[rules-users] Writing JAVA functions in [when] condition of the dsl file

Krishnan krishiyer at gmail.com
Thu May 24 15:27:22 EDT 2007


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 at 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-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
>



-- 
Sivaramakrishna Iyer Krishnan (Anand)

Never assume the obvious is true.
- William Safire
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070524/84045310/attachment.html 


More information about the rules-users mailing list