2 Replies Latest reply on Nov 17, 2010 2:09 PM by billmeng70

    How can we compare null in the jpdl file

    billmeng70

      Hi there,

       

      I have below information in my jpdl.xml file,

       

      decision name="waitDecision">
        <transition name="OK" to="wait">
         <condition expr="#{responseData == null}"/>
        </transition>
        <transition to="end"/>
      </decision>

       

      If I set responseData a null value and I got exception like below

      INFO: exception while executing command org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd@13d638c
      org.jbpm.api.JbpmException: script evaluation error: javax.el.PropertyNotFoundException: Cannot find property responseData
      at org.jbpm.pvm.internal.script.ScriptManager.evaluate(ScriptManager.java:130)

       

       

       

      It workes in Jbpm 4.0 cr1, now we use Jbpm 4.3. Can we compare null object in jpdl?

       

      Thanks,

      Bo

        • 1. Re: How can we compare null in the jpdl file
          mwohlf

          Hi Bo,

          I stumbled over this problem too,

          there is a comment in OpenExecution.java that seems to indicate that jBPM4 doesn't distinguish between variables with a null value and nonexisting process variables:

           

          /** retrieve the value for the given key.
             * The value can be null.
             * If there is no value for the given key, the returned
             * value will also be null.  The value for key <code>null</code>
             * will always be null as null keys are not allowed. */

          Object getVariable(String key);

          • 2. Re: How can we compare null in the jpdl file
            billmeng70

            Hi Michael,

            Thank you very much for your feedback.

            Bo