[jboss-jira] [JBoss JIRA] Commented: (JBRULES-2218) Unknown error while parsing. This is a bug. Please contact the Development team.
Edson Tirelli (JIRA)
jira-events at lists.jboss.org
Thu Feb 25 09:10:10 EST 2010
[ https://jira.jboss.org/jira/browse/JBRULES-2218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12516632#action_12516632 ]
Edson Tirelli commented on JBRULES-2218:
----------------------------------------
In Drools 5, the parser was rewritten from scratch to fix a huge amount of problems we had before, including re-use of keywords. Unfortunately, it was not possible to eliminate all hard keywords, as we would wish.
As you can see in the documentation:
http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html_single/index.html#d0e2792
"from" is one of the few remaining keywords that can not be used elsewhere in the DRL unless you escape it. In your case, as you can read in the docs, you need to do this:
run : RunInstanceWire( eContainer == sw, `from` == operation, name == "run" )
Or, if it is easier for you, just rename your field for something like "fromOperation".
Please note that this is a problem that affects all languages built to integrate with existing user models and AFAIK, a problem that can't be solved with current parsing technologies. Just as an example, Scala has the same limitation and also requires you to escape keywords.
I will keep the ticket open for us to fix the error message.
> Unknown error while parsing. This is a bug. Please contact the Development team.
> --------------------------------------------------------------------------------
>
> Key: JBRULES-2218
> URL: https://jira.jboss.org/jira/browse/JBRULES-2218
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-eclipse
> Affects Versions: 5.0.0.FINAL
> Environment: Eclipse 3.5 (Galileo), Mac OS X
> Reporter: Udo Klinkmüller
> Assignee: Mark Proctor
> Fix For: 5.1.0.M2
>
>
> rule "Arrival-Delayed-Upd"
> salience 1000
> when
> #conditions
> VisitPair( $ov: oldVisit != null, $nv: visit )
> $oaf: ArrivalFlight( onBlock == null, $ost: scheduledTime != null, $op: position != null ) from $ov.arrivalFlight
> $naf: ArrivalFlight( onBlock == null, (($nst: scheduledTime != null, != $ost) || ($np: position != null, != $op)) ) from $nv.arrivalFlighT
>
> then
> #actions
> Date vf = addMinutes($nst, 15);
> ResourceEvent re = eventBuilderFactory.getResourceVisitEventBuilder(EventType.ARRIVAL_DELAYED, $naf.getPositionKey(), vf)
> .visitKey($nv.getKey())
> .build();
> eventHandler.handleEvent(re);
> end
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list