Subprocess DataObjects created in wrong scope.

Description

A dataobject modeled in a subprocess creates a process variable in the process instance (execution) scope rather than the subprocess (execution) scope. This prevents DataObject names from being reused in processes and subprocesses.

The fix is to make the following change to SubProcessActivityBehavior.java:

From:
Map<String, Object> dataObjectVars = ((ActivityImpl) activity).getVariables();
if (dataObjectVars != null) {
execution.setVariables(dataObjectVars);
}

To:
Map<String, Object> dataObjectVars = ((ActivityImpl) activity).getVariables();
if (dataObjectVars != null) {
execution.setVariablesLocal(dataObjectVars);
}

Environment

None

Assignee

Tijs Rademakers

Reporter

Robert Hafner

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure