public ContextInstance getContextInstance(String contextId) { ContextInstance contextInstance = this.contextInstances.get(contextId); if (contextInstance != null) { return contextInstance; } Context context = getCompositeContextNode().getDefaultContext(contextId); if (context != null) { contextInstance = getContextInstance(context); return contextInstance; } return null; }
@Override public Context getContext(String contextType) { Context context = getCompositeNode().getDefaultContext(contextType); if (context != null) { return context; } return super.getContext(contextType); }
public Context resolveContext(String contextId, Object param) { Context context = getDefaultContext(contextId); if (context != null) { context = context.resolveContext(param); if (context != null) { return context; } } return super.resolveContext(contextId, param); }
public DataType getOutputVariableType() { if (outputVariableName == null) { return null; } for (Variable variable: ((VariableScope) getCompositeNode().getDefaultContext(VariableScope.VARIABLE_SCOPE)).getVariables()) { if (outputVariableName.equals(variable.getName())) { return variable.getType(); } } return null; }
public DataType getVariableType() { if (variableName == null) { return null; } for (Variable variable: ((VariableScope) getCompositeNode().getDefaultContext(VariableScope.VARIABLE_SCOPE)).getVariables()) { if (variableName.equals(variable.getName())) { return variable.getType(); } } return null; }
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.setName(variableName); variable.setType(type); variables.add(variable); }
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.setName(variableName); variable.setType(type); variables.add(variable); Variable tmpvariable = new Variable(); tmpvariable.setName("foreach_output"); tmpvariable.setType(type); variables.add(tmpvariable); }
if (compositeNode instanceof CompositeContextNode) { VariableScope variableScope = (VariableScope) ((CompositeContextNode) compositeNode).getDefaultContext(VariableScope.VARIABLE_SCOPE); if (variableScope != null) { List<Variable> variables = variableScope.getVariables(); ((CompositeContextNode) compositeNode).getDefaultContext(ExceptionScope.EXCEPTION_SCOPE); if (exceptionScope != null) { XmlWorkflowProcessDumper.visitExceptionHandlers(
compositeNode.getDefaultContext(VariableScope.VARIABLE_SCOPE); if (variableScope != null && !variableScope.getVariables().isEmpty()) { xmlDump.append(" <!-- variables -->" + EOL);
public DynamicNodeFactory exceptionHandler(String exception, ExceptionHandler exceptionHandler) { ExceptionScope exceptionScope = (ExceptionScope) getCompositeNode().getDefaultContext(ExceptionScope.EXCEPTION_SCOPE); if (exceptionScope == null) { exceptionScope = new ExceptionScope(); getCompositeNode().addContext(exceptionScope); getCompositeNode().setDefaultContext(exceptionScope); } exceptionScope.setExceptionHandler(exception, exceptionHandler); return this; }
public CompositeNodeFactory exceptionHandler(String exception, ExceptionHandler exceptionHandler) { ExceptionScope exceptionScope = (ExceptionScope) getCompositeNode().getDefaultContext(ExceptionScope.EXCEPTION_SCOPE); if (exceptionScope == null) { exceptionScope = new ExceptionScope(); getCompositeNode().addContext(exceptionScope); getCompositeNode().setDefaultContext(exceptionScope); } exceptionScope.setExceptionHandler(exception, exceptionHandler); return this; }
public DynamicNodeFactory variable(String name, DataType type, Object value) { Variable variable = new Variable(); variable.setName(name); variable.setType(type); variable.setValue(value); VariableScope variableScope = (VariableScope) getCompositeNode().getDefaultContext(VariableScope.VARIABLE_SCOPE); if (variableScope == null) { variableScope = new VariableScope(); getCompositeNode().addContext(variableScope); getCompositeNode().setDefaultContext(variableScope); } variableScope.getVariables().add(variable); return this; }
public CompositeNodeFactory variable(String name, DataType type, Object value) { Variable variable = new Variable(); variable.setName(name); variable.setType(type); variable.setValue(value); VariableScope variableScope = (VariableScope) getCompositeNode().getDefaultContext(VariableScope.VARIABLE_SCOPE); if (variableScope == null) { variableScope = new VariableScope(); getCompositeNode().addContext(variableScope); getCompositeNode().setDefaultContext(variableScope); } variableScope.getVariables().add(variable); return this; }
VariableScope v = (VariableScope) ((CompositeContextNode) node).getDefaultContext(VariableScope.VARIABLE_SCOPE); ((VariableScope) ((CompositeContextNode) forEachNode.internalGetNode(2)).getDefaultContext(VariableScope.VARIABLE_SCOPE)).setVariables(v.getVariables()); node = forEachNode; handleForEachNode(node, element, uri, localName, parser, isAsync);
public ContextInstance getContextInstance(String contextId) { ContextInstance contextInstance = this.contextInstances.get(contextId); if (contextInstance != null) { return contextInstance; } Context context = getCompositeContextNode().getDefaultContext(contextId); if (context != null) { contextInstance = getContextInstance(context); return contextInstance; } return null; }
public Context resolveContext(String contextId, Object param) { Context context = getDefaultContext(contextId); if (context != null) { context = context.resolveContext(param); if (context != null) { return context; } } return super.resolveContext(contextId, param); }
@Override public Context getContext(String contextType) { Context context = getCompositeNode().getDefaultContext(contextType); if (context != null) { return context; } return super.getContext(contextType); }
public DataType getOutputVariableType() { if (outputVariableName == null) { return null; } for (Variable variable: ((VariableScope) getCompositeNode().getDefaultContext(VariableScope.VARIABLE_SCOPE)).getVariables()) { if (outputVariableName.equals(variable.getName())) { return variable.getType(); } } return null; }
public DynamicNodeFactory exceptionHandler(String exception, ExceptionHandler exceptionHandler) { ExceptionScope exceptionScope = (ExceptionScope) getCompositeNode().getDefaultContext(ExceptionScope.EXCEPTION_SCOPE); if (exceptionScope == null) { exceptionScope = new ExceptionScope(); getCompositeNode().addContext(exceptionScope); getCompositeNode().setDefaultContext(exceptionScope); } exceptionScope.setExceptionHandler(exception, exceptionHandler); return this; }
public CompositeNodeFactory exceptionHandler(String exception, ExceptionHandler exceptionHandler) { ExceptionScope exceptionScope = (ExceptionScope) getCompositeNode().getDefaultContext(ExceptionScope.EXCEPTION_SCOPE); if (exceptionScope == null) { exceptionScope = new ExceptionScope(); getCompositeNode().addContext(exceptionScope); getCompositeNode().setDefaultContext(exceptionScope); } exceptionScope.setExceptionHandler(exception, exceptionHandler); return this; }