What is the difference between setVariable and setVariableLocal methods in activiti? and when will use these methods.
Asked
Active
Viewed 2,118 times
5
-
This link may help you to find the difference https://www.activiti.org/javadocs/6.latest/org/activiti/engine/delegate/variablescope#setVariable(java.lang.String,%20java.lang.Object) – Sana Sep 08 '18 at 09:41
2 Answers
6
the difference is the scope. When you set a variable local its scope is the current execution only (user task for example). When you set it (without) scope that variable will be able to be used in all the process instance associated executions.
Hope this helps

salaboy
- 4,123
- 1
- 14
- 15
1
As like concept of transient and persist variable.
Transient variable is available only for current scope.
Persistant variable. is get stored in DB so we can access anytime.

Developer
- 150
- 2
- 12