cancel
Showing results for 
Search instead for 
Did you mean: 

Timer boundary event behavior

rwa
Champ in-the-making
Champ in-the-making
Hi,

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.

Thanks,
1 ACCEPTED ANSWER

jbarrez
Star Contributor
Star Contributor
"Why this is the default behavior ?"

Because Alfresco Share stored task local and not execution local. This is not the defult in Activiti.

The solution would be to add your listener of task complete as an execution listener to the sequence flow going out of the timer boundary event.

View answer in original post

1 REPLY 1

jbarrez
Star Contributor
Star Contributor
"Why this is the default behavior ?"

Because Alfresco Share stored task local and not execution local. This is not the defult in Activiti.

The solution would be to add your listener of task complete as an execution listener to the sequence flow going out of the timer boundary event.