Interface TaskQuery
- All Known Implementing Classes:
TaskQueryImpl
Task
s;- Author:
- Joram Barrez, Falko Menge
-
Method Summary
Modifier and TypeMethodDescriptionactive()
Only select tasks which are active (ie.activityInstanceIdIn
(String... activityInstanceIds) Only select task which have one of the activity instance ids.caseDefinitionId
(String caseDefinitionId) Only select tasks which are part of a case instance which has the given case definition id.caseDefinitionKey
(String caseDefinitionKey) Only select tasks which are part of a case instance which has the given case definition key.caseDefinitionName
(String caseDefinitionName) Only select tasks which are part of a case instance which has the given case definition name.caseDefinitionNameLike
(String caseDefinitionNameLike) Only select tasks which are part of a case instance which case definition name is like the given parameter.caseExecutionId
(String caseExecutionId) Only select tasks for the given case execution.caseInstanceBusinessKey
(String caseInstanceBusinessKey) Only select tasks for the given case instance business keycaseInstanceBusinessKeyLike
(String caseInstanceBusinessKeyLike) Only select tasks matching the given case instance business key.caseInstanceId
(String caseInstanceId) Only select tasks for the given case instance id.caseInstanceVariableValueEquals
(String variableName, Object variableValue) Only select tasks which are part of a case instance that have a variable with the given name set to the given value.caseInstanceVariableValueGreaterThan
(String variableName, Object variableValue) Only select tasks which are part of a case instance that have a variable with the given name and a variable value greater than the passed value.caseInstanceVariableValueGreaterThanOrEquals
(String variableName, Object variableValue) Only select tasks which are part of a case instance that have a variable value greater than or equal to the passed value.caseInstanceVariableValueLessThan
(String variableName, Object variableValue) Only select tasks which are part of a case instance that have a variable value less than the passed value.caseInstanceVariableValueLessThanOrEquals
(String variableName, Object variableValue) Only select tasks which are part of a case instance that have a variable value less than or equal to the passed value.caseInstanceVariableValueLike
(String variableName, String variableValue) Only select tasks which are part of a case instance that have a variable value like the given value.caseInstanceVariableValueNotEquals
(String variableName, Object variableValue) Only select tasks which are part of a case instance that have a variable with the given name, but with a different value than the passed value.caseInstanceVariableValueNotLike
(String variableName, String variableValue) Only select tasks which are part of a case instance that have a variable value not like the given value.Only select tasks which have a due date after the given date.dueAfterExpression
(String dueDateExpression) Only select tasks which have a due date after the described date by the given expression.Only select tasks which have a due date before the given date.dueBeforeExpression
(String dueDateExpression) Only select tasks which have a due date before the described date by the given expression.Only select tasks with the given due date.dueDateExpression
(String dueDateExpression) Only select tasks with the described due date by the given expression.endOr()
endOr() terminates an OR query on which an arbitrary amount of filter criteria were applied.Only select tasks that have no parent (i.e.executionId
(String executionId) Only select tasks for the given execution.followUpAfter
(Date followUpDate) Only select tasks which have a follow-up date after the given date.followUpAfterExpression
(String followUpDateExpression) Only select tasks which have a follow-up date after the described date by the given expression.followUpBefore
(Date followUpDate) Only select tasks which have a follow-up date before the given date.followUpBeforeExpression
(String followUpDateExpression) Only select tasks which have a follow-up date before the described date by the given expression.followUpBeforeOrNotExistent
(Date followUpDate) Only select tasks which have no follow-up date or a follow-up date before the given date.followUpBeforeOrNotExistentExpression
(String followUpDateExpression) Only select tasks which have no follow-up date or a follow-up date before the described date by the given expression.followUpDate
(Date followUpDate) Only select tasks with the given follow-up date.followUpDateExpression
(String followUpDateExpression) Only select tasks with the described follow-up date by the given expression.Select both assigned and not assigned tasks for candidate user or group queries.If called, the form keys and form references of the fetched tasks are initialized andTask.getFormKey()
andTask.getCamundaFormRef()
will return a value (in case the task has is linked to a form).All 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.or()
After calling or(), a chain of several filter criteria could follow.Order by case execution id (needs to be followed byQuery.asc()
orQuery.desc()
).orderByCaseExecutionVariable
(String variableName, ValueType valueType) Order by a task variable value of a certain type.Order by case instance id (needs to be followed byQuery.asc()
orQuery.desc()
).orderByCaseInstanceVariable
(String variableName, ValueType valueType) Order by a task variable value of a certain type.Order by due date (needs to be followed byQuery.asc()
orQuery.desc()
).Order by execution id (needs to be followed byQuery.asc()
orQuery.desc()
).orderByExecutionVariable
(String variableName, ValueType valueType) Order by an execution variable value of a certain type.Order by follow-up date (needs to be followed byQuery.asc()
orQuery.desc()
).Order by the time the task was updated last (needs to be followed byQuery.asc()
orQuery.desc()
).Order by process instance id (needs to be followed byQuery.asc()
orQuery.desc()
).orderByProcessVariable
(String variableName, ValueType valueType) Order by a process instance variable value of a certain type.Order by assignee (needs to be followed byQuery.asc()
orQuery.desc()
).Order by the time on which the tasks were created (needs to be followed byQuery.asc()
orQuery.desc()
).Order by description (needs to be followed byQuery.asc()
orQuery.desc()
).Order by task id (needs to be followed byQuery.asc()
orQuery.desc()
).Order by task name (needs to be followed byQuery.asc()
orQuery.desc()
).Order by task name case insensitive (needs to be followed byQuery.asc()
orQuery.desc()
).Order by priority (needs to be followed byQuery.asc()
orQuery.desc()
).orderByTaskVariable
(String variableName, ValueType valueType) Order by a task variable value of a certain type.Order by tenant id (needs to be followed byQuery.asc()
orQuery.desc()
).processDefinitionId
(String processDefinitionId) Only select tasks which are part of a process instance which has the given process definition id.processDefinitionKey
(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.processInstanceBusinessKey
(String processInstanceBusinessKey) Only select tasks for the given process instance business keyprocessInstanceBusinessKeyExpression
(String processInstanceBusinessKeyExpression) Only select tasks for the given process instance business key described by the given expressionprocessInstanceBusinessKeyIn
(String... processInstanceBusinessKeys) Only select tasks for any of the given the given process instance business keys.processInstanceBusinessKeyLike
(String processInstanceBusinessKey) Only select tasks matching the given process instance business key.processInstanceBusinessKeyLikeExpression
(String processInstanceBusinessKeyExpression) Only select tasks matching the given process instance business key described by the given expression.processInstanceId
(String processInstanceId) Only select tasks for the given process instance id.processInstanceIdIn
(String... processInstanceIds) Only select tasks for the given process instance ids.processVariableValueEquals
(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 tasks which are suspended, because its process instance was suspended.Only select tasks which have an assignee.taskAssignee
(String assignee) Only select tasks which are assigned to the given user.taskAssigneeExpression
(String assigneeExpression) Only select tasks which are assigned to the user described by the given expression.taskAssigneeIn
(String... assignees) Only select tasks which are assigned to one of the given users.taskAssigneeLike
(String assignee) Only select tasks which are matching the given user.taskAssigneeLikeExpression
(String assigneeLikeExpression) Only select tasks which are assigned to the user described by the given expression.taskAssigneeNotIn
(String... assignees) Only select tasks which are not assigned to any of the given users.taskCandidateGroup
(String candidateGroup) Only select tasks for which users in the given group are candidates.taskCandidateGroupExpression
(String candidateGroupExpression) Only select tasks for which users in the described group by the given expression are candidates.taskCandidateGroupIn
(List<String> candidateGroups) Only select tasks for which the 'candidateGroup' is one of the given groups.taskCandidateGroupInExpression
(String candidateGroupsExpression) Only select tasks for which the 'candidateGroup' is one of the described groups of the given expression.taskCandidateUser
(String candidateUser) Only select tasks for which the given user or one of his groups is a candidate.taskCandidateUserExpression
(String candidateUserExpression) Only select tasks for which the described user by the given expression is a candidate.taskCreatedAfter
(Date after) Only select tasks that are created after the given date.taskCreatedAfterExpression
(String afterExpression) Only select tasks that are created after the date resolved from the given expression.taskCreatedBefore
(Date before) Only select tasks that are created before the given date.taskCreatedBeforeExpression
(String beforeExpression) Only select tasks that are created before the date resolved from the given expression.taskCreatedOn
(Date createTime) Only select tasks that are created on the given date.taskCreatedOnExpression
(String createTimeExpression) Only select tasks that are created on the date resolved from the given expression.taskDefinitionKey
(String key) Only select tasks with the given taskDefinitionKey.taskDefinitionKeyIn
(String... taskDefinitionKeys) Only select tasks which have one of the taskDefinitionKeys.taskDefinitionKeyLike
(String keyLike) Only select tasks with a taskDefinitionKey that match the given parameter.taskDelegationState
(DelegationState delegationState) Only select tasks with the givenDelegationState
.taskDescription
(String description) Only select tasks with the given description.taskDescriptionLike
(String descriptionLike) Only select tasks with a description matching the parameter .Only select tasks with the given task id (in practice, there will be maximum one of this kind)Only select tasks with the given task ids.taskInvolvedUser
(String involvedUser) Only select tasks for which there exist anIdentityLink
with the given usertaskInvolvedUserExpression
(String involvedUserExpression) Only select tasks for which there exist anIdentityLink
with the described user by the given expressiontaskMaxPriority
(Integer maxPriority) Only select tasks with the given priority or lower.taskMinPriority
(Integer minPriority) Only select tasks with the given priority or higher.Only select tasks with the given name.taskNameLike
(String nameLike) Only select tasks with a name matching the parameter.taskNameNotEqual
(String name) Only select tasks with a name not matching the given name/ The query will match the names of tasks in a case-insensitive way.taskNameNotLike
(String nameNotLike) Only select tasks with a name not matching the parameter.Only select tasks for which the given user is the owner.taskOwnerExpression
(String ownerExpression) Only select tasks for which the described user by the given expression is the owner.taskParentTaskId
(String parentTaskId) Select the tasks which are sub tasks of the given parent task.taskPriority
(Integer priority) Only select tasks with the given priority.Only select tasks which don't have an assignee.Deprecated.taskUpdatedAfter
(Date after) Only select tasks that were updated after the given date.taskUpdatedAfterExpression
(String afterExpression) Only select tasks that were updated after the date resolved from the given expression.taskVariableValueEquals
(String variableName, Object variableValue) Only select tasks which have a local task variable with the given name set to the given value.taskVariableValueGreaterThan
(String variableName, Object variableValue) Only select tasks which have a local task variable with the given name and a value greater than the given one.taskVariableValueGreaterThanOrEquals
(String variableName, Object variableValue) Only select tasks which have a local task variable with the given name and a value greater than or equal to the given one.taskVariableValueLessThan
(String variableName, Object variableValue) Only select tasks which have a local task variable with the given name and a value less than the given one.taskVariableValueLessThanOrEquals
(String variableName, Object variableValue) Only select tasks which have a local task variable with the given name and a value less than or equal to the given one.taskVariableValueLike
(String variableName, String variableValue) Only select tasks which have a local task variable with the given name matching the given value.taskVariableValueNotEquals
(String variableName, Object variableValue) Only select tasks which have a local task variable with the given name, but with a different value than the passed value.tenantIdIn
(String... tenantIds) Only select tasks with one of the given tenant ids.Only select tasks which have a candidate groupOnly select tasks which have a candidate userOnly select tasks which have no candidate groupOnly select tasks which have no candidate userOnly select tasks which have no due date.Only select tasks which have no tenant id.Methods inherited from interface org.camunda.bpm.engine.query.Query
asc, count, desc, list, listPage, singleResult, unlimitedList
-
Method Details
-
taskId
Only select tasks with the given task id (in practice, there will be maximum one of this kind) -
taskIdIn
Only select tasks with the given task ids. -
taskName
Only select tasks with the given name. The query will match the names of tasks in a case-insensitive way. -
taskNameNotEqual
Only select tasks with a name not matching the given name/ The query will match the names of tasks in a case-insensitive way. -
taskNameLike
Only select tasks with a name matching the parameter. The syntax is that of SQL: for example usage: nameLike(%camunda%). The query will match the names of tasks in a case-insensitive way. -
taskNameNotLike
Only select tasks with a name not matching the parameter. The syntax is that of SQL: for example usage: nameNotLike(%camunda%) The query will match the names of tasks in a case-insensitive way. -
taskDescription
Only select tasks with the given description. The query will match the descriptions of tasks in a case-insensitive way. -
taskDescriptionLike
Only select tasks with a description matching the parameter . The syntax is that of SQL: for example usage: descriptionLike(%camunda%) The query will match the descriptions of tasks in a case-insensitive way. -
taskPriority
Only select tasks with the given priority. -
taskMinPriority
Only select tasks with the given priority or higher. -
taskMaxPriority
Only select tasks with the given priority or lower. -
taskAssignee
Only select tasks which are assigned to the given user. -
taskAssigneeExpression
Only select tasks which are assigned to the user described by the given expression.
- Throws:
BadUserRequestException
-- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
Query.list()
,Query.listPage(int, int)
,Query.singleResult()
, orQuery.count()
) or stored queries (in case the query is stored along with a filter). Expression evaluation can be activated by setting the process engine configuration propertiesenableExpressionsInAdhocQueries
(defaultfalse
) andenableExpressionsInStoredQueries
(defaulttrue
) totrue
.
- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
-
taskAssigneeLike
Only select tasks which are matching the given user. The syntax is that of SQL: for example usage: nameLike(%camunda%) -
taskAssigneeLikeExpression
Only select tasks which are assigned to the user described by the given expression. The syntax is that of SQL: for example usage: taskAssigneeLikeExpression("${'%test%'}")
- Throws:
BadUserRequestException
-- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
Query.list()
,Query.listPage(int, int)
,Query.singleResult()
, orQuery.count()
) or stored queries (in case the query is stored along with a filter). Expression evaluation can be activated by setting the process engine configuration propertiesenableExpressionsInAdhocQueries
(defaultfalse
) andenableExpressionsInStoredQueries
(defaulttrue
) totrue
.
- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
-
taskAssigneeIn
Only select tasks which are assigned to one of the given users. -
taskAssigneeNotIn
Only select tasks which are not assigned to any of the given users. -
taskOwner
Only select tasks for which the given user is the owner. -
taskOwnerExpression
Only select tasks for which the described user by the given expression is the owner.
- Throws:
BadUserRequestException
-- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
Query.list()
,Query.listPage(int, int)
,Query.singleResult()
, orQuery.count()
) or stored queries (in case the query is stored along with a filter). Expression evaluation can be activated by setting the process engine configuration propertiesenableExpressionsInAdhocQueries
(defaultfalse
) andenableExpressionsInStoredQueries
(defaulttrue
) totrue
.
- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
-
taskUnassigned
TaskQuery taskUnassigned()Only select tasks which don't have an assignee. -
taskUnnassigned
Deprecated.- See Also:
-
taskAssigned
TaskQuery taskAssigned()Only select tasks which have an assignee. -
taskDelegationState
Only select tasks with the givenDelegationState
. -
taskCandidateUser
Only select tasks for which the given user or one of his groups is a candidate.Per default it only selects tasks which are not already assigned to a user. To also include assigned task in the result specify
includeAssignedTasks()
in your query.- Throws:
ProcessEngineException
-- When query is executed and
taskCandidateGroup(String)
ortaskCandidateGroupIn(List)
has been executed on the "and query" instance. No exception is thrown when query is executed andtaskCandidateGroup(String)
ortaskCandidateGroupIn(List)
has been executed on the "or query" instance. - When passed user is
null
.
- When query is executed and
BadUserRequestException
-- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
Query.list()
,Query.listPage(int, int)
,Query.singleResult()
, orQuery.count()
) or stored queries (in case the query is stored along with a filter). Expression evaluation can be activated by setting the process engine configuration propertiesenableExpressionsInAdhocQueries
(defaultfalse
) andenableExpressionsInStoredQueries
(defaulttrue
) totrue
.
- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
-
taskCandidateUserExpression
Only select tasks for which the described user by the given expression is a candidate.Per default it only selects tasks which are not already assigned to a user. To also include assigned task in the result specify
includeAssignedTasks()
in your query.- Throws:
ProcessEngineException
-- When query is executed and
taskCandidateGroup(String)
ortaskCandidateGroupIn(List)
has been executed on the query instance. - When passed user is
null
.
- When query is executed and
BadUserRequestException
-- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
Query.list()
,Query.listPage(int, int)
,Query.singleResult()
, orQuery.count()
) or stored queries (in case the query is stored along with a filter). Expression evaluation can be activated by setting the process engine configuration propertiesenableExpressionsInAdhocQueries
(defaultfalse
) andenableExpressionsInStoredQueries
(defaulttrue
) totrue
.
- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
-
taskInvolvedUser
Only select tasks for which there exist anIdentityLink
with the given user -
taskInvolvedUserExpression
Only select tasks for which there exist an
IdentityLink
with the described user by the given expression- Throws:
BadUserRequestException
-- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
Query.list()
,Query.listPage(int, int)
,Query.singleResult()
, orQuery.count()
) or stored queries (in case the query is stored along with a filter). Expression evaluation can be activated by setting the process engine configuration propertiesenableExpressionsInAdhocQueries
(defaultfalse
) andenableExpressionsInStoredQueries
(defaulttrue
) totrue
.
- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
-
withCandidateGroups
TaskQuery withCandidateGroups()Only select tasks which have a candidate group- Throws:
ProcessEngineException
- When method has been executed within "or query".
-
withoutCandidateGroups
TaskQuery withoutCandidateGroups()Only select tasks which have no candidate group- Throws:
ProcessEngineException
- When method has been executed within "or query".
-
withCandidateUsers
TaskQuery withCandidateUsers()Only select tasks which have a candidate user- Throws:
ProcessEngineException
- When method has been executed within "or query".
-
withoutCandidateUsers
TaskQuery withoutCandidateUsers()Only select tasks which have no candidate user- Throws:
ProcessEngineException
- When method has been executed within "or query".
-
taskCandidateGroup
Only select tasks for which users in the given group are candidates.Per default it only selects tasks which are not already assigned to a user. To also include assigned task in the result specify
includeAssignedTasks()
in your query.- Throws:
ProcessEngineException
-- When query is executed and
taskCandidateUser(String)
ortaskCandidateGroupIn(List)
has been executed on the "and query" instance.
No exception is thrown when query is executed and
taskCandidateUser(String)
ortaskCandidateGroupIn(List)
has been executed on the "or query" instance.- When query is executed and
- When passed group is
null
.
-
-
taskCandidateGroupExpression
Only select tasks for which users in the described group by the given expression are candidates.Per default it only selects tasks which are not already assigned to a user. To also include assigned task in the result specify
includeAssignedTasks()
in your query.- Throws:
ProcessEngineException
-- When query is executed and
taskCandidateUser(String)
ortaskCandidateGroupIn(List)
has been executed on the query instance. - When passed group is
null
.
- When query is executed and
BadUserRequestException
-- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
Query.list()
,Query.listPage(int, int)
,Query.singleResult()
, orQuery.count()
) or stored queries (in case the query is stored along with a filter). Expression evaluation can be activated by setting the process engine configuration propertiesenableExpressionsInAdhocQueries
(defaultfalse
) andenableExpressionsInStoredQueries
(defaulttrue
) totrue
.
- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
-
taskCandidateGroupIn
Only select tasks for which the 'candidateGroup' is one of the given groups.Per default it only selects tasks which are not already assigned to a user. To also include assigned task in the result specify
includeAssignedTasks()
in your query.- Throws:
ProcessEngineException
-- When query is executed and
taskCandidateGroup(String)
ortaskCandidateUser(String)
has been executed on the "and query" instance.
No exception is thrown when query is executed and
taskCandidateGroup(String)
ortaskCandidateUser(String)
has been executed on the "or query" instance.- When query is executed and
- When passed group list is empty or
null
.
taskCandidateGroupInExpression
Per default it only selects tasks which are not already assigned
to a user. To also include assigned task in the result specify
includeAssignedTasks()
in your query.
- Throws:
ProcessEngineException
-- When query is executed and
taskCandidateGroup(String)
ortaskCandidateUser(String)
has been executed on the query instance. - When passed group list is empty or
null
.
- When query is executed and
BadUserRequestException
-- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
Query.list()
,Query.listPage(int, int)
,Query.singleResult()
, orQuery.count()
) or stored queries (in case the query is stored along with a filter). Expression evaluation can be activated by setting the process engine configuration propertiesenableExpressionsInAdhocQueries
(defaultfalse
) andenableExpressionsInStoredQueries
(defaulttrue
) totrue
.
- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
includeAssignedTasks
By default taskCandidateUser(String)
, taskCandidateGroup(String)
and taskCandidateGroupIn(List)
queries only select not assigned tasks.
- Throws:
ProcessEngineException
- When no candidate user or group(s) are specified beforehand
processInstanceId
processInstanceIdIn
processInstanceBusinessKey
processInstanceBusinessKeyExpression
processInstanceBusinessKeyIn
processInstanceBusinessKeyLike
processInstanceBusinessKeyLikeExpression
executionId
activityInstanceIdIn
taskCreatedOn
taskCreatedOnExpression
taskCreatedBefore
taskCreatedBeforeExpression
taskCreatedAfter
taskCreatedAfterExpression
taskUpdatedAfter
taskUpdatedAfterExpression
excludeSubtasks
taskDefinitionKey
taskDefinitionKeyLike
taskDefinitionKeyIn
taskParentTaskId
caseInstanceId
caseInstanceBusinessKey
caseInstanceBusinessKeyLike
caseExecutionId
caseDefinitionKey
caseDefinitionId
caseDefinitionName
caseDefinitionNameLike
matchVariableNamesIgnoreCase
matchVariableValuesIgnoreCase
taskVariableValueEquals
taskVariableValueNotEquals
Serializable
objects (which are not primitive type wrappers)
are not supported.taskVariableValueLike
taskVariableValueGreaterThan
taskVariableValueGreaterThanOrEquals
taskVariableValueLessThan
taskVariableValueLessThanOrEquals
processVariableValueEquals
processVariableValueNotEquals
Serializable
objects (which are not primitive type wrappers)
are not supported.processVariableValueLike
processVariableValueNotLike
processVariableValueGreaterThan
processVariableValueGreaterThanOrEquals
processVariableValueLessThan
processVariableValueLessThanOrEquals
caseInstanceVariableValueEquals
ProcessEngineConfigurationImpl.getVariableSerializers()
.
Byte-arrays and Serializable
objects (which are not primitive type wrappers)
are not supported.
- Parameters:
variableName
- name of the variable, cannot be null.
caseInstanceVariableValueNotEquals
ProcessEngineConfigurationImpl.getVariableSerializers()
.
Byte-arrays and Serializable
objects (which are not primitive type wrappers)
are not supported.
- Parameters:
variableName
- name of the variable, cannot be null.
caseInstanceVariableValueLike
This be used on string variables only.
- Parameters:
variableName
- variable name, cannot be null.variableValue
- variable value. The string can include the wildcard character '%' to express like-strategy: starts with (string%), ends with (%string) or contains (%string%).
caseInstanceVariableValueNotLike
This be used on string variables only.
- Parameters:
variableName
- variable name, cannot be null.variableValue
- variable value. The string can include the wildcard character '%' to express like-strategy: starts with (string%), ends with (%string) or contains (%string%).
caseInstanceVariableValueGreaterThan
Booleans, Byte-arrays and Serializable
objects (which are not primitive type wrappers)
are not supported.
- Parameters:
variableName
- variable name, cannot be null.
caseInstanceVariableValueGreaterThanOrEquals
Booleans, Byte-arrays and Serializable
objects (which
are not primitive type wrappers) are not supported.
- Parameters:
variableName
- variable name, cannot be null.
caseInstanceVariableValueLessThan
Booleans, Byte-arrays and Serializable
objects (which are not primitive type wrappers)
are not supported.
- Parameters:
variableName
- variable name, cannot be null.
caseInstanceVariableValueLessThanOrEquals
Booleans, Byte-arrays and Serializable
objects (which are not primitive type wrappers)
are not supported.
- Parameters:
variableName
- variable name, cannot be null.
processDefinitionKey
processDefinitionKeyIn
processDefinitionId
processDefinitionName
processDefinitionNameLike
dueDate
dueDateExpression
Only select tasks with the described due date by the given expression.
- Throws:
BadUserRequestException
-- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
Query.list()
,Query.listPage(int, int)
,Query.singleResult()
, orQuery.count()
) or stored queries (in case the query is stored along with a filter). Expression evaluation can be activated by setting the process engine configuration propertiesenableExpressionsInAdhocQueries
(defaultfalse
) andenableExpressionsInStoredQueries
(defaulttrue
) totrue
.
- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
dueBefore
dueBeforeExpression
Only select tasks which have a due date before the described date by the given expression.
- Throws:
BadUserRequestException
-- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
Query.list()
,Query.listPage(int, int)
,Query.singleResult()
, orQuery.count()
) or stored queries (in case the query is stored along with a filter). Expression evaluation can be activated by setting the process engine configuration propertiesenableExpressionsInAdhocQueries
(defaultfalse
) andenableExpressionsInStoredQueries
(defaulttrue
) totrue
.
- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
dueAfter
dueAfterExpression
Only select tasks which have a due date after the described date by the given expression.
- Throws:
BadUserRequestException
-- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
Query.list()
,Query.listPage(int, int)
,Query.singleResult()
, orQuery.count()
) or stored queries (in case the query is stored along with a filter). Expression evaluation can be activated by setting the process engine configuration propertiesenableExpressionsInAdhocQueries
(defaultfalse
) andenableExpressionsInStoredQueries
(defaulttrue
) totrue
.
- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
followUpDate
followUpDateExpression
Only select tasks with the described follow-up date by the given expression.
- Throws:
BadUserRequestException
-- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
Query.list()
,Query.listPage(int, int)
,Query.singleResult()
, orQuery.count()
) or stored queries (in case the query is stored along with a filter). Expression evaluation can be activated by setting the process engine configuration propertiesenableExpressionsInAdhocQueries
(defaultfalse
) andenableExpressionsInStoredQueries
(defaulttrue
) totrue
.
- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
followUpBefore
followUpBeforeExpression
Only select tasks which have a follow-up date before the described date by the given expression.
- Throws:
BadUserRequestException
-- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
Query.list()
,Query.listPage(int, int)
,Query.singleResult()
, orQuery.count()
) or stored queries (in case the query is stored along with a filter). Expression evaluation can be activated by setting the process engine configuration propertiesenableExpressionsInAdhocQueries
(defaultfalse
) andenableExpressionsInStoredQueries
(defaulttrue
) totrue
.
- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
followUpBeforeOrNotExistent
followUpBeforeOrNotExistentExpression
Only select tasks which have no follow-up date or a follow-up date before the described date by the given expression. Serves the typical use case "give me all tasks without follow-up or follow-up date which is already due"
- Throws:
BadUserRequestException
-- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
Query.list()
,Query.listPage(int, int)
,Query.singleResult()
, orQuery.count()
) or stored queries (in case the query is stored along with a filter). Expression evaluation can be activated by setting the process engine configuration propertiesenableExpressionsInAdhocQueries
(defaultfalse
) andenableExpressionsInStoredQueries
(defaulttrue
) totrue
.
- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
followUpAfter
followUpAfterExpression
Only select tasks which have a follow-up date after the described date by the given expression.
- Throws:
BadUserRequestException
-- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
Query.list()
,Query.listPage(int, int)
,Query.singleResult()
, orQuery.count()
) or stored queries (in case the query is stored along with a filter). Expression evaluation can be activated by setting the process engine configuration propertiesenableExpressionsInAdhocQueries
(defaultfalse
) andenableExpressionsInStoredQueries
(defaulttrue
) totrue
.
- When the query is executed and expressions are disabled for adhoc queries
(in case the query is executed via
suspended
active
initializeFormKeys
Task.getFormKey()
and Task.getCamundaFormRef()
will return a value (in
case the task has is linked to a form).- Returns:
- the query itself
- Throws:
ProcessEngineException
- When method has been executed within "or query". Method must be executed on the base query.
tenantIdIn
- Throws:
ProcessEngineException
-- When a query is executed and
withoutTenantId()
has been executed on the "and query" instance. No exception is thrown when a query is executed andwithoutTenantId()
has been executed on the "or query" instance. - When a
null
tenant id is passed.
- When a query is executed and
withoutTenantId
- Throws:
ProcessEngineException
- When query is executed andtenantIdIn(String...)
has been executed on the "and query" instance. No exception is thrown when query is executed andtenantIdIn(String...)
has been executed on the "or query" instance.
withoutDueDate
orderByTaskId
Query.asc()
or Query.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
orderByTaskName
Query.asc()
or Query.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
orderByTaskNameCaseInsensitive
Query.asc()
or Query.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
orderByTaskDescription
Query.asc()
or Query.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
orderByTaskPriority
Query.asc()
or Query.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
orderByTaskAssignee
Query.asc()
or Query.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
orderByTaskCreateTime
Query.asc()
or Query.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
orderByLastUpdated
Query.asc()
or Query.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
orderByProcessInstanceId
Query.asc()
or Query.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
orderByCaseInstanceId
Query.asc()
or Query.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
orderByExecutionId
Query.asc()
or Query.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
orderByCaseExecutionId
Query.asc()
or Query.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
orderByDueDate
Query.asc()
or Query.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
orderByFollowUpDate
Query.asc()
or Query.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
orderByProcessVariable
null
values is database-specific.- Throws:
ProcessEngineException
- When method has been executed within "or query".
orderByExecutionVariable
null
values is database-specific.- Throws:
ProcessEngineException
- When method has been executed within "or query".
orderByTaskVariable
null
values is database-specific.- Throws:
ProcessEngineException
- When method has been executed within "or query".
orderByCaseExecutionVariable
null
values is database-specific.- Throws:
ProcessEngineException
- When method has been executed within "or query".
orderByCaseInstanceVariable
null
values is database-specific.- Throws:
ProcessEngineException
- When method has been executed within "or query".
orderByTenantId
Query.asc()
or Query.desc()
).
Note that the ordering of tasks without tenant id is database-specific.- Throws:
ProcessEngineException
- When method has been executed within "or query".
or
After calling or(), a chain of several filter criteria could follow. Each filter criterion that follows or()
will be linked together with an OR expression until the OR query is terminated. To terminate the OR query right
after the last filter criterion was applied, endOr()
must be invoked.
- Returns:
- an object of the type
TaskQuery
on which an arbitrary amount of filter criteria could be applied. The several filter criteria will be linked together by an OR expression. - Throws:
ProcessEngineException
- when or() has been invoked directly after or() or after or() and trailing filter criteria. To prevent throwing this exception,endOr()
must be invoked after a chain of filter criteria to mark the end of the OR query.
endOr
endOr() terminates an OR query on which an arbitrary amount of filter criteria were applied. To terminate the
OR query which has been started by invoking or()
, endOr() must be invoked. Filter criteria which are
applied after calling endOr() are linked together by an AND expression.
- Returns:
- an object of the type
TaskQuery
on which an arbitrary amount of filter criteria could be applied. The filter criteria will be linked together by an AND expression. - Throws:
ProcessEngineException
- when endOr() has been invoked beforeor()
was invoked. To prevent throwing this exception,or()
must be invoked first.