Allows current tasks to be queried using a range of parameters.
getQueryTasks, which uses the workflow search collection, is more performant than this function and has a range of Filters you can use to find tasks. getQueryTasks should be your preferred choice over this function which, although still supported, primarily exists for backwards compatibility.
Parameters
Name | Type | Description |
---|---|---|
active | Boolean | If true, only return tasks that are not suspended (either part of a process that is not suspended or not part of a process at all); If false, only tasks that are part of suspended process instances are returned |
dueAfter | Date | Only return tasks which are due after the given date |
dueBefore | Date | Only return tasks which are due before the given date |
dueDate | Date | Only return tasks which are due on the given date |
excludeSubtasks | Boolean | If true, only return tasks that are not a subtask of another task; if false, do not filter the returned tasks |
executionId | String | Only return tasks which are part of the execution with the given id |
firstResult | Number | The index of the first result returned in the selected (or default) sort order |
includeBusinessKey | Boolean | If true include the business key of the process instance that contains the task in the response |
includeCanUnclaim | Boolean | If true, include unclaimability of tasks in response |
includeEvents | Boolean | If true include all events related to the tasks in the result |
includeIdentityLinks | Boolean | Include all users and groups associated with the returned tasks in the result |
includeProcessDescription | Boolean | Include the expanded process description (documentation field) in the response |
includeProcessVariables | Boolean | If true, include process variables in the result |
includeRawFormData | Boolean | Includes "rawFormData" in the response which is suitable for passing to the forms service - this is intended for the use of template code only |
includeTaskBehaviours | Boolean | If true returns the boolean properties |
includeTaskComments | Boolean | If true, include task comments in the result |
includeTaskDescription | Boolean | If true, include expanded task description |
includeTaskFormData | Boolean | If true, include task form data in the result |
includeTaskVariables | Boolean | If true, include task local variables in the result |
maxResults | Number | The maximum number of results to return, starting from the 'firstResult' setting in the selected (or default) sort order. Defaults to 5000 if not set |
orderByDueDate | "asc" or "desc" | Sort results by task due date using the specified ordering. Tasks without a due date appear last |
orderByDueDateNullsFirst | "asc" or "desc" | Sort results by task due date using the specified ordering. Tasks without a due date appear first |
orderByExecutionId | "asc" or "desc" | Sort results by execution id using the specified ordering |
orderByProcessInstanceId | "asc" or "desc" | Order results by process instance ID (note that the process instance ID is represented as a string so 77 will appear after 100) |
orderByTaskAssignee | "asc" or "desc" | Sort results by task assignee using the specified ordering |
orderByTaskCreateTime | "asc" or "desc" | Sort results by task creation time using the specified ordering |
orderByTaskDescription | "asc" or "desc" | Sort results by task description using the specified ordering |
orderByTaskId | "asc" or "desc" | Sort results by task id using the specified ordering |
orderByTaskName | "asc" or "desc" | Sort results by task nameusing the specified ordering |
orderByTaskPriority | "asc" or "desc" | Sort results by task priority using the specified ordering |
processDefinitionId | String | Only return tasks using the process definition with the specified ID |
processDefinitionKey | String | Only return tasks using the process definition with the specified key |
processDefinitionKeyIn | List<String> | Only return tasks that have a process definition key included in the supplied list |
processDefinitionKeyLike | String | Only return tasks using process definitions with keys that are 'SQL LIKE' the specified pattern |
processDefinitionName | String | Only return tasks using the process definition with the specified name |
processDefinitionNameLike | String | Only return tasks using process definitions with names that are 'SQL LIKE' the specified pattern |
processInstanceBusinessKey | String | Only return tasks from a process instance with the specified business key |
processInstanceBusinessKeyLike | String | Only return tasks from process instances with the business keys that are 'SQL LIKE' the specified pattern |
processInstanceId | String | Only return tasks from the process instance with the specified ID |
processInstanceIds | List<String> | Only return tasks from this array of instances. An empty array returns no tasks |
processVariableName | String | These parameters are used together, processVariableName specifies a process variable name, processVariableValue specifies a value and processVariableCondition specifies a condition; valid values for variableCondition are "equals", "equalsIgnoreCase", "greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual", "like" and "notEquals" |
processVariableValue | String | |
processVariableCondition | String | |
sortOrder | Array<Object> | Enables multi-column ordering. For example specify [{"taskPriority":"desc"},{"taskCreateTime":"asc"}] to sort by taskPriority then taskCreateTime |
suspended | Boolean | If true, only select tasks that are suspended |
taskAssignee | String | Only return tasks that have been delegated to a specific user |
taskAssigneeLike | String | Only return tasks that have been delegated to users that are 'SQL LIKE' the specified pattern |
taskCandidateGroup | String | Only return tasks for which users in the given group are candidates |
taskCandidateGroupIn | Array<String> | Only return tasks for which the 'candidateGroup' is one of the given groups |
taskCandidateUser | String | Only return tasks for which the given user is a candidate |
taskCreatedAfter | Date | Only return tasks that were created after the given date |
taskCreatedBefore | Date | Only return tasks that were created before the given date |
taskCreatedOn | Date | Only return tasks that were created on the given date |
taskDefinitionKey | String | Only return tasks with the given task definition key |
taskDefinitionKeyLike | String | Only return tasks with task definition keys that are 'SQL LIKE' the specified pattern |
taskDelegationState | String | Only return tasks with the given DelegationState (PENDING or RESOLVED) |
taskDescription | String | Only return tasks with the given description |
taskDescriptionLike | String | Only select tasks with descriptions that are 'SQL LIKE' the specified pattern |
taskId | String | Return the task with the specified ID |
taskInvolvedUser | String | Only return tasks that have involved a specific user |
taskMaxPriority | Number | Only return tasks with the given priority or lower |
taskMinPriority | Number | Only return tasks with the given priority or higher |
taskName | String | Only return tasks with the given name |
taskNameLike | String | Only return tasks with names that are 'SQL LIKE' the pattern |
taskOwner | String | Only select tasks owned by the specified user |
taskPriority | Number | Only select tasks with the given priority |
taskUnassigned | Boolean | Only select tasks which don't have an assignee |
taskVariableCondition | String | These parameters are used together, taskVariableName specifies a task variable name, taskVariableValue specifies a value and taskVariableCondition specifies a condition; valid values for variableCondition are "equals", "equalsIgnoreCase", "greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual", "like" and "notEquals" |
taskVariableName | String | |
taskVariableValue | String | |
withoutDueDate | Boolean | Only select tasks with no due date |
withoutProcessVariableAll | Array<string> | Get tasks for instances that do not have one of these named variables. The more variables you name the broader your exclude list becomes, meaning fewer instances will be returned. An empty array returns all instances |
withoutProcessVariableAny | Array<string> | Get tasks for instances that do not have these named variables. The more variables you name the more specific your exclude list becomes, meaning more instances will be returned. An empty array returns no instances |
withProcessVariableAll | Array<string> | Get tasks for instances that do have all of these named variables. The more variables you name the more specific your filter becomes, meaning fewer instances are returned. An empty array returns all instances |
withProcessVariableAny | Array<string> | Get tasks for instances that do have at least one of the named variables. The more variables you name the broader your filter becomes, meaning more instances will be returned. An empty array returns no instances |
All parameters are optional |
Last modified on July 29, 2024