[JBoss JIRA] (JBRULES-3663) Use a common thread pool for all TimerJobInstances
by Sebastian Calbaza (JIRA)
Sebastian Calbaza created JBRULES-3663:
------------------------------------------
Summary: Use a common thread pool for all TimerJobInstances
Key: JBRULES-3663
URL: https://issues.jboss.org/browse/JBRULES-3663
Project: Drools
Issue Type: Enhancement
Security Level: Public (Everyone can see)
Reporter: Sebastian Calbaza
Assignee: Mark Proctor
>From what I've seen(correct me if I'm wrong) there is, for each StatefulKnowledgeSession a TimeManager -> JDKTimerService instances pair that use a ScheduledThreadPoolExecutor of size one(default) for scheduling timer job instances.
Now the issues that I see are:
* not optimal resource utilization in case of large number of sessions
* number of sessions bounded by available memory for threads
* some performance penalty for concurrent jobs (I say some because all session ops are serial)
I provided also a PR with to be reviewed
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] Created: (JBRULES-3095) MVEL equality is not working as in 5.1.1
by Mauricio Salatino (JIRA)
MVEL equality is not working as in 5.1.1
----------------------------------------
Key: JBRULES-3095
URL: https://issues.jboss.org/browse/JBRULES-3095
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Reporter: Mauricio Salatino
Assignee: Mark Proctor
Attachments: MvelEquality.zip
There is a different behavior caused by what I think is an MVEL regretion in the version that it's being used in 5.3.0.SNAPSHOT.
Patient( groupName == "ceftazidime susc islt" || groupName == "ceftfsdfsazidime susc islt") // this doesn't work
and
Patient( groupName == "ceftazidime susc islt") // This works!!
The field groupName is an Object that overrides the method equals following the java convention for comparing objects.
I'm attaching an isolated unit test showing this problem.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] Created: (JBRULES-2518) equal sign (=) in string literal in MVEL modify statement causes error
by Steve Miner (JIRA)
equal sign (=) in string literal in MVEL modify statement causes error
----------------------------------------------------------------------
Key: JBRULES-2518
URL: https://jira.jboss.org/browse/JBRULES-2518
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core (expert)
Affects Versions: 5.0.1.FINAL
Environment: Mac OS X 10.6.3, Java 1.6
Reporter: Steve Miner
Assignee: Mark Proctor
rule "mvel equal sign bug"
dialect "mvel"
when
$d: Dog(name == "Bertie")
then
modify ($d) {name = "Bertie = Boy"};
end
Note the string literal for the new value for name contains an equal sign (=). That causes an error. Apparently, the modify macro or the MVEL parser is choking on the equal sign.
java.lang.Error: org.drools.rule.InvalidRulePackage: Unable to build expression for 'consequence': [Error: unterminated literal]
[Near : {... h ($d) {name = "Bertie = Boy"} ....}]
^
[Line: 1, Column: 43] ' modify ($d) {name = "Bertie = Boy"};
' : [Rule name='mvel equal sign bug']
If I remove the "=" from inside the string literal (substituting "is a"), it works as expected.
rule "mvel equal sign bug"
dialect "mvel"
when
$d: Dog(name == "Bertie")
then
modify ($d) {name = "Bertie is a Boy"};
end
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] Created: (JBRULES-2406) Unable to create Field extractor error caused by methods like public boolean setTime()
by Jos Hendriks (JIRA)
Unable to create Field extractor error caused by methods like public boolean setTime()
--------------------------------------------------------------------------------------
Key: JBRULES-2406
URL: https://jira.jboss.org/jira/browse/JBRULES-2406
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler
Affects Versions: 5.1.0.M1, 5.0.1.FINAL
Reporter: Jos Hendriks
Assignee: Mark Proctor
I used The clipse plugin to create a new drools project and added the example java class and rule file.
I have added the method below to the Message class:
public boolean setTime() {
return true;
}
This result in the following error messages:
Unable to create Field Extractor for 'status' of '[ClassObjectType class=com.sample.DroolsTest$Message]' in rule 'Hello World' : [Rule name='Hello World']
Unable to create Field Extractor for 'message' : [Rule name='Hello World']
org.drools.RuntimeDroolsException: java.lang.ArrayIndexOutOfBoundsException: 0
Unable to create Field Extractor for 'status' of '[ClassObjectType class=com.sample.DroolsTest$Message]' in rule 'GoodBye' : [Rule name='GoodBye']
Unable to create Field Extractor for 'message' : [Rule name='GoodBye']
org.drools.RuntimeDroolsException: java.lang.ArrayIndexOutOfBoundsException: 0
Rule Compilation error : [Rule name='Hello World']
com/sample/Rule_Hello_World_0.java (7:416) : myMessage cannot be resolved
Rule Compilation error : [Rule name='GoodBye']
com/sample/Rule_GoodBye_0.java (7:343) : myMessage cannot be resolved
java.lang.IllegalArgumentException: Could not parse knowledge.
at com.sample.DroolsTest.readKnowledgeBase(DroolsTest.java:46)
at com.sample.DroolsTest.main(DroolsTest.java:23)
Adding a parameter to setTime or renameing it to something else then setXxxx, storeTime for example, does not result in an error.
--
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
12 years, 1 month
[JBoss JIRA] Created: (JBRULES-2045) Rules Fact Error In Complex Condition Structure
by Hao Chen (JIRA)
Rules Fact Error In Complex Condition Structure
-----------------------------------------------
Key: JBRULES-2045
URL: https://jira.jboss.org/jira/browse/JBRULES-2045
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 4.0.6
Reporter: Hao Chen
Assignee: Mark Proctor
We are running into a complex production rule that either doesn't work or generate errors. I debugged and it seems Drools is not using the correct fact for some segments of the rule conditions. Steps to reproduce
1. Build the attached test case
2. Run the DroolsDefectTest junit test, it should print value "Worked!" on the output console.
3. Modify the rule by remove the commented condition that uses variable b2.
4. Run the test again.
Expected result: the rule should output "Worked!" again.
Actual result: failed with error:
org.drools.RuntimeDroolsException: org.drools.test.Rule_test_0Eval4Invoker@68f1f17a : java.lang.NumberFormatException: For input string: "Y"
at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:82)
at org.drools.reteoo.EvalConditionNode.assertTuple(EvalConditionNode.java:148)
at org.drools.reteoo.SingleTupleSinkAdapter.propagateAssertTuple(SingleTupleSinkAdapter.java:20)
at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:156)
at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:318)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145)
at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:299)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:162)
at org.drools.reteoo.Rete.assertObject(Rete.java:175)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)
at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:915)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:887)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:688)
at com.firstbest.rules.DroolsDefectTest.test_drools(DroolsDefectTest.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.NumberFormatException: For input string: "Y"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.valueOf(Unknown Source)
at com.firstbest.rules.Field.intValue(Field.java:29)
at org.drools.test.Rule_test_0.eval4(Rule_test_0.java:32)
at org.drools.test.Rule_test_0Eval4Invoker.evaluate(Rule_test_0Eval4Invoker.java:20)
at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:77)
... 32 more
--
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
12 years, 1 month