AnsweredAssumed Answered

Timer boundary event behavior

Question asked by rwa on Apr 27, 2016
Latest reply on May 3, 2016 by jbarrez

I use Activiti 5.13 (bundled in Alfresco 4.2.e).
I have a question about boundary event behavior.

Let's imagine a process definition containing a user task on which a timer boundary event is defined. We also add complete event listeners on each user tasks in order to save all task variables into execution variables. We do this so that variables updates performed in a task are available later in the workflow (in all following tasks).
Then this process is instantiated and started. The process enters the user task with the timer boundary event.
The user fills some fields of the form and save it (Note we use Alfresco Share forms). This action sets fields values into TASK variables.
Finally the timer boundary event is fired, the task is interrupted and the process proceeds. But the task variables are not passed in the execution variables because the complete event of the task is not fired. So the following task form does not display variables updated by the preceding task.
This means that all your work is lost.
This sounds a very strange behavior for any application.

Why this is the default behavior ?
What would be the best practice to resolve this problem (i.e. whatever the interruption of a user task, all task variables are available later on) ?
I searched a lot about this topic. The only advisable solution should be to extend the DefaultActivityBehaviorFactory to override the BoundaryEventActivityBehavior with a custom behavior.