[rules-users] Detecting partial matches

Felipe Piccolini felipe.piccolini at bluesoft.cl
Fri Jan 12 15:51:14 EST 2007


  You can use EventListener to check Facts asserted. maybe that is  
not what your
looking for, but its good to know that you can check events inside  
the rule engine
execution...

On 11-01-2007, at 13:08, 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,
>
> -- 
> Kevin J. Schmidt
> <kjschmidt at gmail.com>
>
> A wise and frugal government, which shall leave men free to regulate
> their own pursuits of industry and improvement, and shall not take
> from the mouth of labor and bread it has earned - this is the sum of
> good government.
> --Thomas Jefferson
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users


Felipe Piccolini M.
felipe.piccolini at bluesoft.cl




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


More information about the rules-users mailing list