[rules-dev] A possible 'or ' bug

Edson Tirelli tirelli at post.com
Thu Dec 6 07:53:59 EST 2007


   Looks like a bug indeed. May I ask you please to open a JIRA for it?

   Thank you,
    Edson

2007/12/6, Stjepan Cvitanovic <stjepan.cvitanovic at gmail.com>:
>
> Hello
> I'd like to report a (possible) bug,
> I've tried to run this on the latest version of drools (4.0.3) but I get
> an error:
> applyOrTransformation could not find transformation for parent 'OR' and
> child 'OR'
> java.lang.RuntimeException: applyOrTransformation could not find
> transformation for parent 'OR' and child 'OR'
>     at org.drools.rule.LogicTransformer.applyOrTransformation(
> LogicTransformer.java:148)
>     at org.drools.rule.LogicTransformer.processTree(LogicTransformer.java
> :140)
>     at org.drools.rule.LogicTransformer.transform(LogicTransformer.java
> :76)
>     at org.drools.rule.Rule.getTransformedLhs(Rule.java:419)
>     at org.drools.reteoo.builder.ReteooRuleBuilder.addRule(
> ReteooRuleBuilder.java:102)
>     at org.drools.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:116)
>     at org.drools.reteoo.ReteooRuleBase.addRule(ReteooRuleBase.java :268)
>     at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java
> :337)
>     at hr.combis.rule.editor.tester.RuleTesterFDAImpl.createRuleBase(
> RuleTesterFDAImpl.java:210)
>     at hr.combis.rule.editor.tester.RuleTesterFDAImpl.init (
> RuleTesterFDAImpl.java:159)
>     at hr.combis.rule.editor.testing.TestingExecutor.run(
> TestingExecutor.java:129)
>     at java.lang.Thread.run(Thread.java:595)
> this is what the rule looks like:
>
> wine : Wine(color == "red")
> or
> (
>     cheese : Cheese(smelly == "yes")
>     *and*
>         (
>             person : Person(height == 12, fovouriteCheese == cheese)
>             *or*
>             person : Person(height == 13, fovouriteCheese == cheese)
>         )
> )
>
> the rule looks perfectly sensical to me. If I change it to this (which,
> btw. looks non-sensical)
> wine : Wine(color == "red")
> or
> (
>     cheese : Cheese(smelly == "yes")
>     *or*
>         (
>             person : Person(height == 12, fovouriteCheese == cheese)
>             *and*
>             person : Person(height == 13, fovouriteCheese == cheese)
>         )
> )
>
>
> I'm not saying the second one shouldn't work(I fail to make the sense of
> it however), but it looks to me, the first one should.
> Am I wrong, or is this really a bug?
> --
> lp
> ------
> Stjepan
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>


-- 
  Edson Tirelli
  JBoss Drools Core Development
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20071206/7d59666e/attachment.html 


More information about the rules-dev mailing list