This is indeed a regression, due to the switch to "free form expressions" and the resulting changes in the parser. Originally (5.1.) there were the forms "*" (or "+*") and "-*" for  positive and negative infinity, respectively. (The converter in TimeUtils still handles these strings; it's DRLParser.g that needs to be fixed.) Omitting the 2nd operand in temporal operators as a workaround isn't possible where "-*" is intended as 1st operand.

Creeated JBRULES-3082

-W

2011/6/13 Michael Anstis <michael.anstis@gmail.com>
Wouldn't you just use the single parameter form?


$order : DrugOrder((start != null && start before $now), (stop == null || stop after[-7d] $now))


I'm not the CEP expert though - I know we don't support "*" in Guvnor's guided editors though.

2011/6/13 Nathan Bell <Nathan.Bell@pharmacyonesource.com>

In 5.1 this was valid syntax:

 

rule "OrderActiveInLast7Days"

when

                $order : DrugOrder((start != null && start before $now), (stop == null || stop after[-7d,*] $now))

then

                #stuff

end

 

 

In 5.2.0.CR1 it complains about the asterisk. Is that no longer supported?

 

The error I get is “no viable alternative at input '(' in rule "OrderActiveInLast7Days"”. If I remove the part of the constraint in brackets “[-7d,*]” then it compiles.

 

 

Thank You,

 

Nathan Bell

 

 


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users