cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti loses context in a loop

cnirparis
Champ in-the-making
Champ in-the-making
Hello everyone.

I have an userTask using a Javabean (already initialized).
It has a TimerBoundaryEvent attached to it, set with "R/PT5M", which means it is fired every 5 minutes.
A sequence flow goes form the timer to a mailTask, and an other returns back from the mailTask to the userTask.
So I have a loop.
The problem is that when it returns back to the userTask, Activiti cannot find the Java Bean and generates an exception :

org.activiti.engine.ActivitiException: Error while evaluating expression: ${MyBean.MyValue}

I have also noticed in the log that it reprocess the xml bpmn resource, as if it were deployed again.
It seems it reinitializes the execution context.

I have tried with "cancelActivity=false" and "cancelActivity=true"  in the TimerBoundaryEvent without any change .
Does it means that the userTask is deleted (if "yes") or not (if "no") when it returns back after looping ?
Why Activiti reprocesses the Bpmn xml file ?

Thank you if anyone has any clue.
1 REPLY 1

mikedias
Champ in-the-making
Champ in-the-making
Hi,

The attribute "cancelActivity" specify if the userTask will be deleted or not.

I believe that in you case, you can use a timerBoundaryEvent with cancelActivity=false without a loop.