[rules-users] How to use for loop in drools!!!!
Esteban Aliverti
esteban.aliverti at gmail.com
Tue Apr 19 08:09:20 EDT 2011
Drools is an inference engine and it let you express your knowledge using
rules.
A rule has 2 parts: CONDITION par and ACTION part.
The CONDITION part is expressed in a drools' proprietary syntax, but in the
ACTION part you can use plain java code.
What you have described looks like an action that needs to be executed when
certain constraints are meet.
So, in your case, you can just write those lines in you action part. They
should work fine.
I recommend you to read the documentation:
http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-expert/html_single/index.html
Best Regards,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com
On Tue, Apr 19, 2011 at 3:13 AM, Sumeet Karawal <sumeet.karawal at tcs.com>wrote:
> for(i = 0; i<10; i++)
> {
> c.setCustomerCount(c.getCustomerCount() + 1);
> }
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110419/fe1c5056/attachment.html
More information about the rules-users
mailing list