Try changing DSL
from
[consequence][]write "{value}" to
stdout=System.out.println("{value}");
To
[consequence][]write {value} to stdout=System.out.println( {value} );
And see if it works.
--Mohan
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Markus Helbig
Sent: Wednesday, November 07, 2007 8:09 AM
To: rules-users(a)lists.jboss.org
Subject: [rules-users] Combine DSL and Java Code?
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(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users