Get Task Count (POST)

Queries for the number of historic tasks that fulfill the given parameters. Takes the same parameters as the Get Tasks (Historic) method. Corresponds to the size of the result set of the Get Tasks (Historic) (POST) method and takes the same parameters.

Method

POST /history/task/count

Parameters

Request Body

A JSON object with the following properties:

Name Description
taskId Filter by task id.
taskParentTaskId Filter by parent task id.
processInstanceId Filter by process instance id.
processInstanceBusinessKey Filter by process instance business key.
processInstanceBusinessKeyIn Filter by process instances with one of the give business keys. The keys need to be in a comma-separated list.
processInstanceBusinessKeyLike Filter by process instance business key that has the parameter value as a substring.
executionId Filter by the id of the execution that executed the task.
processDefinitionId Filter by process definition id.
processDefinitionKey Restrict to tasks that belong to a process definition with the given key.
processDefinitionName Restrict to tasks that belong to a process definition with the given name.
caseInstanceId Filter by case instance id.
caseExecutionId Filter by the id of the case execution that executed the task.
caseDefinitionId Filter by case definition id.
caseDefinitionKey Restrict to tasks that belong to a case definition with the given key.
caseDefinitionName Restrict to tasks that belong to a case definition with the given name.
activityInstanceIdIn Only include tasks which belong to one of the passed and comma-separated activity instance ids.
taskName Restrict to tasks that have the given name.
taskNameLike Restrict to tasks that have a name with the given parameter value as substring.
taskDescription Restrict to tasks that have the given description.
taskDescriptionLike Restrict to tasks that have a description that has the parameter value as a substring.
taskDefinitionKey Restrict to tasks that have the given key.
taskDefinitionKeyIn Restrict to tasks that have one of the given key.
taskDeleteReason Restrict to tasks that have the given delete reason.
taskDeleteReasonLike Restrict to tasks that have a delete reason that has the parameter value as a substring.
taskAssignee Restrict to tasks that the given user is assigned to.
taskAssigneeLike Restrict to tasks that are assigned to users with the parameter value as a substring.
taskOwner Restrict to tasks that the given user owns.
taskOwnerLike Restrict to tasks that are owned by users with the parameter value as a substring.
taskPriority Restrict to tasks that have the given priority.
assigned If set to true, restricts the query to all tasks that are assigned.
unassigned If set to true, restricts the query to all tasks that are unassigned.
finished Only include finished tasks. Value may only be true, as false is the default behavior.
unfinished Only include unfinished tasks. Value may only be true, as false is the default behavior.
processFinished Only include tasks of finished processes. Value may only be true, as false is the default behavior.
processUnfinished Only include tasks of unfinished processes. Value may only be true, as false is the default behavior.
taskDueDate Restrict to tasks that are due on the given date. By default*, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.
taskDueDateBefore Restrict to tasks that are due before the given date. By default*, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.
taskDueDateAfter Restrict to tasks that are due after the given date. By default*, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.
withoutTaskDueDate Only include tasks which have no due date. Value may only be true, as false is the default behavior.
taskFollowUpDate Restrict to tasks that have a followUp date on the given date. By default*, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.
taskFollowUpDateBefore Restrict to tasks that have a followUp date before the given date. By default*, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.
taskFollowUpDateAfter Restrict to tasks that have a followUp date after the given date. By default*, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.
startedBefore Restrict to tasks that were started before the given date. By default*, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.
startedAfter Restrict to tasks that were started after the given date. By default*, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.
finishedBefore Restrict to tasks that were finished before the given date. By default*, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.
finishedAfter Restrict to tasks that were finished after the given date. By default*, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.000+0200.
tenantIdIn Filter by a list of tenant ids. A task instance must have one of the given tenant ids. Must be a JSON array of Strings.
withoutTenantId Only include historic task instances that belong to no tenant. Value may only be true, as false is the default behavior.
taskVariables A JSON array to only include tasks that have variables with certain values.
The array consists of JSON objects with three properties name, operator and value. name is the variable name, operator is the comparison operator to be used and value the variable value.
value may be of type String, Number or Boolean.

Valid operator values are: eq - equal to; neq - not equal to; gt - greater than; gteq - greater than or equal to; lt - lower than; lteq - lower than or equal to; like.
processVariables A JSON array to only include tasks that belong to a process instance with variables with certain values.
The array consists of JSON objects with three properties name, operator and value. name is the variable name, operator is the comparison operator to be used and value the variable value.
value may be of type String, Number or Boolean.

Valid operator values are: eq - equal to; neq - not equal to; gt - greater than; gteq - greater than or equal to; lt - lower than; lteq - lower than or equal to; like;notLike.
variableNamesIgnoreCase Match the variable name provided in taskVariables and processVariables case-insensitively. If set to true variableName and variablename are treated as equal.
variableValuesIgnoreCase Match the variable value provided in taskVariables and processVariables case-insensitively. If set to true variableValue and variablevalue are treated as equal.
taskInvolvedUser Restrict to tasks with a historic identity link to the given user.
taskInvolvedGroup Restrict to tasks with a historic identity link to the given group.
taskHadCandidateUser Restrict to tasks with a historic identity link to the given candidate user.
taskHadCandidateGroup Restrict to tasks with a historic identity link to the given candidate group.
withCandidateGroups Only include tasks which have a candidate group. Value may only be true, as false is the default behavior.
withoutCandidateGroups Only include tasks which have no candidate group. Value may only be true, as false is the default behavior.
orQueries A JSON array which contains at least one OR query JSON Object. All previously listed filter criteria can be used inside of this JSON object. See the user guide for more information about OR queries.

The following properties are not supported: sorting, withCandidateGroups, withoutCandidateGroups.

* For further information, please see the documentation.

Result

A JSON object that contains the count as the only property.

Name Type Description
count Number The number of matching historic tasks.

Response Codes

Code Media type Description
200 application/json Request successful.
400 application/json Returned if some of the query parameters are invalid. See the Introduction for the error response format.

Example

Request

POST /history/task/count

Request Body:

{"taskVariables":
    [{"name": "varName",
    "value": "varValue",
    "operator": "eq"
    },
    {"name": "anotherVarName",
    "value": 30,
    "operator": "neq"}],
"priority":10}

Response

{"count": 1}

On this Page: