cancel
Showing results for 
Search instead for 
Did you mean: 

Task deletion semantics

bwd
Champ in-the-making
Champ in-the-making
Hi,

Can someone describe the effects of calling TaskService.deleteTask() wrt process execution?  The javadoc on the method doesn't go into details.  The only thing in the user guide that seems relevant is the description of multi-instance tasks and completionCondition, where I find the text "In this example, there will be parallel instances created for each element of the assigneeList collection. However, when 60% of the tasks are completed, the other tasks are deleted and the process continues."  I'm particularly interested in understanding how it differs from just completing the task from a process execution perspective.

Thanks,

bwd
3 REPLIES 3

trademak
Star Contributor
Star Contributor
Hi,

When the multi instance construct is configured with a completion condition of 60%, the execution scope of the multi instance is completed and therefore every outstanding execution within it.
This is different from completing a task, because that's a user action.

Best regards,

bwd
Champ in-the-making
Champ in-the-making
Ok - but how does task deletion differ from task completion (other than the fact that you can modify workflow variables on completion)?

Presumably, both allow workflow to continue, as otherwise you could end up with a stuck process when you deleted a task.

I see that table ACT_HI_TASKINST has a DELETE_REASON_ column, which has values 'deleted' and 'completed' in my database, but other than that and adding workflow variables, is there any difference between task completion and deletion?

Thanks in advance for any additional clarification.

bwd

bwd
Champ in-the-making
Champ in-the-making
I see from forum topic http://forums.activiti.org/en/viewtopic.php?f=6&t=270&start=0&hilit=deleteTask that deleteTask() isn't the correct call.  Instead, the following should be done:

jbarrez wrote:
Closing the task, while providing a reason (eg 'task invalid, John already did this for me') is cleaner and a more traceable approach.

By closing, do you mean complete the task?  If that is the case, how can I differentiate between tasks that have been completed normally by a user and tasks that have been 'cancelled'.

Thanks,

bwd