Class HistoricProcessInstanceApi

java.lang.Object
org.camunda.community.rest.client.api.HistoricProcessInstanceApi

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-06-04T13:43:01.451833574Z[Etc/UTC]") public class HistoricProcessInstanceApi extends Object
  • Constructor Details

    • HistoricProcessInstanceApi

      public HistoricProcessInstanceApi()
    • HistoricProcessInstanceApi

      public HistoricProcessInstanceApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • deleteHistoricProcessInstance

      public void deleteHistoricProcessInstance(String id, Boolean failIfNotExists) throws ApiException
      Delete Deletes a process instance from the history by id.
      Parameters:
      id - The id of the historic process instance to be deleted. (required)
      failIfNotExists - If set to `false`, the request will still be successful if the process id is not found. (optional)
      Throws:
      ApiException - if fails to make API call
    • deleteHistoricProcessInstance

      public void deleteHistoricProcessInstance(String id, Boolean failIfNotExists, Map<String,String> additionalHeaders) throws ApiException
      Delete Deletes a process instance from the history by id.
      Parameters:
      id - The id of the historic process instance to be deleted. (required)
      failIfNotExists - If set to `false`, the request will still be successful if the process id is not found. (optional)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • deleteHistoricProcessInstancesAsync

      public BatchDto deleteHistoricProcessInstancesAsync(DeleteHistoricProcessInstancesDto deleteHistoricProcessInstancesDto) throws ApiException
      Delete Async (POST) Delete multiple historic process instances asynchronously (batch). At least `historicProcessInstanceIds` or `historicProcessInstanceQuery` has to be provided. If both are provided then all instances matching query criterion and instances from the list will be deleted.
      Parameters:
      deleteHistoricProcessInstancesDto - (optional)
      Returns:
      BatchDto
      Throws:
      ApiException - if fails to make API call
    • deleteHistoricProcessInstancesAsync

      public BatchDto deleteHistoricProcessInstancesAsync(DeleteHistoricProcessInstancesDto deleteHistoricProcessInstancesDto, Map<String,String> additionalHeaders) throws ApiException
      Delete Async (POST) Delete multiple historic process instances asynchronously (batch). At least `historicProcessInstanceIds` or `historicProcessInstanceQuery` has to be provided. If both are provided then all instances matching query criterion and instances from the list will be deleted.
      Parameters:
      deleteHistoricProcessInstancesDto - (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      BatchDto
      Throws:
      ApiException - if fails to make API call
    • deleteHistoricVariableInstancesOfHistoricProcessInstance

      public void deleteHistoricVariableInstancesOfHistoricProcessInstance(String id) throws ApiException
      Delete Variable Instances Deletes all variables of a process instance from the history by id.
      Parameters:
      id - The id of the process instance for which all historic variables are to be deleted. (required)
      Throws:
      ApiException - if fails to make API call
    • deleteHistoricVariableInstancesOfHistoricProcessInstance

      public void deleteHistoricVariableInstancesOfHistoricProcessInstance(String id, Map<String,String> additionalHeaders) throws ApiException
      Delete Variable Instances Deletes all variables of a process instance from the history by id.
      Parameters:
      id - The id of the process instance for which all historic variables are to be deleted. (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getHistoricProcessInstance

      public HistoricProcessInstanceDto getHistoricProcessInstance(String id) throws ApiException
      Get Retrieves a historic process instance by id, according to the `HistoricProcessInstance` interface in the engine.
      Parameters:
      id - The id of the historic process instance to be retrieved. (required)
      Returns:
      HistoricProcessInstanceDto
      Throws:
      ApiException - if fails to make API call
    • getHistoricProcessInstance

      public HistoricProcessInstanceDto getHistoricProcessInstance(String id, Map<String,String> additionalHeaders) throws ApiException
      Get Retrieves a historic process instance by id, according to the `HistoricProcessInstance` interface in the engine.
      Parameters:
      id - The id of the historic process instance to be retrieved. (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      HistoricProcessInstanceDto
      Throws:
      ApiException - if fails to make API call
    • getHistoricProcessInstanceDurationReport

      public List<DurationReportResultDto> getHistoricProcessInstanceDurationReport(String reportType, String periodUnit, String processDefinitionIdIn, String processDefinitionKeyIn, OffsetDateTime startedBefore, OffsetDateTime startedAfter) throws ApiException
      Get Duration Report Retrieves a report about the duration of completed process instances, grouped by a period. These reports include the maximum, minimum and average duration of all completed process instances which were started in a given period. **Note:** This only includes historic data.
      Parameters:
      reportType - **Mandatory.** Specifies the type of the report to retrieve. To retrieve a report about the duration of process instances, the value must be set to `duration`. (required)
      periodUnit - **Mandatory.** Specifies the granularity of the report. Valid values are `month` and `quarter`. (required)
      processDefinitionIdIn - Filter by process definition ids. Must be a comma-separated list of process definition ids. (optional)
      processDefinitionKeyIn - Filter by process definition keys. Must be a comma-separated list of process definition keys. (optional)
      startedBefore - Restrict to instances 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., `2016-01-23T14:42:45.000+0200`. (optional)
      startedAfter - Restrict to instances that were started after the given date. By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2016-01-23T14:42:45.000+0200`. (optional)
      Returns:
      List<DurationReportResultDto>
      Throws:
      ApiException - if fails to make API call
    • getHistoricProcessInstanceDurationReport

      public List<DurationReportResultDto> getHistoricProcessInstanceDurationReport(String reportType, String periodUnit, String processDefinitionIdIn, String processDefinitionKeyIn, OffsetDateTime startedBefore, OffsetDateTime startedAfter, Map<String,String> additionalHeaders) throws ApiException
      Get Duration Report Retrieves a report about the duration of completed process instances, grouped by a period. These reports include the maximum, minimum and average duration of all completed process instances which were started in a given period. **Note:** This only includes historic data.
      Parameters:
      reportType - **Mandatory.** Specifies the type of the report to retrieve. To retrieve a report about the duration of process instances, the value must be set to `duration`. (required)
      periodUnit - **Mandatory.** Specifies the granularity of the report. Valid values are `month` and `quarter`. (required)
      processDefinitionIdIn - Filter by process definition ids. Must be a comma-separated list of process definition ids. (optional)
      processDefinitionKeyIn - Filter by process definition keys. Must be a comma-separated list of process definition keys. (optional)
      startedBefore - Restrict to instances 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., `2016-01-23T14:42:45.000+0200`. (optional)
      startedAfter - Restrict to instances that were started after the given date. By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2016-01-23T14:42:45.000+0200`. (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<DurationReportResultDto>
      Throws:
      ApiException - if fails to make API call
    • getHistoricProcessInstances

      public List<HistoricProcessInstanceDto> getHistoricProcessInstances(String sortBy, String sortOrder, Integer firstResult, Integer maxResults, String processInstanceId, String processInstanceIds, String processDefinitionId, String processDefinitionKey, String processDefinitionKeyIn, String processDefinitionName, String processDefinitionNameLike, String processDefinitionKeyNotIn, String processInstanceBusinessKey, String processInstanceBusinessKeyIn, String processInstanceBusinessKeyLike, Boolean rootProcessInstances, Boolean finished, Boolean unfinished, Boolean withIncidents, Boolean withRootIncidents, String incidentType, String incidentStatus, String incidentMessage, String incidentMessageLike, OffsetDateTime startedBefore, OffsetDateTime startedAfter, OffsetDateTime finishedBefore, OffsetDateTime finishedAfter, OffsetDateTime executedActivityAfter, OffsetDateTime executedActivityBefore, OffsetDateTime executedJobAfter, OffsetDateTime executedJobBefore, String startedBy, String superProcessInstanceId, String subProcessInstanceId, String superCaseInstanceId, String subCaseInstanceId, String caseInstanceId, String tenantIdIn, Boolean withoutTenantId, String executedActivityIdIn, String activeActivityIdIn, Boolean active, Boolean suspended, Boolean completed, Boolean externallyTerminated, Boolean internallyTerminated, String variables, Boolean variableNamesIgnoreCase, Boolean variableValuesIgnoreCase) throws ApiException
      Get List Queries for historic process instances that fulfill the given parameters. The size of the result set can be retrieved by using the [Get Process Instance Count](https://docs.camunda.org/manual/7.21/reference/rest/history/process-instance/get-process-instance-query-count/) method.
      Parameters:
      sortBy - Sort the results lexicographically by a given criterion. Must be used in conjunction with the sortOrder parameter. (optional)
      sortOrder - Sort the results in a given order. Values may be asc for ascending order or desc for descending order. Must be used in conjunction with the sortBy parameter. (optional)
      firstResult - Pagination of results. Specifies the index of the first result to return. (optional)
      maxResults - Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left. (optional)
      processInstanceId - Filter by process instance id. (optional)
      processInstanceIds - Filter by process instance ids. Filter by a comma-separated list of `Strings`. (optional)
      processDefinitionId - Filter by the process definition the instances run on. (optional)
      processDefinitionKey - Filter by the key of the process definition the instances run on. (optional)
      processDefinitionKeyIn - Filter by a list of process definition keys. A process instance must have one of the given process definition keys. Filter by a comma-separated list of `Strings`. (optional)
      processDefinitionName - Filter by the name of the process definition the instances run on. (optional)
      processDefinitionNameLike - Filter by process definition names that the parameter is a substring of. (optional)
      processDefinitionKeyNotIn - Exclude instances that belong to a set of process definitions. Filter by a comma-separated list of `Strings`. (optional)
      processInstanceBusinessKey - Filter by process instance business key. (optional)
      processInstanceBusinessKeyIn - Filter by a list of business keys. A process instance must have one of the given business keys. Filter by a comma-separated list of `Strings` (optional)
      processInstanceBusinessKeyLike - Filter by process instance business key that the parameter is a substring of. (optional)
      rootProcessInstances - Restrict the query to all process instances that are top level process instances. (optional)
      finished - Only include finished process instances. This flag includes all process instances that are completed or terminated. Value may only be `true`, as `false` is the default behavior. (optional)
      unfinished - Only include unfinished process instances. Value may only be `true`, as `false` is the default behavior. (optional)
      withIncidents - Only include process instances which have an incident. Value may only be `true`, as `false` is the default behavior. (optional)
      withRootIncidents - Only include process instances which have a root incident. Value may only be `true`, as `false` is the default behavior. (optional)
      incidentType - Filter by the incident type. See the [User Guide](https://docs.camunda.org/manual/7.21/user-guide/process-engine/incidents/#incident-types) for a list of incident types. (optional)
      incidentStatus - Only include process instances which have an incident in status either open or resolved. To get all process instances, use the query parameter withIncidents. (optional)
      incidentMessage - Filter by the incident message. Exact match. (optional)
      incidentMessageLike - Filter by the incident message that the parameter is a substring of. (optional)
      startedBefore - Restrict to instances that were started before the given date. By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      startedAfter - Restrict to instances that were started after the given date. By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      finishedBefore - Restrict to instances that were finished before the given date. By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      finishedAfter - Restrict to instances that were finished after the given date. By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      executedActivityAfter - Restrict to instances that executed an activity after the given date (inclusive). By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      executedActivityBefore - Restrict to instances that executed an activity before the given date (inclusive). By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      executedJobAfter - Restrict to instances that executed an job after the given date (inclusive). By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      executedJobBefore - Restrict to instances that executed an job before the given date (inclusive). By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      startedBy - Only include process instances that were started by the given user. (optional)
      superProcessInstanceId - Restrict query to all process instances that are sub process instances of the given process instance. Takes a process instance id. (optional)
      subProcessInstanceId - Restrict query to one process instance that has a sub process instance with the given id. (optional)
      superCaseInstanceId - Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id. (optional)
      subCaseInstanceId - Restrict query to one process instance that has a sub case instance with the given id. (optional)
      caseInstanceId - Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id. (optional)
      tenantIdIn - Filter by a list of tenant ids. A process instance must have one of the given tenant ids. Filter by a comma-separated list of `Strings` (optional)
      withoutTenantId - Only include historic process instances which belong to no tenant. Value may only be `true`, as `false` is the default behavior. (optional)
      executedActivityIdIn - Restrict to instances that executed an activity with one of given ids. Filter by a comma-separated list of `Strings` (optional)
      activeActivityIdIn - Restrict to instances that have an active activity with one of given ids. Filter by a comma-separated list of `Strings` (optional)
      active - Restrict to instances that are active. (optional)
      suspended - Restrict to instances that are suspended. (optional)
      completed - Restrict to instances that are completed. (optional)
      externallyTerminated - Restrict to instances that are externallyTerminated. (optional)
      internallyTerminated - Restrict to instances that are internallyTerminated. (optional)
      variables - Only include process instances that have/had variables with certain values. Variable filtering expressions are comma-separated and are structured as follows: A valid parameter value has the form `key_operator_value`. `key` is the variable name, `operator` is the comparison operator to be used and `value` the variable value. **Note:** Values are always treated as String objects on server side. 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`. Key and value may not contain underscore or comma characters. (optional)
      variableNamesIgnoreCase - Match all variable names provided in variables case-insensitively. If set to `true` variableName and variablename are treated as equal. (optional)
      variableValuesIgnoreCase - Match all variable values provided in variables case-insensitively. If set to `true` variableValue and variablevalue are treated as equal. (optional)
      Returns:
      List<HistoricProcessInstanceDto>
      Throws:
      ApiException - if fails to make API call
    • getHistoricProcessInstances

      public List<HistoricProcessInstanceDto> getHistoricProcessInstances(String sortBy, String sortOrder, Integer firstResult, Integer maxResults, String processInstanceId, String processInstanceIds, String processDefinitionId, String processDefinitionKey, String processDefinitionKeyIn, String processDefinitionName, String processDefinitionNameLike, String processDefinitionKeyNotIn, String processInstanceBusinessKey, String processInstanceBusinessKeyIn, String processInstanceBusinessKeyLike, Boolean rootProcessInstances, Boolean finished, Boolean unfinished, Boolean withIncidents, Boolean withRootIncidents, String incidentType, String incidentStatus, String incidentMessage, String incidentMessageLike, OffsetDateTime startedBefore, OffsetDateTime startedAfter, OffsetDateTime finishedBefore, OffsetDateTime finishedAfter, OffsetDateTime executedActivityAfter, OffsetDateTime executedActivityBefore, OffsetDateTime executedJobAfter, OffsetDateTime executedJobBefore, String startedBy, String superProcessInstanceId, String subProcessInstanceId, String superCaseInstanceId, String subCaseInstanceId, String caseInstanceId, String tenantIdIn, Boolean withoutTenantId, String executedActivityIdIn, String activeActivityIdIn, Boolean active, Boolean suspended, Boolean completed, Boolean externallyTerminated, Boolean internallyTerminated, String variables, Boolean variableNamesIgnoreCase, Boolean variableValuesIgnoreCase, Map<String,String> additionalHeaders) throws ApiException
      Get List Queries for historic process instances that fulfill the given parameters. The size of the result set can be retrieved by using the [Get Process Instance Count](https://docs.camunda.org/manual/7.21/reference/rest/history/process-instance/get-process-instance-query-count/) method.
      Parameters:
      sortBy - Sort the results lexicographically by a given criterion. Must be used in conjunction with the sortOrder parameter. (optional)
      sortOrder - Sort the results in a given order. Values may be asc for ascending order or desc for descending order. Must be used in conjunction with the sortBy parameter. (optional)
      firstResult - Pagination of results. Specifies the index of the first result to return. (optional)
      maxResults - Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left. (optional)
      processInstanceId - Filter by process instance id. (optional)
      processInstanceIds - Filter by process instance ids. Filter by a comma-separated list of `Strings`. (optional)
      processDefinitionId - Filter by the process definition the instances run on. (optional)
      processDefinitionKey - Filter by the key of the process definition the instances run on. (optional)
      processDefinitionKeyIn - Filter by a list of process definition keys. A process instance must have one of the given process definition keys. Filter by a comma-separated list of `Strings`. (optional)
      processDefinitionName - Filter by the name of the process definition the instances run on. (optional)
      processDefinitionNameLike - Filter by process definition names that the parameter is a substring of. (optional)
      processDefinitionKeyNotIn - Exclude instances that belong to a set of process definitions. Filter by a comma-separated list of `Strings`. (optional)
      processInstanceBusinessKey - Filter by process instance business key. (optional)
      processInstanceBusinessKeyIn - Filter by a list of business keys. A process instance must have one of the given business keys. Filter by a comma-separated list of `Strings` (optional)
      processInstanceBusinessKeyLike - Filter by process instance business key that the parameter is a substring of. (optional)
      rootProcessInstances - Restrict the query to all process instances that are top level process instances. (optional)
      finished - Only include finished process instances. This flag includes all process instances that are completed or terminated. Value may only be `true`, as `false` is the default behavior. (optional)
      unfinished - Only include unfinished process instances. Value may only be `true`, as `false` is the default behavior. (optional)
      withIncidents - Only include process instances which have an incident. Value may only be `true`, as `false` is the default behavior. (optional)
      withRootIncidents - Only include process instances which have a root incident. Value may only be `true`, as `false` is the default behavior. (optional)
      incidentType - Filter by the incident type. See the [User Guide](https://docs.camunda.org/manual/7.21/user-guide/process-engine/incidents/#incident-types) for a list of incident types. (optional)
      incidentStatus - Only include process instances which have an incident in status either open or resolved. To get all process instances, use the query parameter withIncidents. (optional)
      incidentMessage - Filter by the incident message. Exact match. (optional)
      incidentMessageLike - Filter by the incident message that the parameter is a substring of. (optional)
      startedBefore - Restrict to instances that were started before the given date. By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      startedAfter - Restrict to instances that were started after the given date. By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      finishedBefore - Restrict to instances that were finished before the given date. By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      finishedAfter - Restrict to instances that were finished after the given date. By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      executedActivityAfter - Restrict to instances that executed an activity after the given date (inclusive). By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      executedActivityBefore - Restrict to instances that executed an activity before the given date (inclusive). By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      executedJobAfter - Restrict to instances that executed an job after the given date (inclusive). By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      executedJobBefore - Restrict to instances that executed an job before the given date (inclusive). By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      startedBy - Only include process instances that were started by the given user. (optional)
      superProcessInstanceId - Restrict query to all process instances that are sub process instances of the given process instance. Takes a process instance id. (optional)
      subProcessInstanceId - Restrict query to one process instance that has a sub process instance with the given id. (optional)
      superCaseInstanceId - Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id. (optional)
      subCaseInstanceId - Restrict query to one process instance that has a sub case instance with the given id. (optional)
      caseInstanceId - Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id. (optional)
      tenantIdIn - Filter by a list of tenant ids. A process instance must have one of the given tenant ids. Filter by a comma-separated list of `Strings` (optional)
      withoutTenantId - Only include historic process instances which belong to no tenant. Value may only be `true`, as `false` is the default behavior. (optional)
      executedActivityIdIn - Restrict to instances that executed an activity with one of given ids. Filter by a comma-separated list of `Strings` (optional)
      activeActivityIdIn - Restrict to instances that have an active activity with one of given ids. Filter by a comma-separated list of `Strings` (optional)
      active - Restrict to instances that are active. (optional)
      suspended - Restrict to instances that are suspended. (optional)
      completed - Restrict to instances that are completed. (optional)
      externallyTerminated - Restrict to instances that are externallyTerminated. (optional)
      internallyTerminated - Restrict to instances that are internallyTerminated. (optional)
      variables - Only include process instances that have/had variables with certain values. Variable filtering expressions are comma-separated and are structured as follows: A valid parameter value has the form `key_operator_value`. `key` is the variable name, `operator` is the comparison operator to be used and `value` the variable value. **Note:** Values are always treated as String objects on server side. 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`. Key and value may not contain underscore or comma characters. (optional)
      variableNamesIgnoreCase - Match all variable names provided in variables case-insensitively. If set to `true` variableName and variablename are treated as equal. (optional)
      variableValuesIgnoreCase - Match all variable values provided in variables case-insensitively. If set to `true` variableValue and variablevalue are treated as equal. (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<HistoricProcessInstanceDto>
      Throws:
      ApiException - if fails to make API call
    • getHistoricProcessInstancesCount

      public CountResultDto getHistoricProcessInstancesCount(String processInstanceId, String processInstanceIds, String processDefinitionId, String processDefinitionKey, String processDefinitionKeyIn, String processDefinitionName, String processDefinitionNameLike, String processDefinitionKeyNotIn, String processInstanceBusinessKey, String processInstanceBusinessKeyIn, String processInstanceBusinessKeyLike, Boolean rootProcessInstances, Boolean finished, Boolean unfinished, Boolean withIncidents, Boolean withRootIncidents, String incidentType, String incidentStatus, String incidentMessage, String incidentMessageLike, OffsetDateTime startedBefore, OffsetDateTime startedAfter, OffsetDateTime finishedBefore, OffsetDateTime finishedAfter, OffsetDateTime executedActivityAfter, OffsetDateTime executedActivityBefore, OffsetDateTime executedJobAfter, OffsetDateTime executedJobBefore, String startedBy, String superProcessInstanceId, String subProcessInstanceId, String superCaseInstanceId, String subCaseInstanceId, String caseInstanceId, String tenantIdIn, Boolean withoutTenantId, String executedActivityIdIn, String activeActivityIdIn, Boolean active, Boolean suspended, Boolean completed, Boolean externallyTerminated, Boolean internallyTerminated, String variables, Boolean variableNamesIgnoreCase, Boolean variableValuesIgnoreCase) throws ApiException
      Get List Count Queries for the number of historic process instances that fulfill the given parameters. Takes the same parameters as the [Get Process Instances](https://docs.camunda.org/manual/7.21/reference/rest/history/process-instance/get-process-instance-query/) method.
      Parameters:
      processInstanceId - Filter by process instance id. (optional)
      processInstanceIds - Filter by process instance ids. Filter by a comma-separated list of `Strings`. (optional)
      processDefinitionId - Filter by the process definition the instances run on. (optional)
      processDefinitionKey - Filter by the key of the process definition the instances run on. (optional)
      processDefinitionKeyIn - Filter by a list of process definition keys. A process instance must have one of the given process definition keys. Filter by a comma-separated list of `Strings`. (optional)
      processDefinitionName - Filter by the name of the process definition the instances run on. (optional)
      processDefinitionNameLike - Filter by process definition names that the parameter is a substring of. (optional)
      processDefinitionKeyNotIn - Exclude instances that belong to a set of process definitions. Filter by a comma-separated list of `Strings`. (optional)
      processInstanceBusinessKey - Filter by process instance business key. (optional)
      processInstanceBusinessKeyIn - Filter by a list of business keys. A process instance must have one of the given business keys. Filter by a comma-separated list of `Strings` (optional)
      processInstanceBusinessKeyLike - Filter by process instance business key that the parameter is a substring of. (optional)
      rootProcessInstances - Restrict the query to all process instances that are top level process instances. (optional)
      finished - Only include finished process instances. This flag includes all process instances that are completed or terminated. Value may only be `true`, as `false` is the default behavior. (optional)
      unfinished - Only include unfinished process instances. Value may only be `true`, as `false` is the default behavior. (optional)
      withIncidents - Only include process instances which have an incident. Value may only be `true`, as `false` is the default behavior. (optional)
      withRootIncidents - Only include process instances which have a root incident. Value may only be `true`, as `false` is the default behavior. (optional)
      incidentType - Filter by the incident type. See the [User Guide](https://docs.camunda.org/manual/7.21/user-guide/process-engine/incidents/#incident-types) for a list of incident types. (optional)
      incidentStatus - Only include process instances which have an incident in status either open or resolved. To get all process instances, use the query parameter withIncidents. (optional)
      incidentMessage - Filter by the incident message. Exact match. (optional)
      incidentMessageLike - Filter by the incident message that the parameter is a substring of. (optional)
      startedBefore - Restrict to instances that were started before the given date. By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      startedAfter - Restrict to instances that were started after the given date. By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      finishedBefore - Restrict to instances that were finished before the given date. By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      finishedAfter - Restrict to instances that were finished after the given date. By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      executedActivityAfter - Restrict to instances that executed an activity after the given date (inclusive). By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      executedActivityBefore - Restrict to instances that executed an activity before the given date (inclusive). By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      executedJobAfter - Restrict to instances that executed an job after the given date (inclusive). By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      executedJobBefore - Restrict to instances that executed an job before the given date (inclusive). By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      startedBy - Only include process instances that were started by the given user. (optional)
      superProcessInstanceId - Restrict query to all process instances that are sub process instances of the given process instance. Takes a process instance id. (optional)
      subProcessInstanceId - Restrict query to one process instance that has a sub process instance with the given id. (optional)
      superCaseInstanceId - Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id. (optional)
      subCaseInstanceId - Restrict query to one process instance that has a sub case instance with the given id. (optional)
      caseInstanceId - Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id. (optional)
      tenantIdIn - Filter by a list of tenant ids. A process instance must have one of the given tenant ids. Filter by a comma-separated list of `Strings` (optional)
      withoutTenantId - Only include historic process instances which belong to no tenant. Value may only be `true`, as `false` is the default behavior. (optional)
      executedActivityIdIn - Restrict to instances that executed an activity with one of given ids. Filter by a comma-separated list of `Strings` (optional)
      activeActivityIdIn - Restrict to instances that have an active activity with one of given ids. Filter by a comma-separated list of `Strings` (optional)
      active - Restrict to instances that are active. (optional)
      suspended - Restrict to instances that are suspended. (optional)
      completed - Restrict to instances that are completed. (optional)
      externallyTerminated - Restrict to instances that are externallyTerminated. (optional)
      internallyTerminated - Restrict to instances that are internallyTerminated. (optional)
      variables - Only include process instances that have/had variables with certain values. Variable filtering expressions are comma-separated and are structured as follows: A valid parameter value has the form `key_operator_value`. `key` is the variable name, `operator` is the comparison operator to be used and `value` the variable value. **Note:** Values are always treated as String objects on server side. 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`. Key and value may not contain underscore or comma characters. (optional)
      variableNamesIgnoreCase - Match all variable names provided in variables case-insensitively. If set to `true` variableName and variablename are treated as equal. (optional)
      variableValuesIgnoreCase - Match all variable values provided in variables case-insensitively. If set to `true` variableValue and variablevalue are treated as equal. (optional)
      Returns:
      CountResultDto
      Throws:
      ApiException - if fails to make API call
    • getHistoricProcessInstancesCount

      public CountResultDto getHistoricProcessInstancesCount(String processInstanceId, String processInstanceIds, String processDefinitionId, String processDefinitionKey, String processDefinitionKeyIn, String processDefinitionName, String processDefinitionNameLike, String processDefinitionKeyNotIn, String processInstanceBusinessKey, String processInstanceBusinessKeyIn, String processInstanceBusinessKeyLike, Boolean rootProcessInstances, Boolean finished, Boolean unfinished, Boolean withIncidents, Boolean withRootIncidents, String incidentType, String incidentStatus, String incidentMessage, String incidentMessageLike, OffsetDateTime startedBefore, OffsetDateTime startedAfter, OffsetDateTime finishedBefore, OffsetDateTime finishedAfter, OffsetDateTime executedActivityAfter, OffsetDateTime executedActivityBefore, OffsetDateTime executedJobAfter, OffsetDateTime executedJobBefore, String startedBy, String superProcessInstanceId, String subProcessInstanceId, String superCaseInstanceId, String subCaseInstanceId, String caseInstanceId, String tenantIdIn, Boolean withoutTenantId, String executedActivityIdIn, String activeActivityIdIn, Boolean active, Boolean suspended, Boolean completed, Boolean externallyTerminated, Boolean internallyTerminated, String variables, Boolean variableNamesIgnoreCase, Boolean variableValuesIgnoreCase, Map<String,String> additionalHeaders) throws ApiException
      Get List Count Queries for the number of historic process instances that fulfill the given parameters. Takes the same parameters as the [Get Process Instances](https://docs.camunda.org/manual/7.21/reference/rest/history/process-instance/get-process-instance-query/) method.
      Parameters:
      processInstanceId - Filter by process instance id. (optional)
      processInstanceIds - Filter by process instance ids. Filter by a comma-separated list of `Strings`. (optional)
      processDefinitionId - Filter by the process definition the instances run on. (optional)
      processDefinitionKey - Filter by the key of the process definition the instances run on. (optional)
      processDefinitionKeyIn - Filter by a list of process definition keys. A process instance must have one of the given process definition keys. Filter by a comma-separated list of `Strings`. (optional)
      processDefinitionName - Filter by the name of the process definition the instances run on. (optional)
      processDefinitionNameLike - Filter by process definition names that the parameter is a substring of. (optional)
      processDefinitionKeyNotIn - Exclude instances that belong to a set of process definitions. Filter by a comma-separated list of `Strings`. (optional)
      processInstanceBusinessKey - Filter by process instance business key. (optional)
      processInstanceBusinessKeyIn - Filter by a list of business keys. A process instance must have one of the given business keys. Filter by a comma-separated list of `Strings` (optional)
      processInstanceBusinessKeyLike - Filter by process instance business key that the parameter is a substring of. (optional)
      rootProcessInstances - Restrict the query to all process instances that are top level process instances. (optional)
      finished - Only include finished process instances. This flag includes all process instances that are completed or terminated. Value may only be `true`, as `false` is the default behavior. (optional)
      unfinished - Only include unfinished process instances. Value may only be `true`, as `false` is the default behavior. (optional)
      withIncidents - Only include process instances which have an incident. Value may only be `true`, as `false` is the default behavior. (optional)
      withRootIncidents - Only include process instances which have a root incident. Value may only be `true`, as `false` is the default behavior. (optional)
      incidentType - Filter by the incident type. See the [User Guide](https://docs.camunda.org/manual/7.21/user-guide/process-engine/incidents/#incident-types) for a list of incident types. (optional)
      incidentStatus - Only include process instances which have an incident in status either open or resolved. To get all process instances, use the query parameter withIncidents. (optional)
      incidentMessage - Filter by the incident message. Exact match. (optional)
      incidentMessageLike - Filter by the incident message that the parameter is a substring of. (optional)
      startedBefore - Restrict to instances that were started before the given date. By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      startedAfter - Restrict to instances that were started after the given date. By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      finishedBefore - Restrict to instances that were finished before the given date. By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      finishedAfter - Restrict to instances that were finished after the given date. By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      executedActivityAfter - Restrict to instances that executed an activity after the given date (inclusive). By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      executedActivityBefore - Restrict to instances that executed an activity before the given date (inclusive). By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      executedJobAfter - Restrict to instances that executed an job after the given date (inclusive). By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      executedJobBefore - Restrict to instances that executed an job before the given date (inclusive). By [default](https://docs.camunda.org/manual/7.21/reference/rest/overview/date-format/), the date must have the format `yyyy-MM-dd'T'HH:mm:ss.SSSZ`, e.g., `2013-01-23T14:42:45.000+0200`. (optional)
      startedBy - Only include process instances that were started by the given user. (optional)
      superProcessInstanceId - Restrict query to all process instances that are sub process instances of the given process instance. Takes a process instance id. (optional)
      subProcessInstanceId - Restrict query to one process instance that has a sub process instance with the given id. (optional)
      superCaseInstanceId - Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id. (optional)
      subCaseInstanceId - Restrict query to one process instance that has a sub case instance with the given id. (optional)
      caseInstanceId - Restrict query to all process instances that are sub process instances of the given case instance. Takes a case instance id. (optional)
      tenantIdIn - Filter by a list of tenant ids. A process instance must have one of the given tenant ids. Filter by a comma-separated list of `Strings` (optional)
      withoutTenantId - Only include historic process instances which belong to no tenant. Value may only be `true`, as `false` is the default behavior. (optional)
      executedActivityIdIn - Restrict to instances that executed an activity with one of given ids. Filter by a comma-separated list of `Strings` (optional)
      activeActivityIdIn - Restrict to instances that have an active activity with one of given ids. Filter by a comma-separated list of `Strings` (optional)
      active - Restrict to instances that are active. (optional)
      suspended - Restrict to instances that are suspended. (optional)
      completed - Restrict to instances that are completed. (optional)
      externallyTerminated - Restrict to instances that are externallyTerminated. (optional)
      internallyTerminated - Restrict to instances that are internallyTerminated. (optional)
      variables - Only include process instances that have/had variables with certain values. Variable filtering expressions are comma-separated and are structured as follows: A valid parameter value has the form `key_operator_value`. `key` is the variable name, `operator` is the comparison operator to be used and `value` the variable value. **Note:** Values are always treated as String objects on server side. 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`. Key and value may not contain underscore or comma characters. (optional)
      variableNamesIgnoreCase - Match all variable names provided in variables case-insensitively. If set to `true` variableName and variablename are treated as equal. (optional)
      variableValuesIgnoreCase - Match all variable values provided in variables case-insensitively. If set to `true` variableValue and variablevalue are treated as equal. (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      CountResultDto
      Throws:
      ApiException - if fails to make API call
    • queryHistoricProcessInstances

      public List<HistoricProcessInstanceDto> queryHistoricProcessInstances(Integer firstResult, Integer maxResults, HistoricProcessInstanceQueryDto historicProcessInstanceQueryDto) throws ApiException
      Get List (POST) Queries for historic process instances that fulfill the given parameters. This method is slightly more powerful than the [Get Process Instance](https://docs.camunda.org/manual/7.21/reference/rest/history/process-instance/get-process-instance-query/) because it allows filtering by multiple process variables of types `String`, `Number` or `Boolean`.
      Parameters:
      firstResult - Pagination of results. Specifies the index of the first result to return. (optional)
      maxResults - Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left. (optional)
      historicProcessInstanceQueryDto - (optional)
      Returns:
      List<HistoricProcessInstanceDto>
      Throws:
      ApiException - if fails to make API call
    • queryHistoricProcessInstances

      public List<HistoricProcessInstanceDto> queryHistoricProcessInstances(Integer firstResult, Integer maxResults, HistoricProcessInstanceQueryDto historicProcessInstanceQueryDto, Map<String,String> additionalHeaders) throws ApiException
      Get List (POST) Queries for historic process instances that fulfill the given parameters. This method is slightly more powerful than the [Get Process Instance](https://docs.camunda.org/manual/7.21/reference/rest/history/process-instance/get-process-instance-query/) because it allows filtering by multiple process variables of types `String`, `Number` or `Boolean`.
      Parameters:
      firstResult - Pagination of results. Specifies the index of the first result to return. (optional)
      maxResults - Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left. (optional)
      historicProcessInstanceQueryDto - (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<HistoricProcessInstanceDto>
      Throws:
      ApiException - if fails to make API call
    • queryHistoricProcessInstancesCount

      public CountResultDto queryHistoricProcessInstancesCount(HistoricProcessInstanceQueryDto historicProcessInstanceQueryDto) throws ApiException
      Get List Count (POST) Queries for the number of historic process instances that fulfill the given parameters. This method takes the same message body as the [Get Process Instances (POST)](https://docs.camunda.org/manual/7.21/reference/rest/history/process-instance/get-process-instance-query/) method and therefore it is slightly more powerful than the [Get Process Instance Count](https://docs.camunda.org/manual/7.21/reference/rest/history/process-instance/post-process-instance-query-count/) method.
      Parameters:
      historicProcessInstanceQueryDto - (optional)
      Returns:
      CountResultDto
      Throws:
      ApiException - if fails to make API call
    • queryHistoricProcessInstancesCount

      public CountResultDto queryHistoricProcessInstancesCount(HistoricProcessInstanceQueryDto historicProcessInstanceQueryDto, Map<String,String> additionalHeaders) throws ApiException
      Get List Count (POST) Queries for the number of historic process instances that fulfill the given parameters. This method takes the same message body as the [Get Process Instances (POST)](https://docs.camunda.org/manual/7.21/reference/rest/history/process-instance/get-process-instance-query/) method and therefore it is slightly more powerful than the [Get Process Instance Count](https://docs.camunda.org/manual/7.21/reference/rest/history/process-instance/post-process-instance-query-count/) method.
      Parameters:
      historicProcessInstanceQueryDto - (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      CountResultDto
      Throws:
      ApiException - if fails to make API call
    • setRemovalTimeAsync

      public BatchDto setRemovalTimeAsync(SetRemovalTimeToHistoricProcessInstancesDto setRemovalTimeToHistoricProcessInstancesDto) throws ApiException
      Set Removal Time Async (POST) Sets the removal time to multiple historic process instances asynchronously (batch). At least `historicProcessInstanceIds` or `historicProcessInstanceQuery` has to be provided. If both are provided, all instances matching query criterion and instances from the list will be updated with a removal time.
      Parameters:
      setRemovalTimeToHistoricProcessInstancesDto - (optional)
      Returns:
      BatchDto
      Throws:
      ApiException - if fails to make API call
    • setRemovalTimeAsync

      public BatchDto setRemovalTimeAsync(SetRemovalTimeToHistoricProcessInstancesDto setRemovalTimeToHistoricProcessInstancesDto, Map<String,String> additionalHeaders) throws ApiException
      Set Removal Time Async (POST) Sets the removal time to multiple historic process instances asynchronously (batch). At least `historicProcessInstanceIds` or `historicProcessInstanceQuery` has to be provided. If both are provided, all instances matching query criterion and instances from the list will be updated with a removal time.
      Parameters:
      setRemovalTimeToHistoricProcessInstancesDto - (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      BatchDto
      Throws:
      ApiException - if fails to make API call