<br>I&#39;m afraid I can&#39;t publish as it is, but I hope this would give you a hint:<br><br>myrules.drl:<br><br>rule &quot;New case&quot; <br>    when    <br>        $case : Case(processed==false) from entry-point &quot;case stream&quot;        <br>

    then<br>        modify ($case){<br>            setProcessed(true)<br>        }<br>  <br>        [....  processing code omitted ... ]<br><br>        insert(kcontext.getKnowledgeRuntime().startProcess(&quot;com.mycompany.Process&quot;, parameters));<br>

end<br><br>rule &quot;job complete&quot;<br>ruleflow-group &quot;jobs group&quot;<br>    when<br>        $processInstance: WorkflowProcessInstance()<br>    then<br>        Job job = (Job)$processInstance.getVariable(&quot;var&quot;);<br>

        update(job);<br>end<br><br><br><br><br>process.bpmn:<br><br>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;definitions ....&gt;<br>&lt;process processType=&quot;Private&quot; isExecutable=&quot;true&quot; id=&quot;com.mycompany.Process&quot; name=&quot;process&quot; &gt;<br>

[one start node and lots of nodes here, one that ends in the next ]<br><br>&lt;businessRuleTask g:ruleFlowGroup=&quot;jobs group&quot; id=&quot;job complete&quot; name=&quot;complete job&quot;/&gt;<br><br>[ lots of nodes after, ending in an end node]<br>

<br>&lt;/process&gt;<br>&lt;/definitions&gt;<br><br><br><br><br>As you can see the rule &quot;New case&quot; is not in any group and is responsible ( if it is the case ) of launching the process, and then that process invokes the bussinessrule group &quot;jobs group&quot;. As stated, what we see is that the rule &quot;job complete&quot; never gets fired.<br>

<br><br><br clear="all">Alberto R. Galdo<br><a href="/user/SendEmail.jtp?type=node&node=3726616&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a><br><br><div class="gmail_quote">On Tue, Feb 7, 2012 at 21:18, salaboy [via Drools] <span dir="ltr">&lt;<a href="/user/SendEmail.jtp?type=node&node=3726616&i=1" target="_top" rel="nofollow" link="external">[hidden email]</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="im">

        &quot;&quot;businessRuleTask&quot; who tries to fire a rule in drools ant that rule
<br></div><div class="im">are not in the same group&quot; can you share the process definition and
<br>the rule?
<br><br></div>2012/2/7 Alberto R. Galdo &lt;<a href="http://user/SendEmail.jtp?type=node&amp;node=3723757&amp;i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>&gt;:
<div><div class="im"><div class='shrinkable-quote'><br>&gt; Hi,
<br>&gt;
<br>&gt;    The rule that inserts the process which has the node &quot;businessRuleTask&quot;
<br>&gt; who tries to fire a rule in drools ant that rule are not in the same group.
<br>&gt; In fact, the rule that should be fired is the only rule in that group and
<br>&gt; should only be fired by the process itself.
<br>&gt;
<br>&gt;    What we are trying to do is to update the state of a fact inside drools
<br>&gt; with information gathered in the BPM process. Maybe I am getting this wrong,
<br>&gt; but, Is there another way to accomplish this?
<br>&gt;
<br>&gt; Greets,
<br>&gt;
<br>&gt;
<br>&gt; Alberto R. Galdo
</div></div>&gt; <a href="http://user/SendEmail.jtp?type=node&amp;node=3723757&amp;i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><div class="im">&gt;
<div class='shrinkable-quote'><br>&gt;
<br>&gt;
<br>&gt;
<br>&gt; On Tue, Feb 7, 2012 at 19:23, Mauricio Salatino &lt;<a href="http://user/SendEmail.jtp?type=node&amp;node=3723757&amp;i=2" rel="nofollow" link="external" target="_blank">[hidden email]</a>&gt; wrote:
<br>&gt;&gt;
<br>&gt;&gt; Hi are you using the same rule flow-group in the businessRuleTask and
<br>&gt;&gt; in your rule? can you share the rule that you are using?
<br>&gt;&gt; remember that the evaluation will be done by the engine as soon as the
<br>&gt;&gt; information comes in. The rule flow group will only execute something
<br>&gt;&gt; if a rule was activated inside the rule flow group of your
<br>&gt;&gt; businessRuleTask.
<br>&gt;&gt; Cheers
<br>&gt;&gt;
</div></div><div><div class="h5">&gt;&gt; On Tue, Feb 7, 2012 at 2:23 PM, argaldo &lt;<a href="http://user/SendEmail.jtp?type=node&amp;node=3723757&amp;i=3" rel="nofollow" link="external" target="_blank">[hidden email]</a>&gt; wrote:
<div class='shrinkable-quote'><br>&gt;&gt; &gt; Hi,
<br>&gt;&gt; &gt;
<br>&gt;&gt; &gt;  We&#39;re running an application that uses Drools + JBPM 5 + Drools
<br>&gt;&gt; &gt; integration our set-up can be seen as:
<br>&gt;&gt; &gt;
<br>&gt;&gt; &gt;  Some rule fires and creates a JBPM process ( a fact gets inserted into
<br>&gt;&gt; &gt; drools using &quot;kcontext.getKnowledgeRuntime().startProcess()&quot; ), after a
<br>&gt;&gt; &gt; few
<br>&gt;&gt; &gt; nodes processed, the JBPM engine arrives to a node of type
<br>&gt;&gt; &gt; &quot;businessRuleTask&quot; which in turn tells drools to evaluate a group of
<br>&gt;&gt; &gt; rules (
<br>&gt;&gt; &gt; which at the moment consists on only one rule ).
<br>&gt;&gt; &gt;
<br>&gt;&gt; &gt;  Well, the problem is that what we see is that everything runs ok before
<br>&gt;&gt; &gt; the businessRuleTask and at the moment when the rule group would be
<br>&gt;&gt; &gt; evaluated we could see that in drools the rule gets created, activated,
<br>&gt;&gt; &gt; but
<br>&gt;&gt; &gt; never fired.
<br>&gt;&gt; &gt;
<br>&gt;&gt; &gt;  We did some debug and realized that the reason the rule group never got
<br>&gt;&gt; &gt; fired is because this check in RuleFlowGroupImpl.java ( method
<br>&gt;&gt; &gt; setActive(boolean) ):
<br>&gt;&gt; &gt;
<br>&gt;&gt; &gt;            if ( this.list.isEmpty() ) {
<br>&gt;&gt; &gt;                if ( this.autoDeactivate ) {
<br>&gt;&gt; &gt;                    // if the list of activations is empty and
<br>&gt;&gt; &gt;                    // auto-deactivate is on, deactivate this group
<br>&gt;&gt; &gt;                    WorkingMemoryAction action = new DeactivateCallback(
<br>&gt;&gt; &gt; this );
<br>&gt;&gt; &gt;                    this.workingMemory.queueWorkingMemoryAction( action
<br>&gt;&gt; &gt; );
<br>&gt;&gt; &gt;                }
<br>&gt;&gt; &gt;            }
<br>&gt;&gt; &gt;
<br>&gt;&gt; &gt;
<br>&gt;&gt; &gt;   The problem is that at the moment when drools calls setActive() and
<br>&gt;&gt; &gt; performs the check, this.list is in fact empty and autoDeactivate is
<br>&gt;&gt; &gt; true by
<br>&gt;&gt; &gt; default ). Then drools enqueues a deactivation task afterwords, which
<br>&gt;&gt; &gt; deactivates the rule *before* even firing it.
<br>&gt;&gt; &gt;
<br>&gt;&gt; &gt;    From now on, things get a little weirder, every subsequent invocation
<br>&gt;&gt; &gt; of
<br>&gt;&gt; &gt; the method setActive ( in response of bussinessRuleTask from our
<br>&gt;&gt; &gt; bussiness
<br>&gt;&gt; &gt; process ) runs ok as that list now is not empty ( has one rule ).
<br>&gt;&gt; &gt;
<br>&gt;&gt; &gt;    Seems a race condition to me, but,...,  Is there any way to
<br>&gt;&gt; &gt; deactivate
<br>&gt;&gt; &gt; autodeactivation by default? Are we doing something wrong? Bug report?
<br>&gt;&gt; &gt;
<br>&gt;&gt; &gt; Greets,
<br>&gt;&gt; &gt;
<br>&gt;&gt; &gt; --
<br>&gt;&gt; &gt; View this message in context:
<br>&gt;&gt; &gt; <a href="http://drools.46999.n3.nabble.com/Rule-does-not-fire-when-JBPM-asks-to-do-so-in-BPMN-2-0-process-tp3723183p3723183.html" rel="nofollow" link="external" target="_blank">http://drools.46999.n3.nabble.com/Rule-does-not-fire-when-JBPM-asks-to-do-so-in-BPMN-2-0-process-tp3723183p3723183.html</a></div>

&gt;&gt; &gt; Sent from the Drools: User forum mailing list archive at Nabble.com.
<br>&gt;&gt; &gt; _______________________________________________
<br>&gt;&gt; &gt; rules-users mailing list
<br></div></div>&gt;&gt; &gt; <a href="http://user/SendEmail.jtp?type=node&amp;node=3723757&amp;i=4" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><div class="im">&gt;&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt;&gt;
<br>&gt;&gt;
<br>&gt;&gt;
<br>&gt;&gt; --
<br>&gt;&gt;  - CTO @ <a href="http://www.plugtree.com" rel="nofollow" link="external" target="_blank">http://www.plugtree.com</a><br>&gt;&gt;  - MyJourney @ <a href="http://salaboy.wordpress.com" rel="nofollow" link="external" target="_blank">http://salaboy.wordpress.com</a><br>

&gt;&gt;  - Co-Founder @ <a href="http://www.jugargentina.org" rel="nofollow" link="external" target="_blank">http://www.jugargentina.org</a><br>&gt;&gt;  - Co-Founder @ <a href="http://www.jbug.com.ar" rel="nofollow" link="external" target="_blank">http://www.jbug.com.ar</a><br>

&gt;&gt;
<br>&gt;&gt;  - Salatino &quot;Salaboy&quot; Mauricio -
<br>&gt;&gt;
<br>&gt;&gt; _______________________________________________
<br>&gt;&gt; rules-users mailing list
<br></div>&gt;&gt; <a href="http://user/SendEmail.jtp?type=node&amp;node=3723757&amp;i=5" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><div class="im">&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt;
<br>&gt;
<br>&gt;
<br>&gt; _______________________________________________
<br>&gt; rules-users mailing list
<br></div>&gt; <a href="http://user/SendEmail.jtp?type=node&amp;node=3723757&amp;i=6" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br>&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt;
</div><div class="im"><br><br><br>-- 
<br> - CTO @ <a href="http://www.plugtree.com" rel="nofollow" link="external" target="_blank">http://www.plugtree.com</a><br> - MyJourney @ <a href="http://salaboy.wordpress.com" rel="nofollow" link="external" target="_blank">http://salaboy.wordpress.com</a><br>

 - Co-Founder @ <a href="http://www.jugargentina.org" rel="nofollow" link="external" target="_blank">http://www.jugargentina.org</a><br> - Co-Founder @ <a href="http://www.jbug.com.ar" rel="nofollow" link="external" target="_blank">http://www.jbug.com.ar</a><br>

<br> - Salatino &quot;Salaboy&quot; Mauricio -
<br><br>_______________________________________________
<br>rules-users mailing list
<br></div><div class="im"><a href="http://user/SendEmail.jtp?type=node&amp;node=3723757&amp;i=7" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
        
        <br>
        <br>
        <hr color="#cccccc" noshade size="1">
        </div><div style="color:rgb(68,68,68);font:12px tahoma,geneva,helvetica,arial,sans-serif"><div class="im">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                </div><a href="http://drools.46999.n3.nabble.com/Rule-does-not-fire-when-JBPM-asks-to-do-so-in-BPMN-2-0-process-tp3723183p3723757.html" target="_blank" rel="nofollow" link="external">http://drools.46999.n3.nabble.com/Rule-does-not-fire-when-JBPM-asks-to-do-so-in-BPMN-2-0-process-tp3723183p3723757.html</a>
        </div><div class="HOEnZb"><div class="h5">
        <div style="color:rgb(102,102,102);font:11px/1.5em tahoma,geneva,helvetica,arial,sans-serif;margin-top:0.4em">
                
                To unsubscribe from Rule does not fire when JBPM asks to do so in BPMN 2.0 process, <a href="" target="_blank" rel="nofollow" link="external">click here</a>.<br>


                <a href="http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&amp;id=instant_html%21nabble%3Aemail.naml&amp;base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&amp;breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_blank" link="external">NAML</a>
        </div></div></div></blockquote></div><br>

        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://drools.46999.n3.nabble.com/Rule-does-not-fire-when-JBPM-asks-to-do-so-in-BPMN-2-0-process-tp3723183p3726616.html">Re: [rules-users] Rule does not fire when JBPM asks to do so in BPMN 2.0 process</a><br/>
Sent from the <a href="http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html">Drools: User forum mailing list archive</a> at Nabble.com.<br/>