Skip to content

Commit 0b103b6

Browse files
feat(engine, engine-rest-core) take out 'active' filter from acquired filter's logic
related to: camunda#4470
1 parent 5252727 commit 0b103b6

File tree

4 files changed

+5
-7
lines changed
  • engine/src/main
    • java/org/camunda/bpm/engine/runtime
    • resources/org/camunda/bpm/engine/impl/mapping/entity
  • engine-rest/engine-rest-openapi/src/main/templates/lib/commons
  • webapps/frontend/camunda-bpm-sdk-js/lib/api-client/resources

4 files changed

+5
-7
lines changed

engine-rest/engine-rest-openapi/src/main/templates/lib/commons/job-query-params.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
"acquired": {
168168
"type": "boolean",
169169
"desc": "Only select jobs which are acquired, i.e., lock expiration date is not null, lock expiration
170-
date is in future and suspension state is 1. Value may only be `true`, as `false` is the default
170+
date is in future. Value may only be `true`, as `false` is the default
171171
behavior."
172172
}
173173
}>

engine/src/main/java/org/camunda/bpm/engine/runtime/JobQuery.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public interface JobQuery extends Query<JobQuery, Job> {
193193

194194
/**
195195
* Only select jobs that are currently being acquired,
196-
* ie. lock expiration time is not null, lock expiration is in future and suspension state is 1
196+
* ie. lock expiration time is not null, lock expiration is in future
197197
*/
198198
JobQuery acquired();
199199

engine/src/main/resources/org/camunda/bpm/engine/impl/mapping/entity/Job.xml

+2-4
Original file line numberDiff line numberDiff line change
@@ -421,11 +421,9 @@
421421
and RES.SUSPENSION_STATE_ = #{suspensionState.stateCode}
422422
</if>
423423
<if test="acquired">
424-
AND
425-
RES.SUSPENSION_STATE_ = 1
426-
AND
424+
and
427425
RES.LOCK_EXP_TIME_ IS NOT NULL
428-
AND
426+
and
429427
RES.LOCK_EXP_TIME_ > #{now, jdbcType=TIMESTAMP}
430428
</if>
431429
<if test="isTenantIdSet">

webapps/frontend/camunda-bpm-sdk-js/lib/api-client/resources/job.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Job.get = function(id, done) {
6767
* @param {String} [params.firstResult] Pagination of results. Specifies the index of the first result to return.
6868
* @param {String} [params.maxResults] Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left.
6969
* @param {Bool} [params.acquired] Select jobs which are acquired, ie. lock expiration time is not
70-
* null,lock expiration is in future and suspension state is 1
70+
* null,lock expiration is in future
7171
* @param {Function} done
7272
*/
7373
Job.list = function(params, done) {

0 commit comments

Comments
 (0)