subContextInstance.setTransientVariables(superContextInstance.getTransientVariables());
// loop over all the variable accesses
Iterator iter = variableAccesses.iterator();
while (iter.hasNext()) {
VariableAccess variableAccess = (VariableAccess) iter.next();
// if this variable access is readable
if (variableAccess.isReadable()) {
// the variable is copied from the super process variable name
// to the sub process mapped name
String variableName = variableAccess.getVariableName();
Object value = superContextInstance.getVariable(variableName, superProcessToken);
String mappedName = variableAccess.getMappedName();
log.debug("copying super process var '"+variableName+"' to sub process var '"+mappedName+"': "+value);
if (value!=null) {
subContextInstance.setVariable(mappedName, value);
}
}