private function createWorkload(TaskInterface $task)
    {
        // TODO get from additional form of handler
        $workload = [];

        $optionsResolver = new OptionsResolver();
        $optionsResolver->setDefaults(
            [
                'class' => $task->getEntityClass(),
                'id' => $task->getEntityId(),
                'locale' => $task->getLocale(),
            ]
        );

        $handler = $this->taskHandlerFactory->create($task->getHandlerClass());
        if (!$handler instanceof AutomationTaskHandlerInterface) {
            throw new TaskHandlerNotSupportedException($handler, $task);
        }

        $optionsResolver = $handler->configureOptionsResolver($optionsResolver);

        return $optionsResolver->resolve($workload);
    }