[
http://jira.jboss.com/jira/browse/JBRULES-554?page=comments#action_12347662 ]
John Cocktolstoy commented on JBRULES-554:
------------------------------------------
Hi,
I am writing application, where user in GUI creates rule that is later translated into
Drools rules. I tould be very helpful to have this issue fixed. Also for the guys creating
rules using DRL files I think using the same variable in two parts of 'or'
statement would greatly simplify rules. Looking forward to have this issue fixed.
regards
John C.
False "Duplicate declaration for variable" error when doing
"Match( homeTeam == $team) || Match( awayTeam == $team)"
--------------------------------------------------------------------------------------------------------------------
Key: JBRULES-554
URL:
http://jira.jboss.com/jira/browse/JBRULES-554
Project: JBoss Rules
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Drl Parser/Builder
Affects Versions: 3.0.4
Reporter: Geoffrey De Smet
Assigned To: Mark Proctor
Priority: Minor
Attachments: JBRULES-554-testcase-branch-3.0.x.patch
[Maybe assign to Edson, he asked me to open in mailing list thread "Yet another or
question"]
On the 3.0.x branch (update from this time) when declaring this rule:
query "multipleMatchesPerTeamPerDay"
$team : Team();
Match( $id : id, homeTeam == $team, $day : day )
|| Match( $id : id, awayTeam == $team, $day : day );
exists Match( id > $id, homeTeam == $team, day == $day )
|| exists Match(id > $id, awayTeam == $team, day == $day );
end
It reports an error:
org.drools.rule.InvalidRulePackage: Duplicate declaration for variable '$day'
in the rule 'multipleMatchesPerTeamPerDay'
Testcase patch coming up.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira