<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Do you still want the rules to execute according to the agenda salience, or as soon as they are matched?<div><br></div><div>Take a look at the Rule, and the attribute fireDirect. It's set by an annotation (see release notes):</div><div><span style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: small; line-height: 16px; background-color: rgb(255, 255, 255); ">&nbsp;@</span><em style="font-weight: bold; font-style: normal; font-family: arial, sans-serif; font-size: small; line-height: 16px; background-color: rgb(255, 255, 255); ">activationListener</em><span style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: small; line-height: 16px; background-color: rgb(255, 255, 255); ">('</span><em style="font-weight: bold; font-style: normal; font-family: arial, sans-serif; font-size: small; line-height: 16px; background-color: rgb(255, 255, 255); ">direct</em><span style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: small; line-height: 16px; background-color: rgb(255, 255, 255); ">' )&nbsp;</span></div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><a href="https://community.jboss.org/wiki/RuleExecutionSemantics">https://community.jboss.org/wiki/RuleExecutionSemantics</a></div><div><br></div><div><br></div><div>Mark</div><div><br><div><div>On 23 Feb 2013, at 05:13, Mallory &lt;<a href="mailto:gmalathi.in@gmail.com">gmalathi.in@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hello,<br><br>I would be grateful to receive some help regarding editing Drools engine<br>source code. I am looking at making the drools engine execute rules parallel<br>so I went ahead and changed the &nbsp;DefaultAgenda.java source file. On running<br>this file everything worked perfectly well. I tried to run two different for<br>loops from 1 to 500 in two different rules and I saw that both threads were<br>working together.<br><br>On the other hand when I make a jar file of this by using the class file for<br>DefaultAgenda and try to run in a new project I am getting the error below:<br><br>java.lang.NoSuchMethodError:<br>org.drools.RuleBaseConfiguration.getComponentFactory()Lorg/drools/reteoo/ReteooComponentFactory;<br><span class="Apple-tab-span" style="white-space:pre">        </span>at org.drools.common.DefaultAgenda.setWorkingMemory(DefaultAgenda.java:215)<br><span class="Apple-tab-span" style="white-space:pre">        </span>at<br>org.drools.reteoo.ReteooWorkingMemory.&lt;init&gt;(ReteooWorkingMemory.java:110)<br><span class="Apple-tab-span" style="white-space:pre">        </span>at<br>org.drools.reteoo.ReteooStatefulSession.&lt;init&gt;(ReteooStatefulSession.java:81)<br><span class="Apple-tab-span" style="white-space:pre">        </span>at<br>org.drools.reteoo.ReteooRuleBase.newStatefulSession(ReteooRuleBase.java:402)<br><span class="Apple-tab-span" style="white-space:pre">        </span>at<br>org.drools.reteoo.ReteooRuleBase.newStatefulSession(ReteooRuleBase.java:387)<br><span class="Apple-tab-span" style="white-space:pre">        </span>at<br>org.drools.impl.KnowledgeBaseImpl.newStatefulKnowledgeSession(KnowledgeBaseImpl.java:176)<br><span class="Apple-tab-span" style="white-space:pre">        </span>at<br>org.drools.impl.KnowledgeBaseImpl.newStatefulKnowledgeSession(KnowledgeBaseImpl.java:163)<br><span class="Apple-tab-span" style="white-space:pre">        </span>at drools.main.DroolsApi.createKnowledgeBase(DroolsApi.java:38)<br><span class="Apple-tab-span" style="white-space:pre">        </span>at drools.main.TestMain.main(TestMain.java:8)<br><br><br>Can someone please help me fix this issue?<br><br>Thanks in advance:)<br><br><br><br>--<br>View this message in context: <a href="http://drools.46999.n3.nabble.com/Editing-DefaultAgenda-java-file-from-org-drools-common-tp4022549.html">http://drools.46999.n3.nabble.com/Editing-DefaultAgenda-java-file-from-org-drools-common-tp4022549.html</a><br>Sent from the Drools: User forum mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/rules-users<br></blockquote></div><br></div></body></html>