// loop over all variable definitions
if (hasVariableOutDefinitions()) {
for (VariableOutDefinitionImpl variableOutDefinition: variableOutDefinitions) {
String variableName = variableOutDefinition.getName();
if (variableName!=null) {
ScriptManager scriptManager = Environment.getFromCurrent(ScriptManager.class);
// TODO update evaluateExpression so that scopeInstance can be passed in directly
String expression = variableOutDefinition.getExpression();
String language = variableOutDefinition.getLanguage();
Object value = scriptManager.evaluateExpression(expression, language);
outerExecution.setVariable(variableName, value);
}
}
}
}