public function onTaskSerialize(ObjectEvent $event)
    {
        $object = $event->getObject();
        if (!$object instanceof TaskInterface) {
            return;
        }

        $handler = $this->handlerFactory->create($object->getHandlerClass());
        if ($handler instanceof AutomationTaskHandlerInterface) {
            $event->getVisitor()->addData('taskName', $handler->getConfiguration()->getTitle());
        }

        $executions = $this->taskExecutionRepository->findByTaskUuid($object->getTaskId());
        if (0 < count($executions)) {
            $event->getVisitor()->addData('status', $executions[0]->getStatus());
        }
    }