[rules-users] Combine DSL and Java Code?

Edson Tirelli tirelli at post.com
Wed Nov 7 11:50:36 EST 2007


  Markus, did you tried:

[consequence][]write {value} to stdout=System.out.println({value});

   With the line:

write $item.getMessage() to stdout

    []s
    Edson

2007/11/7, Markus Helbig <mhelbig81 at googlemail.com>:
>
> 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
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
  Edson Tirelli
  Software Engineer - JBoss Rules Core Developer
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20071107/fb33c17d/attachment.html 


More information about the rules-users mailing list