[rules-users] Rule nodes in a ruleflow sharing some rules

Francois Gadrat fgadrat at genigraph.fr
Thu Mar 1 01:20:52 EST 2012


Hello drools users,

 

I have a modeling issue with ruleflows : I would like to know how to having
rule nodes sharing some rules.

 

Problem: 

Lets says i have 3 rule nodes A, B and C in a ruleflow after a split node:

 

Node A has rules R1, R3 and R5

 

Node B has rules R2,R3 and R4

 

Node C has rules R1, R2, R6

 

so the issue is that there are rules that are common to different rule nodes
and this seems to be a problem with uniqueness of ruleflow-group attribute
and value in both rule and rule node.

 

Is there a way to achieve this without splitting nodes A,B and C into
smaller nodes? 

 

Would it be possible to achieve this with getting the ruleflow-group rule
attribute as a result of a function call or an evaluation at runtime, in
order to operate a dynamic rule selection? 

 

Something like this in a rule 

ruleflow-group (getRuleflowGroup(kcontext))

 

where from kcontext, 

one would get the name of the rule => kcontext.getRule().getName()

one would get the name of current Node from kcontext ? 

 

Thanks for sharing your thoughts and for your time. Francois.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120301/b54cc55e/attachment.html 


More information about the rules-users mailing list