-
1. Re: equivalent to ruleflow-group in drools
rebody Apr 28, 2010 4:54 AM (in response to lokr)Hi Manuel,
What does ruleflow-group can do? Does it equals as RulesActivity in jBPM-4.3?
-
2. Re: equivalent to ruleflow-group in drools
lokr Apr 28, 2010 5:32 AM (in response to rebody)Actually, ruleflow-group is a way to define which rules to activate for a given node. It works like this in drools:
-you put a node with an argument defining a context (a ruleflow-group)
-the next time the rule engine is summoned, it will only fire the rules with the given ruleflow-group.
for example, when ruleflow-group is defined to "group-A" with a node, the next node that will fire rules will only fire like described below:
rule "will be activated"
ruleflow-group "group-A"
when
eval(true)
then
System.out.println("I'm activated");
end
rule "will not be activated"
ruleflow-group "group-B"
when
eval(true)
then
System.out.println("I'm not activated");
end
-
3. Re: equivalent to ruleflow-group in drools
rebody Apr 28, 2010 8:26 PM (in response to lokr)Hi Manuel,
You could use CustomActivity to implement this feature. In the CustomActivity of jBPM 4 we can use our class to implement any operations including rules. It is very easy to use and you can try like this.
<custom name="drools-group" class="sample.DroolsGroupActivity">
And jBPM 4.3 has already provider some activities for Drools, you can find RuleDecisionActivity and RulesActivity in the Developer Guide. Here are the links.
http://docs.jboss.com/jbpm/v4/devguide/html_single/#rulesdecision