[rules-users] Detecting partial matches

Mark Proctor mproctor at codehaus.org
Fri Jan 12 06:12:35 EST 2007


Just repeat the rule twice, with the subset - the rule engine will share 
the nodes so that their is no repetition of work.

Mark
Kevin J. Schmidt wrote:
> I'm using JBoss Rules 3.0.5 and want to know if there is a way to
> detect when a rule partially matches. For example, let's say I have
> the following rule:
>
> rule "My Rule"
>    no-loop true
> when
>    myo1: MyObject(id==12)
>    myo2: MyObject(id==45)
> then
>    // do something with myo1 and myo2
> end
>
> This rule is looking for one MyObject with an id of 12 and another
> MyObject with an id of 45. A MyObject with id 12 may come into working
> memory before the one with an id of 45. Is there a way, either in Java
> code or in the rules file itself, to know when the rule is partially
> matched?
>
> Thanks,
>




More information about the rules-users mailing list