org.activiti.engine.task
接口 TaskQuery

所有超级接口:
Query<TaskQuery,Task>
所有已知实现类:
TaskQueryImpl

public interface TaskQuery
extends Query<TaskQuery,Task>

Allows programmatic querying of Tasks;

作者:
Joram Barrez, Falko Menge, Tijs Rademakers

方法摘要
 TaskQuery active()
          Only selects tasks which are active (ie. not suspended)
 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 excludeSubtasks()
          Only select tasks that have no parent (i.e. do not select subtasks).
 TaskQuery executionId(String executionId)
          Only select tasks for the given execution.
 TaskQuery includeProcessVariables()
          Include global task variables in the task query result
 TaskQuery includeTaskLocalVariables()
          Include local task variables in the task query result
 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 processDefinitionKeyLike(String processDefinitionKeyLike)
          Only select tasks which are part of a process instance which has a process definition key like the given value.
 TaskQuery processDefinitionName(String processDefinitionName)
          Only select tasks which are part of a process instance which has the given process definition name.
 TaskQuery processDefinitionNameLike(String processDefinitionNameLike)
          Only select tasks which are part of a process instance which has a process definition name like the given value.
 TaskQuery processInstanceBusinessKey(String processInstanceBusinessKey)
          Only select tasks foe the given business key
 TaskQuery processInstanceBusinessKeyLike(String processInstanceBusinessKeyLike)
          Only select tasks with a business key like the given value The syntax is that of SQL: for example usage: processInstanceBusinessKeyLike("%activiti%").
 TaskQuery processInstanceId(String processInstanceId)
          Only select tasks for the given process instance id.
 TaskQuery processVariableValueEquals(Object variableValue)
          Only select tasks which are part of a process that has at least one variable with the given value.
 TaskQuery processVariableValueEquals(String variableName, Object variableValue)
          Only select tasks which are part of a process that has a variable with the given name set to the given value.
 TaskQuery processVariableValueEqualsIgnoreCase(String name, String value)
          Only select tasks which are part of a process that has a local string variable which is not the given value, case insensitive.
 TaskQuery processVariableValueGreaterThan(String name, Object value)
          Only select tasks which have a global variable value greater than the passed value when they ended.
 TaskQuery processVariableValueGreaterThanOrEqual(String name, Object value)
          Only select tasks which have a global variable value greater than or equal to the passed value when they ended.
 TaskQuery processVariableValueLessThan(String name, Object value)
          Only select tasks which have a global variable value less than the passed value when the ended.Booleans, Byte-arrays and Serializable objects (which are not primitive type wrappers) are not supported.
 TaskQuery processVariableValueLessThanOrEqual(String name, Object value)
          Only select tasks which have a global variable value less than or equal to the passed value when they ended.
 TaskQuery processVariableValueLike(String name, String value)
          Only select tasks which have a global variable value like the given value when they ended.
 TaskQuery 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.
 TaskQuery processVariableValueNotEqualsIgnoreCase(String name, String value)
          Only select tasks which are part of a process that has a string variable with the given value, case insensitive.
 TaskQuery suspended()
          Only selects tasks which are suspended, because its process instance was suspended.
 TaskQuery taskAssignee(String assignee)
          Only select tasks which are assigned to the given user.
 TaskQuery taskAssigneeLike(String assigneeLike)
          Only select tasks which were last assigned to an assignee like the given value.
 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 taskDelegationState(DelegationState delegationState)
          Only select tasks with the given DelegationState.
 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, including tasks which have been assigned to the given user (assignee) or owned by the given user (owner).
 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 taskOwnerLike(String ownerLike)
          Only select tasks which were last assigned to an owner like the given value.
 TaskQuery taskPriority(Integer priority)
          Only select tasks with the given priority.
 TaskQuery taskUnassigned()
          Only select tasks which don't have an assignee.
 TaskQuery taskUnnassigned()
          已过时。 
 TaskQuery taskVariableValueEquals(Object variableValue)
          Only select tasks which have at least one local task variable with the given value.
 TaskQuery taskVariableValueEquals(String variableName, Object variableValue)
          Only select tasks which have a local task variable with the given name set to the given value.
 TaskQuery taskVariableValueEqualsIgnoreCase(String name, String value)
          Only select tasks which have a local string variable with the given value, case insensitive.
 TaskQuery taskVariableValueGreaterThan(String name, Object value)
          Only select tasks which have a local variable value greater than the passed value when they ended.
 TaskQuery taskVariableValueGreaterThanOrEqual(String name, Object value)
          Only select tasks which have a local variable value greater than or equal to the passed value when they ended.
 TaskQuery taskVariableValueLessThan(String name, Object value)
          Only select tasks which have a local variable value less than the passed value when the ended.Booleans, Byte-arrays and Serializable objects (which are not primitive type wrappers) are not supported.
 TaskQuery taskVariableValueLessThanOrEqual(String name, Object value)
          Only select tasks which have a local variable value less than or equal to the passed value when they ended.
 TaskQuery taskVariableValueLike(String name, String value)
          Only select tasks which have a local variable value like the given value when they ended.
 TaskQuery 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.
 TaskQuery taskVariableValueNotEqualsIgnoreCase(String name, String value)
          Only select tasks which have a local string variable with is not the given value, case insensitive.
 TaskQuery withoutDueDate()
          Only select tasks with no due date.
 
从接口 org.activiti.engine.query.Query 继承的方法
asc, count, desc, list, listPage, singleResult
 

方法详细信息

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.


taskAssigneeLike

TaskQuery taskAssigneeLike(String assigneeLike)
Only select tasks which were last assigned to an assignee like the given value. The syntax that should be used is the same as in SQL, eg. %activiti%.


taskOwner

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


taskOwnerLike

TaskQuery taskOwnerLike(String ownerLike)
Only select tasks which were last assigned to an owner like the given value. The syntax that should be used is the same as in SQL, eg. %activiti%.


taskUnassigned

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


taskUnnassigned

@Deprecated
TaskQuery taskUnnassigned()
已过时。 

另请参见:
#taskUnassigned}

taskDelegationState

TaskQuery taskDelegationState(DelegationState delegationState)
Only select tasks with the given DelegationState.


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, including tasks which have been assigned to the given user (assignee) or owned by the given user (owner).


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.

抛出:
ActivitiIllegalArgumentException - 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


processInstanceBusinessKeyLike

TaskQuery processInstanceBusinessKeyLike(String processInstanceBusinessKeyLike)
Only select tasks with a business key like the given value The syntax is that of SQL: for example usage: processInstanceBusinessKeyLike("%activiti%").


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.


excludeSubtasks

TaskQuery excludeSubtasks()
Only select tasks that have no parent (i.e. do not select subtasks).


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.


taskVariableValueEquals

TaskQuery taskVariableValueEquals(Object variableValue)
Only select tasks which have at least one local task variable with the given value.


taskVariableValueEqualsIgnoreCase

TaskQuery taskVariableValueEqualsIgnoreCase(String name,
                                            String value)
Only select tasks which have a local string variable with the given value, case insensitive.

This method only works if your database has encoding/collation that supports case-sensitive queries. For example, use "collate UTF-8" on MySQL and for MSSQL, select one of the case-sensitive Collations available (MSDN Server Collation Reference).


taskVariableValueNotEquals

TaskQuery 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. Byte-arrays and Serializable objects (which are not primitive type wrappers) are not supported.


taskVariableValueNotEqualsIgnoreCase

TaskQuery taskVariableValueNotEqualsIgnoreCase(String name,
                                               String value)
Only select tasks which have a local string variable with is not the given value, case insensitive.

This method only works if your database has encoding/collation that supports case-sensitive queries. For example, use "collate UTF-8" on MySQL and for MSSQL, select one of the case-sensitive Collations available (MSDN Server Collation Reference).


taskVariableValueGreaterThan

TaskQuery taskVariableValueGreaterThan(String name,
                                       Object value)
Only select tasks which have a local variable value greater than the passed value when they ended. Booleans, Byte-arrays and Serializable objects (which are not primitive type wrappers) are not supported.

参数:
name - cannot be null.
value - cannot be null.

taskVariableValueGreaterThanOrEqual

TaskQuery taskVariableValueGreaterThanOrEqual(String name,
                                              Object value)
Only select tasks which have a local variable value greater than or equal to the passed value when they ended. Booleans, Byte-arrays and Serializable objects (which are not primitive type wrappers) are not supported.

参数:
name - cannot be null.
value - cannot be null.

taskVariableValueLessThan

TaskQuery taskVariableValueLessThan(String name,
                                    Object value)
Only select tasks which have a local variable value less than the passed value when the ended.Booleans, Byte-arrays and Serializable objects (which are not primitive type wrappers) are not supported.

参数:
name - cannot be null.
value - cannot be null.

taskVariableValueLessThanOrEqual

TaskQuery taskVariableValueLessThanOrEqual(String name,
                                           Object value)
Only select tasks which have a local variable value less than or equal to the passed value when they ended. Booleans, Byte-arrays and Serializable objects (which are not primitive type wrappers) are not supported.

参数:
name - cannot be null.
value - cannot be null.

taskVariableValueLike

TaskQuery taskVariableValueLike(String name,
                                String value)
Only select tasks which have a local variable value like the given value when they ended. This can be used on string variables only.

参数:
name - cannot be null.
value - cannot be null. The string can include the wildcard character '%' to express like-strategy: starts with (string%), ends with (%string) or contains (%string%).

processVariableValueEquals

TaskQuery processVariableValueEquals(String variableName,
                                     Object variableValue)
Only select tasks which are part of a process that has a variable with the given name set to the given value.


processVariableValueEquals

TaskQuery processVariableValueEquals(Object variableValue)
Only select tasks which are part of a process that has at least one variable with the given value.


processVariableValueEqualsIgnoreCase

TaskQuery processVariableValueEqualsIgnoreCase(String name,
                                               String value)
Only select tasks which are part of a process that has a local string variable which is not the given value, case insensitive.

This method only works if your database has encoding/collation that supports case-sensitive queries. For example, use "collate UTF-8" on MySQL and for MSSQL, select one of the case-sensitive Collations available (MSDN Server Collation Reference).


processVariableValueNotEquals

TaskQuery 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. Byte-arrays and Serializable objects (which are not primitive type wrappers) are not supported.


processVariableValueNotEqualsIgnoreCase

TaskQuery processVariableValueNotEqualsIgnoreCase(String name,
                                                  String value)
Only select tasks which are part of a process that has a string variable with the given value, case insensitive.

This method only works if your database has encoding/collation that supports case-sensitive queries. For example, use "collate UTF-8" on MySQL and for MSSQL, select one of the case-sensitive Collations available (MSDN Server Collation Reference).


processVariableValueGreaterThan

TaskQuery processVariableValueGreaterThan(String name,
                                          Object value)
Only select tasks which have a global variable value greater than the passed value when they ended. Booleans, Byte-arrays and Serializable objects (which are not primitive type wrappers) are not supported.

参数:
name - cannot be null.
value - cannot be null.

processVariableValueGreaterThanOrEqual

TaskQuery processVariableValueGreaterThanOrEqual(String name,
                                                 Object value)
Only select tasks which have a global variable value greater than or equal to the passed value when they ended. Booleans, Byte-arrays and Serializable objects (which are not primitive type wrappers) are not supported.

参数:
name - cannot be null.
value - cannot be null.

processVariableValueLessThan

TaskQuery processVariableValueLessThan(String name,
                                       Object value)
Only select tasks which have a global variable value less than the passed value when the ended.Booleans, Byte-arrays and Serializable objects (which are not primitive type wrappers) are not supported.

参数:
name - cannot be null.
value - cannot be null.

processVariableValueLessThanOrEqual

TaskQuery processVariableValueLessThanOrEqual(String name,
                                              Object value)
Only select tasks which have a global variable value less than or equal to the passed value when they ended. Booleans, Byte-arrays and Serializable objects (which are not primitive type wrappers) are not supported.

参数:
name - cannot be null.
value - cannot be null.

processVariableValueLike

TaskQuery processVariableValueLike(String name,
                                   String value)
Only select tasks which have a global variable value like the given value when they ended. This can be used on string variables only.

参数:
name - cannot be null.
value - cannot be null. The string can include the wildcard character '%' to express like-strategy: starts with (string%), ends with (%string) or contains (%string%).

processDefinitionKey

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


processDefinitionKeyLike

TaskQuery processDefinitionKeyLike(String processDefinitionKeyLike)
Only select tasks which are part of a process instance which has a process definition key like the given value. The syntax that should be used is the same as in SQL, eg. %activiti%.


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.


processDefinitionNameLike

TaskQuery processDefinitionNameLike(String processDefinitionNameLike)
Only select tasks which are part of a process instance which has a process definition name like the given value. The syntax that should be used is the same as in SQL, eg. %activiti%.


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.


withoutDueDate

TaskQuery withoutDueDate()
Only select tasks with no due date.


suspended

TaskQuery suspended()
Only selects tasks which are suspended, because its process instance was suspended.


active

TaskQuery active()
Only selects tasks which are active (ie. not suspended)


includeTaskLocalVariables

TaskQuery includeTaskLocalVariables()
Include local task variables in the task query result


includeProcessVariables

TaskQuery includeProcessVariables()
Include global task variables in the task query result


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 © 2013 Alfresco. All rights reserved.