Search in sources :

Example 21 with DroolsConsequenceAction

use of org.jbpm.workflow.core.impl.DroolsConsequenceAction in project jbpm by kiegroup.

the class HumanTaskNodeFactory method timer.

public HumanTaskNodeFactory timer(String delay, String period, String dialect, String action) {
    Timer timer = new Timer();
    timer.setDelay(delay);
    timer.setPeriod(period);
    getHumanTaskNode().addTimer(timer, new DroolsConsequenceAction(dialect, action));
    return this;
}
Also used : Timer(org.jbpm.process.core.timer.Timer) DroolsConsequenceAction(org.jbpm.workflow.core.impl.DroolsConsequenceAction)

Example 22 with DroolsConsequenceAction

use of org.jbpm.workflow.core.impl.DroolsConsequenceAction in project jbpm by kiegroup.

the class MilestoneNodeFactory method timer.

public MilestoneNodeFactory timer(String delay, String period, String dialect, String action) {
    Timer timer = new Timer();
    timer.setDelay(delay);
    timer.setPeriod(period);
    getMilestoneNode().addTimer(timer, new DroolsConsequenceAction(dialect, action));
    return this;
}
Also used : Timer(org.jbpm.process.core.timer.Timer) DroolsConsequenceAction(org.jbpm.workflow.core.impl.DroolsConsequenceAction)

Example 23 with DroolsConsequenceAction

use of org.jbpm.workflow.core.impl.DroolsConsequenceAction in project jbpm by kiegroup.

the class MilestoneNodeFactory method onExitAction.

public MilestoneNodeFactory onExitAction(String dialect, String action) {
    if (getMilestoneNode().getActions(dialect) != null) {
        getMilestoneNode().getActions(dialect).add(new DroolsConsequenceAction(dialect, action));
    } else {
        List<DroolsAction> actions = new ArrayList<DroolsAction>();
        actions.add(new DroolsConsequenceAction(dialect, action));
        getMilestoneNode().setActions(MilestoneNode.EVENT_NODE_EXIT, actions);
    }
    return this;
}
Also used : DroolsAction(org.jbpm.workflow.core.DroolsAction) DroolsConsequenceAction(org.jbpm.workflow.core.impl.DroolsConsequenceAction) ArrayList(java.util.ArrayList)

Example 24 with DroolsConsequenceAction

use of org.jbpm.workflow.core.impl.DroolsConsequenceAction in project jbpm by kiegroup.

the class RuleFlowProcessFactory method exceptionHandler.

public RuleFlowProcessFactory exceptionHandler(String exception, String dialect, String action) {
    ActionExceptionHandler exceptionHandler = new ActionExceptionHandler();
    exceptionHandler.setAction(new DroolsConsequenceAction(dialect, action));
    return exceptionHandler(exception, exceptionHandler);
}
Also used : DroolsConsequenceAction(org.jbpm.workflow.core.impl.DroolsConsequenceAction) ActionExceptionHandler(org.jbpm.process.core.context.exception.ActionExceptionHandler)

Example 25 with DroolsConsequenceAction

use of org.jbpm.workflow.core.impl.DroolsConsequenceAction in project jbpm by kiegroup.

the class CompositeNodeFactory method exceptionHandler.

public CompositeNodeFactory exceptionHandler(String exception, String dialect, String action) {
    ActionExceptionHandler exceptionHandler = new ActionExceptionHandler();
    exceptionHandler.setAction(new DroolsConsequenceAction(dialect, action));
    return exceptionHandler(exception, exceptionHandler);
}
Also used : DroolsConsequenceAction(org.jbpm.workflow.core.impl.DroolsConsequenceAction) ActionExceptionHandler(org.jbpm.process.core.context.exception.ActionExceptionHandler)

Aggregations

DroolsConsequenceAction (org.jbpm.workflow.core.impl.DroolsConsequenceAction)73 ActionNode (org.jbpm.workflow.core.node.ActionNode)41 DroolsAction (org.jbpm.workflow.core.DroolsAction)40 ArrayList (java.util.ArrayList)32 EndNode (org.jbpm.workflow.core.node.EndNode)28 StartNode (org.jbpm.workflow.core.node.StartNode)25 RuleFlowProcess (org.jbpm.ruleflow.core.RuleFlowProcess)24 Action (org.jbpm.process.instance.impl.Action)21 EventTypeFilter (org.jbpm.process.core.event.EventTypeFilter)18 Test (org.junit.Test)18 AbstractBaseTest (org.jbpm.test.util.AbstractBaseTest)17 ConnectionImpl (org.jbpm.workflow.core.impl.ConnectionImpl)17 KieSession (org.kie.api.runtime.KieSession)17 ProcessContext (org.kie.api.runtime.process.ProcessContext)17 EventNode (org.jbpm.workflow.core.node.EventNode)16 Timer (org.jbpm.process.core.timer.Timer)11 Variable (org.jbpm.process.core.context.variable.Variable)10 ObjectDataType (org.jbpm.process.core.datatype.impl.type.ObjectDataType)10 TestProcessEventListener (org.jbpm.process.test.TestProcessEventListener)9 KnowledgeBuilderImpl (org.drools.compiler.builder.impl.KnowledgeBuilderImpl)8