Hi all,
I have a question about process variables behavior in parallel flows and exception handling.
Scenario:
- The parent process has a process variable (pv!x) initialized with value = 5.
- The process splits into two parallel branches.
- Both branches start with pv!x = 5.
Then:
- Branch A continues execution, updates pv!x, and reaches the merge point.
- The parent process continues and later updates pv!x = 6.
- Meanwhile, Branch B is still active and waiting in a task (for example, a user input or a task with an exception flow handling an error).
Question:
Will Branch B see the updated value (pv!x = 6) while it is still in that task/exception state, or will it continue working with the original value (pv!x = 5) that was evaluated when the branch started?
In other words:
Are process variables dynamically re-evaluated for already running parallel activities, or do they keep the value from the moment the activity started?
Thanks in advance!
Discussion posts and replies are publicly visible
Within a single process model, process variables (PVs) are global in scope. So, if Branch A updates pv!x to 6, then Branch B will see pv!x = 6, assuming the update has already occurred, because both branches are working on the same shared process state.
However, when you introduce a subprocess (child process) in a branch, the behavior is different. At the moment the subprocess starts, it receives a copy of the process variable values from the parent.If pv!x is still 5 at that time, the subprocess will receive 5, even if the parent updates pv!x to 6 later.Therefore, subprocess interactions behave like pass-by-value, not pass-by-reference. Because:The child process receives a snapshot of the data at invocation time and It does not automatically see future updates made in the parent process.