Search in sources :

Example 46 with ProcessAction

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

the class ActionNodeFactory method action.

public ActionNodeFactory action(Action action) {
    ProcessAction processAction = new ProcessAction();
    processAction.setMetaData(ACTION, action);
    getActionNode().setAction(processAction);
    return this;
}
Also used : ProcessAction(io.automatiko.engine.workflow.process.core.ProcessAction)

Example 47 with ProcessAction

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

the class StartNodeFactory method timer.

public StartNodeFactory timer(String delay, String period, String date, int timeType) {
    Timer timer = new Timer();
    timer.setDate(date);
    timer.setDelay(delay);
    timer.setPeriod(period);
    timer.setTimeType(timeType);
    getStartNode().setTimer(timer);
    if (nodeContainer instanceof CompositeContextNode) {
        ProcessAction noop = new ProcessAction();
        Action action = kcontext -> {
        };
        noop.wire(action);
        ((CompositeContextNode) nodeContainer).addTimer(timer, noop);
    }
    return this;
}
Also used : ProcessAction(io.automatiko.engine.workflow.process.core.ProcessAction) Arrays(java.util.Arrays) Timer(io.automatiko.engine.workflow.base.core.timer.Timer) Assignment(io.automatiko.engine.workflow.process.core.node.Assignment) Predicate(java.util.function.Predicate) ProcessAction(io.automatiko.engine.workflow.process.core.ProcessAction) NodeContainer(io.automatiko.engine.workflow.process.core.NodeContainer) ExecutableNodeContainerFactory(io.automatiko.engine.workflow.process.executable.core.ExecutableNodeContainerFactory) ProcessContext(io.automatiko.engine.api.runtime.process.ProcessContext) Action(io.automatiko.engine.workflow.base.instance.impl.Action) List(java.util.List) EventTypeFilter(io.automatiko.engine.workflow.base.core.event.EventTypeFilter) DataAssociation(io.automatiko.engine.workflow.process.core.node.DataAssociation) CompositeContextNode(io.automatiko.engine.workflow.process.core.node.CompositeContextNode) StartNode(io.automatiko.engine.workflow.process.core.node.StartNode) Mappable(io.automatiko.engine.workflow.base.core.context.variable.Mappable) EventTrigger(io.automatiko.engine.workflow.process.core.node.EventTrigger) Node(io.automatiko.engine.workflow.process.core.Node) ProcessAction(io.automatiko.engine.workflow.process.core.ProcessAction) Action(io.automatiko.engine.workflow.base.instance.impl.Action) Timer(io.automatiko.engine.workflow.base.core.timer.Timer) CompositeContextNode(io.automatiko.engine.workflow.process.core.node.CompositeContextNode)

Aggregations

ProcessAction (io.automatiko.engine.workflow.process.core.ProcessAction)47 ConsequenceAction (io.automatiko.engine.workflow.process.core.impl.ConsequenceAction)30 ActionNode (io.automatiko.engine.workflow.process.core.node.ActionNode)20 EndNode (io.automatiko.engine.workflow.process.core.node.EndNode)18 ArrayList (java.util.ArrayList)18 EventNode (io.automatiko.engine.workflow.process.core.node.EventNode)16 StartNode (io.automatiko.engine.workflow.process.core.node.StartNode)15 EventTypeFilter (io.automatiko.engine.workflow.base.core.event.EventTypeFilter)14 Action (io.automatiko.engine.workflow.base.instance.impl.Action)13 ExecutableProcess (io.automatiko.engine.workflow.process.executable.core.ExecutableProcess)13 Timer (io.automatiko.engine.workflow.base.core.timer.Timer)12 ProcessContext (io.automatiko.engine.api.runtime.process.ProcessContext)11 BoundaryEventNode (io.automatiko.engine.workflow.process.core.node.BoundaryEventNode)11 CancelNodeInstanceAction (io.automatiko.engine.workflow.base.instance.impl.actions.CancelNodeInstanceAction)10 ConnectionImpl (io.automatiko.engine.workflow.process.core.impl.ConnectionImpl)9 Node (io.automatiko.engine.api.definition.process.Node)8 ContextContainer (io.automatiko.engine.workflow.base.core.ContextContainer)7 VariableScope (io.automatiko.engine.workflow.base.core.context.variable.VariableScope)7 EventTrigger (io.automatiko.engine.workflow.process.core.node.EventTrigger)7 WorkItemNode (io.automatiko.engine.workflow.process.core.node.WorkItemNode)7