and what about using java code in LHS:
DSL
[condition][]Text is {value}=text matches {value}
Rule1 (works fine)
when
$item: Item()
-Text is "Hello World.*"
Rule2 (doesn't work)
when
$item1: Item()
$item2: Item()
-Text is $item1.getText()
am i doing sth. wrong or is it impossible?
Cheers
Markus
2007/11/9, Markus Helbig <[EMAIL PROTECTED]>:
> thanks ... that works ...
>
> 2007/11/7, Edson Tirelli <[EMAIL PROTECTED]>:
> >
> > 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 <[EMAIL PROTECTED]>:
> > >
> > > 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
> > > [email protected]
> > > 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
> > _______________________________________________
> > rules-users mailing list
> > [email protected]
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
> >
>
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users