setVariable makes the variable local to a task?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2014 08:51 AM
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
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
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2014 09:23 AM
Forget this, it was a well hidden typo between the two tasks…
