Package org.camunda.bpm.engine.impl
Class ExternalTaskQueryImpl
java.lang.Object
org.camunda.bpm.engine.impl.db.ListQueryParameterObject
org.camunda.bpm.engine.impl.AbstractQuery<ExternalTaskQuery,ExternalTask>
org.camunda.bpm.engine.impl.ExternalTaskQueryImpl
- All Implemented Interfaces:
Serializable,ExternalTaskQuery,Command<Object>,Query<ExternalTaskQuery,ExternalTask>
public class ExternalTaskQueryImpl
extends AbstractQuery<ExternalTaskQuery,ExternalTask>
implements ExternalTaskQuery
- Author:
- Thorben Lindhauer, Christopher Zell
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.camunda.bpm.engine.impl.AbstractQuery
AbstractQuery.ResultType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected String[]protected Stringprotected Stringprotected Booleanprotected Dateprotected Dateprotected Booleanprotected Longprotected Longprotected Stringprotected Stringprotected String[]protected Stringprotected Stringprotected Stringprotected String[]protected Booleanprotected SuspensionStateprotected String[]protected Stringprotected Booleanprotected List<QueryVariableValue>protected Booleanprotected StringFields inherited from class org.camunda.bpm.engine.impl.AbstractQuery
commandExecutor, expressions, maxResultsLimitEnabled, resultType, SORTORDER_ASC, SORTORDER_DESC, validatorsFields inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
authCheck, databaseType, firstResult, maxResults, orderingProperties, parameter, tenantCheck -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactive()Only select external tasks that are currently not suspendedactivityId(String activityId) Only select external tasks that belong to an instance of the given activityactivityIdIn(String... activityIdIn) Only select external tasks that belong to an instances of the given activities.voidaddVariable(String name, Object value, QueryOperator operator) protected voidaddVariable(QueryVariableValue queryVariableValue) protected voidlongexecuteCount(CommandContext commandContext) executeDeploymentIdMappingsList(CommandContext commandContext) executeIdsList(CommandContext commandContext) executeList(CommandContext commandContext, Page page) Executes the actual query to retrieve the list of results.executionId(String executionId) Only select external tasks created in the context of the given executionexternalTaskId(String externalTaskId) Only select the external task with the given idexternalTaskIdIn(Set<String> externalTaskIds) Only select external tasks with any of the given idsgetNow()String[]protected booleanWhether or not the query has excluding conditions.locked()Only select external tasks that are currently locked, i.e.lockExpirationAfter(Date lockExpirationDate) Only select external tasks that have a lock expiring after the given datelockExpirationBefore(Date lockExpirationDate) Only select external tasks that have a lock expiring before the given dateAll queries for task-, process- and case-variables will match the variable names in a case-insensitive way.All queries for task-, process- and case-variables will match the variable values in a case-insensitive way.Only select external tasks that have retries = 0Only select external tasks that are not currently locked, i.e.Order by create time (needs to be followed byQuery.asc()orQuery.desc()).Order by external task id (needs to be followed byQuery.asc()orQuery.desc()).Order by lock expiration time (needs to be followed byQuery.asc()orQuery.desc()).Order by priority (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 external tasks with a priority that is higher than or equal to the given priority.priorityLowerThanOrEquals(long priority) Only select external tasks with a priority that is lower than or equal to the given priority.processDefinitionId(String processDefinitionId) Only select external tasks that belong to an instance of the given process definitionprocessDefinitionKey(String processDefinitionKey) Only select tasks which are part of a process instance which has the given process definition key.processDefinitionKeyIn(String... processDefinitionKeys) Only select tasks which are part of a process instance which has one of the given process definition keys.processDefinitionName(String processDefinitionName) Only select tasks which are part of a process instance which has the given process definition name.processDefinitionNameLike(String processDefinitionName) Only select tasks which are part of a process instance which process definition name is like the given parameter.processInstanceId(String processInstanceId) Only select external tasks created in the context of the given process instanceprocessInstanceIdIn(String... processInstanceIdIn) Only select external tasks created in the context of the given process instancesprocessVariableValueEquals(String variableName, Object variableValue) Only select tasks which have are part of a process that have a variable with the given name set to the given value.processVariableValueGreaterThan(String variableName, Object variableValue) Only select tasks which are part of a process that have a variable with the given name and a value greater than the given one.processVariableValueGreaterThanOrEquals(String variableName, Object variableValue) Only select tasks which are part of a process that have a variable with the given name and a value greater than or equal to the given one.processVariableValueLessThan(String variableName, Object variableValue) Only select tasks which are part of a process that have a variable with the given name and a value less than the given one.processVariableValueLessThanOrEquals(String variableName, Object variableValue) Only select tasks which are part of a process that have a variable with the given name and a value greater than or equal to the given one.processVariableValueLike(String variableName, String variableValue) Only select tasks which are part of a process that have a variable with the given name and matching the given value.processVariableValueNotEquals(String variableName, Object variableValue) Only select tasks which have a variable with the given name, but with a different value than the passed value.processVariableValueNotLike(String variableName, String variableValue) Only select tasks which are part of a process that have a variable with the given name and not matching the given value.Only select external tasks that are currently suspendedtenantIdIn(String... tenantIds) Only select external tasks that belong to one of the given tenant ids.Only select external tasks of the given topicOnly select external tasks that have retries > 0Only select external tasks that was most recently locked by the given workerMethods inherited from class org.camunda.bpm.engine.impl.AbstractQuery
addExpression, addValidator, asc, checkMaxResultsLimit, checkQueryOk, count, desc, direction, disableMaxResultsLimit, enableMaxResultsLimit, evaluateExpressions, evaluateExpressionsAndExecuteCount, evaluateExpressionsAndExecuteDeploymentIdMappingsList, evaluateExpressionsAndExecuteIdsList, evaluateExpressionsAndExecuteList, execute, executeResult, executeSingleResult, extend, getExpressions, getMethod, list, listDeploymentIdMappings, listIds, listPage, mergeExpressions, mergeOrdering, orderBy, orderBy, removeValidator, setCommandExecutor, setExpressions, singleResult, unlimitedList, validate, validateMethods inherited from class org.camunda.bpm.engine.impl.db.ListQueryParameterObject
getAuthCheck, getDatabaseType, getFirstResult, getFirstRow, getLastRow, getMaxResults, getOrderingProperties, getParameter, getTenantCheck, setAuthCheck, setDatabaseType, setFirstResult, setMaxResults, setOrderingProperties, setParameter, setTenantCheckMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.camunda.bpm.engine.query.Query
asc, count, desc, list, listPage, singleResult, unlimitedList
-
Field Details
-
externalTaskId
-
externalTaskIds
-
workerId
-
lockExpirationBefore
-
lockExpirationAfter
-
topicName
-
locked
-
notLocked
-
executionId
-
processInstanceId
-
processInstanceIdIn
-
processDefinitionKey
-
processDefinitionKeys
-
processDefinitionId
-
processDefinitionName
-
processDefinitionNameLike
-
activityId
-
activityIdIn
-
suspensionState
-
priorityHigherThanOrEquals
-
priorityLowerThanOrEquals
-
variableNamesIgnoreCase
-
variableValuesIgnoreCase
-
variables
-
retriesLeft
-
tenantIds
-
-
Constructor Details
-
ExternalTaskQueryImpl
public ExternalTaskQueryImpl() -
ExternalTaskQueryImpl
-
-
Method Details
-
externalTaskId
Description copied from interface:ExternalTaskQueryOnly select the external task with the given id- Specified by:
externalTaskIdin interfaceExternalTaskQuery
-
externalTaskIdIn
Description copied from interface:ExternalTaskQueryOnly select external tasks with any of the given ids- Specified by:
externalTaskIdInin interfaceExternalTaskQuery
-
workerId
Description copied from interface:ExternalTaskQueryOnly select external tasks that was most recently locked by the given worker- Specified by:
workerIdin interfaceExternalTaskQuery
-
lockExpirationBefore
Description copied from interface:ExternalTaskQueryOnly select external tasks that have a lock expiring before the given date- Specified by:
lockExpirationBeforein interfaceExternalTaskQuery
-
lockExpirationAfter
Description copied from interface:ExternalTaskQueryOnly select external tasks that have a lock expiring after the given date- Specified by:
lockExpirationAfterin interfaceExternalTaskQuery
-
topicName
Description copied from interface:ExternalTaskQueryOnly select external tasks of the given topic- Specified by:
topicNamein interfaceExternalTaskQuery
-
locked
Description copied from interface:ExternalTaskQueryOnly select external tasks that are currently locked, i.e. that have a lock expiration time that is in the future- Specified by:
lockedin interfaceExternalTaskQuery
-
notLocked
Description copied from interface:ExternalTaskQueryOnly select external tasks that are not currently locked, i.e. that have no lock expiration time or one that is overdue- Specified by:
notLockedin interfaceExternalTaskQuery
-
executionId
Description copied from interface:ExternalTaskQueryOnly select external tasks created in the context of the given execution- Specified by:
executionIdin interfaceExternalTaskQuery
-
processInstanceId
Description copied from interface:ExternalTaskQueryOnly select external tasks created in the context of the given process instance- Specified by:
processInstanceIdin interfaceExternalTaskQuery
-
processInstanceIdIn
Description copied from interface:ExternalTaskQueryOnly select external tasks created in the context of the given process instances- Specified by:
processInstanceIdInin interfaceExternalTaskQuery
-
processDefinitionKey
Description copied from interface:ExternalTaskQueryOnly select tasks which are part of a process instance which has the given process definition key.- Specified by:
processDefinitionKeyin interfaceExternalTaskQuery
-
processDefinitionKeyIn
Description copied from interface:ExternalTaskQueryOnly select tasks which are part of a process instance which has one of the given process definition keys.- Specified by:
processDefinitionKeyInin interfaceExternalTaskQuery
-
processDefinitionId
Description copied from interface:ExternalTaskQueryOnly select external tasks that belong to an instance of the given process definition- Specified by:
processDefinitionIdin interfaceExternalTaskQuery
-
processDefinitionName
Description copied from interface:ExternalTaskQueryOnly select tasks which are part of a process instance which has the given process definition name.- Specified by:
processDefinitionNamein interfaceExternalTaskQuery
-
processDefinitionNameLike
Description copied from interface:ExternalTaskQueryOnly select tasks which are part of a process instance which process definition name is like the given parameter. The syntax is that of SQL: for example usage: nameLike(%processDefinitionName%)- Specified by:
processDefinitionNameLikein interfaceExternalTaskQuery
-
activityId
Description copied from interface:ExternalTaskQueryOnly select external tasks that belong to an instance of the given activity- Specified by:
activityIdin interfaceExternalTaskQuery
-
activityIdIn
Description copied from interface:ExternalTaskQueryOnly select external tasks that belong to an instances of the given activities.- Specified by:
activityIdInin interfaceExternalTaskQuery
-
priorityHigherThanOrEquals
Description copied from interface:ExternalTaskQueryOnly select external tasks with a priority that is higher than or equal to the given priority.- Specified by:
priorityHigherThanOrEqualsin interfaceExternalTaskQuery- Parameters:
priority- the priority which is used for the query- Returns:
- the builded external task query
-
priorityLowerThanOrEquals
Description copied from interface:ExternalTaskQueryOnly select external tasks with a priority that is lower than or equal to the given priority.- Specified by:
priorityLowerThanOrEqualsin interfaceExternalTaskQuery- Parameters:
priority- the priority which is used for the query- Returns:
- the builded external task query
-
processVariableValueEquals
Description copied from interface:ExternalTaskQueryOnly select tasks which have are part of a process that have a variable with the given name set to the given value.- Specified by:
processVariableValueEqualsin interfaceExternalTaskQuery
-
processVariableValueNotEquals
Description copied from interface:ExternalTaskQueryOnly select tasks which have a variable with the given name, but with a different value than the passed value. Byte-arrays andSerializableobjects (which are not primitive type wrappers) are not supported.- Specified by:
processVariableValueNotEqualsin interfaceExternalTaskQuery
-
processVariableValueLike
Description copied from interface:ExternalTaskQueryOnly select tasks which are part of a process that have a variable with the given name and matching the given value. The syntax is that of SQL: for example usage: valueLike(%value%)- Specified by:
processVariableValueLikein interfaceExternalTaskQuery
-
processVariableValueNotLike
Description copied from interface:ExternalTaskQueryOnly select tasks which are part of a process that have a variable with the given name and not matching the given value. The syntax is that of SQL: for example usage: valueNotLike(%value%)- Specified by:
processVariableValueNotLikein interfaceExternalTaskQuery
-
processVariableValueGreaterThan
Description copied from interface:ExternalTaskQueryOnly select tasks which are part of a process that have a variable with the given name and a value greater than the given one.- Specified by:
processVariableValueGreaterThanin interfaceExternalTaskQuery
-
processVariableValueGreaterThanOrEquals
public ExternalTaskQuery processVariableValueGreaterThanOrEquals(String variableName, Object variableValue) Description copied from interface:ExternalTaskQueryOnly select tasks which are part of a process that have a variable with the given name and a value greater than or equal to the given one.- Specified by:
processVariableValueGreaterThanOrEqualsin interfaceExternalTaskQuery
-
processVariableValueLessThan
Description copied from interface:ExternalTaskQueryOnly select tasks which are part of a process that have a variable with the given name and a value less than the given one.- Specified by:
processVariableValueLessThanin interfaceExternalTaskQuery
-
processVariableValueLessThanOrEquals
public ExternalTaskQuery processVariableValueLessThanOrEquals(String variableName, Object variableValue) Description copied from interface:ExternalTaskQueryOnly select tasks which are part of a process that have a variable with the given name and a value greater than or equal to the given one.- Specified by:
processVariableValueLessThanOrEqualsin interfaceExternalTaskQuery
-
matchVariableNamesIgnoreCase
Description copied from interface:ExternalTaskQueryAll queries for task-, process- and case-variables will match the variable names in a case-insensitive way.- Specified by:
matchVariableNamesIgnoreCasein interfaceExternalTaskQuery
-
matchVariableValuesIgnoreCase
Description copied from interface:ExternalTaskQueryAll queries for task-, process- and case-variables will match the variable values in a case-insensitive way.- Specified by:
matchVariableValuesIgnoreCasein interfaceExternalTaskQuery
-
addVariable
-
addVariable
-
suspended
Description copied from interface:ExternalTaskQueryOnly select external tasks that are currently suspended- Specified by:
suspendedin interfaceExternalTaskQuery
-
active
Description copied from interface:ExternalTaskQueryOnly select external tasks that are currently not suspended- Specified by:
activein interfaceExternalTaskQuery
-
withRetriesLeft
Description copied from interface:ExternalTaskQueryOnly select external tasks that have retries > 0- Specified by:
withRetriesLeftin interfaceExternalTaskQuery
-
noRetriesLeft
Description copied from interface:ExternalTaskQueryOnly select external tasks that have retries = 0- Specified by:
noRetriesLeftin interfaceExternalTaskQuery
-
hasExcludingConditions
protected boolean hasExcludingConditions()Description copied from class:AbstractQueryWhether or not the query has excluding conditions. If the query has excluding conditions, (e.g. task due date before and after are excluding), the SQL query is avoided and a default result is returned. The returned result is the same as if the SQL was executed and there were no entries.- Overrides:
hasExcludingConditionsin classAbstractQuery<ExternalTaskQuery,ExternalTask> - Returns:
trueif the query does have excluding conditions,falseotherwise
-
tenantIdIn
Description copied from interface:ExternalTaskQueryOnly select external tasks that belong to one of the given tenant ids.- Specified by:
tenantIdInin interfaceExternalTaskQuery
-
orderById
Description copied from interface:ExternalTaskQueryOrder by external task id (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByIdin interfaceExternalTaskQuery
-
orderByLockExpirationTime
Description copied from interface:ExternalTaskQueryOrder by lock expiration time (needs to be followed byQuery.asc()orQuery.desc()). Ordering of tasks with no lock expiration time is database-dependent.- Specified by:
orderByLockExpirationTimein interfaceExternalTaskQuery
-
orderByProcessInstanceId
Description copied from interface:ExternalTaskQueryOrder by process instance id (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByProcessInstanceIdin interfaceExternalTaskQuery
-
orderByProcessDefinitionId
Description copied from interface:ExternalTaskQueryOrder by process definition id (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByProcessDefinitionIdin interfaceExternalTaskQuery
-
orderByProcessDefinitionKey
Description copied from interface:ExternalTaskQueryOrder by process definition key (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByProcessDefinitionKeyin interfaceExternalTaskQuery
-
orderByTenantId
Description copied from interface:ExternalTaskQueryOrder by tenant id (needs to be followed byQuery.asc()orQuery.desc()). Note that the ordering of external tasks without tenant id is database-specific.- Specified by:
orderByTenantIdin interfaceExternalTaskQuery
-
orderByPriority
Description copied from interface:ExternalTaskQueryOrder by priority (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByPriorityin interfaceExternalTaskQuery
-
orderByCreateTime
Description copied from interface:ExternalTaskQueryOrder by create time (needs to be followed byQuery.asc()orQuery.desc()).- Specified by:
orderByCreateTimein interfaceExternalTaskQuery
-
executeCount
- Specified by:
executeCountin classAbstractQuery<ExternalTaskQuery,ExternalTask>
-
executeList
Description copied from class:AbstractQueryExecutes the actual query to retrieve the list of results.- Specified by:
executeListin classAbstractQuery<ExternalTaskQuery,ExternalTask> page- used if the results must be paged. If null, no paging will be applied.
-
executeIdsList
- Overrides:
executeIdsListin classAbstractQuery<ExternalTaskQuery,ExternalTask>
-
executeDeploymentIdMappingsList
public List<ImmutablePair<String,String>> executeDeploymentIdMappingsList(CommandContext commandContext) - Overrides:
executeDeploymentIdMappingsListin classAbstractQuery<ExternalTaskQuery,ExternalTask>
-
getExternalTaskId
-
getWorkerId
-
getLockExpirationBefore
-
getLockExpirationAfter
-
getTopicName
-
getLocked
-
getNotLocked
-
getExecutionId
-
getProcessInstanceId
-
getProcessDefinitionKey
-
getProcessDefinitionKeys
-
getProcessDefinitionId
-
getProcessDefinitionName
-
getProcessDefinitionNameLike
-
getActivityId
-
getSuspensionState
-
getRetriesLeft
-
getNow
-
ensureVariablesInitialized
protected void ensureVariablesInitialized() -
getVariables
-