AnsweredAssumed Answered

Questions around Design pattern and usage of Event Handler which are introduced in 5.15

Question asked by bhuvangupta on Jul 11, 2014
Latest reply on Jul 25, 2014 by jbarrez
[1] We have software system where we can create tasks and these tasks contains data about domain specific stuff.
[2] We want to use Activiti as workflow engine for our tasks.
[3] Also we want that when a process instance is created and task are created in activiti system , tasks in our system should get created with correct assigned people, due date and priorities and also task in activiti should get correct "related content" based on what our system returns.
[4] We also want that we can filter Task for which we need to create corresponding task in our system.
[5] Also give user the ability to create new task in activiti which are not part of a process instance and  user can decide whether he want to create a task in our system for this particular task.
[6] when user is done with the task , he can click a custom button on our system and task in activiti gets completed/or go in different state.

For this we are looking at using Event Handler that were introduced in 5.15.
Our Plan:
[1] Listen for all type of events and when we find an event related to task we either create or update task in our system with same taskId.
[2] Data return by our system is then saved into the task object either in variables or in "related content"
 Is it ok to modify task object in event handlers ?

 How to set/get related content from task object ?

[3] When user is done with work he will click a custom button on our system and we will use rest-api to complete that task in activiti.

Does above design pattern is good for our use case or is there a better way to achieve it ?
What is the best way to filter out task: USECASE STEP [4] and [5].

Thanks for reading this post!