public function transitionAction(Request $request)
    {
        $id = $request->get('id');
        $assignedUserId = $request->get('recipient');
        $name = $request->get('name');
        $comment = $request->get('comment');

        if ($comment) {
            $comment = urldecode($comment);
        }

        $taskManager = $this->get('phlexible_task.task_manager');
        $userManager = $this->get('phlexible_user.user_manager');

        $assignUser = null;
        if ($assignedUserId) {
            $assignUser = $userManager->find($assignedUserId);
        }

        $task = $taskManager->find($id);
        $taskManager->updateTask($task, $this->getUser(), $name, $assignUser, $comment);

        return new ResultResponse(true, 'Task transition created.', array('task' => $this->serializeTask($task)));
    }