[rules-users] Rules don't execute using MVEL syntax in RHS - Possible Bug

Wolfgang Laun wolfgang.laun at gmail.com
Mon May 12 07:21:30 EDT 2014


Repeated executions show varying results: sometimes it's OK, sometimes it isn't.

I don't think it's a race condition in your code (although proper
syncing on the map would be the "clean" way to go).

I think that salience doesn't work properly )(6.0.0, OP used 6.0.1.),
if a fact is matched unconditionally by a high salience rule and the
same fact is matched using constraints in rules with lesser priority.

(Wasn't this recognized before as a bug in 6.0.x?)

-W




On 12/05/2014, jlprat <jlprat at gmail.com> wrote:
> Hi,
> I updated my test code to use your way of creating the Knowledge Base
> (using
> KieBase) and I have the exact same results. Does anyone have an idea why
> this is still failing?
>
> Furthermore, I think the way I was initializing my rules is also supported
> by Drools 6, because it's almost copied line by line from the Official
> Drools API page:
> https://docs.jboss.org/drools/release/6.0.1.Final/kie-api-javadoc/
>
> /
> A Typical example to load a rule resource.
>
> KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
> kbuilder.add( ResourceFactory.newUrlResource( url ),
>                       ResourceType.DRL );
> if ( kbuilder.hasErrors() ) {
>     System.err.println( builder.getErrors().toString() );
> }
>
> KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
> kbase.addKnowledgePackages( builder.getKnowledgePackages() );
>
> StatefulKnowledgeSession ksession =
> knowledgeBase.newStatefulKnowledgeSession();
> ksession.insert( new Fibonacci( 10 ) );
> ksession.fireAllRules();
>
> ksession.dispose();/
>
> Best,
> Josep
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Rules-don-t-execute-using-MVEL-syntax-in-LHS-Possible-Bug-tp4029494p4029517.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


More information about the rules-users mailing list