Activiti
  1. Activiti
  2. ACT-1170

'selectExclusiveJobsToExecute' does not work for DB2 and MSSQL

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.9
    • Fix Version/s: 5.10
    • Component/s: Engine
    • Labels:
      None
    • Number of attachments :
      1

      Description

      For DB2 and MSSQL, we had to change EXCLUSIVE_ = TRUE to EXCLUSIVE_ = 1 (it then becomes the similar statement as 'selectExclusiveJobsToExecute_oracle').

      Not working for DB2 and MSSQL:

      <select id="selectExclusiveJobsToExecute" parameterType="map" resultMap="jobResultMap">
          select * 
          from ACT_RU_JOB     
          where (RETRIES_ &gt; 0)
            and (DUEDATE_ is null or DUEDATE_ &lt; #{now, jdbcType=TIMESTAMP})
            and (LOCK_OWNER_ is null or LOCK_EXP_TIME_ &lt; #{now, jdbcType=TIMESTAMP})
            and (RETRIES_ &gt; 0)
            and (EXCLUSIVE_ = TRUE)
            and (PROCESS_INSTANCE_ID_ = #{pid})  
        </select>
      

      Working for DB2 and MSSQL:

      <select id="selectExclusiveJobsToExecute_custom" parameterType="map" resultMap="jobResultMap">
      	  select *
      	  from ACT_RU_JOB
      	  where (RETRIES_ &gt; 0)
      	  and (DUEDATE_ is null or DUEDATE_ &lt; #{now, jdbcType=TIMESTAMP})
      	  and (LOCK_OWNER_ is null or LOCK_EXP_TIME_ &lt; #{now, jdbcType=TIMESTAMP})
      	  and (RETRIES_ &gt; 0)
      	  and (EXCLUSIVE_ = 1)
      	  and (PROCESS_INSTANCE_ID_ = #{pid})
        </select>
      

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Daniel Meyer (camunda)
              Reporter:
              Etienne Studer
            • Votes:
              5 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: