Search in sources :

Example 1 with JsonVariableScope

use of io.automatiko.engine.workflow.base.core.context.variable.JsonVariableScope in project automatiko-engine by automatiko-io.

the class ServerlessWorkflowFactory method subProcessNode.

public CompositeContextNode subProcessNode(long id, String name, NodeContainer nodeContainer) {
    CompositeContextNode subProcessNode = new CompositeContextNode();
    subProcessNode.setId(id);
    subProcessNode.setName(name);
    subProcessNode.setAutoComplete(true);
    subProcessNode.setMetaData(UNIQUE_ID_PARAM, Long.toString(subProcessNode.getId()));
    JsonVariableScope variableScope = new JsonVariableScope();
    subProcessNode.addContext(variableScope);
    subProcessNode.setDefaultContext(variableScope);
    nodeContainer.addNode(subProcessNode);
    return subProcessNode;
}
Also used : CompositeContextNode(io.automatiko.engine.workflow.process.core.node.CompositeContextNode) JsonVariableScope(io.automatiko.engine.workflow.base.core.context.variable.JsonVariableScope)

Example 2 with JsonVariableScope

use of io.automatiko.engine.workflow.base.core.context.variable.JsonVariableScope in project automatiko-engine by automatiko-io.

the class CompositeContextNodeFactory method setVariableScope.

protected void setVariableScope(NodeContainer nodeContainer, CompositeContextNode node) {
    if (nodeContainer instanceof ServerlessExecutableProcess) {
        JsonVariableScope variableScope = new JsonVariableScope();
        node.addContext(variableScope);
        node.setDefaultContext(variableScope);
    }
}
Also used : JsonVariableScope(io.automatiko.engine.workflow.base.core.context.variable.JsonVariableScope) ServerlessExecutableProcess(io.automatiko.engine.workflow.process.executable.core.ServerlessExecutableProcess)

Aggregations

JsonVariableScope (io.automatiko.engine.workflow.base.core.context.variable.JsonVariableScope)2 CompositeContextNode (io.automatiko.engine.workflow.process.core.node.CompositeContextNode)1 ServerlessExecutableProcess (io.automatiko.engine.workflow.process.executable.core.ServerlessExecutableProcess)1