cancel
Showing results for 
Search instead for 
Did you mean: 

Extending the Activiti Designer - Custom (User) Tasks

thensgens
Champ in-the-making
Champ in-the-making
Hello,

regarding the designer's extensibility , I'm trying to add a new (user) task in the designer. According to the documentation, this step will only allow new custom task to be treated as regular service tasks, but specifically in my case this is  not really what I want.
My (new user) task should be able to react as a regular user task, hence offer completion of these tasks via the (already existing) REST interface, support status querying etc.
Service tasks, however, are treated very differently in activiti from my understanding: service tasks cannot be queried, they cannot be completed externally and so on (which makes sense after all).

Is there a workaround to add the desired behaviour for the custom tasks?
2 REPLIES 2

jbarrez
Star Contributor
Star Contributor
UserTasks are implemented as service tasks under the covers. Check the UserTaskActivityBehaviour.

You can customize the behaviour and replace it with your own using the ActivityBehaviourFactory pluggability.

thensgens
Champ in-the-making
Champ in-the-making
Interesting, thanks.
From my understanding, the TaskService merely provides 'access' to user task (which are apparently service task under the hood, but are certainly treated differently since only these tasks are changeable in the task service), so I have to somehow allow newly specified tasks (by extending the Activiti Designer) to be treated as 'user tasks'. By extending the Activiti Designer, the generated output of a custom task uses the xml tag 'serviceTask', while your regular 'user task' uses 'userTask' as an XML tag representation.