cancel
Showing results for 
Search instead for 
Did you mean: 

setVariable makes the variable local to a task?

lmollea
Champ in-the-making
Champ in-the-making
Hi all,

I have a process with two task (A and B) in sequence. When task B completes, there are two possible routes based on value of a process variable (X). If X has a certain value, then the process continue, else it goes into a signal catching event which will loop back the process into task A again when the signal is raised.

Task B sometimes sets a value of another variable (Y). The subsequent execution of task A always find the value of variable Y unchanged.

Is that the expected behaviour?

To set the value of variable Y, in Task B (a ServiceTask) I call setVariable(String, Object) on the DelegateExecution context.
Should I instead use
DelegateExecution.getEngineServices().getRuntimeService().setVariable(executionId, variableName, value)
to achieve this?

Using Activiti 5.14

Thanks
1 REPLY 1

lmollea
Champ in-the-making
Champ in-the-making
Forget this, it was a well hidden typo between the two tasks…