[rules-users] Identify Rule on Attributes

Scott Reed sreed at avacoda.com
Thu Mar 12 11:57:58 EDT 2009


It sounds like you want to bypass the rule engine and go right to the 
rule that fits the facts you have on hand. However, it's the rule engine 
that would be able to tell you which rule to use, so it would actually 
be slower to ask the rule engine and then execute the right hand side of 
the rule yourself than to just let the rule engine run as normal. 
Because of that, there is no mechanism that I know of that would tell 
you what you want to know. Please just trust the rule engine to do its 
job very efficiently and automatically.

Nikhil_dev [3/12/2009 9:15 AM] wrote:
> Consider Example ::::
> Rule 1: requires attributes/Values :::::::: adultFare == 3000 and ChildFare
> == 2500
> Rule 2: requires attributes/Values :::::::: ChildFare == 2000 or InfantFare 
> == 1500
> Rule 3: requires attributes/Values :::::::: AdultFare + InfantFare < 4000
>
> Above said rules is complied and its Rulebase is stored in the memory......
>
> Now i have adultFare and InfantFare Attribute in hand....... so now is there
> any way with the help of drools we can identify which rule to execute with
> out executing all of them one after the another.......as per the example
> Rule3 should be executed....and will give right output.......
>
> I hope u got what i am trying to do..... let me know weather it is
> possible........
>
>
>
> -----
> Regards,
> :working:Nikhil
>   



More information about the rules-users mailing list