cancel
Showing results for 
Search instead for 
Did you mean: 

Process Variables / Subprocess

dognose
Champ in-the-making
Champ in-the-making
Hello,

Is there a seperate Scope of Process Variables for embedded subprocesses?
(Like "inheriting" Process Variables on creation, but then work with an "own" Pool of process variables)

Local Task variables are lost, if the task is completed. (Any chance to "pass" local variables
to next upcoming execution without doing it manually?)

Background: A certain SubProcess can be invoked multiple times during my main process. For usability reasons
i don't want to model the SubProcess as a normal Process. This would solve the scope issue, but i want the
tasks of the subprocess(es) to be shown as tasks of the main process.

best regards,
dognose
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
An embedded-subprocess creates an extra scope, with the ability to store it's own local variables. However, all "setVariable()" calls on the sub-process will create the variables on the parent-process, only setVariableLocal() will set values on the sub-proc-scope (unless the sub-proc-scope already contains a local value for that variable).

Task-local variables (and any scope-variables) are lost when task/scope is completed/destroyed. So ANY local values you want to keep, you should manually added to the parent-scope (eg. using task-listener on event=complete). There is no automatic way for doing this…