Maybe this is too simplistic, but wouldn't the following accomplish the
same thing:
Rule #1
[when] Person (gender == female)
...
Rule #2
[when] Person (gender != female)
and
Procedure( needToDone == "ABC" )
Given the OR behaviour, you could probably combine the above two
separate rules into one rule with an OR between them. Yes, it may look
a little ugly, but I think it would do what you want, right?
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of kashif10
Sent: February 11, 2011 8:51 AM
To: rules-users(a)lists.jboss.org
Subject: Re: [rules-users] Some Questions related to execution
Thanks for your reply,
I am alreday only checking/considering the unique resultIds, returning
as Global Vector"resultIds" from my Rules.
I have around 1000s of .drl (a Rule definitions).
And Each Rule definition (.drl) have several conditions which are Anded
or ORed with each other.
In Actual my Question is that how can I write a rule definition which
short circuits, So the performnace will increase for the case.
That if Person matches it will not go to evaluate Procedure. Only go to
procedure If person doesn't match.
May I have to replace "or" with some other operator ?
Person ( gender == "Female" )
or <what shoul Come here>
Procedure( needToDone == "ABC" )
Thanks.
--
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/Some-Questions-relat
ed-to-execution-tp2470079p2473608.html
Sent from the Drools - User mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users