[JBoss JIRA] Created: (JBRULES-570) Problem compiling package from xml
by Javier Prieto (JIRA)
Problem compiling package from xml
----------------------------------
Key: JBRULES-570
URL: http://jira.jboss.com/jira/browse/JBRULES-570
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: xml
Affects Versions: 3.0.4
Environment: Windows XP, Eclipse 3.2, JBoss Rules IDE 3.0.4
Reporter: Javier Prieto
Assigned To: Mark Proctor
There is a problem compiling package from an xml rule file with rules calling functions in the rhs body. This is an example of an xml rule file that fails:
<?xml version="1.0" encoding="UTF-8"?>
<package name="com.sample"
xmlns="http://drools.org/drools-3.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="http://drools.org/drools-3.0 drools-3.0.xsd">
<function return-type="void" name="manageAlert">
<parameter identifier="alert" type="String"/>
<body>System.out.println(alert);</body>
</function>
<function return-type="void" name="manageRuleFired">
<parameter identifier="ruleName" type="String"/>
<body>System.out.println(ruleName + " fired");</body>
</function>
<rule name="Impossible Rule">
<lhs>
<eval>1 == 2</eval>
</lhs>
<rhs>manageAlert("impossibleRule!!!"); manageRuleFired("Impossible Rule");</rhs>
</rule>
</package>
I've found a workaround. If you insert a blank char anywhere in the first sentence of the rhs body (manageAlert(...);), it works well:
<rhs>manageAlert ("impossibleRule!!!"); manageRuleFired("Impossible Rule");</rhs> (blank after manageAlert)
or, <rhs>manageAlert( "impossibleRule!!!"); manageRuleFired("Impossible Rule");</rhs> (blank after '(' )
or, <rhs> manageAlert("impossibleRule!!!"); manageRuleFired("Impossible Rule");</rhs> (blank at the begining)
or, <rhs>manageAlert("impossible Rule!!!"); manageRuleFired("Impossible Rule");</rhs> (blank in the string)
...
If you call a Java method just before or after 'manageAlert("impossible Rule!!!");' with a blank between them, it works well too:
<rhs>System.out.println("Hello"); manageAlert("impossibleRule!!!"); manageRuleFired("Impossible Rule");</rhs>
<rhs>manageAlert("impossibleRule!!!"); System.out.println("Hello"); manageRuleFired("Impossible Rule");</rhs>
...
I attach a test case with the xml rule file that cause the rule compilation error and the main class to test it.
--
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, 10 months
[JBoss JIRA] Created: (JBRULES-553) Add newlines in parser error messages
by Dirk Bergstrom (JIRA)
Add newlines in parser error messages
-------------------------------------
Key: JBRULES-553
URL: http://jira.jboss.com/jira/browse/JBRULES-553
Project: JBoss Rules
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Affects Versions: 3.0.4
Reporter: Dirk Bergstrom
Assigned To: Mark Proctor
Priority: Minor
Some kinds of parser errors get strung together on a single very long line, which makes it irritating to debug problems. This doozy is 332 characters long:
org.drools.rule.InvalidRulePackage: Rule Compilation error Class "net.juniper.dash.RUM" has no method named "countPicklistFieldsComparingxTo" Instance method "countPicklistFieldsComparingxTo" cannot be invoked in static context Exception:2 errors while compiling unit "net/juniper/dash/Rule_RLIs_with_missing_func_specs_0.java"
That's a lot of side-scrolling to figure out what happened. Breaking it up into four or five lines would greatly increase readability.
--
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, 10 months
[JBoss JIRA] Created: (JBRULES-501) DRL -> decision table (round trip)
by Scott Reed (JIRA)
DRL -> decision table (round trip)
----------------------------------
Key: JBRULES-501
URL: http://jira.jboss.com/jira/browse/JBRULES-501
Project: JBoss Rules
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Decision tables
Reporter: Scott Reed
Assigned To: Mark Proctor
It would be extremely useful to be able to convert existing rules to decision tables. The educational value alone would make it worth while, but it would speed up development as well since the DRL -> decision table mapping is not straight forward and cell merging and coloring is fairly tedious.
Users would probably want to be able to select the rules and functions to be mapped. If so, then the results of the mapping would have to be one or more decision table files and a new DRL file containing the rules and functions that were not converted.
--
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, 10 months
[JBoss JIRA] Created: (JBRULES-502) Add binding semantics for decision table authors
by Scott Reed (JIRA)
Add binding semantics for decision table authors
------------------------------------------------
Key: JBRULES-502
URL: http://jira.jboss.com/jira/browse/JBRULES-502
Project: JBoss Rules
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Decision tables
Reporter: Scott Reed
Assigned To: Mark Proctor
The expressive capability of decision tables for non-programmer authors is limited. Especially, the author has no way to tell the developer to use the value of a property from one column in the condition for another. I can think of two ways that binding semantics could be added:
Use the comment cells (i.e. "Age: Person's Age") - this is simple and expressive but would cause problems if an author wants to use the '<word>:' construct in a comment without intending it to be a binding.
Add a designated row above or below the comment row.
--
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, 10 months
[JBoss JIRA] Created: (JBRULES-451) Allow optional trailing comma "," for field constraint list
by Juergen none (JIRA)
Allow optional trailing comma "," for field constraint list
-----------------------------------------------------------
Key: JBRULES-451
URL: http://jira.jboss.com/jira/browse/JBRULES-451
Project: JBoss Rules
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Drl Parser/Builder
Affects Versions: 3.0.4
Reporter: Juergen none
Assigned To: Mark Proctor
Priority: Optional
With frequently re-arranging / adding / removing field constraints, I more than once forgot to add / remove trailing/separating commas in the field constraint list.
would it be possible to extend the drools drl syntax to allow an optional trailing comma?
e.g.
A(
a == 1,
b == 2, // optional trailing comma, should not yield the syntax error
)
A(
a == 1,
b == 2 // no (optional) trailing comma, like currently required, is also valid
)
--
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, 10 months
[JBoss JIRA] Created: (JBRULES-377) the whole rule set was looped.
by wen Lin (JIRA)
the whole rule set was looped.
------------------------------
Key: JBRULES-377
URL: http://jira.jboss.com/jira/browse/JBRULES-377
Project: JBoss Rules
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Decision tables
Affects Versions: 3.0.1
Environment: window xp, eclipse-3.1.2
Reporter: wen Lin
Assigned To: Mark Proctor
There were some discussions about this issue in the drools-user mailing list already.
In the decision table, salience = true:
When I modify a variable in the action cell, even I have specified keyword "UNLOOP" to be true, all other rules satisfying the new conditions are fired (even for rules which already fired before). Therefore, the whole rule set is looped and can not stop running.
Currently I need to set up a lot of flags to avoid this situation ...
--
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, 10 months