[jboss-user] [Beginners Corner] - Re: Is it possible to fire a single rule from a rule table ?
panihill
do-not-reply at jboss.com
Thu Aug 3 16:21:34 EDT 2006
I am assuming you are talking about firing one rule from a package, not firing a rule one time when fact could make it fire many times.
I don't have a great answer for you, but in the past I have handled this sort of thing by using some sort of marker. Set some field of the marker and assert with your other facts.
Then append to the WHEN of your rule, preferably at the top, a test against your marker. This way, the rule will only fire if the marker is there and the value is correct.
when
$mark : RuleMarker( marker == "xyz" )
This is also how some people hack a rules engine to work ? badly - like a process engine.
The other answer is to remove the other rules from your rulebase. Probably not the solution, but you should slim down your rule sets when possible ? for performance reasons.
Mike
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962999#3962999
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962999
More information about the jboss-user
mailing list