Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-9262

OgnlException when query task

XMLWordPrintable

      I found that execution of following query always leads to a "ProcessEngineException":

      createTaskQuery().or().active().processVariableValueEquals("FOO", 0).endOr().list()
      

      I think maybe this is a bug

      root cause exception of ProcessEngineException is:

      Caused by: org.apache.ibatis.ognl.OgnlException: source is null for getProperty(null, "stateCode")
      

      I looked into the source code Task.xml, found a mistake:

                  <if test="query.suspensionState != null">
                    <if test="suspensionState.stateCode == 1">
                      ${queryType} RES.SUSPENSION_STATE_ = 1
                    </if>
                    <if test="query.suspensionState.stateCode == 2">
                      ${queryType} RES.SUSPENSION_STATE_ = 2
                    </if>
                  </if>
      

      this line is wrong: <if test="suspensionState.stateCode == 1">
      I suppose the line should correct to <if test="query.suspensionState.stateCode == 1">

        This is the controller panel for Smart Panels app

              yana.vasileva Yana Vasileva
              zhangchao zhang chao
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: