[rules-users] How to know which condition passed from list of conditions

Isaac Martin melchoir55 at gmail.com
Wed Nov 20 16:40:09 EST 2013


I preface this with saying that you should be doing what Mark suggests. If
what he suggests is going to create "too many drools" or "clutter your
files" then I'd recommend putting them in a decision table.

Another way you could get information like this is to use the event
listeners built into drools in order to give you information about
activation events. For example, you could have a listener print out the
antecedents to a drool in the beforeActivationFired method.


On Wed, Nov 20, 2013 at 1:18 PM, Mark Proctor <mproctor at codehaus.org> wrote:

> create additional rules, with just the patterns you know you want to match
> and record the result in the consequence - so you can check/assert later.
>
> Mark
> On 20 Nov 2013, at 20:49, swaroop <swaroop.oggu at gmail.com> wrote:
>
> > Hi ,
> >
> > Is there any way to determine which conditions matched/passed from list
> of
> > conditions defined for a rule . Also it would be helpful to know if
> there is
> > any means to relate a fact and the rule fired. In the below mentioned
> rule
> > can we know which condition passed ?
> >
> > Eg;
> > rule "check which Object matched"
> > when
> > Any of following conditions are true
> > Condition1
> > Condition2
> > Condition3
> > then
> > insert(Obj A)
> >
> >
> > Regards
> > Oggu
> >
> >
> >
> > --
> > View this message in context:
> http://drools.46999.n3.nabble.com/How-to-know-which-condition-passed-from-list-of-conditions-tp4026853.html
> > Sent from the Drools: User forum mailing list archive at Nabble.com.
> > _______________________________________________
> > rules-users mailing list
> > rules-users at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131120/e036f914/attachment.html 


More information about the rules-users mailing list