from what I understand, in the when clause you can only have predicates.
So, you can create a function that does that and somehow returns a boolean
and then evaluate the boolean to be true
using eval.
-Krishnan.
On 5/23/07, Rajesh.Sachin10 <rajesh_sachin10(a)yahoo.co.in> wrote:
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-d...
Sent from the drools - user mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Sivaramakrishna Iyer Krishnan (Anand)
Never assume the obvious is true.
- William Safire