cancel
Showing results for 
Search instead for 
Did you mean: 

complete the task at once after it created

woodfox
Champ in-the-making
Champ in-the-making
so, my requirement is :

we are using many multi instance human task to create task instance dynamically and we have a custom subclass of ParallelMultiInstanceBehavior to call a userhandler for retrieving the assignees from our database to Collection property before task user assignment, it works fine in this way.

however, in some cases, our  userhandler may found no man for the task node, in this case,  we hope :

1, don't create any task instance so we can just skip the task node, and to the next node.

or 2, we can still create only one task instance with an assignee : "SKIP" or "AUTO", and then complete it at once.


we have no idea for first way so we just using the second way, the problem is :

when can we complete the task just created ?    I have tried to complete it in activitieventListener at "TASK_CREATED" event, however it will cause the task data corrupted, so we have to use a time scheduler to do this behavior for now,

we still hope there is a event point so that we can use it to complete the task.

any suggestion ? thanks !
2 REPLIES 2

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,
I would prefer option 1,
https://github.com/Activiti/Activiti/pull/364

Regards
Martin

woodfox
Champ in-the-making
Champ in-the-making
thanks, that's indeed what I want.