use of io.automatiko.engine.workflow.base.core.context.variable.Variable in project automatiko-engine by automatiko-io.
the class ForEachNode method setVariable.
public void setVariable(String variableName, DataType type) {
this.variableName = variableName;
VariableScope variableScope = (VariableScope) getCompositeNode().getDefaultContext(VariableScope.VARIABLE_SCOPE);
List<Variable> variables = variableScope.getVariables();
if (variables == null) {
variables = new ArrayList<Variable>();
variableScope.setVariables(variables);
}
Variable variable = new Variable();
variable.setId((String) getMetaData().getOrDefault("MIInput", variableName));
variable.setName(variableName);
variable.setType(type);
variables.add(variable);
}
use of io.automatiko.engine.workflow.base.core.context.variable.Variable in project automatiko-engine by automatiko-io.
the class ForEachNode method setOutputVariable.
public void setOutputVariable(String variableName, DataType type) {
this.outputVariableName = variableName;
VariableScope variableScope = (VariableScope) getCompositeNode().getDefaultContext(VariableScope.VARIABLE_SCOPE);
List<Variable> variables = variableScope.getVariables();
if (variables == null) {
variables = new ArrayList<Variable>();
variableScope.setVariables(variables);
}
Variable variable = new Variable();
variable.setId((String) getMetaData().getOrDefault("MIOutput", variableName));
variable.setName(variableName);
variable.setType(type);
variables.add(variable);
Variable tmpvariable = new Variable();
tmpvariable.setId("foreach_output");
tmpvariable.setName("foreach_output");
tmpvariable.setType(type);
variables.add(tmpvariable);
}
Aggregations