[rules-users] Writing JAVA functions in [when] condition of the dsl file
Edson Tirelli
tirelli at post.com
Thu May 24 16:01:34 EDT 2007
Rules are supposed to be declarative in nature. You should never need to
add control statements, neither to the LHS ("when"), nor to the RHS
("then"), although, the RHS being a java code block allows you to do it...
but it is usually code smell...
Think about what you are doing and check if you are not trying to use
drools as a scripting language...
Following may help:
http://markproctor.blogspot.com/2007/03/writing-better-rules.html
[]s
Edson
2007/5/23, Rajesh.Sachin10 <rajesh_sachin10 at yahoo.co.in>:
>
>
> We can write the Java functions in [then] condition of the dsl file.
>
> Is it possible to write JAVA functions / JAVA kind of coding in the [when]
> condition of dsl file?
>
>
> eg: [when] for(int i = 0; i < 3; i++) { System.out.println(i); }
> [then] Log "{message}"
> --
> View this message in context:
> http://www.nabble.com/Writing-JAVA-functions-in--when--condition-of-the-dsl-file-tf3806720.html#a10773355
> Sent from the drools - user mailing list archive at Nabble.com.
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
--
Edson Tirelli
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070524/dc86ba25/attachment.html
More information about the rules-users
mailing list