Class ExternalTaskApi

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

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

    • ExternalTaskApi

      public ExternalTaskApi()
    • ExternalTaskApi

      public ExternalTaskApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • completeExternalTaskResource

      public void completeExternalTaskResource(String id, CompleteExternalTaskDto completeExternalTaskDto) throws ApiException
      Complete Completes an external task by id and updates process variables.
      Parameters:
      id - The id of the task to complete. (required)
      completeExternalTaskDto - (optional)
      Throws:
      ApiException - if fails to make API call
    • completeExternalTaskResource

      public void completeExternalTaskResource(String id, CompleteExternalTaskDto completeExternalTaskDto, Map<String,String> additionalHeaders) throws ApiException
      Complete Completes an external task by id and updates process variables.
      Parameters:
      id - The id of the task to complete. (required)
      completeExternalTaskDto - (optional)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • extendLock

      public void extendLock(String id, ExtendLockOnExternalTaskDto extendLockOnExternalTaskDto) throws ApiException
      Extend Lock Extends the timeout of the lock by a given amount of time.
      Parameters:
      id - The id of the external task. (required)
      extendLockOnExternalTaskDto - (optional)
      Throws:
      ApiException - if fails to make API call
    • extendLock

      public void extendLock(String id, ExtendLockOnExternalTaskDto extendLockOnExternalTaskDto, Map<String,String> additionalHeaders) throws ApiException
      Extend Lock Extends the timeout of the lock by a given amount of time.
      Parameters:
      id - The id of the external task. (required)
      extendLockOnExternalTaskDto - (optional)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • fetchAndLock

      public List<LockedExternalTaskDto> fetchAndLock(FetchExternalTasksDto fetchExternalTasksDto) throws ApiException
      Fetch and Lock Fetches and locks a specific number of external tasks for execution by a worker. Query can be restricted to specific task topics and for each task topic an individual lock time can be provided.
      Parameters:
      fetchExternalTasksDto - (optional)
      Returns:
      List<LockedExternalTaskDto>
      Throws:
      ApiException - if fails to make API call
    • fetchAndLock

      public List<LockedExternalTaskDto> fetchAndLock(FetchExternalTasksDto fetchExternalTasksDto, Map<String,String> additionalHeaders) throws ApiException
      Fetch and Lock Fetches and locks a specific number of external tasks for execution by a worker. Query can be restricted to specific task topics and for each task topic an individual lock time can be provided.
      Parameters:
      fetchExternalTasksDto - (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<LockedExternalTaskDto>
      Throws:
      ApiException - if fails to make API call
    • getExternalTask

      public ExternalTaskDto getExternalTask(String id) throws ApiException
      Get Retrieves an external task by id, corresponding to the `ExternalTask` interface in the engine.
      Parameters:
      id - The id of the external task to be retrieved. (required)
      Returns:
      ExternalTaskDto
      Throws:
      ApiException - if fails to make API call
    • getExternalTask

      public ExternalTaskDto getExternalTask(String id, Map<String,String> additionalHeaders) throws ApiException
      Get Retrieves an external task by id, corresponding to the `ExternalTask` interface in the engine.
      Parameters:
      id - The id of the external task to be retrieved. (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      ExternalTaskDto
      Throws:
      ApiException - if fails to make API call
    • getExternalTaskErrorDetails

      public String getExternalTaskErrorDetails(String id) throws ApiException
      Get Error Details Retrieves the error details in the context of a running external task by id.
      Parameters:
      id - The id of the external task for which the error details should be retrieved. (required)
      Returns:
      String
      Throws:
      ApiException - if fails to make API call
    • getExternalTaskErrorDetails

      public String getExternalTaskErrorDetails(String id, Map<String,String> additionalHeaders) throws ApiException
      Get Error Details Retrieves the error details in the context of a running external task by id.
      Parameters:
      id - The id of the external task for which the error details should be retrieved. (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      String
      Throws:
      ApiException - if fails to make API call
    • getExternalTasks

      public List<ExternalTaskDto> getExternalTasks(String externalTaskId, String externalTaskIdIn, String topicName, String workerId, Boolean locked, Boolean notLocked, Boolean withRetriesLeft, Boolean noRetriesLeft, OffsetDateTime lockExpirationAfter, OffsetDateTime lockExpirationBefore, String activityId, String activityIdIn, String executionId, String processInstanceId, String processInstanceIdIn, String processDefinitionId, String tenantIdIn, Boolean active, Boolean suspended, Long priorityHigherThanOrEquals, Long priorityLowerThanOrEquals, String sortBy, String sortOrder, Integer firstResult, Integer maxResults) throws ApiException
      Get List Queries for the external tasks that fulfill given parameters. Parameters may be static as well as dynamic runtime properties of executions. The size of the result set can be retrieved by using the [Get External Task Count](https://docs.camunda.org/manual/7.21/reference/rest/external-task/get-query-count/) method.
      Parameters:
      externalTaskId - Filter by an external task's id. (optional)
      externalTaskIdIn - Filter by the comma-separated list of external task ids. (optional)
      topicName - Filter by an external task topic. (optional)
      workerId - Filter by the id of the worker that the task was most recently locked by. (optional)
      locked - Only include external tasks that are currently locked (i.e., they have a lock time and it has not expired). Value may only be `true`, as `false` matches any external task. (optional)
      notLocked - Only include external tasks that are currently not locked (i.e., they have no lock or it has expired). Value may only be `true`, as `false` matches any external task. (optional)
      withRetriesLeft - Only include external tasks that have a positive (&gt; 0) number of retries (or `null`). Value may only be `true`, as `false` matches any external task. (optional)
      noRetriesLeft - Only include external tasks that have 0 retries. Value may only be `true`, as `false` matches any external task. (optional)
      lockExpirationAfter - Restrict to external tasks that have a lock that expires after a 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)
      lockExpirationBefore - Restrict to external tasks that have a lock that expires before a 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)
      activityId - Filter by the id of the activity that an external task is created for. (optional)
      activityIdIn - Filter by the comma-separated list of ids of the activities that an external task is created for. (optional)
      executionId - Filter by the id of the execution that an external task belongs to. (optional)
      processInstanceId - Filter by the id of the process instance that an external task belongs to. (optional)
      processInstanceIdIn - Filter by a comma-separated list of process instance ids that an external task may belong to. (optional)
      processDefinitionId - Filter by the id of the process definition that an external task belongs to. (optional)
      tenantIdIn - Filter by a comma-separated list of tenant ids. An external task must have one of the given tenant ids. (optional)
      active - Only include active tasks. Value may only be `true`, as `false` matches any external task. (optional)
      suspended - Only include suspended tasks. Value may only be `true`, as `false` matches any external task. (optional)
      priorityHigherThanOrEquals - Only include jobs with a priority higher than or equal to the given value. Value must be a valid `long` value. (optional)
      priorityLowerThanOrEquals - Only include jobs with a priority lower than or equal to the given value. Value must be a valid `long` value. (optional)
      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)
      Returns:
      List<ExternalTaskDto>
      Throws:
      ApiException - if fails to make API call
    • getExternalTasks

      public List<ExternalTaskDto> getExternalTasks(String externalTaskId, String externalTaskIdIn, String topicName, String workerId, Boolean locked, Boolean notLocked, Boolean withRetriesLeft, Boolean noRetriesLeft, OffsetDateTime lockExpirationAfter, OffsetDateTime lockExpirationBefore, String activityId, String activityIdIn, String executionId, String processInstanceId, String processInstanceIdIn, String processDefinitionId, String tenantIdIn, Boolean active, Boolean suspended, Long priorityHigherThanOrEquals, Long priorityLowerThanOrEquals, String sortBy, String sortOrder, Integer firstResult, Integer maxResults, Map<String,String> additionalHeaders) throws ApiException
      Get List Queries for the external tasks that fulfill given parameters. Parameters may be static as well as dynamic runtime properties of executions. The size of the result set can be retrieved by using the [Get External Task Count](https://docs.camunda.org/manual/7.21/reference/rest/external-task/get-query-count/) method.
      Parameters:
      externalTaskId - Filter by an external task's id. (optional)
      externalTaskIdIn - Filter by the comma-separated list of external task ids. (optional)
      topicName - Filter by an external task topic. (optional)
      workerId - Filter by the id of the worker that the task was most recently locked by. (optional)
      locked - Only include external tasks that are currently locked (i.e., they have a lock time and it has not expired). Value may only be `true`, as `false` matches any external task. (optional)
      notLocked - Only include external tasks that are currently not locked (i.e., they have no lock or it has expired). Value may only be `true`, as `false` matches any external task. (optional)
      withRetriesLeft - Only include external tasks that have a positive (&gt; 0) number of retries (or `null`). Value may only be `true`, as `false` matches any external task. (optional)
      noRetriesLeft - Only include external tasks that have 0 retries. Value may only be `true`, as `false` matches any external task. (optional)
      lockExpirationAfter - Restrict to external tasks that have a lock that expires after a 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)
      lockExpirationBefore - Restrict to external tasks that have a lock that expires before a 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)
      activityId - Filter by the id of the activity that an external task is created for. (optional)
      activityIdIn - Filter by the comma-separated list of ids of the activities that an external task is created for. (optional)
      executionId - Filter by the id of the execution that an external task belongs to. (optional)
      processInstanceId - Filter by the id of the process instance that an external task belongs to. (optional)
      processInstanceIdIn - Filter by a comma-separated list of process instance ids that an external task may belong to. (optional)
      processDefinitionId - Filter by the id of the process definition that an external task belongs to. (optional)
      tenantIdIn - Filter by a comma-separated list of tenant ids. An external task must have one of the given tenant ids. (optional)
      active - Only include active tasks. Value may only be `true`, as `false` matches any external task. (optional)
      suspended - Only include suspended tasks. Value may only be `true`, as `false` matches any external task. (optional)
      priorityHigherThanOrEquals - Only include jobs with a priority higher than or equal to the given value. Value must be a valid `long` value. (optional)
      priorityLowerThanOrEquals - Only include jobs with a priority lower than or equal to the given value. Value must be a valid `long` value. (optional)
      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)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<ExternalTaskDto>
      Throws:
      ApiException - if fails to make API call
    • getExternalTasksCount

      public CountResultDto getExternalTasksCount(String externalTaskId, String externalTaskIdIn, String topicName, String workerId, Boolean locked, Boolean notLocked, Boolean withRetriesLeft, Boolean noRetriesLeft, OffsetDateTime lockExpirationAfter, OffsetDateTime lockExpirationBefore, String activityId, String activityIdIn, String executionId, String processInstanceId, String processInstanceIdIn, String processDefinitionId, String tenantIdIn, Boolean active, Boolean suspended, Long priorityHigherThanOrEquals, Long priorityLowerThanOrEquals) throws ApiException
      Get List Count Queries for the number of external tasks that fulfill given parameters. Takes the same parameters as the [Get External Tasks](https://docs.camunda.org/manual/7.21/reference/rest/external-task/get-query/) method.
      Parameters:
      externalTaskId - Filter by an external task's id. (optional)
      externalTaskIdIn - Filter by the comma-separated list of external task ids. (optional)
      topicName - Filter by an external task topic. (optional)
      workerId - Filter by the id of the worker that the task was most recently locked by. (optional)
      locked - Only include external tasks that are currently locked (i.e., they have a lock time and it has not expired). Value may only be `true`, as `false` matches any external task. (optional)
      notLocked - Only include external tasks that are currently not locked (i.e., they have no lock or it has expired). Value may only be `true`, as `false` matches any external task. (optional)
      withRetriesLeft - Only include external tasks that have a positive (&gt; 0) number of retries (or `null`). Value may only be `true`, as `false` matches any external task. (optional)
      noRetriesLeft - Only include external tasks that have 0 retries. Value may only be `true`, as `false` matches any external task. (optional)
      lockExpirationAfter - Restrict to external tasks that have a lock that expires after a 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)
      lockExpirationBefore - Restrict to external tasks that have a lock that expires before a 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)
      activityId - Filter by the id of the activity that an external task is created for. (optional)
      activityIdIn - Filter by the comma-separated list of ids of the activities that an external task is created for. (optional)
      executionId - Filter by the id of the execution that an external task belongs to. (optional)
      processInstanceId - Filter by the id of the process instance that an external task belongs to. (optional)
      processInstanceIdIn - Filter by a comma-separated list of process instance ids that an external task may belong to. (optional)
      processDefinitionId - Filter by the id of the process definition that an external task belongs to. (optional)
      tenantIdIn - Filter by a comma-separated list of tenant ids. An external task must have one of the given tenant ids. (optional)
      active - Only include active tasks. Value may only be `true`, as `false` matches any external task. (optional)
      suspended - Only include suspended tasks. Value may only be `true`, as `false` matches any external task. (optional)
      priorityHigherThanOrEquals - Only include jobs with a priority higher than or equal to the given value. Value must be a valid `long` value. (optional)
      priorityLowerThanOrEquals - Only include jobs with a priority lower than or equal to the given value. Value must be a valid `long` value. (optional)
      Returns:
      CountResultDto
      Throws:
      ApiException - if fails to make API call
    • getExternalTasksCount

      public CountResultDto getExternalTasksCount(String externalTaskId, String externalTaskIdIn, String topicName, String workerId, Boolean locked, Boolean notLocked, Boolean withRetriesLeft, Boolean noRetriesLeft, OffsetDateTime lockExpirationAfter, OffsetDateTime lockExpirationBefore, String activityId, String activityIdIn, String executionId, String processInstanceId, String processInstanceIdIn, String processDefinitionId, String tenantIdIn, Boolean active, Boolean suspended, Long priorityHigherThanOrEquals, Long priorityLowerThanOrEquals, Map<String,String> additionalHeaders) throws ApiException
      Get List Count Queries for the number of external tasks that fulfill given parameters. Takes the same parameters as the [Get External Tasks](https://docs.camunda.org/manual/7.21/reference/rest/external-task/get-query/) method.
      Parameters:
      externalTaskId - Filter by an external task's id. (optional)
      externalTaskIdIn - Filter by the comma-separated list of external task ids. (optional)
      topicName - Filter by an external task topic. (optional)
      workerId - Filter by the id of the worker that the task was most recently locked by. (optional)
      locked - Only include external tasks that are currently locked (i.e., they have a lock time and it has not expired). Value may only be `true`, as `false` matches any external task. (optional)
      notLocked - Only include external tasks that are currently not locked (i.e., they have no lock or it has expired). Value may only be `true`, as `false` matches any external task. (optional)
      withRetriesLeft - Only include external tasks that have a positive (&gt; 0) number of retries (or `null`). Value may only be `true`, as `false` matches any external task. (optional)
      noRetriesLeft - Only include external tasks that have 0 retries. Value may only be `true`, as `false` matches any external task. (optional)
      lockExpirationAfter - Restrict to external tasks that have a lock that expires after a 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)
      lockExpirationBefore - Restrict to external tasks that have a lock that expires before a 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)
      activityId - Filter by the id of the activity that an external task is created for. (optional)
      activityIdIn - Filter by the comma-separated list of ids of the activities that an external task is created for. (optional)
      executionId - Filter by the id of the execution that an external task belongs to. (optional)
      processInstanceId - Filter by the id of the process instance that an external task belongs to. (optional)
      processInstanceIdIn - Filter by a comma-separated list of process instance ids that an external task may belong to. (optional)
      processDefinitionId - Filter by the id of the process definition that an external task belongs to. (optional)
      tenantIdIn - Filter by a comma-separated list of tenant ids. An external task must have one of the given tenant ids. (optional)
      active - Only include active tasks. Value may only be `true`, as `false` matches any external task. (optional)
      suspended - Only include suspended tasks. Value may only be `true`, as `false` matches any external task. (optional)
      priorityHigherThanOrEquals - Only include jobs with a priority higher than or equal to the given value. Value must be a valid `long` value. (optional)
      priorityLowerThanOrEquals - Only include jobs with a priority lower than or equal to the given value. Value must be a valid `long` value. (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      CountResultDto
      Throws:
      ApiException - if fails to make API call
    • getTopicNames

      public List<String> getTopicNames(Boolean withLockedTasks, Boolean withUnlockedTasks, Boolean withRetriesLeft) throws ApiException
      Get External Task Topic Names Queries for distinct topic names of external tasks that fulfill given parameters. Query can be restricted to only tasks with retries left, tasks that are locked, or tasks that are unlocked. The parameters withLockedTasks and withUnlockedTasks are exclusive. Setting them both to true will return an empty list. Providing no parameters will return a list of all distinct topic names with external tasks.
      Parameters:
      withLockedTasks - Only include external tasks that are currently locked (i.e., they have a lock time and it has not expired). Value may only be `true`, as `false` matches any external task. (optional)
      withUnlockedTasks - Only include external tasks that are currently not locked (i.e., they have no lock or it has expired). Value may only be `true`, as `false` matches any external task. (optional)
      withRetriesLeft - Only include external tasks that have a positive (&gt; 0) number of retries (or `null`). Value may only be `true`, as `false` matches any external task. (optional)
      Returns:
      List<String>
      Throws:
      ApiException - if fails to make API call
    • getTopicNames

      public List<String> getTopicNames(Boolean withLockedTasks, Boolean withUnlockedTasks, Boolean withRetriesLeft, Map<String,String> additionalHeaders) throws ApiException
      Get External Task Topic Names Queries for distinct topic names of external tasks that fulfill given parameters. Query can be restricted to only tasks with retries left, tasks that are locked, or tasks that are unlocked. The parameters withLockedTasks and withUnlockedTasks are exclusive. Setting them both to true will return an empty list. Providing no parameters will return a list of all distinct topic names with external tasks.
      Parameters:
      withLockedTasks - Only include external tasks that are currently locked (i.e., they have a lock time and it has not expired). Value may only be `true`, as `false` matches any external task. (optional)
      withUnlockedTasks - Only include external tasks that are currently not locked (i.e., they have no lock or it has expired). Value may only be `true`, as `false` matches any external task. (optional)
      withRetriesLeft - Only include external tasks that have a positive (&gt; 0) number of retries (or `null`). Value may only be `true`, as `false` matches any external task. (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<String>
      Throws:
      ApiException - if fails to make API call
    • handleExternalTaskBpmnError

      public void handleExternalTaskBpmnError(String id, ExternalTaskBpmnError externalTaskBpmnError) throws ApiException
      Handle BPMN Error Reports a business error in the context of a running external task by id. The error code must be specified to identify the BPMN error handler.
      Parameters:
      id - The id of the external task in which context a BPMN error is reported. (required)
      externalTaskBpmnError - (optional)
      Throws:
      ApiException - if fails to make API call
    • handleExternalTaskBpmnError

      public void handleExternalTaskBpmnError(String id, ExternalTaskBpmnError externalTaskBpmnError, Map<String,String> additionalHeaders) throws ApiException
      Handle BPMN Error Reports a business error in the context of a running external task by id. The error code must be specified to identify the BPMN error handler.
      Parameters:
      id - The id of the external task in which context a BPMN error is reported. (required)
      externalTaskBpmnError - (optional)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • handleFailure

      public void handleFailure(String id, ExternalTaskFailureDto externalTaskFailureDto) throws ApiException
      Handle Failure Reports a failure to execute an external task by id. A number of retries and a timeout until the task can be retried can be specified. If retries are set to 0, an incident for this task is created.
      Parameters:
      id - The id of the external task to report a failure for. (required)
      externalTaskFailureDto - (optional)
      Throws:
      ApiException - if fails to make API call
    • handleFailure

      public void handleFailure(String id, ExternalTaskFailureDto externalTaskFailureDto, Map<String,String> additionalHeaders) throws ApiException
      Handle Failure Reports a failure to execute an external task by id. A number of retries and a timeout until the task can be retried can be specified. If retries are set to 0, an incident for this task is created.
      Parameters:
      id - The id of the external task to report a failure for. (required)
      externalTaskFailureDto - (optional)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • lock

      public void lock(String id, LockExternalTaskDto lockExternalTaskDto) throws ApiException
      Lock an external task by a given id for a specified worker and amount of time.
      Parameters:
      id - The id of the external task. (required)
      lockExternalTaskDto - (optional)
      Throws:
      ApiException - if fails to make API call
    • lock

      public void lock(String id, LockExternalTaskDto lockExternalTaskDto, Map<String,String> additionalHeaders) throws ApiException
      Lock an external task by a given id for a specified worker and amount of time.
      Parameters:
      id - The id of the external task. (required)
      lockExternalTaskDto - (optional)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • queryExternalTasks

      public List<ExternalTaskDto> queryExternalTasks(Integer firstResult, Integer maxResults, ExternalTaskQueryDto externalTaskQueryDto) throws ApiException
      Get List (POST) Queries for external tasks that fulfill given parameters in the form of a JSON object. This method is slightly more powerful than the [Get External Tasks](https://docs.camunda.org/manual/7.21/reference/rest/external-task/get-query/) method because it allows to specify a hierarchical result sorting.
      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)
      externalTaskQueryDto - (optional)
      Returns:
      List<ExternalTaskDto>
      Throws:
      ApiException - if fails to make API call
    • queryExternalTasks

      public List<ExternalTaskDto> queryExternalTasks(Integer firstResult, Integer maxResults, ExternalTaskQueryDto externalTaskQueryDto, Map<String,String> additionalHeaders) throws ApiException
      Get List (POST) Queries for external tasks that fulfill given parameters in the form of a JSON object. This method is slightly more powerful than the [Get External Tasks](https://docs.camunda.org/manual/7.21/reference/rest/external-task/get-query/) method because it allows to specify a hierarchical result sorting.
      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)
      externalTaskQueryDto - (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<ExternalTaskDto>
      Throws:
      ApiException - if fails to make API call
    • queryExternalTasksCount

      public CountResultDto queryExternalTasksCount(ExternalTaskQueryDto externalTaskQueryDto) throws ApiException
      Get List Count (POST) Queries for the number of external tasks that fulfill given parameters. This method takes the same message body as the [Get External Tasks (POST)](https://docs.camunda.org/manual/7.21/reference/rest/external-task/post-query/) method.
      Parameters:
      externalTaskQueryDto - (optional)
      Returns:
      CountResultDto
      Throws:
      ApiException - if fails to make API call
    • queryExternalTasksCount

      public CountResultDto queryExternalTasksCount(ExternalTaskQueryDto externalTaskQueryDto, Map<String,String> additionalHeaders) throws ApiException
      Get List Count (POST) Queries for the number of external tasks that fulfill given parameters. This method takes the same message body as the [Get External Tasks (POST)](https://docs.camunda.org/manual/7.21/reference/rest/external-task/post-query/) method.
      Parameters:
      externalTaskQueryDto - (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      CountResultDto
      Throws:
      ApiException - if fails to make API call
    • setExternalTaskResourcePriority

      public void setExternalTaskResourcePriority(String id, PriorityDto priorityDto) throws ApiException
      Set Priority Sets the priority of an existing external task by id. The default value of a priority is 0.
      Parameters:
      id - The id of the external task to set the priority for. (required)
      priorityDto - (optional)
      Throws:
      ApiException - if fails to make API call
    • setExternalTaskResourcePriority

      public void setExternalTaskResourcePriority(String id, PriorityDto priorityDto, Map<String,String> additionalHeaders) throws ApiException
      Set Priority Sets the priority of an existing external task by id. The default value of a priority is 0.
      Parameters:
      id - The id of the external task to set the priority for. (required)
      priorityDto - (optional)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • setExternalTaskResourceRetries

      public void setExternalTaskResourceRetries(String id, RetriesDto retriesDto) throws ApiException
      Set Retries Sets the number of retries left to execute an external task by id. If retries are set to 0, an incident is created.
      Parameters:
      id - The id of the external task to set the number of retries for. (required)
      retriesDto - (optional)
      Throws:
      ApiException - if fails to make API call
    • setExternalTaskResourceRetries

      public void setExternalTaskResourceRetries(String id, RetriesDto retriesDto, Map<String,String> additionalHeaders) throws ApiException
      Set Retries Sets the number of retries left to execute an external task by id. If retries are set to 0, an incident is created.
      Parameters:
      id - The id of the external task to set the number of retries for. (required)
      retriesDto - (optional)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • setExternalTaskRetries

      public void setExternalTaskRetries(SetRetriesForExternalTasksDto setRetriesForExternalTasksDto) throws ApiException
      Set Retries Sync Sets the number of retries left to execute external tasks by id synchronously. If retries are set to 0, an incident is created.
      Parameters:
      setRetriesForExternalTasksDto - (optional)
      Throws:
      ApiException - if fails to make API call
    • setExternalTaskRetries

      public void setExternalTaskRetries(SetRetriesForExternalTasksDto setRetriesForExternalTasksDto, Map<String,String> additionalHeaders) throws ApiException
      Set Retries Sync Sets the number of retries left to execute external tasks by id synchronously. If retries are set to 0, an incident is created.
      Parameters:
      setRetriesForExternalTasksDto - (optional)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • setExternalTaskRetriesAsyncOperation

      public BatchDto setExternalTaskRetriesAsyncOperation(SetRetriesForExternalTasksDto setRetriesForExternalTasksDto) throws ApiException
      Set Retries Async Sets the number of retries left to execute external tasks by id asynchronously. If retries are set to 0, an incident is created.
      Parameters:
      setRetriesForExternalTasksDto - (optional)
      Returns:
      BatchDto
      Throws:
      ApiException - if fails to make API call
    • setExternalTaskRetriesAsyncOperation

      public BatchDto setExternalTaskRetriesAsyncOperation(SetRetriesForExternalTasksDto setRetriesForExternalTasksDto, Map<String,String> additionalHeaders) throws ApiException
      Set Retries Async Sets the number of retries left to execute external tasks by id asynchronously. If retries are set to 0, an incident is created.
      Parameters:
      setRetriesForExternalTasksDto - (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      BatchDto
      Throws:
      ApiException - if fails to make API call
    • unlock

      public void unlock(String id) throws ApiException
      Unlock Unlocks an external task by id. Clears the task's lock expiration time and worker id.
      Parameters:
      id - The id of the external task to unlock. (required)
      Throws:
      ApiException - if fails to make API call
    • unlock

      public void unlock(String id, Map<String,String> additionalHeaders) throws ApiException
      Unlock Unlocks an external task by id. Clears the task's lock expiration time and worker id.
      Parameters:
      id - The id of the external task to unlock. (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call