Interface TaskQuery
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description TaskQuery
active()
Only select tasks which are active (ie.TaskQuery
activityInstanceIdIn(java.lang.String... activityInstanceIds)
Only select task which have one of the activity instance ids.TaskQuery
caseDefinitionId(java.lang.String caseDefinitionId)
Only select tasks which are part of a case instance which has the given case definition id.TaskQuery
caseDefinitionKey(java.lang.String caseDefinitionKey)
Only select tasks which are part of a case instance which has the given case definition key.TaskQuery
caseDefinitionName(java.lang.String caseDefinitionName)
Only select tasks which are part of a case instance which has the given case definition name.TaskQuery
caseDefinitionNameLike(java.lang.String caseDefinitionNameLike)
Only select tasks which are part of a case instance which case definition name is like the given parameter.TaskQuery
caseExecutionId(java.lang.String caseExecutionId)
Only select tasks for the given case execution.TaskQuery
caseInstanceBusinessKey(java.lang.String caseInstanceBusinessKey)
Only select tasks for the given case instance business keyTaskQuery
caseInstanceBusinessKeyLike(java.lang.String caseInstanceBusinessKeyLike)
Only select tasks matching the given case instance business key.TaskQuery
caseInstanceId(java.lang.String caseInstanceId)
Only select tasks for the given case instance id.TaskQuery
caseInstanceVariableValueEquals(java.lang.String variableName, java.lang.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.TaskQuery
caseInstanceVariableValueGreaterThan(java.lang.String variableName, java.lang.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.TaskQuery
caseInstanceVariableValueGreaterThanOrEquals(java.lang.String variableName, java.lang.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.TaskQuery
caseInstanceVariableValueLessThan(java.lang.String variableName, java.lang.Object variableValue)
Only select tasks which are part of a case instance that have a variable value less than the passed value.TaskQuery
caseInstanceVariableValueLessThanOrEquals(java.lang.String variableName, java.lang.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.TaskQuery
caseInstanceVariableValueLike(java.lang.String variableName, java.lang.String variableValue)
Only select tasks which are part of a case instance that have a variable value like the given value.TaskQuery
caseInstanceVariableValueNotEquals(java.lang.String variableName, java.lang.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.TaskQuery
caseInstanceVariableValueNotLike(java.lang.String variableName, java.lang.String variableValue)
Only select tasks which are part of a case instance that have a variable value not like the given value.TaskQuery
dueAfter(java.util.Date dueDate)
Only select tasks which have a due date after the given date.TaskQuery
dueAfterExpression(java.lang.String dueDateExpression)
Only select tasks which have a due date after the described date by the given expression.TaskQuery
dueBefore(java.util.Date dueDate)
Only select tasks which have a due date before the given date.TaskQuery
dueBeforeExpression(java.lang.String dueDateExpression)
Only select tasks which have a due date before the described date by the given expression.TaskQuery
dueDate(java.util.Date dueDate)
Only select tasks with the given due date.TaskQuery
dueDateExpression(java.lang.String dueDateExpression)
Only select tasks with the described due date by the given expression.TaskQuery
endOr()
endOr() terminates an OR query on which an arbitrary amount of filter criteria were applied.TaskQuery
excludeSubtasks()
Only select tasks that have no parent (i.e.TaskQuery
executionId(java.lang.String executionId)
Only select tasks for the given execution.TaskQuery
followUpAfter(java.util.Date followUpDate)
Only select tasks which have a follow-up date after the given date.TaskQuery
followUpAfterExpression(java.lang.String followUpDateExpression)
Only select tasks which have a follow-up date after the described date by the given expression.TaskQuery
followUpBefore(java.util.Date followUpDate)
Only select tasks which have a follow-up date before the given date.TaskQuery
followUpBeforeExpression(java.lang.String followUpDateExpression)
Only select tasks which have a follow-up date before the described date by the given expression.TaskQuery
followUpBeforeOrNotExistent(java.util.Date followUpDate)
Only select tasks which have no follow-up date or a follow-up date before the given date.TaskQuery
followUpBeforeOrNotExistentExpression(java.lang.String followUpDateExpression)
Only select tasks which have no follow-up date or a follow-up date before the described date by the given expression.TaskQuery
followUpDate(java.util.Date followUpDate)
Only select tasks with the given follow-up date.TaskQuery
followUpDateExpression(java.lang.String followUpDateExpression)
Only select tasks with the described follow-up date by the given expression.TaskQuery
includeAssignedTasks()
Select both assigned and not assigned tasks for candidate user or group queries.TaskQuery
initializeFormKeys()
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).TaskQuery
matchVariableNamesIgnoreCase()
All queries for task-, process- and case-variables will match the variable names in a case-insensitive way.TaskQuery
matchVariableValuesIgnoreCase()
All queries for task-, process- and case-variables will match the variable values in a case-insensitive way.TaskQuery
or()
After calling or(), a chain of several filter criteria could follow.TaskQuery
orderByCaseExecutionId()
Order by case execution id (needs to be followed byQuery.asc()
orQuery.desc()
).TaskQuery
orderByCaseExecutionVariable(java.lang.String variableName, ValueType valueType)
Order by a task variable value of a certain type.TaskQuery
orderByCaseInstanceId()
Order by case instance id (needs to be followed byQuery.asc()
orQuery.desc()
).TaskQuery
orderByCaseInstanceVariable(java.lang.String variableName, ValueType valueType)
Order by a task variable value of a certain type.TaskQuery
orderByDueDate()
Order by due date (needs to be followed byQuery.asc()
orQuery.desc()
).TaskQuery
orderByExecutionId()
Order by execution id (needs to be followed byQuery.asc()
orQuery.desc()
).TaskQuery
orderByExecutionVariable(java.lang.String variableName, ValueType valueType)
Order by an execution variable value of a certain type.TaskQuery
orderByFollowUpDate()
Order by follow-up date (needs to be followed byQuery.asc()
orQuery.desc()
).TaskQuery
orderByLastUpdated()
Order by the time the task was updated last (needs to be followed byQuery.asc()
orQuery.desc()
).TaskQuery
orderByProcessInstanceId()
Order by process instance id (needs to be followed byQuery.asc()
orQuery.desc()
).TaskQuery
orderByProcessVariable(java.lang.String variableName, ValueType valueType)
Order by a process instance variable value of a certain type.TaskQuery
orderByTaskAssignee()
Order by assignee (needs to be followed byQuery.asc()
orQuery.desc()
).TaskQuery
orderByTaskCreateTime()
Order by the time on which the tasks were created (needs to be followed byQuery.asc()
orQuery.desc()
).TaskQuery
orderByTaskDescription()
Order by description (needs to be followed byQuery.asc()
orQuery.desc()
).TaskQuery
orderByTaskId()
Order by task id (needs to be followed byQuery.asc()
orQuery.desc()
).TaskQuery
orderByTaskName()
Order by task name (needs to be followed byQuery.asc()
orQuery.desc()
).TaskQuery
orderByTaskNameCaseInsensitive()
Order by task name case insensitive (needs to be followed byQuery.asc()
orQuery.desc()
).TaskQuery
orderByTaskPriority()
Order by priority (needs to be followed byQuery.asc()
orQuery.desc()
).TaskQuery
orderByTaskVariable(java.lang.String variableName, ValueType valueType)
Order by a task variable value of a certain type.TaskQuery
orderByTenantId()
Order by tenant id (needs to be followed byQuery.asc()
orQuery.desc()
).TaskQuery
processDefinitionId(java.lang.String processDefinitionId)
Only select tasks which are part of a process instance which has the given process definition id.TaskQuery
processDefinitionKey(java.lang.String processDefinitionKey)
Only select tasks which are part of a process instance which has the given process definition key.TaskQuery
processDefinitionKeyIn(java.lang.String... processDefinitionKeys)
Only select tasks which are part of a process instance which has one of the given process definition keys.TaskQuery
processDefinitionName(java.lang.String processDefinitionName)
Only select tasks which are part of a process instance which has the given process definition name.TaskQuery
processDefinitionNameLike(java.lang.String processDefinitionName)
Only select tasks which are part of a process instance which process definition name is like the given parameter.TaskQuery
processInstanceBusinessKey(java.lang.String processInstanceBusinessKey)
Only select tasks for the given process instance business keyTaskQuery
processInstanceBusinessKeyExpression(java.lang.String processInstanceBusinessKeyExpression)
Only select tasks for the given process instance business key described by the given expressionTaskQuery
processInstanceBusinessKeyIn(java.lang.String... processInstanceBusinessKeys)
Only select tasks for any of the given the given process instance business keys.TaskQuery
processInstanceBusinessKeyLike(java.lang.String processInstanceBusinessKey)
Only select tasks matching the given process instance business key.TaskQuery
processInstanceBusinessKeyLikeExpression(java.lang.String processInstanceBusinessKeyExpression)
Only select tasks matching the given process instance business key described by the given expression.TaskQuery
processInstanceId(java.lang.String processInstanceId)
Only select tasks for the given process instance id.TaskQuery
processInstanceIdIn(java.lang.String... processInstanceIds)
Only select tasks for the given process instance ids.TaskQuery
processVariableValueEquals(java.lang.String variableName, java.lang.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.TaskQuery
processVariableValueGreaterThan(java.lang.String variableName, java.lang.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.TaskQuery
processVariableValueGreaterThanOrEquals(java.lang.String variableName, java.lang.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.TaskQuery
processVariableValueLessThan(java.lang.String variableName, java.lang.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.TaskQuery
processVariableValueLessThanOrEquals(java.lang.String variableName, java.lang.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.TaskQuery
processVariableValueLike(java.lang.String variableName, java.lang.String variableValue)
Only select tasks which are part of a process that have a variable with the given name and matching the given value.TaskQuery
processVariableValueNotEquals(java.lang.String variableName, java.lang.Object variableValue)
Only select tasks which have a variable with the given name, but with a different value than the passed value.TaskQuery
processVariableValueNotLike(java.lang.String variableName, java.lang.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.TaskQuery
suspended()
Only select tasks which are suspended, because its process instance was suspended.TaskQuery
taskAssigned()
Only select tasks which have an assignee.TaskQuery
taskAssignee(java.lang.String assignee)
Only select tasks which are assigned to the given user.TaskQuery
taskAssigneeExpression(java.lang.String assigneeExpression)
Only select tasks which are assigned to the user described by the given expression.TaskQuery
taskAssigneeIn(java.lang.String... assignees)
Only select tasks which are assigned to one of the given users.TaskQuery
taskAssigneeLike(java.lang.String assignee)
Only select tasks which are matching the given user.TaskQuery
taskAssigneeLikeExpression(java.lang.String assigneeLikeExpression)
Only select tasks which are assigned to the user described by the given expression.TaskQuery
taskAssigneeNotIn(java.lang.String... assignees)
Only select tasks which are not assigned to any of the given users.TaskQuery
taskCandidateGroup(java.lang.String candidateGroup)
Only select tasks for which users in the given group are candidates.TaskQuery
taskCandidateGroupExpression(java.lang.String candidateGroupExpression)
Only select tasks for which users in the described group by the given expression are candidates.TaskQuery
taskCandidateGroupIn(java.util.List<java.lang.String> candidateGroups)
Only select tasks for which the 'candidateGroup' is one of the given groups.TaskQuery
taskCandidateGroupInExpression(java.lang.String candidateGroupsExpression)
Only select tasks for which the 'candidateGroup' is one of the described groups of the given expression.TaskQuery
taskCandidateUser(java.lang.String candidateUser)
Only select tasks for which the given user or one of his groups is a candidate.TaskQuery
taskCandidateUserExpression(java.lang.String candidateUserExpression)
Only select tasks for which the described user by the given expression is a candidate.TaskQuery
taskCreatedAfter(java.util.Date after)
Only select tasks that are created after the given date.TaskQuery
taskCreatedAfterExpression(java.lang.String afterExpression)
Only select tasks that are created after the date resolved from the given expression.TaskQuery
taskCreatedBefore(java.util.Date before)
Only select tasks that are created before the given date.TaskQuery
taskCreatedBeforeExpression(java.lang.String beforeExpression)
Only select tasks that are created before the date resolved from the given expression.TaskQuery
taskCreatedOn(java.util.Date createTime)
Only select tasks that are created on the given date.TaskQuery
taskCreatedOnExpression(java.lang.String createTimeExpression)
Only select tasks that are created on the date resolved from the given expression.TaskQuery
taskDefinitionKey(java.lang.String key)
Only select tasks with the given taskDefinitionKey.TaskQuery
taskDefinitionKeyIn(java.lang.String... taskDefinitionKeys)
Only select tasks which have one of the taskDefinitionKeys.TaskQuery
taskDefinitionKeyLike(java.lang.String keyLike)
Only select tasks with a taskDefinitionKey that match the given parameter.TaskQuery
taskDelegationState(DelegationState delegationState)
Only select tasks with the givenDelegationState
.TaskQuery
taskDescription(java.lang.String description)
Only select tasks with the given description.TaskQuery
taskDescriptionLike(java.lang.String descriptionLike)
Only select tasks with a description matching the parameter .TaskQuery
taskId(java.lang.String taskId)
Only select tasks with the given task id (in practice, there will be maximum one of this kind)TaskQuery
taskIdIn(java.lang.String... taskIds)
Only select tasks with the given task ids.TaskQuery
taskInvolvedUser(java.lang.String involvedUser)
Only select tasks for which there exist anIdentityLink
with the given userTaskQuery
taskInvolvedUserExpression(java.lang.String involvedUserExpression)
Only select tasks for which there exist anIdentityLink
with the described user by the given expressionTaskQuery
taskMaxPriority(java.lang.Integer maxPriority)
Only select tasks with the given priority or lower.TaskQuery
taskMinPriority(java.lang.Integer minPriority)
Only select tasks with the given priority or higher.TaskQuery
taskName(java.lang.String name)
Only select tasks with the given name.TaskQuery
taskNameLike(java.lang.String nameLike)
Only select tasks with a name matching the parameter.TaskQuery
taskNameNotEqual(java.lang.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.TaskQuery
taskNameNotLike(java.lang.String nameNotLike)
Only select tasks with a name not matching the parameter.TaskQuery
taskOwner(java.lang.String owner)
Only select tasks for which the given user is the owner.TaskQuery
taskOwnerExpression(java.lang.String ownerExpression)
Only select tasks for which the described user by the given expression is the owner.TaskQuery
taskParentTaskId(java.lang.String parentTaskId)
Select the tasks which are sub tasks of the given parent task.TaskQuery
taskPriority(java.lang.Integer priority)
Only select tasks with the given priority.TaskQuery
taskUnassigned()
Only select tasks which don't have an assignee.TaskQuery
taskUnnassigned()
Deprecated.TaskQuery
taskUpdatedAfter(java.util.Date after)
Only select tasks that were updated after the given date.TaskQuery
taskUpdatedAfterExpression(java.lang.String afterExpression)
Only select tasks that were updated after the date resolved from the given expression.TaskQuery
taskVariableValueEquals(java.lang.String variableName, java.lang.Object variableValue)
Only select tasks which have a local task variable with the given name set to the given value.TaskQuery
taskVariableValueGreaterThan(java.lang.String variableName, java.lang.Object variableValue)
Only select tasks which have a local task variable with the given name and a value greater than the given one.TaskQuery
taskVariableValueGreaterThanOrEquals(java.lang.String variableName, java.lang.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.TaskQuery
taskVariableValueLessThan(java.lang.String variableName, java.lang.Object variableValue)
Only select tasks which have a local task variable with the given name and a value less than the given one.TaskQuery
taskVariableValueLessThanOrEquals(java.lang.String variableName, java.lang.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.TaskQuery
taskVariableValueLike(java.lang.String variableName, java.lang.String variableValue)
Only select tasks which have a local task variable with the given name matching the given value.TaskQuery
taskVariableValueNotEquals(java.lang.String variableName, java.lang.Object variableValue)
Only select tasks which have a local task variable with the given name, but with a different value than the passed value.TaskQuery
tenantIdIn(java.lang.String... tenantIds)
Only select tasks with one of the given tenant ids.TaskQuery
withCandidateGroups()
Only select tasks which have a candidate groupTaskQuery
withCandidateUsers()
Only select tasks which have a candidate userTaskQuery
withoutCandidateGroups()
Only select tasks which have no candidate groupTaskQuery
withoutCandidateUsers()
Only select tasks which have no candidate userTaskQuery
withoutDueDate()
Only select tasks which have no due date.TaskQuery
withoutTenantId()
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 Detail
-
taskId
TaskQuery taskId(java.lang.String taskId)
Only select tasks with the given task id (in practice, there will be maximum one of this kind)
-
taskIdIn
TaskQuery taskIdIn(java.lang.String... taskIds)
Only select tasks with the given task ids.
-
taskName
TaskQuery taskName(java.lang.String name)
Only select tasks with the given name. The query will match the names of tasks in a case-insensitive way.
-
taskNameNotEqual
TaskQuery taskNameNotEqual(java.lang.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.
-
taskNameLike
TaskQuery taskNameLike(java.lang.String nameLike)
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
TaskQuery taskNameNotLike(java.lang.String nameNotLike)
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
TaskQuery taskDescription(java.lang.String description)
Only select tasks with the given description. The query will match the descriptions of tasks in a case-insensitive way.
-
taskDescriptionLike
TaskQuery taskDescriptionLike(java.lang.String descriptionLike)
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
TaskQuery taskPriority(java.lang.Integer priority)
Only select tasks with the given priority.
-
taskMinPriority
TaskQuery taskMinPriority(java.lang.Integer minPriority)
Only select tasks with the given priority or higher.
-
taskMaxPriority
TaskQuery taskMaxPriority(java.lang.Integer maxPriority)
Only select tasks with the given priority or lower.
-
taskAssignee
TaskQuery taskAssignee(java.lang.String assignee)
Only select tasks which are assigned to the given user.
-
taskAssigneeExpression
TaskQuery taskAssigneeExpression(java.lang.String assigneeExpression)
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
TaskQuery taskAssigneeLike(java.lang.String assignee)
Only select tasks which are matching the given user. The syntax is that of SQL: for example usage: nameLike(%camunda%)
-
taskAssigneeLikeExpression
TaskQuery taskAssigneeLikeExpression(java.lang.String assigneeLikeExpression)
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
TaskQuery taskAssigneeIn(java.lang.String... assignees)
Only select tasks which are assigned to one of the given users.
-
taskAssigneeNotIn
TaskQuery taskAssigneeNotIn(java.lang.String... assignees)
Only select tasks which are not assigned to any of the given users.
-
taskOwner
TaskQuery taskOwner(java.lang.String owner)
Only select tasks for which the given user is the owner.
-
taskOwnerExpression
TaskQuery taskOwnerExpression(java.lang.String ownerExpression)
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 TaskQuery taskUnnassigned()
Deprecated.
-
taskAssigned
TaskQuery taskAssigned()
Only select tasks which have an assignee.
-
taskDelegationState
TaskQuery taskDelegationState(DelegationState delegationState)
Only select tasks with the givenDelegationState
.
-
taskCandidateUser
TaskQuery taskCandidateUser(java.lang.String candidateUser)
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
TaskQuery taskCandidateUserExpression(java.lang.String candidateUserExpression)
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
TaskQuery taskInvolvedUser(java.lang.String involvedUser)
Only select tasks for which there exist anIdentityLink
with the given user
-
taskInvolvedUserExpression
TaskQuery taskInvolvedUserExpression(java.lang.String involvedUserExpression)
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
TaskQuery taskCandidateGroup(java.lang.String candidateGroup)
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
TaskQuery taskCandidateGroupExpression(java.lang.String candidateGroupExpression)
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
TaskQuery taskCandidateGroupIn(java.util.List<java.lang.String> candidateGroups)
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
TaskQuery taskCandidateGroupInExpression(java.lang.String candidateGroupsExpression)
Only select tasks for which the 'candidateGroup' is one of the described groups of the given expression.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
TaskQuery includeAssignedTasks()
Select both assigned and not assigned tasks for candidate user or group queries.By default
taskCandidateUser(String)
,taskCandidateGroup(String)
andtaskCandidateGroupIn(List)
queries only select not assigned tasks.- Throws:
ProcessEngineException
- When no candidate user or group(s) are specified beforehand
-
processInstanceId
TaskQuery processInstanceId(java.lang.String processInstanceId)
Only select tasks for the given process instance id.
-
processInstanceIdIn
TaskQuery processInstanceIdIn(java.lang.String... processInstanceIds)
Only select tasks for the given process instance ids.
-
processInstanceBusinessKey
TaskQuery processInstanceBusinessKey(java.lang.String processInstanceBusinessKey)
Only select tasks for the given process instance business key
-
processInstanceBusinessKeyExpression
TaskQuery processInstanceBusinessKeyExpression(java.lang.String processInstanceBusinessKeyExpression)
Only select tasks for the given process instance business key described by the given expression
-
processInstanceBusinessKeyIn
TaskQuery processInstanceBusinessKeyIn(java.lang.String... processInstanceBusinessKeys)
Only select tasks for any of the given the given process instance business keys.
-
processInstanceBusinessKeyLike
TaskQuery processInstanceBusinessKeyLike(java.lang.String processInstanceBusinessKey)
Only select tasks matching the given process instance business key. The syntax is that of SQL: for example usage: nameLike(%camunda%)
-
processInstanceBusinessKeyLikeExpression
TaskQuery processInstanceBusinessKeyLikeExpression(java.lang.String processInstanceBusinessKeyExpression)
Only select tasks matching the given process instance business key described by the given expression. The syntax is that of SQL: for example usage: processInstanceBusinessKeyLikeExpression("${ '%camunda%' }")
-
executionId
TaskQuery executionId(java.lang.String executionId)
Only select tasks for the given execution.
-
activityInstanceIdIn
TaskQuery activityInstanceIdIn(java.lang.String... activityInstanceIds)
Only select task which have one of the activity instance ids.
-
taskCreatedOn
TaskQuery taskCreatedOn(java.util.Date createTime)
Only select tasks that are created on the given date.
-
taskCreatedOnExpression
TaskQuery taskCreatedOnExpression(java.lang.String createTimeExpression)
Only select tasks that are created on the date resolved from the given expression.
-
taskCreatedBefore
TaskQuery taskCreatedBefore(java.util.Date before)
Only select tasks that are created before the given date.
-
taskCreatedBeforeExpression
TaskQuery taskCreatedBeforeExpression(java.lang.String beforeExpression)
Only select tasks that are created before the date resolved from the given expression.
-
taskCreatedAfter
TaskQuery taskCreatedAfter(java.util.Date after)
Only select tasks that are created after the given date.
-
taskCreatedAfterExpression
TaskQuery taskCreatedAfterExpression(java.lang.String afterExpression)
Only select tasks that are created after the date resolved from the given expression.
-
taskUpdatedAfter
TaskQuery taskUpdatedAfter(java.util.Date after)
Only select tasks that were updated after the given date.
-
taskUpdatedAfterExpression
TaskQuery taskUpdatedAfterExpression(java.lang.String afterExpression)
Only select tasks that were updated after the date resolved from the given expression.
-
excludeSubtasks
TaskQuery excludeSubtasks()
Only select tasks that have no parent (i.e. do not select subtasks).
-
taskDefinitionKey
TaskQuery taskDefinitionKey(java.lang.String key)
Only select tasks with the given taskDefinitionKey. The task definition key is the id of the userTask: <userTask id="xxx" .../>
-
taskDefinitionKeyLike
TaskQuery taskDefinitionKeyLike(java.lang.String keyLike)
Only select tasks with a taskDefinitionKey that match the given parameter. The syntax is that of SQL: for example usage: taskDefinitionKeyLike("%camunda%"). The task definition key is the id of the userTask: <userTask id="xxx" .../>
-
taskDefinitionKeyIn
TaskQuery taskDefinitionKeyIn(java.lang.String... taskDefinitionKeys)
Only select tasks which have one of the taskDefinitionKeys.
-
taskParentTaskId
TaskQuery taskParentTaskId(java.lang.String parentTaskId)
Select the tasks which are sub tasks of the given parent task.
-
caseInstanceId
TaskQuery caseInstanceId(java.lang.String caseInstanceId)
Only select tasks for the given case instance id.
-
caseInstanceBusinessKey
TaskQuery caseInstanceBusinessKey(java.lang.String caseInstanceBusinessKey)
Only select tasks for the given case instance business key
-
caseInstanceBusinessKeyLike
TaskQuery caseInstanceBusinessKeyLike(java.lang.String caseInstanceBusinessKeyLike)
Only select tasks matching the given case instance business key. The syntax is that of SQL: for example usage: nameLike(%aBusinessKey%)
-
caseExecutionId
TaskQuery caseExecutionId(java.lang.String caseExecutionId)
Only select tasks for the given case execution.
-
caseDefinitionKey
TaskQuery caseDefinitionKey(java.lang.String caseDefinitionKey)
Only select tasks which are part of a case instance which has the given case definition key.
-
caseDefinitionId
TaskQuery caseDefinitionId(java.lang.String caseDefinitionId)
Only select tasks which are part of a case instance which has the given case definition id.
-
caseDefinitionName
TaskQuery caseDefinitionName(java.lang.String caseDefinitionName)
Only select tasks which are part of a case instance which has the given case definition name.
-
caseDefinitionNameLike
TaskQuery caseDefinitionNameLike(java.lang.String caseDefinitionNameLike)
Only select tasks which are part of a case instance which case definition name is like the given parameter. The syntax is that of SQL: for example usage: nameLike(%processDefinitionName%)
-
matchVariableNamesIgnoreCase
TaskQuery matchVariableNamesIgnoreCase()
All queries for task-, process- and case-variables will match the variable names in a case-insensitive way.
-
matchVariableValuesIgnoreCase
TaskQuery matchVariableValuesIgnoreCase()
All queries for task-, process- and case-variables will match the variable values in a case-insensitive way.
-
taskVariableValueEquals
TaskQuery taskVariableValueEquals(java.lang.String variableName, java.lang.Object variableValue)
Only select tasks which have a local task variable with the given name set to the given value.
-
taskVariableValueNotEquals
TaskQuery taskVariableValueNotEquals(java.lang.String variableName, java.lang.Object variableValue)
Only select tasks which have a local task variable with the given name, but with a different value than the passed value. Byte-arrays andSerializable
objects (which are not primitive type wrappers) are not supported.
-
taskVariableValueLike
TaskQuery taskVariableValueLike(java.lang.String variableName, java.lang.String variableValue)
Only select tasks which have a local task variable with the given name matching the given value. The syntax is that of SQL: for example usage: valueLike(%value%)
-
taskVariableValueGreaterThan
TaskQuery taskVariableValueGreaterThan(java.lang.String variableName, java.lang.Object variableValue)
Only select tasks which have a local task variable with the given name and a value greater than the given one.
-
taskVariableValueGreaterThanOrEquals
TaskQuery taskVariableValueGreaterThanOrEquals(java.lang.String variableName, java.lang.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
TaskQuery taskVariableValueLessThan(java.lang.String variableName, java.lang.Object variableValue)
Only select tasks which have a local task variable with the given name and a value less than the given one.
-
taskVariableValueLessThanOrEquals
TaskQuery taskVariableValueLessThanOrEquals(java.lang.String variableName, java.lang.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.
-
processVariableValueEquals
TaskQuery processVariableValueEquals(java.lang.String variableName, java.lang.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.
-
processVariableValueNotEquals
TaskQuery processVariableValueNotEquals(java.lang.String variableName, java.lang.Object variableValue)
Only select tasks which have a variable with the given name, but with a different value than the passed value. Byte-arrays andSerializable
objects (which are not primitive type wrappers) are not supported.
-
processVariableValueLike
TaskQuery processVariableValueLike(java.lang.String variableName, java.lang.String variableValue)
Only 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%)
-
processVariableValueNotLike
TaskQuery processVariableValueNotLike(java.lang.String variableName, java.lang.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. The syntax is that of SQL: for example usage: valueNotLike(%value%)
-
processVariableValueGreaterThan
TaskQuery processVariableValueGreaterThan(java.lang.String variableName, java.lang.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
TaskQuery processVariableValueGreaterThanOrEquals(java.lang.String variableName, java.lang.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
TaskQuery processVariableValueLessThan(java.lang.String variableName, java.lang.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
TaskQuery processVariableValueLessThanOrEquals(java.lang.String variableName, java.lang.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.
-
caseInstanceVariableValueEquals
TaskQuery caseInstanceVariableValueEquals(java.lang.String variableName, java.lang.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. The type of variable is determined based on the value, using types configured inProcessEngineConfiguration#getVariableSerializers()
. Byte-arrays andSerializable
objects (which are not primitive type wrappers) are not supported.- Parameters:
name
- name of the variable, cannot be null.
-
caseInstanceVariableValueNotEquals
TaskQuery caseInstanceVariableValueNotEquals(java.lang.String variableName, java.lang.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. The type of variable is determined based on the value, using types configured inProcessEngineConfiguration#getVariableSerializers()
. Byte-arrays andSerializable
objects (which are not primitive type wrappers) are not supported.- Parameters:
name
- name of the variable, cannot be null.
-
caseInstanceVariableValueLike
TaskQuery caseInstanceVariableValueLike(java.lang.String variableName, java.lang.String variableValue)
Only select tasks which are part of a case instance that have a variable value like the given value. This be used on string variables only.- Parameters:
name
- variable name, cannot be null.value
- variable value. The string can include the wildcard character '%' to express like-strategy: starts with (string%), ends with (%string) or contains (%string%).
-
caseInstanceVariableValueNotLike
TaskQuery caseInstanceVariableValueNotLike(java.lang.String variableName, java.lang.String variableValue)
Only select tasks which are part of a case instance that have a variable value not like the given value. This be used on string variables only.- Parameters:
name
- variable name, cannot be null.value
- variable value. The string can include the wildcard character '%' to express like-strategy: starts with (string%), ends with (%string) or contains (%string%).
-
caseInstanceVariableValueGreaterThan
TaskQuery caseInstanceVariableValueGreaterThan(java.lang.String variableName, java.lang.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. Booleans, Byte-arrays andSerializable
objects (which are not primitive type wrappers) are not supported.- Parameters:
name
- variable name, cannot be null.
-
caseInstanceVariableValueGreaterThanOrEquals
TaskQuery caseInstanceVariableValueGreaterThanOrEquals(java.lang.String variableName, java.lang.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. Booleans, Byte-arrays andSerializable
objects (which are not primitive type wrappers) are not supported.- Parameters:
name
- variable name, cannot be null.
-
caseInstanceVariableValueLessThan
TaskQuery caseInstanceVariableValueLessThan(java.lang.String variableName, java.lang.Object variableValue)
Only select tasks which are part of a case instance that have a variable value less than the passed value. Booleans, Byte-arrays andSerializable
objects (which are not primitive type wrappers) are not supported.- Parameters:
name
- variable name, cannot be null.
-
caseInstanceVariableValueLessThanOrEquals
TaskQuery caseInstanceVariableValueLessThanOrEquals(java.lang.String variableName, java.lang.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. Booleans, Byte-arrays andSerializable
objects (which are not primitive type wrappers) are not supported.- Parameters:
name
- variable name, cannot be null.
-
processDefinitionKey
TaskQuery processDefinitionKey(java.lang.String processDefinitionKey)
Only select tasks which are part of a process instance which has the given process definition key.
-
processDefinitionKeyIn
TaskQuery processDefinitionKeyIn(java.lang.String... processDefinitionKeys)
Only select tasks which are part of a process instance which has one of the given process definition keys.
-
processDefinitionId
TaskQuery processDefinitionId(java.lang.String processDefinitionId)
Only select tasks which are part of a process instance which has the given process definition id.
-
processDefinitionName
TaskQuery processDefinitionName(java.lang.String processDefinitionName)
Only select tasks which are part of a process instance which has the given process definition name.
-
processDefinitionNameLike
TaskQuery processDefinitionNameLike(java.lang.String processDefinitionName)
Only 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%)
-
dueDate
TaskQuery dueDate(java.util.Date dueDate)
Only select tasks with the given due date.
-
dueDateExpression
TaskQuery dueDateExpression(java.lang.String 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
TaskQuery dueBefore(java.util.Date dueDate)
Only select tasks which have a due date before the given date.
-
dueBeforeExpression
TaskQuery dueBeforeExpression(java.lang.String dueDateExpression)
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
TaskQuery dueAfter(java.util.Date dueDate)
Only select tasks which have a due date after the given date.
-
dueAfterExpression
TaskQuery dueAfterExpression(java.lang.String dueDateExpression)
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
TaskQuery followUpDate(java.util.Date followUpDate)
Only select tasks with the given follow-up date.
-
followUpDateExpression
TaskQuery followUpDateExpression(java.lang.String 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
TaskQuery followUpBefore(java.util.Date followUpDate)
Only select tasks which have a follow-up date before the given date.
-
followUpBeforeExpression
TaskQuery followUpBeforeExpression(java.lang.String followUpDateExpression)
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
TaskQuery followUpBeforeOrNotExistent(java.util.Date followUpDate)
Only select tasks which have no follow-up date or a follow-up date before the given date. Serves the typical use case "give me all tasks without follow-up or follow-up date which is already due"
-
followUpBeforeOrNotExistentExpression
TaskQuery followUpBeforeOrNotExistentExpression(java.lang.String followUpDateExpression)
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
TaskQuery followUpAfter(java.util.Date followUpDate)
Only select tasks which have a follow-up date after the given date.
-
followUpAfterExpression
TaskQuery followUpAfterExpression(java.lang.String followUpDateExpression)
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
TaskQuery suspended()
Only select tasks which are suspended, because its process instance was suspended.
-
active
TaskQuery active()
Only select tasks which are active (ie. not suspended)
-
initializeFormKeys
TaskQuery initializeFormKeys()
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).- Returns:
- the query itself
- Throws:
ProcessEngineException
- When method has been executed within "or query". Method must be executed on the base query.
-
tenantIdIn
TaskQuery tenantIdIn(java.lang.String... tenantIds)
Only select tasks with one of the given tenant ids.- 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
TaskQuery withoutTenantId()
Only select tasks which have no tenant id.- 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
TaskQuery withoutDueDate()
Only select tasks which have no due date.
-
orderByTaskId
TaskQuery orderByTaskId()
Order by task id (needs to be followed byQuery.asc()
orQuery.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
-
orderByTaskName
TaskQuery orderByTaskName()
Order by task name (needs to be followed byQuery.asc()
orQuery.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
-
orderByTaskNameCaseInsensitive
TaskQuery orderByTaskNameCaseInsensitive()
Order by task name case insensitive (needs to be followed byQuery.asc()
orQuery.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
-
orderByTaskDescription
TaskQuery orderByTaskDescription()
Order by description (needs to be followed byQuery.asc()
orQuery.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
-
orderByTaskPriority
TaskQuery orderByTaskPriority()
Order by priority (needs to be followed byQuery.asc()
orQuery.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
-
orderByTaskAssignee
TaskQuery orderByTaskAssignee()
Order by assignee (needs to be followed byQuery.asc()
orQuery.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
-
orderByTaskCreateTime
TaskQuery orderByTaskCreateTime()
Order by the time on which the tasks were created (needs to be followed byQuery.asc()
orQuery.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
-
orderByLastUpdated
TaskQuery orderByLastUpdated()
Order by the time the task was updated last (needs to be followed byQuery.asc()
orQuery.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
-
orderByProcessInstanceId
TaskQuery orderByProcessInstanceId()
Order by process instance id (needs to be followed byQuery.asc()
orQuery.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
-
orderByCaseInstanceId
TaskQuery orderByCaseInstanceId()
Order by case instance id (needs to be followed byQuery.asc()
orQuery.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
-
orderByExecutionId
TaskQuery orderByExecutionId()
Order by execution id (needs to be followed byQuery.asc()
orQuery.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
-
orderByCaseExecutionId
TaskQuery orderByCaseExecutionId()
Order by case execution id (needs to be followed byQuery.asc()
orQuery.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
-
orderByDueDate
TaskQuery orderByDueDate()
Order by due date (needs to be followed byQuery.asc()
orQuery.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
-
orderByFollowUpDate
TaskQuery orderByFollowUpDate()
Order by follow-up date (needs to be followed byQuery.asc()
orQuery.desc()
).- Throws:
ProcessEngineException
- When method has been executed within "or query".
-
orderByProcessVariable
TaskQuery orderByProcessVariable(java.lang.String variableName, ValueType valueType)
Order by a process instance variable value of a certain type. Calling this method multiple times specifies secondary, tertiary orderings, etc. The ordering of variables withnull
values is database-specific.- Throws:
ProcessEngineException
- When method has been executed within "or query".
-
orderByExecutionVariable
TaskQuery orderByExecutionVariable(java.lang.String variableName, ValueType valueType)
Order by an execution variable value of a certain type. Calling this method multiple times specifies secondary, tertiary orderings, etc. The ordering of variables withnull
values is database-specific.- Throws:
ProcessEngineException
- When method has been executed within "or query".
-
orderByTaskVariable
TaskQuery orderByTaskVariable(java.lang.String variableName, ValueType valueType)
Order by a task variable value of a certain type. Calling this method multiple times specifies secondary, tertiary orderings, etc. The ordering of variables withnull
values is database-specific.- Throws:
ProcessEngineException
- When method has been executed within "or query".
-
orderByCaseExecutionVariable
TaskQuery orderByCaseExecutionVariable(java.lang.String variableName, ValueType valueType)
Order by a task variable value of a certain type. Calling this method multiple times specifies secondary, tertiary orderings, etc. The ordering of variables withnull
values is database-specific.- Throws:
ProcessEngineException
- When method has been executed within "or query".
-
orderByCaseInstanceVariable
TaskQuery orderByCaseInstanceVariable(java.lang.String variableName, ValueType valueType)
Order by a task variable value of a certain type. Calling this method multiple times specifies secondary, tertiary orderings, etc. The ordering of variables withnull
values is database-specific.- Throws:
ProcessEngineException
- When method has been executed within "or query".
-
orderByTenantId
TaskQuery orderByTenantId()
Order by tenant id (needs to be followed byQuery.asc()
orQuery.desc()
). Note that the ordering of tasks without tenant id is database-specific.- Throws:
ProcessEngineException
- When method has been executed within "or query".
-
or
TaskQuery 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
TaskQuery 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.