You missed the second part of the instructions - once a rule has matched you 
need to make sure the other rules don't match.
This can be achieved in multiple ways:
Call the engines halt method - just stop evaluation.
Retract the facts - then nothing else can match it.
Update the facts to stop the condition from being matched - eg add a 
"processed" field and make the rules match only if processed is false.
Insert a new fact and modify your rules to only run if that fact doesn't exist 
- eg add "not YourResultObject()" to the when's and "insert(new 
YourResultObject());" to the thens.

Thomas
> -----Original Message-----
> From: rules-users-boun...@lists.jboss.org [mailto:rules-users-
> boun...@lists.jboss.org] On Behalf Of Saurabh Pandey
> Sent: 26 September 2011 07:49
> To: rules-users@lists.jboss.org
> Subject: Re: [rules-users] Drools all lhs execute before all the rhs, i want 
> to
> run sequentially
>
> @Nguy I tried salience but it just orders the execution of "when" part, but
> still all when execute before the "then" parts
>
> --
> View this message in context: http://drools.46999.n3.nabble.com/Drools-all-
> lhs-execute-before-all-the-rhs-i-want-to-run-sequentially-
> tp3368215p3368415.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users


**************************************************************************************
This message is confidential and intended only for the addressee. If you have 
received this message in error, please immediately notify the 
postmas...@nds.com and delete it from your system as well as any copies. The 
content of e-mails as well as traffic data may be monitored by NDS for 
employment and security purposes. To protect the environment please do not 
print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, 
United Kingdom. A company registered in England and Wales. Registered no. 
3080780. VAT no. GB 603 8808 40-00
**************************************************************************************

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to