[rules-users] Using multiple RuleFlows with similar group names

Mark Proctor mproctor at codehaus.org
Sat Nov 17 12:46:43 EST 2007


There is a loose coupling from the ruleflow-group defined in the drl and 
the one in the ruleflow. So no matter how many rules you add, and how 
they are added, there will only be one ruleflow-group "Group A". You can 
deploy two ruleflows, both that use that group. The process that enters 
that group first will then be in charge of executing the rules - you 
should make sure there is no overlap in execution, I'm not sure what hte 
behaviour would be then; i.e. the second ruleflow attempts to activate 
the same group that the first ruleflow is already executing.

Mark
james_d wrote:
> Hi,
>
> I've built a RuleBase comprised of 2 ruleflows and their respective rules. 
> Each ruleflow is defined in a separate package however both use a common set
> of ruleflow-group names.  It looks something like this:
>
> Ruleflows: Flow 1, Flow 2
>
> Flow 1 package: com.test.flow1
> Flow 1 ruleflow groups: Group A, Group B, Group C
>
> Flow 2 package: com.test.flow2
> Flow 2 ruleflow groups: Group A, Group B, Group C
>
> When I load both packages into a RuleBase and insert an Object, I see that
> rules in both Flow 1 and Flow 2 are executed, even though only ruleflow
> process "Flow 1" was started.  In short, it appears that Drools does not
> take a rule's package into consideration when executing a ruleflow.  Is this
> expected behavior?  
> My understanding was that the rules in Flow 2 should not be executed because
> they are in a different package.
>
> I welcome any input.
>
>
>   




More information about the rules-users mailing list