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.<br>
<br>Creeated <a id="key-val" rel="12439620" href="https://issues.jboss.org/browse/JBRULES-3082">JBRULES-3082</a><br><br>-W<br><br><div class="gmail_quote">2011/6/13 Michael Anstis <span dir="ltr"><<a href="mailto:michael.anstis@gmail.com">michael.anstis@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Wouldn't you just use the single parameter form?<div class="im"><br><br><p class="MsoNormal">
$order : DrugOrder((start != null && start before $now), (stop == null || stop after[-7d] $now))</p><br></div>I'm not the CEP expert though - I know we don't support "*" in Guvnor's guided editors though.<br>
<br><div class="gmail_quote"><div><div></div><div class="h5">2011/6/13 Nathan Bell <span dir="ltr"><<a href="mailto:Nathan.Bell@pharmacyonesource.com" target="_blank">Nathan.Bell@pharmacyonesource.com</a>></span><br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
<div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal">In 5.1 this was valid syntax:</p><p class="MsoNormal"> </p><p class="MsoNormal">rule "OrderActiveInLast7Days"</p><p class="MsoNormal">when</p>
<p class="MsoNormal"> $order : DrugOrder((start != null && start before $now), (stop == null || stop after[-7d,*] $now))</p><p class="MsoNormal">then</p><p class="MsoNormal"> #stuff</p>
<p class="MsoNormal">end</p><p class="MsoNormal"> </p><p class="MsoNormal"> </p><p class="MsoNormal">In 5.2.0.CR1 it complains about the asterisk. Is that no longer supported?</p><p class="MsoNormal"> </p><p class="MsoNormal">
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.</p><p class="MsoNormal"> </p><p class="MsoNormal">
</p><p class="MsoNormal">Thank You,</p><p class="MsoNormal"> </p><font color="#888888"><p class="MsoNormal">Nathan Bell</p><p class="MsoNormal"> </p><p class="MsoNormal"> </p></font></div></div><br></div></div>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>