[JBoss JIRA] Created: (JBRULES-838) Disabling right-indexing means a rule no longer fires
by P Robinson (JIRA)
Disabling right-indexing means a rule no longer fires
-----------------------------------------------------
Key: JBRULES-838
URL: http://jira.jboss.com/jira/browse/JBRULES-838
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 3.0.6, 3.0.5
Environment: Windows XP and also Linux Ubuntu. Using Drools within RepastJ social simulation framework, Java 1.6.0.
Reporter: P Robinson
Assigned To: Mark Proctor
When I disable right-indexing, one of the rules no longer fires the second time around ("Accept school place application" in school.drl, see test uploaded to forum posting) which escalates into further problems with the program.
The first symptom of the rule not firing is when the message "1JUST ACCEPTED WRONG NUM CHILDREN: 186 instead of 200" is printed to the console (as a direct result of the above rule not firing). This does not occur when right-indexing is enabled.
--
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
18 years, 8 months
[JBoss JIRA] Created: (JBRULES-790) DSL mechanism not working if some keywords are part of the DSL
by Gilles Dubuc (JIRA)
DSL mechanism not working if some keywords are part of the DSL
--------------------------------------------------------------
Key: JBRULES-790
URL: http://jira.jboss.com/jira/browse/JBRULES-790
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Drl Parser/Builder
Affects Versions: 3.1-m1, 3.0.6
Environment: Issue happened with both 3.1-m1 and
Reporter: Gilles Dubuc
Assigned To: Mark Proctor
Please ignore what this rule actually does when executed, as this is a syntax issue in the DSL/DRL parsing.
If you have a DSL like this:
[when]Invoke rule executor=ruleExec: RuleExecutor()
[then]Execute rule "{id}"=ruleExec.ExecuteSubRule( new Long({id}));
and a DRL like that:
package something;
rule "1"
when
Invoke rule executor
then
Execute rule "5"
end
When calling addPackageFromnDrl( drl, dsl ) you get an exception about "Invoke" not being a keyword (I can reproduce the error and provide the exception if needed). What I'm guessing is happening is the following:
Before going through the DSL to translate the DRL file, the DRL is broken down into rules and their when/then parts. Since there is the word "rule" in "Execute rule executor" the parser thinks it's the start of a new rule. Even more so with "Execute rule "5"" because of the quotes. Strangely enough it probably goes beyond that stage and the parser assumes that "Invoke" is the only text present in the when part of rule "1". And obviously there is no translation for "Invoke" in the DSL.
Maybe I missed it, but I didn't see any mention of the fact that DRL keywords have to be avoided in the left parts or DSL statements. If it's missing from the documentation maybe it would be worth being added to it. It took me a huge amount of time before understanding that the issue came from there, banging my head for hours on the DSL translation suddenly not working even made me reimplement the DSL translation mechanism using StringTemplate...
I haven't checked if "when" and "then" induce similar issues, but if they do it might be limiting for some uses of the DSL to have to avoid these words. In that case, maybe revising the part of the parser interpreting a DSL-ed DRL would be required. It all comes down to the parser knowing accurately which parts of the DSL file are the rules, their LHS and RHS. As far as I know it shouldn't be possible to define a rule in the middle of the when statement of another one, so there is no reason why the "rule" in "Invoke rule executor" should be treated as the start of a new rule. Same goes for the "Execute rule" that sits in the RHS of another rule.
--
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
18 years, 8 months
[JBoss JIRA] Created: (JBRULES-765) org.drools.ide plugin MANIFEST.MF should be allowed to find classes from other plugins at runtime to correclty resolve facts
by Christophe Avare (JIRA)
org.drools.ide plugin MANIFEST.MF should be allowed to find classes from other plugins at runtime to correclty resolve facts
----------------------------------------------------------------------------------------------------------------------------
Key: JBRULES-765
URL: http://jira.jboss.com/jira/browse/JBRULES-765
Project: JBoss Rules
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Eclipse IDE
Affects Versions: 3.0.5
Environment: Eclipse 3.2.2 + EMF 2.1 + JBRules 3.0.5
Reporter: Christophe Avare
Assigned To: Mark Proctor
Priority: Trivial
When using Eclipse, each plugin have a limited class loading capability.
When used in an Eclipse application (RCP or not), the model and facts usually comes from other plugins, but the packages and rules are scoped by the org.drools.ide plugin class loader.
While adding this plugin as a runtime dependency of the other plugins solves the build time problem of creating a package and compiling it, at runtime when rules are fired, the org.drools.ide package cannot resolve the actual class of the facts, raising a ClassNotFoundException.
Solving this issue is easy as it involves only an additional line in the plugin MANIFEST.MF:
Eclipse-BuddyPolicy: registered
Each plugin that wants to expose its classes to the rule engine thus have to have its own exported packages registered with the org.drools.ide by adding:
Eclipse-RegisterBuddy: org.drools.ide
In their own plugin manifest.
This article in eclipsezone have the whole picture: http://www.eclipsezone.com/articles/eclipse-vms/
--
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
18 years, 8 months
[JBoss JIRA] Created: (JBRULES-617) DSL completion processor enhancements
by Michael Neale (JIRA)
DSL completion processor enhancements
-------------------------------------
Key: JBRULES-617
URL: http://jira.jboss.com/jira/browse/JBRULES-617
Project: JBoss Rules
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Affects Versions: 3.0.5
Reporter: Michael Neale
Assigned To: Kris Verlaenen
Fix For: 3.1-m3
Peter lin has contributed some possible enhancements for DSL completion proposals.
It works by breaking down the DSL in to a tree of sentence fragments, which can be given to used to limit the selections in the content assistance.
This would work best for a dedicated DSL editor, where the content assistance can be active, always, when typing (not ctrl-space, but as soon as the cursor enters the LHS).
--
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
18 years, 8 months