from what I understand, in the when clause you can only have predicates. <br><br>So, you can create a function that does that and somehow returns a boolean and then evaluate the boolean to be true <br>using eval. <br><br>-Krishnan.
<br><br><div><span class="gmail_quote">On 5/23/07, <b class="gmail_sendername">Rajesh.Sachin10</b> <<a href="mailto:rajesh_sachin10@yahoo.co.in">rajesh_sachin10@yahoo.co.in</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>We can write the Java functions in [then] condition of the dsl file.<br><br>Is it possible to write JAVA functions / JAVA kind of coding in the [when]<br>condition of dsl file?<br><br><br>eg: [when] for(int i = 0; i < 3; i++) {
System.out.println(i); }<br> [then] Log "{message}"<br>--<br>View this message in context: <a href="http://www.nabble.com/Writing-JAVA-functions-in--when--condition-of-the-dsl-file-tf3806720.html#a10773355">
http://www.nabble.com/Writing-JAVA-functions-in--when--condition-of-the-dsl-file-tf3806720.html#a10773355</a><br>Sent from the drools - user mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br><br>_______________________________________________
<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users
</a><br></blockquote></div><br><br clear="all"><br>-- <br>Sivaramakrishna Iyer Krishnan (Anand) <br><br>Never assume the obvious is true. <br>- William Safire