[rules-users] Combine DSL and Java Code?

Markus Helbig mhelbig81 at googlemail.com
Wed Nov 7 11:09:09 EST 2007


Hi,

following example:

Item Class:

public class MyItem {

      public MyItem() {}

      public String getMessage()
      {
            return "Hello World!";
      }

}

DSL:

[condition][]is of type MyItem=MyItem()
[consequence][]write "{value}" to stdout=System.out.println("{value}");

DSRL File:

rule
    when
           $item: is of type MyItem
    then
           write $item.getMessage() to stdout
end

Is this "write $item.getMessage() to stdout" possible in any way?
Currently i'm not able to get it to work ...

Cheers

Markus



More information about the rules-users mailing list