[JBoss JIRA] Created: (JBRULES-1829) Nested From Tag Not Supported in Drools
by Nagarajan Shanmugam (JIRA)
Nested From Tag Not Supported in Drools
---------------------------------------
Key: JBRULES-1829
URL: https://jira.jboss.org/jira/browse/JBRULES-1829
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler
Affects Versions: 5.0.0.M2
Environment: Windows XP, Eclipse 3.3.
Reporter: Nagarajan Shanmugam
Assignee: Mark Proctor
HI i have Created one rule file that have two From tag. Using XmlDumper I create Xml rule file. When i try to parse that Xml rule file its throwing Error. And also the parsed Xml files also Wrong.
Exception in thread "main" org.drools.compiler.DroolsParserException: org.xml.sax.SAXParseException: <from> may not be nested
at com.drools.service.ConvertDrlToXml.main(ConvertDrlToXml.java:47)
--
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
11 years, 7 months
[JBoss JIRA] Created: (JBRULES-1009) Can't execute rules twice with a second classloader
by aaron dixon (JIRA)
Can't execute rules twice with a second classloader
---------------------------------------------------
Key: JBRULES-1009
URL: http://jira.jboss.com/jira/browse/JBRULES-1009
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Reteoo
Affects Versions: 4.0.0.MR3
Reporter: aaron dixon
Assigned To: Mark Proctor
Priority: Minor
Attachments: drools-test.zip
I am trying to sequentially perform two rules executions using two
different classloaders in the same VM. I create completely new state
for each execution, yet I still fail on the second execution (the first execution succeeds). I
believe this has to do with some internal static cached state that
JBossRules is maintaining. An integration test is attached as an archived Eclipse project (zip).
Exception thrown:
Exception in thread "main" java.lang.ClassCastException: test.drools.classloader.FooShadowProxy
at org.drools.base.test.drools.classloader.Foo$getName.getValue(Unknown Source)
at org.drools.base.ClassFieldExtractor.getValue(ClassFieldExtractor.java:94)
at org.drools.base.evaluators.StringFactory$StringEqualEvaluator.evaluate(StringFactory.java:85)
at org.drools.rule.LiteralRestriction.isAllowed(LiteralRestriction.java:61)
at org.drools.rule.LiteralConstraint.isAllowed(LiteralConstraint.java:82)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:121)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:20)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:159)
at org.drools.reteoo.Rete.assertObject(Rete.java:175)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:190)
at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:70)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:772)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:584)
at org.drools.reteoo.ReteooStatelessSession.execute(ReteooStatelessSession.java:63)
at test.drools.classloader.Driver.testRules(Driver.java:49)
at test.drools.classloader.Driver.go(Driver.java:35)
at test.drools.classloader.Driver.main(Driver.java:19)
--
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
11 years, 7 months
[JBoss JIRA] (JBRULES-3379) org.antlr.runtime.CommonToken cannot be cast to org.drools.lang.DroolsToken
by sundaranarayanan rengasamy (JIRA)
sundaranarayanan rengasamy created JBRULES-3379:
---------------------------------------------------
Summary: org.antlr.runtime.CommonToken cannot be cast to org.drools.lang.DroolsToken
Key: JBRULES-3379
URL: https://issues.jboss.org/browse/JBRULES-3379
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler (expert)
Affects Versions: 5.2.0.Final
Environment: eclipse
Reporter: sundaranarayanan rengasamy
Assignee: Mark Proctor
Fix For: FUTURE
I am using Decision table for the condition. I want to compare, two properties of two different class. when creating the object types for that classes in a cell I am facing the problem. I am using drools-compiler5.2.0 FINAL jar file.
The problem is:
Description Resource Path Location Type
Unexpected exception raised while parsing. This is a bug. Please contact the Development team :
java.lang.ClassCastException: org.antlr.runtime.CommonToken cannot be cast to org.drools.lang.DroolsToken
[org.drools.lang.ParserHelper.emit(ParserHelper.java:89), org.drools.lang.DRLParser.fact(DRLParser.java:9214), org.drools.lang.DRLParser.fact_binding(DRLParser.java:8872), org.drools.lang.DRLParser.lhs_pattern(DRLParser.java:8713), org.drools.lang.DRLParser.pattern_source(DRLParser.java:7017), org.drools.lang.DRLParser.lhs_unary(DRLParser.java:5846), org.drools.lang.DRLParser.lhs_and(DRLParser.java:5559), org.drools.lang.DRLParser.lhs_or(DRLParser.java:5249), org.drools.lang.DRLParser.lhs(DRLParser.java:5047), org.drools.lang.DRLParser.normal_lhs_block(DRLParser.java:4953), org.drools.lang.DRLParser.when_part(DRLParser.java:3217), org.drools.lang.DRLParser.rule(DRLParser.java:3009), org.drools.lang.DRLParser.statement(DRLParser.java:746), org.drools.lang.DRLParser.compilation_unit(DRLParser.java:340), org.drools.compiler.DrlParser.compile(DrlParser.java:231), org.drools.compiler.DrlParser.parse(DrlParser.java:71), org.drools.eclipse.DroolsEclipsePlugin.generateParsedResource(DroolsEclipsePlugin.java:416), org.drools.eclipse.DroolsEclipsePlugin.parseXLSResource(DroolsEclipsePlugin.java:310), org.drools.eclipse.builder.DroolsBuilder.parseXLSFile(DroolsBuilder.java:306), org.drools.eclipse.builder.DroolsBuilder.parseResource(DroolsBuilder.java:206), org.drools.eclipse.builder.DroolsBuilder$DroolsBuildVisitor.visit(DroolsBuilder.java:149), org.eclipse.core.internal.resources.Resource$2.visit(Resource.java:112), org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:64), org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:82), org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86), org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86), org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86), org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86), org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:127), org.eclipse.core.internal.resources.Resource.accept(Resource.java:74), org.eclipse.core.internal.resources.Resource.accept(Resource.java:110), org.eclipse.core.internal.resources.Resource.accept(Resource.java:94), org.drools.eclipse.builder.DroolsBuilder.fullBuild(DroolsBuilder.java:133), org.drools.eclipse.builder.DroolsBuilder.build(DroolsBuilder.java:95), org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629), org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42), org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172), org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:203), org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:255), org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42), org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:258), org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:311), org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:343), org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144), org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:242), org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)] POC.xls /drools poc/src/main/rules Unknown Drools Error
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[JBoss JIRA] Created: (JBRULES-2031) Enhancements to spreadsheet based testing tool
by Michael Neale (JIRA)
Enhancements to spreadsheet based testing tool
----------------------------------------------
Key: JBRULES-2031
URL: https://jira.jboss.org/jira/browse/JBRULES-2031
Project: JBoss Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: drools-testing
Reporter: Michael Neale
Assignee: Michael Neale
Fix For: FUTURE
As mentioned by Ansgar in blog comments: http://blog.athico.com/2009/03/new-testing-tool.html
Hi,
we're using Drools to perform mortgage scoring. For testing, we developed a somewhat similar, but already more sophisticated testing framework. Currently, our test set comprises of roughly 800 test scenarios/test cases.
Similarities:
* also uses spreadsheet tables to define test cases.
* each column resembles a test case
* leftmost column used to name elements of input facts or define expected conditions (see below)
Differences:
* concept of "expected values" not expressed as mere values, but as drools conditions which are expected to hold after rules all under test finished execution. These conditions are automagically converted into a drools query which is run against the working memory after rule execution.
Enhancements:
* conditions support simple text replacement, like a macro preprocessor. Wildcards in drools condition can be replaced by test case-specific text
* allows skipping of certain condition checks on a per-test-case basis
* event logging of the drools working memory embedded into fit output file for failed checks. visibility of log can be toggled using html-embedded javascript. allows for simple copy/paste into "audit view" window in eclipse. This eases debugging rules a lot!
* possibility to define a subset of rules contained in a *.drl file to be tested
Open issues:
* Syntax of initial facts specification is probably a bit cumbersome. We're using a self-brewed language to do this. Already thought of replacing this by MVEL, but not done yet. For us, the current solution works ok.
* Up to now, requires explicit import of all used Java classes. This is rather a limitation of drools - we did not manage to get package imports in *.drl files to work. Could probably be solved.
--
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
11 years, 7 months
[JBoss JIRA] (JBRULES-3583) Retracting an event with an explicit expiration results in memory leak
by Ladd Asper (JIRA)
Ladd Asper created JBRULES-3583:
-----------------------------------
Summary: Retracting an event with an explicit expiration results in memory leak
Key: JBRULES-3583
URL: https://issues.jboss.org/browse/JBRULES-3583
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.4.0.Final
Environment: Windows 7, Java 1.6
Reporter: Ladd Asper
Assignee: Mark Proctor
package drools.tests
import drools.tests.MyEvent
import java.util.List
declare MyEvent @role(event) @expires(14d) end // <====== leaks
//declare MyEvent @role(event) end // <====== doesn't leak
rule "UpdateAndRetractOldEvents"
salience 10000
when
$old : MyEvent( $key : key )
MyEvent( key == $key, this after $old )
then
retract( $old );
System.err.println( "retracted $old" );
end
My test case is a loop that does this:
MyEvent firstA = new MyEvent( "first", "firstA" ); // key, value
MyEvent firstB = new MyEvent( "first", "firstB" ); // key, value
...
ksession.insert( firstA );
ksession.fireAllRules();
Thread.sleep( 50 );
ksession.insert( firstB );
ksession.fireAllRules();
Memory consumption stays flat if MyEvent is declared without an expiration time. Memory consumption increases linearly if MyEvent is declared with an expiration time.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months