@camunda can someone explain this system behaviour (and assuming this is not a bug, the reasoning/use case).
Consider the following:
“create variable”: contains the following javascript:
execution.setVariable("myTestVar", "value123");
“Create second variable”: contains the following javascript:
execution.setVariable("myTestVar2", myTestVar);
If you run this, no errors are thrown and myTestVar2
is created with the process variable value of myTestVar
. Why is the myTestVar value available to the second task when it is placed as the value parameter of the setVariable()
method?
If the second task’s script was just:
myTestVar;
the script would error out and not be able to find the variable.
Is this the expected behaviour? if so, why?
Thanks!