[rules-users] How Can a Drools Rule call another Drools Rule?

Sanjib Karmakar sanjibk at skytechsolutions.co.in
Fri Aug 20 03:43:59 EDT 2010


Sir

Thank you very much for your reply.
In fact what I wanted to execute the specific rule out of say 10 rules.

I have tried 
ksession.fireAllRules(2);
Then only first 2 rules get executed.

Please let me know if there is any way-out to call specific rules out of 
bunch of rules.
It would be extremely helpful if you please share a code snippet regarding 
this.

Regards
Sanjib Karmakar
SkyTech Solutions Pvt. Ltd

Please consider the environment before printing this email.



"Wolfgang Laun-2 [via Drools - Java Rules Engine]" 
<ml-node+1225490-1260937792-82539 at n3.nabble.com> 
08/19/2010 07:45 PM

To
Sanjib Karmakar <sanjibk at skytechsolutions.co.in>
cc

Subject
Re: How Can a Drools Rule call another Drools Rule?






Rules are never "called". Changes in WM create (and also delete) 
"activations": tuples consisting of a rule and the fact objects 
matching the left hand side patterns. From this set of activations, 
rule right hand sides are executed according to salience (and other 
criteria). 

Perhaps if you describe the actual problem...? 

-W 


On 19 August 2010 06:58, Sanjib Karmakar <[hidden email]> wrote: 

> 
> Hi friends 
> 
> I would like to execute a rule say Rule-1 from inside another rule say 
> Rule-2. 
> In project I am using xml and not drl, and I am using Drools 5.0 
> 
> Please let me know how to call a rule from another rule. 
> 
> Thanks 
> Sanjib 
> -- 
> View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/How-Can-a-Drools-Rule-call-another-Drools-Rule-tp1219190p1219190.html

> Sent from the Drools - User mailing list archive at Nabble.com. 
> _______________________________________________ 
> rules-users mailing list 
> [hidden email] 
> https://lists.jboss.org/mailman/listinfo/rules-users
> 
_______________________________________________ 
rules-users mailing list 
[hidden email] 
https://lists.jboss.org/mailman/listinfo/rules-users

View message @ 
http://drools-java-rules-engine.46999.n3.nabble.com/How-Can-a-Drools-Rule-call-another-Drools-Rule-tp1219190p1225490.html 

To unsubscribe from How Can a Drools Rule call another Drools Rule?, click 
here. 

-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/How-Can-a-Drools-Rule-call-another-Drools-Rule-tp1219190p1238924.html
Sent from the Drools - User mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100820/929c9e65/attachment.html 


More information about the rules-users mailing list