Package org.camunda.bpm.engine.runtime
Interface JobQuery
- All Known Implementing Classes:
- JobQueryImpl
Allows programmatic querying of 
Jobs.- Author:
- Joram Barrez, Falko Menge
- 
Method SummaryModifier and TypeMethodDescriptionactive()Only select jobs that are not suspended.activityId(String activityId) Only select jobs which are defined on an activity with the given id.createdAfter(Date date) Only select jobs created after the given date.createdBefore(Date date) Only select jobs created before the given date.duedateHigherThan(Date date) Only select jobs where the duedate is higher then the given date.duedateHigherThen(Date date) Deprecated.Deprecated.duedateLowerThan(Date date) Only select jobs where the duedate is lower than the given date.duedateLowerThen(Date date) Deprecated.duedateLowerThenOrEquals(Date date) Deprecated.exceptionMessage(String exceptionMessage) Only select jobs that failed due to an exception with the given message.Only select jobs which are executable, ie.executionId(String executionId) Only select jobs which exist for the given executionfailedActivityId(String activityId) Only select jobs that failed due to an exception at an activity with the given id.Select jobs which have no tenant id.jobDefinitionId(String jobDefinitionId) Only select jobs which exist for the given job definition id.Only select jobs with the given idOnly select jobs whose id is in the given set of idsmessages()Only select jobs that are messages.Only select jobs which have no retries leftOrder by execution id (needs to be followed byQuery.asc()orQuery.desc()).Order by duedate (needs to be followed byQuery.asc()orQuery.desc()).Order by job id (needs to be followed byQuery.asc()orQuery.desc()).Order by priority for execution (needs to be followed byQuery.asc()orQuery.desc()).Order by retries (needs to be followed byQuery.asc()orQuery.desc()).Order by process definition id (needs to be followed byQuery.asc()orQuery.desc()).Order by process definition key (needs to be followed byQuery.asc()orQuery.desc()).Order by process instance id (needs to be followed byQuery.asc()orQuery.desc()).Order by tenant id (needs to be followed byQuery.asc()orQuery.desc()).priorityHigherThanOrEquals(long priority) Only select jobs with a priority that is higher than or equal to the given priority.priorityLowerThanOrEquals(long priority) Only select jobs with a priority that is lower than or equal to the given priority.processDefinitionId(String processDefinitionId) Only select jobs which exist for the given process definition id.processDefinitionKey(String processDefinitionKey) Only select jobs which exist for the given process definition key.processInstanceId(String processInstanceId) Only select jobs which exist for the given process instance.processInstanceIds(Set<String> processInstanceIds) Only select jobs which exist for any of the given process instance idsrootProcessInstanceId(String rootProcessInstanceId) Only select jobs which exist for the given root process instance.Only select jobs that are suspended.tenantIdIn(String... tenantIds) Only select jobs that belong to one of the given tenant ids.timers()Only select jobs that are timers.Only select jobs that failed due to an exception.Only select jobs which have no tenant id.Only select jobs which have retries leftMethods inherited from interface org.camunda.bpm.engine.query.Queryasc, count, desc, list, listPage, singleResult, unlimitedList
- 
Method Details- 
jobIdOnly select jobs with the given id
- 
jobIdsOnly select jobs whose id is in the given set of ids
- 
jobDefinitionIdOnly select jobs which exist for the given job definition id.
- 
rootProcessInstanceIdOnly select jobs which exist for the given root process instance.
- 
processInstanceIdOnly select jobs which exist for the given process instance.
- 
processInstanceIdsOnly select jobs which exist for any of the given process instance ids
- 
processDefinitionIdOnly select jobs which exist for the given process definition id.
- 
processDefinitionKeyOnly select jobs which exist for the given process definition key.
- 
executionIdOnly select jobs which exist for the given execution
- 
activityIdOnly select jobs which are defined on an activity with the given id.
- 
withRetriesLeftJobQuery withRetriesLeft()Only select jobs which have retries left
- 
executableJobQuery executable()Only select jobs which are executable, ie. retries > 0 and duedate is null or duedate is in the past
- 
timersJobQuery timers()Only select jobs that are timers. Cannot be used together withmessages()
- 
messagesJobQuery messages()Only select jobs that are messages. Cannot be used together withtimers()
- 
duedateLowerThanOnly select jobs where the duedate is lower than the given date.
- 
duedateHigherThanOnly select jobs where the duedate is higher then the given date.
- 
duedateLowerThenDeprecated.Only select jobs where the duedate is lower then the given date.
- 
duedateLowerThenOrEqualsDeprecated.Only select jobs where the duedate is lower then or equals the given date.
- 
duedateHigherThenDeprecated.Only select jobs where the duedate is higher then the given date.
- 
duedateHigherThenOrEqualsDeprecated.Only select jobs where the duedate is higher then or equals the given date.
- 
createdBeforeOnly select jobs created before the given date.
- 
createdAfterOnly select jobs created after the given date.
- 
priorityHigherThanOrEqualsOnly select jobs with a priority that is higher than or equal to the given priority.- Since:
- 7.4
 
- 
priorityLowerThanOrEqualsOnly select jobs with a priority that is lower than or equal to the given priority.- Since:
- 7.4
 
- 
withExceptionJobQuery withException()Only select jobs that failed due to an exception.
- 
exceptionMessageOnly select jobs that failed due to an exception with the given message.
- 
failedActivityIdOnly select jobs that failed due to an exception at an activity with the given id.
- 
noRetriesLeftJobQuery noRetriesLeft()Only select jobs which have no retries left
- 
activeJobQuery active()Only select jobs that are not suspended.
- 
suspendedJobQuery suspended()Only select jobs that are suspended.
- 
tenantIdInOnly select jobs that belong to one of the given tenant ids.
- 
withoutTenantIdJobQuery withoutTenantId()Only select jobs which have no tenant id.
- 
includeJobsWithoutTenantIdJobQuery includeJobsWithoutTenantId()Select jobs which have no tenant id. Can be used in combination withtenantIdIn(String...).
- 
orderByJobIdJobQuery orderByJobId()Order by job id (needs to be followed byQuery.asc()orQuery.desc()).
- 
orderByJobDuedateJobQuery orderByJobDuedate()Order by duedate (needs to be followed byQuery.asc()orQuery.desc()).
- 
orderByJobRetriesJobQuery orderByJobRetries()Order by retries (needs to be followed byQuery.asc()orQuery.desc()).
- 
orderByJobPriorityJobQuery orderByJobPriority()Order by priority for execution (needs to be followed byQuery.asc()orQuery.desc()).- Since:
- 7.4
 
- 
orderByProcessInstanceIdJobQuery orderByProcessInstanceId()Order by process instance id (needs to be followed byQuery.asc()orQuery.desc()).
- 
orderByProcessDefinitionIdJobQuery orderByProcessDefinitionId()Order by process definition id (needs to be followed byQuery.asc()orQuery.desc()).
- 
orderByProcessDefinitionKeyJobQuery orderByProcessDefinitionKey()Order by process definition key (needs to be followed byQuery.asc()orQuery.desc()).
- 
orderByExecutionIdJobQuery orderByExecutionId()Order by execution id (needs to be followed byQuery.asc()orQuery.desc()).
- 
orderByTenantIdJobQuery orderByTenantId()Order by tenant id (needs to be followed byQuery.asc()orQuery.desc()). Note that the ordering of job without tenant id is database-specific.
 
-