org.activiti.engine.task
Interface TaskQuery

All Superinterfaces:
Query<TaskQuery,Task>

public interface TaskQuery
extends Query<TaskQuery,Task>

Allows programmatic querying of Tasks;

Author:
Joram Barrez

Method Summary
 TaskQuery dueAfter(Date dueDate)
          Only select tasks which have a due date after the given date.
 TaskQuery dueBefore(Date dueDate)
          Only select tasks which have a due date before the given date.
 TaskQuery dueDate(Date dueDate)
          Only select tasks with the given due date.
 TaskQuery executionId(String executionId)
          Only select tasks for the given execution.
 TaskQuery orderByDueDate()
          Order by due date (needs to be followed by Query.asc() or Query.desc()).
 TaskQuery orderByExecutionId()
          Order by execution id (needs to be followed by Query.asc() or Query.desc()).
 TaskQuery orderByProcessInstanceId()
          Order by process instance id (needs to be followed by Query.asc() or Query.desc()).
 TaskQuery orderByTaskAssignee()
          Order by assignee (needs to be followed by Query.asc() or Query.desc()).
 TaskQuery orderByTaskCreateTime()
          Order by the time on which the tasks were created (needs to be followed by Query.asc() or Query.desc()).
 TaskQuery orderByTaskDescription()
          Order by description (needs to be followed by Query.asc() or Query.desc()).
 TaskQuery orderByTaskId()
          Order by task id (needs to be followed by Query.asc() or Query.desc()).
 TaskQuery orderByTaskName()
          Order by task name (needs to be followed by Query.asc() or Query.desc()).
 TaskQuery orderByTaskPriority()
          Order by priority (needs to be followed by Query.asc() or Query.desc()).
 TaskQuery processDefinitionId(String processDefinitionId)
          Only select tasks which are part of a process instance which has the given process definition id.
 TaskQuery processDefinitionKey(String processDefinitionKey)
          Only select tasks which are part of a process instance which has the given process definition key.
 TaskQuery processDefinitionName(String processDefinitionName)
          Only select tasks which are part of a process instance which has the given process definition name.
 TaskQuery processInstanceBusinessKey(String processInstanceBusinessKey)
          Only select tasks foe the given business key
 TaskQuery processInstanceId(String processInstanceId)
          Only select tasks for the given process instance id.
 TaskQuery 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.
 TaskQuery taskAssignee(String assignee)
          Only select tasks which are assigned to the given user.
 TaskQuery taskCandidateGroup(String candidateGroup)
          Only select tasks for which users in the given group are candidates.
 TaskQuery taskCandidateGroupIn(List<String> candidateGroups)
          Only select tasks for which the 'candidateGroup' is one of the given groups.
 TaskQuery taskCandidateUser(String candidateUser)
          Only select tasks for which the given user is a candidate.
 TaskQuery taskCreatedAfter(Date after)
          Only select tasks that are created after the given date.
 TaskQuery taskCreatedBefore(Date before)
          Only select tasks that are created before the given date.
 TaskQuery taskCreatedOn(Date createTime)
          Only select tasks that are created on the given date.
 TaskQuery taskDefinitionKey(String key)
          Only select tasks with the given taskDefinitionKey.
 TaskQuery taskDefinitionKeyLike(String keyLike)
          Only select tasks with a taskDefinitionKey that match the given parameter.
 TaskQuery taskDescription(String description)
          Only select tasks with the given description.
 TaskQuery taskDescriptionLike(String descriptionLike)
          Only select tasks with a description matching the parameter .
 TaskQuery taskId(String taskId)
          Only select tasks with the given task id (in practice, there will be maximum one of this kind)
 TaskQuery taskInvolvedUser(String involvedUser)
          Only select tasks for which there exist an IdentityLink with the given user
 TaskQuery taskMaxPriority(Integer maxPriority)
          Only select tasks with the given priority or lower.
 TaskQuery taskMinPriority(Integer minPriority)
          Only select tasks with the given priority or higher.
 TaskQuery taskName(String name)
          Only select tasks with the given name
 TaskQuery taskNameLike(String nameLike)
          Only select tasks with a name matching the parameter.
 TaskQuery taskOwner(String owner)
          Only select tasks for which the given user is the owner.
 TaskQuery taskPriority(Integer priority)
          Only select tasks with the given priority.
 TaskQuery taskUnnassigned()
          Only select tasks which don't have an assignee.
 TaskQuery taskVariableValueEquals(String variableName, Object variableValue)
          Only select tasks which have a local task variable with the given name set to the given value.
 
Methods inherited from interface org.activiti.engine.query.Query
asc, count, desc, list, listPage, singleResult
 

Method Detail

taskId

TaskQuery taskId(String taskId)
Only select tasks with the given task id (in practice, there will be maximum one of this kind)


taskName

TaskQuery taskName(String name)
Only select tasks with the given name


taskNameLike

TaskQuery taskNameLike(String nameLike)
Only select tasks with a name matching the parameter. The syntax is that of SQL: for example usage: nameLike(%activiti%)


taskDescription

TaskQuery taskDescription(String description)
Only select tasks with the given description.


taskDescriptionLike

TaskQuery taskDescriptionLike(String descriptionLike)
Only select tasks with a description matching the parameter . The syntax is that of SQL: for example usage: descriptionLike(%activiti%)


taskPriority

TaskQuery taskPriority(Integer priority)
Only select tasks with the given priority.


taskMinPriority

TaskQuery taskMinPriority(Integer minPriority)
Only select tasks with the given priority or higher.


taskMaxPriority

TaskQuery taskMaxPriority(Integer maxPriority)
Only select tasks with the given priority or lower.


taskAssignee

TaskQuery taskAssignee(String assignee)
Only select tasks which are assigned to the given user.


taskOwner

TaskQuery taskOwner(String owner)
Only select tasks for which the given user is the owner.


taskUnnassigned

TaskQuery taskUnnassigned()
Only select tasks which don't have an assignee.


taskCandidateUser

TaskQuery taskCandidateUser(String candidateUser)
Only select tasks for which the given user is a candidate.


taskInvolvedUser

TaskQuery taskInvolvedUser(String involvedUser)
Only select tasks for which there exist an IdentityLink with the given user


taskCandidateGroup

TaskQuery taskCandidateGroup(String candidateGroup)
Only select tasks for which users in the given group are candidates.


taskCandidateGroupIn

TaskQuery taskCandidateGroupIn(List<String> candidateGroups)
Only select tasks for which the 'candidateGroup' is one of the given groups.

Throws:
ActivitiException - When query is executed and taskCandidateGroup(String) or taskCandidateUser(String) has been executed on the query instance. When passed group list is empty or null.

processInstanceId

TaskQuery processInstanceId(String processInstanceId)
Only select tasks for the given process instance id.


processInstanceBusinessKey

TaskQuery processInstanceBusinessKey(String processInstanceBusinessKey)
Only select tasks foe the given business key


executionId

TaskQuery executionId(String executionId)
Only select tasks for the given execution.


taskCreatedOn

TaskQuery taskCreatedOn(Date createTime)
Only select tasks that are created on the given date.


taskCreatedBefore

TaskQuery taskCreatedBefore(Date before)
Only select tasks that are created before the given date.


taskCreatedAfter

TaskQuery taskCreatedAfter(Date after)
Only select tasks that are created after the given date.


taskDefinitionKey

TaskQuery taskDefinitionKey(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(String keyLike)
Only select tasks with a taskDefinitionKey that match the given parameter. The syntax is that of SQL: for example usage: taskDefinitionKeyLike("%activiti%"). The task definition key is the id of the userTask: <userTask id="xxx" .../>


taskVariableValueEquals

TaskQuery taskVariableValueEquals(String variableName,
                                  Object variableValue)
Only select tasks which have a local task variable with the given name set to the given value.


processVariableValueEquals

TaskQuery 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.


processDefinitionKey

TaskQuery processDefinitionKey(String processDefinitionKey)
Only select tasks which are part of a process instance which has the given process definition key.


processDefinitionId

TaskQuery processDefinitionId(String processDefinitionId)
Only select tasks which are part of a process instance which has the given process definition id.


processDefinitionName

TaskQuery processDefinitionName(String processDefinitionName)
Only select tasks which are part of a process instance which has the given process definition name.


dueDate

TaskQuery dueDate(Date dueDate)
Only select tasks with the given due date.


dueBefore

TaskQuery dueBefore(Date dueDate)
Only select tasks which have a due date before the given date.


dueAfter

TaskQuery dueAfter(Date dueDate)
Only select tasks which have a due date after the given date.


orderByTaskId

TaskQuery orderByTaskId()
Order by task id (needs to be followed by Query.asc() or Query.desc()).


orderByTaskName

TaskQuery orderByTaskName()
Order by task name (needs to be followed by Query.asc() or Query.desc()).


orderByTaskDescription

TaskQuery orderByTaskDescription()
Order by description (needs to be followed by Query.asc() or Query.desc()).


orderByTaskPriority

TaskQuery orderByTaskPriority()
Order by priority (needs to be followed by Query.asc() or Query.desc()).


orderByTaskAssignee

TaskQuery orderByTaskAssignee()
Order by assignee (needs to be followed by Query.asc() or Query.desc()).


orderByTaskCreateTime

TaskQuery orderByTaskCreateTime()
Order by the time on which the tasks were created (needs to be followed by Query.asc() or Query.desc()).


orderByProcessInstanceId

TaskQuery orderByProcessInstanceId()
Order by process instance id (needs to be followed by Query.asc() or Query.desc()).


orderByExecutionId

TaskQuery orderByExecutionId()
Order by execution id (needs to be followed by Query.asc() or Query.desc()).


orderByDueDate

TaskQuery orderByDueDate()
Order by due date (needs to be followed by Query.asc() or Query.desc()).



Copyright © 2012 Alfresco. All Rights Reserved.