[rules-users] Grouping rules
Anstis, Michael (M.)
manstis1 at ford.com
Fri Feb 1 03:46:45 EST 2008
What about Agenda Groups?
Rule "pick group X"
when
Fact( attribute = "condition1" )
then
drools.setFocus("Group X")
end
Rule "pick group Y"
when
Fact( attribute = "condition2" )
then
drools.setFocus("Group Y")
end
Rule "Group X1"
Agenda Group "Group X"
when
Smurf( )
then
// Do something
end
Rule "Group X2"
Agenda Group "Group X"
when
Smurfette( )
then
// Something else
end
etc
_____
From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Jai Vasanth
Sent: 31 January 2008 19:45
To: rules-users at lists.jboss.org
Subject: [rules-users] Grouping rules
Hi,
I am building a system where I would need to fire different sets of rules
based on some attribute in the fact object.
Here are someways which I thought of, I was wondering if there was something
better than that.
1) I could do this by creating different sessions based on the data attrbute
(different sessions would have different rule packages based on the
attribute)
or
2) Have all the rules fire (all the different sets of rules) irrespective of
the attribute and have them insert fact new objects into the working memory.
In the second round of rules, collect the (newly made) fact objects based
on the attribute and take that action.
Thanks
Jai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080201/84b0f09e/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4159 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20080201/84b0f09e/attachment.bin
More information about the rules-users
mailing list