Search in sources :

Example 31 with DataAssociation

use of io.automatiko.engine.workflow.process.core.node.DataAssociation in project automatiko-engine by automatiko-io.

the class CompositeContextNodeFactory method inMappingWithJqAssignment.

public CompositeContextNodeFactory inMappingWithJqAssignment(String stateDataFilter) {
    Assignment inputAssignment = new Assignment("jq", "", "");
    inputAssignment.setMetaData("Action", new InputJqAssignmentAction(stateDataFilter));
    getCompositeNode().addInAssociation(new DataAssociation(Collections.emptyList(), "", Arrays.asList(inputAssignment), null));
    return this;
}
Also used : Assignment(io.automatiko.engine.workflow.process.core.node.Assignment) DataAssociation(io.automatiko.engine.workflow.process.core.node.DataAssociation) InputJqAssignmentAction(io.automatiko.engine.workflow.base.instance.impl.jq.InputJqAssignmentAction)

Example 32 with DataAssociation

use of io.automatiko.engine.workflow.process.core.node.DataAssociation in project automatiko-engine by automatiko-io.

the class MappableNodeFactory method outMappingWithJqAssignment.

default MappableNodeFactory outMappingWithJqAssignment(String outputExpression, String scopeExpression, boolean ignoreScopeExpression) {
    Assignment outAssignment = new Assignment("jq", null, null);
    outAssignment.setMetaData("Action", new TaskOutputJqAssignmentAction(outputExpression, scopeExpression, ignoreScopeExpression));
    getMappableNode().addOutAssociation(new DataAssociation(Collections.emptyList(), "", Arrays.asList(outAssignment), null));
    return this;
}
Also used : Assignment(io.automatiko.engine.workflow.process.core.node.Assignment) DataAssociation(io.automatiko.engine.workflow.process.core.node.DataAssociation) TaskOutputJqAssignmentAction(io.automatiko.engine.workflow.base.instance.impl.jq.TaskOutputJqAssignmentAction)

Example 33 with DataAssociation

use of io.automatiko.engine.workflow.process.core.node.DataAssociation in project automatiko-engine by automatiko-io.

the class StartNodeFactory method outMapping.

public StartNodeFactory outMapping(String source, String target, String assignmentDialect, String assignmentFrom, String assignmentTo) {
    List<Assignment> assignments = null;
    if (assignmentFrom != null && assignmentTo != null) {
        assignments = Arrays.asList(new Assignment(assignmentDialect, assignmentFrom, assignmentTo));
    }
    DataAssociation dataAssociation = new DataAssociation(source, target, assignments, null);
    getStartNode().addOutAssociation(dataAssociation);
    return this;
}
Also used : Assignment(io.automatiko.engine.workflow.process.core.node.Assignment) DataAssociation(io.automatiko.engine.workflow.process.core.node.DataAssociation)

Aggregations

DataAssociation (io.automatiko.engine.workflow.process.core.node.DataAssociation)33 Assignment (io.automatiko.engine.workflow.process.core.node.Assignment)20 DataTransformer (io.automatiko.engine.api.runtime.process.DataTransformer)14 Transformation (io.automatiko.engine.workflow.process.core.node.Transformation)14 Map (java.util.Map)13 ArrayList (java.util.ArrayList)12 HashMap (java.util.HashMap)11 VariableScopeInstance (io.automatiko.engine.workflow.base.instance.context.variable.VariableScopeInstance)10 NodeInstanceResolverFactory (io.automatiko.engine.workflow.process.instance.impl.NodeInstanceResolverFactory)9 ExpressionEvaluator (io.automatiko.engine.api.expression.ExpressionEvaluator)7 Variable (io.automatiko.engine.workflow.base.core.context.variable.Variable)7 WorkflowProcess (io.automatiko.engine.workflow.process.core.WorkflowProcess)7 Matcher (java.util.regex.Matcher)7 LinkedList (java.util.LinkedList)6 List (java.util.List)6 Element (org.w3c.dom.Element)6 NullLiteralExpr (com.github.javaparser.ast.expr.NullLiteralExpr)4 StringLiteralExpr (com.github.javaparser.ast.expr.StringLiteralExpr)4 DataType (io.automatiko.engine.api.workflow.datatype.DataType)4 DataTransformerRegistry (io.automatiko.engine.workflow.base.core.impl.DataTransformerRegistry)4