[JBoss JIRA] Created: (JBRULES-1559) Ability to negate a constraint group
by Dirk Bergstrom (JIRA)
Ability to negate a constraint group
------------------------------------
Key: JBRULES-1559
URL: http://jira.jboss.com/jira/browse/JBRULES-1559
Project: JBoss Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Drl Parser/Builder
Affects Versions: FUTURE
Reporter: Dirk Bergstrom
Assigned To: Mark Proctor
Priority: Minor
I want to write a rule that says "Find all long-eared dogs that do not have
short, black hair". This seems like the simple way to do it:
collect( Dog( ears=="long",
not (hair=="short" && color=="black") )
But that doesn't parse. Some digging through the archives unearthed a mention
of De Morgan's laws, which leads to: http://en.wikipedia.org/wiki/De_Morgan's_laws
Which explains that I can instead write:
collect( Dog( ears=="long", (hair!="short" || color!="black") )
Which, after some mental effort, turns out to be the right thing.
However, had I not found the reference to De Morgan's Law, it would have taken
me a long time to get there (if indeed I ever would have). The end result is
also quite difficult to parse if you're not a logician, and thus not very
user-friendly.
--
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
13 years, 8 months
[JBoss JIRA] Created: (JBRULES-1662) Tomcat Debugging of Rules
by Paul Ryan (JIRA)
Tomcat Debugging of Rules
-------------------------
Key: JBRULES-1662
URL: http://jira.jboss.com/jira/browse/JBRULES-1662
Project: JBoss Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Eclipse IDE
Environment: Tomcat 5+ and Eclipse IDE
Reporter: Paul Ryan
Assigned To: Mark Proctor
The ability to debug rules while running from a tomcat instance. This would be helpful for those of us that have services wrapping the rules so that we can debug into running rule sets. This feature should be capable of running its own instance of tomcat as well as attaching to a debug version of an externally running tomcat to allow for flexibility based on the users socket needs.
This feature would be a huge selling point for enterprise applications of Drools.
--
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
13 years, 8 months
[JBoss JIRA] Created: (JBRULES-1675) Xpath Default Constraint Evaluations
by Paul Ryan (JIRA)
Xpath Default Constraint Evaluations
------------------------------------
Key: JBRULES-1675
URL: http://jira.jboss.com/jira/browse/JBRULES-1675
Project: JBoss Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Drl Parser/Builder, Eclipse IDE, Rule Assemply/SPI, Solver, Verifier, xml
Reporter: Paul Ryan
Assigned To: Mark Proctor
A default set of constraint matchers for xpath based on loaded w3c DOMs would be very helpful. For our project we have alot of facts that are just an xml file (this seems to be the way the industry in general is going) that is calculated and being able to load that in to working memory and have constraint based node evaluations would be a very nice and attractive feature. I would suggest as a start a basic content equals (on elements it would match against text content and on attributes it would match against the node value) as well as a basic check for exists based on given xpath.
Potential syntax:
Fact( xml.xpath("/document//fragment[@id='myid']")) // Checks if the xpath exists in the property xml
or
Fact( xml.xpath("/document//fragment[@id='myid']") == "myvalue") // Checks if the text content of the fragment with the given id is "myvalue"
or
Fact( xml.xpath("/document//fragment[@id='myid']/@attr1") == "myattr") // Checks if the node value of the attribute attr1 in the given fragment is "myattr"
with the property xml having been defined in the fact.
I would suggest implementing this using the latest DOM stuff that has been recently released with xerces 2.9 and up as it has a very fast and efficient xpath evaluator. If you would like I think I can draw up some examples, however I don't think I know enough about drools core code to write this feature myself yet, maybe with some help.
Also this constraint module may need a new interface for configuring the size limit (or other constraint) around when to load the xml into working memory. Maybe a annotation based solution in the fact is a good idea (e.g. put an annotation @LoadDOM on xml property in the fact for properties that should be loaded into DOM), or the other option is that the designer has to set the property up as an org.w3c.dom.Document for it to be consider pre-loadable.
--
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
13 years, 8 months
[JBoss JIRA] Created: (JBRULES-2069) NPE on RuleBase when Guvnor is down
by George Gastaldi (JIRA)
NPE on RuleBase when Guvnor is down
-----------------------------------
Key: JBRULES-2069
URL: https://jira.jboss.org/jira/browse/JBRULES-2069
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.0.0.CR1
Reporter: George Gastaldi
Assignee: Mark Proctor
Priority: Minor
When creating a a RuleBasedAgent with the following code: org.drools.agent.RuleAgent.newRuleAgent(properties), having properties only the url property, the following stacktrace appears:
java.io.IOException: Was unable to reach server.
at org.drools.agent.URLScanner.hasChanged(URLScanner.java:155)
at org.drools.agent.URLScanner.getChangeSet(URLScanner.java:119)
at org.drools.agent.URLScanner.loadPackageChanges(URLScanner.java:96)
at org.drools.agent.RuleAgent.checkForChanges(RuleAgent.java:410)
at org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:362)
at org.drools.agent.RuleAgent.configure(RuleAgent.java:347)
at org.drools.agent.RuleAgent.init(RuleAgent.java:247)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:187)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:147)
followed by
java.lang.NullPointerException
at org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:363)
at org.drools.agent.RuleAgent.configure(RuleAgent.java:347)
at org.drools.agent.RuleAgent.init(RuleAgent.java:247)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:187)
at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:147)
That´s OK to throw the IOException, but the NullPointerException should not happen.
--
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
13 years, 8 months