0
votes

My requirement is,Fire 2nd rule then stop the process without firing 3rd rule

In the middle of jBPM process by using RuleFlow group(contains 3 rules) and fire the 1st rule and completed that rule then give the control to jBPM process and then fire 2nd rule again continue the jB[M process and so on....so how could it will be done ?

ex:

1.Drool Rule :

rule "Paycheck"

ruleflow-group "Order_flow"
when
    $process: WorkflowProcessInstance()

    OrderDetails(price<=1000)from $process.getVariable("orderDetails")

then 

    System.out.println("****** This is Paycheck  from rule ******\n");
    $process.setVariable("price", 2000);

end

2.jBPM process(BPMN2) :

start ---> workflowProcessInstance(data available in kcontext)--->ruleflowgroup(with 3 rules)---->Fire 1st rule --->paycheck(Script task)---->Fire 2nd rule --->Fraudcheck(Script task)-->Fire 3rd rule---->inventorycheck(Script task)----> end

1

1 Answers

0
votes

You cannot tell the rule engine which rule to fire, the engine will decide what to fire based on the RuleFlowGroup active and the data that is inside the session.

HTH