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.


On 5/23/07, Rajesh.Sachin10 <> 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:
Sent from the drools - user mailing list archive at

rules-users mailing list

Sivaramakrishna Iyer Krishnan (Anand)

Never assume the obvious is true.
- William Safire