3.1-M1 - Can't get rules to build
by Tom Gonzalez
I am attempting to convert our application to use drools 3.1.M from
current use of 3.0.4.
I downloaded the binaries posted and am getting this very basic
exception when building our rules.
[java] Feb 19, 2007 5:21:25 PM
com.nortel.connect.rbuilder.RulePackage addR
ulesFromDrlFile
[java] INFO: adding Rules from: CBMRules.drl (with associated
DSL)
[java] Exception in thread "main" java.lang.NoSuchFieldError:
recognizer
[java] at
org.drools.lang.DRLLexer$DFA18.<init>(DRLLexer.java:3914)
[java] at org.drools.lang.DRLLexer.<init>(DRLLexer.java:3565)
[java] at
org.drools.compiler.DrlParser.getParser(DrlParser.java:78)
[java] at
org.drools.compiler.DrlParser.parse(DrlParser.java:110)
[java] at
org.drools.compiler.DrlParser.parse(DrlParser.java:96)
[java] at
com.nortel.connect.rbuilder.RulePackage.addRulesFromDrlFile(R
ulePackage.java:219)
Any suggestions for getting past this?
Thanks,
Tom G
17 years, 6 months
change "assert" to "insert"
by Mark Proctor
We have been getting querries with regards to jdk assert collision and
jboss rules assert, for this reason we are thinking of changing it to
insert for 4.0. Further to that its causing language integrations issues
for us as we expand pluggeable dialects. For this reason we are thinking
of chaning assert to insert, this would be an api change and a language
level change. I'd thought I'd throw this out to the community before we
do it. This of course breaks backwards compatability.
Mark
17 years, 6 months
Jboss snapshot repo
by Geoffrey De Smet
I took a quick look at seam and richfaces, and it looks like it might be
interesting to add this to the <repositorie> entry in the parent pom:
<repository>
<id>jboss-snapshots</id>
<url>http://snapshots.jboss.com/maven2/</url>
</repository>
--
With kind regards,
Geoffrey De Smet
17 years, 7 months
Sudoku example on 4.0 MR2
by webbo
Is any one having aproblem getting this to run - I get -
java.lang.NullPointerException
at org.drools.reteoo.ReteTuple.get(ReteTuple.java:71)
at
org.drools.common.InstanceNotEqualsConstraint$InstanceNotEqualsConstraintContextEntry.updateFromTuple(InstanceNotEqualsConstraint.java:112)
at
org.drools.common.TripleBetaConstraints.updateFromTuple(TripleBetaConstraints.java:146)
at org.drools.reteoo.NotNode.assertTuple(NotNode.java:108)
at
org.drools.reteoo.SingleTupleSinkAdapter.propagateAssertTuple(SingleTupleSinkAdapter.java:29)
at org.drools.reteoo.NotNode.assertTuple(NotNode.java:121)
at
org.drools.reteoo.SingleTupleSinkAdapter.propagateAssertTuple(SingleTupleSinkAdapter.java:29)
at org.drools.reteoo.NotNode.assertTuple(NotNode.java:121)
at
org.drools.reteoo.CompositeTupleSinkAdapter.createAndPropagateAssertTuple(CompositeTupleSinkAdapter.java:73)
at
org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:144)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:317)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:183)
at org.drools.reteoo.Rete.assertObject(Rete.java:121)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:201)
at
org.drools.reteoo.ReteooWorkingMemory.doAssertObject(ReteooWorkingMemory.java:70)
at
org.drools.common.AbstractWorkingMemory.assertObject(AbstractWorkingMemory.java:724)
at
org.drools.base.DefaultKnowledgeHelper.assertObject(DefaultKnowledgeHelper.java:72)
at
org.drools.base.DefaultKnowledgeHelper.assertObject(DefaultKnowledgeHelper.java:66)
at
test.Rule_Rule_1__If_a_field_has_the_value_0__it_is_empty__remove_it_and_insert_the_PossibleValues_0.consequence(Rule_Rule_1__If_a_field_has_the_value_0__it_is_empty__remove_it_and_insert_the_PossibleValues_0.java:8)
at
test.Rule_Rule_1__If_a_field_has_the_value_0__it_is_empty__remove_it_and_insert_the_PossibleValues_0ConsequenceInvoker.evaluate(Rule_Rule_1__If_a_field_has_the_value_0__it_is_empty__remove_it_and_insert_the_PossibleValues_0ConsequenceInvoker.java:22)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:497)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:461)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:373)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:354)
at test.SudokuExample.testWithInput(SudokuExample.java:52)
at test.SudokuExample.main(SudokuExample.java:91)
I'm working through the code - but anyone else found this?
--
View this message in context: http://www.nabble.com/Sudoku-example-on-4.0-MR2-tf3813556.html#a10795330
Sent from the drools - dev mailing list archive at Nabble.com.
17 years, 7 months
rules on xml data.
by srikantha raghavan
i have an xml on which i have to evaluate rules. i
want to know if there is a way we can directly use the
xpath expression in my rule file.
pls help me if any one is aware of any such senario.
thank you
srikanth
___________________________________________________________
Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
your free account today http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07....
17 years, 7 months
evil examples
by Michael Neale
Are Examples part of the main build? I ask as sometimes they break (it
happens) - it would be better if they were integration tests and something
else extracted them into a separate downloadable zip.
We certainly could make them part of the maven build, but the problem is
that all the other integration tests are in -compiler.
Thoughts?
Michael
17 years, 7 months
Refer to the 'Rule Name' within the Rule script
by Arjun Dhar
Hi,
In JBoss Rules 4, the WorkingMemoryLogger is not applicable for the
StatelessSession.
For this and a whole other reasons, we are building a log framework more
extensive than the default one provided.
But, am hitting a small bottleneck. In the Log get the name of the Rule
executing.
One can copy the Rule names and put in an 'Action' column that logs it, but
this is not sophisticated I feel.
Q1) Is there anyway within the Rule script for me to refer to the rule name
that caused that action so that i may log it?
Any other approach that integrates with a custom log framework is welcome!
In the examples I've seen one explicitly puts a "reason", this may be a good
practice but is not always practical. Would request this feature if not already
there.
Q2) Can I run the engine as a Daemon serive(Out of the box solution)?
(I apologize for repeating this particular question; incase you have already
answered it please let me know)
thanks,
Arjun
17 years, 7 months
Possible bug in looping ruleflows
by Shahad Ahmed
I've been trying out the latest version of the ruleflow and I think I may
have found a bug when creating looping ruleflows. I think the bug is in
RuleFlowProcessInstance.getNodeInstance, where I suspect there is a return
in the wrong place in the if-then-else that deals with ISplit node.
I created a looping ruleflow that contains a Join and Split node, where the
Split decides if we should enter the loop and the Join allows a flow to
re-enter the loop body. The issues is that the second time the same Split
node is re-entered I always get the following exception:
java.lang.IllegalArgumentException: Illegal node type: class
org.drools.ruleflow.core.impl.Split
at
org.drools.ruleflow.instance.impl.RuleFlowProcessInstance.getNodeInstance(
RuleFlowProcessInstance.java:121)
at
org.drools.ruleflow.instance.impl.RuleFlowSequenceNodeInstance.triggerCompleted
(RuleFlowSequenceNodeInstance.java:38)
at org.drools.common.RuleFlowGroupImpl$DeactivateCallback.execute(
RuleFlowGroupImpl.java:191)
at org.drools.common.AbstractWorkingMemory.executeQueuedActions(
AbstractWorkingMemory.java:992)
at org.drools.common.AbstractWorkingMemory.fireAllRules(
AbstractWorkingMemory.java:375)
at org.drools.common.AbstractWorkingMemory.fireAllRules (
AbstractWorkingMemory.java:353)
at org.drools.examples.SequentialTest.runTest4(SequentialTest.java:192)
at org.drools.examples.SequentialTest.main(SequentialTest.java:27)
This exception is only thrown if the ruleflow contains an unknown node, but
org.drools.ruleflow.core.impl.Split is a valid node (i.e. an instance of
ISplit)! Looking at the body of RuleFlowProcessInstance.getNodeInstance I
think the return in the following part of the if-then-else is in the wrong
place:
else if ( node instanceof ISplit ) {
IRuleFlowNodeInstance result = getFirstNodeInstance( node.getId()
);
if ( result == null ) {
result = new RuleFlowSplitInstance();
result.setNodeId( node.getId() );
addNodeInstance( result );
return result;
}
}...
This code would mean that the second time the Split is entered, result is
not null, so "if ( result == null )" is never entered, which results in
dropping out of the if-then-else and activating the error exception above. I
suspect the return should be outside the "if ( result == null )"
if-statement just like the IJoin part of the if-then-else to give the
following (correct?) code:
else if ( node instanceof ISplit ) {
IRuleFlowNodeInstance result = getFirstNodeInstance( node.getId()
);
if ( result == null ) {
result = new RuleFlowSplitInstance();
result.setNodeId( node.getId() );
addNodeInstance( result );
}
return result;
}...
Once I changed the return, looping seemed to work fine. I wasn't sure about
raising a JIRA about this, as this stuff is still under development.
Regards
Shahad
17 years, 7 months
BRMS i18 and DSLs in GUI
by Felipe Piccolini
Hi guys,
The BRMS looks great (very good work Michael and everyone involved
in JCR and other stuffs), but I wanna ask
if you guys have in mind a way to change the language used in the GUI
and in the Rule Editor, so the editor can be
used in a 'natural language' way from GUI.
From the same point of view, the quick-start-tutorialmovie says you
can add a DSL as an asset for the package of rules
which is great, but it doesnt help me 'much' if I'm a not technical
user who is designing rules with the rule-editor GUI
and then I wanna use DSL, because the dsl must be done a part by
another guy who doesn't know how am I writing
the rule, so there is no way he can know the code that must be write
to translate the natural-languaje-phrase of the
CE/Action I wanna use. The only way would be if he already knows the
sentences (and the associated code) before
I (business man) write the rule it self, which is not most cases (Am
I explaining well?). I mean, I like what is done, but
I would like to see a way to create from scratch a rule and associate
CE/Action sentences to new DSL sentences and
add this new DSL sentences to the DSL asset (or create a new one),
see the DSL from the rule editor and maybe edit
the DSL from the rule editor so I can update while I write the rules.
If it is possible to internationalizate the GUI I can translate to
spanish :)
Thanks.
Felipe Piccolini M.
felipe.piccolini(a)bluesoft.cl
17 years, 7 months