[rules-users] DSL to multiline DRL?
Wolfgang Laun
wolfgang.laun at gmail.com
Thu Oct 21 08:44:10 EDT 2010
Newlines are ignored by the DRL parser.
You can pack any number of Conditional Expressions into the expansion
of a DSL phrase. Just make sure you put it all on a single line in
your DSL file:
# line 1
[when] There are mutliple transactions with the same value for
prodCat=$a : Trans( $groupValue : prodCat, $date : date ) not Trans(
this != $a, prodCat == $groupValue, date < $date ) $b : LinkedList(
size >= 1 ) from collect ( Trans( this != $a, prodCat == $groupValue,
date > $date ) )
# line 3
On 21 October 2010 11:06, Tim 4076 <tm4076 at gmail.com> wrote:
> Is it possible to have a single line of DSL convert into multiple lines of DRL?
>
> I want to hide the implementation of my rules from the user. So, using
> my previous post as an example:
>
> rule "group 1"
> when
> $a : Trans( $groupValue : prodCat, $date : date )
> not Trans( this != $a, prodCat == $groupValue, date < $date )
> $b : LinkedList( size >= 1 ) from collect ( Trans( this != $a,
> prodCat == $groupValue, date > $date ) )
> then
> //do something
> end
>
> should become something like:
>
> rule "group 1"
> when
> There are mutliple transactions with the same value for prodCat
> then
> //do something
> end
>
>
>
> Thanks,
> Tim
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
More information about the rules-users
mailing list