Do you still want the rules to execute according to the agenda salience, or as soon as they are matched?

Take a look at the Rule, and the attribute fireDirect. It's set by an annotation (see release notes):
 @activationListener('direct' ) 

This allows a rule to fire without needing to be added to the agenda, it currently calls fireActivation - so it's still serial. However you could add another metadata tag to specify async or not. This would allow either the standard fireActivation to be called, or an async one.

On a related subject, I sketched some ideas of how I'd like to see this working in the future. So that 'activationListener' approach is definitely not stable and will change.
https://community.jboss.org/wiki/RuleExecutionSemantics


Mark

On 23 Feb 2013, at 05:13, Mallory <gmalathi.in@gmail.com> wrote:

Hello,

I would be grateful to receive some help regarding editing Drools engine
source code. I am looking at making the drools engine execute rules parallel
so I went ahead and changed the  DefaultAgenda.java source file. On running
this file everything worked perfectly well. I tried to run two different for
loops from 1 to 500 in two different rules and I saw that both threads were
working together.

On the other hand when I make a jar file of this by using the class file for
DefaultAgenda and try to run in a new project I am getting the error below:

java.lang.NoSuchMethodError:
org.drools.RuleBaseConfiguration.getComponentFactory()Lorg/drools/reteoo/ReteooComponentFactory;
at org.drools.common.DefaultAgenda.setWorkingMemory(DefaultAgenda.java:215)
at
org.drools.reteoo.ReteooWorkingMemory.<init>(ReteooWorkingMemory.java:110)
at
org.drools.reteoo.ReteooStatefulSession.<init>(ReteooStatefulSession.java:81)
at
org.drools.reteoo.ReteooRuleBase.newStatefulSession(ReteooRuleBase.java:402)
at
org.drools.reteoo.ReteooRuleBase.newStatefulSession(ReteooRuleBase.java:387)
at
org.drools.impl.KnowledgeBaseImpl.newStatefulKnowledgeSession(KnowledgeBaseImpl.java:176)
at
org.drools.impl.KnowledgeBaseImpl.newStatefulKnowledgeSession(KnowledgeBaseImpl.java:163)
at drools.main.DroolsApi.createKnowledgeBase(DroolsApi.java:38)
at drools.main.TestMain.main(TestMain.java:8)


Can someone please help me fix this issue?

Thanks in advance:)



--
View this message in context: http://drools.46999.n3.nabble.com/Editing-DefaultAgenda-java-file-from-org-drools-common-tp4022549.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users