Reputation: 3761
Scenario:
I want to execute multiple Drools
flow one after another.
That is, I've one input, I'll pass it to on my first DRL/XLS file. Output of this first flow will act as input to second DRL.
My question is, does DROOLS have the facility to execute one flow after another in sequence. If so, how?
Till now, I'm guessing to do it via Java code only, which I want to avoid.
Thank You
Upvotes: 1
Views: 2230
Reputation: 199
Using Rule Flow, you have lots of flexibility of execution of sequence, and if you want re execute/reuse the same rules from the current execution thread that also can be possible using rule flow.
There is a rule flow group property which is use to activate the rule(s) at a particulate time of execution. Passing output of first flow to another flow can be achieved by declaring your input parameter and set them.
You may use BPMN editor plugin in eclipse to achieve this functionality.
Upvotes: 0
Reputation: 31
Try using ruleflow diagrams. In which you have the luxury of using sub process. With this feature you can create a master flow that will call sub flows and in those sub flows you can have your rules tagged under particular ruleflow groups. If you could tell the scenario exactly I can provide in depth answer. Thanks.
Upvotes: 1
Reputation: 961
You can put all of your rules in different agenda group and load the all rules in a knowledge base. In each agenda group, keep one rule that will activate the next agenda group as below rule:
rule "agenda-group-activation"
dialect -1000
agenda-group "ag1"
When
//some conditions
Then
drools.setFocus("nextAgendaGroup");
end
Hope this would help you.
Upvotes: 2
Reputation: 13
You could tag both of your DRL files with agenda-group "SomeGroupName"
. Your first DRL file could have a trigger rule that activates the second agenda-group.
Upvotes: 0