That&#39;s because you are evaluating a Process Variable as a fact.. and it&#39;s not a fact. You cannot do:<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">i : FooInstance(action == &#39;EDITING&#39;)</span></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">Because inside the working memory there is no FooInstance.</span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">If you want to do that.. you should insert the FooInstance instead of defining it as process variable.</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">You also has the possibility to evaluate ProcessVariables in rules.. for that you should get the process variable from the WorkFlowProcessInstance.</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">Greetings<br></span></font><div><br><br><div class="gmail_quote">On Mon, Sep 27, 2010 at 1:58 PM, bob.breitling <span dir="ltr">&lt;<a href="mailto:bob.breitling@rrd.com">bob.breitling@rrd.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
Here is my object:<br>
<br>
package com.rrd.xspace.drools;<br>
<br>
import java.io.Serializable;<br>
<br>
public class FooInstance implements Serializable<br>
{<br>
        /**<br>
         *<br>
         */<br>
        private static final long serialVersionUID = 132337L;<br>
<br>
        private String action = &quot;EDITING&quot;;<br>
<br>
        public FooInstance()<br>
        {<br>
        }<br>
<br>
        public String getAction() {<br>
                return action;<br>
        }<br>
<br>
        public void setAction(String action) {<br>
                this.action = action;<br>
        }<br>
}<br>
<br>
<br>
Here is my rf file:<br>
<br>
&lt;process xmlns=&quot;<a href="http://drools.org/drools-5.0/process" target="_blank">http://drools.org/drools-5.0/process</a>&quot;<br>
         xmlns:xs=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>&quot;<br>
         xs:schemaLocation=&quot;<a href="http://drools.org/drools-5.0/process
drools-processes-5.0.xsd" target="_blank">http://drools.org/drools-5.0/process<br>
drools-processes-5.0.xsd</a>&quot;<br>
         type=&quot;RuleFlow&quot; name=&quot;Studio Sample Listener Flow&quot;<br>
id=&quot;StudioSampleListener&quot; package-name=&quot;com.rrd.xspace.drools&quot; &gt;<br>
<br>
  &lt;header&gt;<br>
    &lt;variables&gt;<br>
      &lt;variable name=&quot;Instance&quot; &gt;<br>
        &lt;type<br>
name=&quot;org.drools.process.core.datatype.impl.type.ObjectDataType&quot;<br>
className=&quot;com.rrd.xspace.drools.FooInstance&quot; /&gt;<br>
      &lt;/variable&gt;<br>
    &lt;/variables&gt;<br>
  &lt;/header&gt;<br>
<br>
  &lt;nodes&gt;<br>
    &lt;start id=&quot;1&quot; name=&quot;Start&quot; x=&quot;81&quot; y=&quot;36&quot; width=&quot;48&quot; height=&quot;48&quot; /&gt;<br>
    &lt;end id=&quot;2&quot; name=&quot;End&quot; x=&quot;81&quot; y=&quot;291&quot; width=&quot;48&quot; height=&quot;48&quot; /&gt;<br>
    &lt;ruleSet id=&quot;5&quot; name=&quot;Validate&quot; x=&quot;65&quot; y=&quot;122&quot; width=&quot;80&quot; height=&quot;48&quot;<br>
ruleFlowGroup=&quot;StudioSampleListenerValidate&quot; /&gt;<br>
  &lt;/nodes&gt;<br>
<br>
  &lt;connections&gt;<br>
    &lt;connection from=&quot;5&quot; to=&quot;2&quot; /&gt;<br>
    &lt;connection from=&quot;1&quot; to=&quot;5&quot; /&gt;<br>
  &lt;/connections&gt;<br>
<br>
&lt;/process&gt;<br>
<br>
<br>
Here is my drl file:<br>
<br>
package com.rrd.xspace.drools<br>
<br>
import com.rrd.xspace.drools.*;<br>
import com.rrd.xspace.data.levels.XMetaDataValue;<br>
<br>
import org.drools.runtime.process.ProcessInstance<br>
import org.drools.runtime.process.WorkflowProcessInstance<br>
<br>
rule &quot;Test&quot;<br>
ruleflow-group &quot;StudioSampleListenerValidate&quot;<br>
    when<br>
    then<br>
        System.out.println(&quot;GOT HERE FIRST&quot;);<br>
    end<br>
<br>
rule &quot;StudioSampleListener&quot;<br>
ruleflow-group &quot;StudioSampleListenerValidate&quot;<br>
agenda-group &quot;MAIN&quot;<br>
    when<br>
        processInstance : WorkflowProcessInstance()<br>
    then<br>
        System.out.println(&quot;GOT HERE&quot;);<br>
    end<br>
<br>
rule &quot;StudioSampleListener Validate&quot;<br>
ruleflow-group &quot;StudioSampleListenerValidate&quot;<br>
agenda-group &quot;MAIN&quot;<br>
    when<br>
        i : FooInstance(action == &#39;EDITING&#39;)<br>
    then<br>
        System.out.println(&quot;GOT HERE LAST&quot;);<br>
    end<br>
<br>
<br>
When I runt this stuff, the Test rule and the StudioSampleListener rule will<br>
fire.  If I move Test, then nothing fires.  The &quot;StudioSampleListener<br>
Validate&quot; has never fired.  I have a break point on the getAction method of<br>
FooInstance and it is never called.<br>
<br>
Bob<br>
<font color="#888888">--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Flow-process-question-tp1589567p1590453.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Flow-process-question-tp1589567p1590453.html</a><br>

</font><div><div></div><div class="h5">Sent from the Drools - User mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br> - CTO @ <a href="http://www.plugtree.com">http://www.plugtree.com</a>  <br> - MyJourney @ <a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a><br>
 - Co-Founder @ <a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a><br> <br> - Salatino &quot;Salaboy&quot; Mauricio -<br>
</div></div>