protected void mapDynamicOutputData(Map<String, Object> results) { if (results != null && !results.isEmpty()) { VariableScope variableScope = (VariableScope) ((ContextContainer) getProcessInstance().getProcess()).getDefaultContext( VariableScope.VARIABLE_SCOPE ); VariableScopeInstance variableScopeInstance = (VariableScopeInstance)getProcessInstance().getContextInstance(VariableScope.VARIABLE_SCOPE); for (Entry<String, Object> result : results.entrySet()) { String variableName = result.getKey(); Variable variable = variableScope.findVariable(variableName); if (variable == null) { // check if there is any match for case file data variableName = VariableScope.CASE_FILE_PREFIX + variableName; // check only those that are defined and avoid dynamically created case file variables List<String> definedVariables = Arrays.asList(variableScope.getVariableNames()); if (definedVariables.contains(variableName)) { variable = variableScope.findVariable(variableName); } } if (variable != null) { variableScopeInstance.getVariableScope().validateVariable(getProcessInstance().getProcessName(), variableName, result.getValue()); variableScopeInstance.setVariable(variableName, result.getValue()); } } } } }
validateWorkItemResultVariable(getProcessInstance().getProcessName(), workItemNode.getOutAssociations(), workItem); for (Iterator<DataAssociation> iterator = getWorkItemNode().getOutAssociations().iterator(); iterator.hasNext();) { DataAssociation association = iterator.next(); if (variableScopeInstance != null && parameterValue != null) { variableScopeInstance.getVariableScope().validateVariable(getProcessInstance().getProcessName(), association.getTarget(), parameterValue); value = dataType.readValue((String) value); } else { variableScopeInstance.getVariableScope().validateVariable(getProcessInstance().getProcessName(), association.getTarget(), value);
protected void mapDynamicOutputData(Map<String, Object> results) { if (results != null && !results.isEmpty()) { VariableScope variableScope = (VariableScope) ((ContextContainer) getProcessInstance().getProcess()).getDefaultContext( VariableScope.VARIABLE_SCOPE ); VariableScopeInstance variableScopeInstance = (VariableScopeInstance)getProcessInstance().getContextInstance(VariableScope.VARIABLE_SCOPE); for (Entry<String, Object> result : results.entrySet()) { String variableName = result.getKey(); Variable variable = variableScope.findVariable(variableName); if (variable == null) { // check if there is any match for case file data variableName = VariableScope.CASE_FILE_PREFIX + variableName; // check only those that are defined and avoid dynamically created case file variables List<String> definedVariables = Arrays.asList(variableScope.getVariableNames()); if (definedVariables.contains(variableName)) { variable = variableScope.findVariable(variableName); } } if (variable != null) { variableScopeInstance.getVariableScope().validateVariable(getProcessInstance().getProcessName(), variableName, result.getValue()); variableScopeInstance.setVariable(variableName, result.getValue()); } } } } }
validateWorkItemResultVariable(getProcessInstance().getProcessName(), workItemNode.getOutAssociations(), workItem); for (Iterator<DataAssociation> iterator = getWorkItemNode().getOutAssociations().iterator(); iterator.hasNext();) { DataAssociation association = iterator.next(); if (variableScopeInstance != null && parameterValue != null) { variableScopeInstance.getVariableScope().validateVariable(getProcessInstance().getProcessName(), association.getTarget(), parameterValue); value = dataType.readValue((String) value); } else { variableScopeInstance.getVariableScope().validateVariable(getProcessInstance().getProcessName(), association.getTarget(), value);