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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcompleteExternalTaskResource(String id, CompleteExternalTaskDto completeExternalTaskDto) Complete Completes an external task by id and updates process variables.voidcompleteExternalTaskResource(String id, CompleteExternalTaskDto completeExternalTaskDto, Map<String, String> additionalHeaders) Complete Completes an external task by id and updates process variables.voidextendLock(String id, ExtendLockOnExternalTaskDto extendLockOnExternalTaskDto) Extend Lock Extends the timeout of the lock by a given amount of time.voidextendLock(String id, ExtendLockOnExternalTaskDto extendLockOnExternalTaskDto, Map<String, String> additionalHeaders) Extend Lock Extends the timeout of the lock by a given amount of time.fetchAndLock(FetchExternalTasksDto fetchExternalTasksDto) Fetch and Lock Fetches and locks a specific number of external tasks for execution by a worker.fetchAndLock(FetchExternalTasksDto fetchExternalTasksDto, Map<String, String> additionalHeaders) Fetch and Lock Fetches and locks a specific number of external tasks for execution by a worker.Get Retrieves an external task by id, corresponding to the `ExternalTask` interface in the engine.getExternalTask(String id, Map<String, String> additionalHeaders) Get Retrieves an external task by id, corresponding to the `ExternalTask` interface in the engine.Get Error Details Retrieves the error details in the context of a running external task by id.getExternalTaskErrorDetails(String id, Map<String, String> additionalHeaders) Get Error Details Retrieves the error details in the context of a running external task by id.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) Get List Queries for the external tasks that fulfill given parameters.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) Get List Queries for the external tasks that fulfill given parameters.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) Get List Count Queries for the number of external tasks that fulfill given parameters.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) Get List Count Queries for the number of external tasks that fulfill given parameters.getTopicNames(Boolean withLockedTasks, Boolean withUnlockedTasks, Boolean withRetriesLeft) Get External Task Topic Names Queries for distinct topic names of external tasks that fulfill given parameters.getTopicNames(Boolean withLockedTasks, Boolean withUnlockedTasks, Boolean withRetriesLeft, Map<String, String> additionalHeaders) Get External Task Topic Names Queries for distinct topic names of external tasks that fulfill given parameters.voidhandleExternalTaskBpmnError(String id, ExternalTaskBpmnError externalTaskBpmnError) Handle BPMN Error Reports a business error in the context of a running external task by id.voidhandleExternalTaskBpmnError(String id, ExternalTaskBpmnError externalTaskBpmnError, Map<String, String> additionalHeaders) Handle BPMN Error Reports a business error in the context of a running external task by id.voidhandleFailure(String id, ExternalTaskFailureDto externalTaskFailureDto) Handle Failure Reports a failure to execute an external task by id.voidhandleFailure(String id, ExternalTaskFailureDto externalTaskFailureDto, Map<String, String> additionalHeaders) Handle Failure Reports a failure to execute an external task by id.voidlock(String id, LockExternalTaskDto lockExternalTaskDto) Lock an external task by a given id for a specified worker and amount of time.voidLock an external task by a given id for a specified worker and amount of time.queryExternalTasks(Integer firstResult, Integer maxResults, ExternalTaskQueryDto externalTaskQueryDto) Get List (POST) Queries for external tasks that fulfill given parameters in the form of a JSON object.queryExternalTasks(Integer firstResult, Integer maxResults, ExternalTaskQueryDto externalTaskQueryDto, Map<String, String> additionalHeaders) Get List (POST) Queries for external tasks that fulfill given parameters in the form of a JSON object.queryExternalTasksCount(ExternalTaskQueryDto externalTaskQueryDto) Get List Count (POST) Queries for the number of external tasks that fulfill given parameters.queryExternalTasksCount(ExternalTaskQueryDto externalTaskQueryDto, Map<String, String> additionalHeaders) Get List Count (POST) Queries for the number of external tasks that fulfill given parameters.voidsetApiClient(ApiClient apiClient) voidsetExternalTaskResourcePriority(String id, PriorityDto priorityDto) Set Priority Sets the priority of an existing external task by id.voidsetExternalTaskResourcePriority(String id, PriorityDto priorityDto, Map<String, String> additionalHeaders) Set Priority Sets the priority of an existing external task by id.voidsetExternalTaskResourceRetries(String id, RetriesDto retriesDto) Set Retries Sets the number of retries left to execute an external task by id.voidsetExternalTaskResourceRetries(String id, RetriesDto retriesDto, Map<String, String> additionalHeaders) Set Retries Sets the number of retries left to execute an external task by id.voidsetExternalTaskRetries(SetRetriesForExternalTasksDto setRetriesForExternalTasksDto) Set Retries Sync Sets the number of retries left to execute external tasks by id synchronously.voidsetExternalTaskRetries(SetRetriesForExternalTasksDto setRetriesForExternalTasksDto, Map<String, String> additionalHeaders) Set Retries Sync Sets the number of retries left to execute external tasks by id synchronously.setExternalTaskRetriesAsyncOperation(SetRetriesForExternalTasksDto setRetriesForExternalTasksDto) Set Retries Async Sets the number of retries left to execute external tasks by id asynchronously.setExternalTaskRetriesAsyncOperation(SetRetriesForExternalTasksDto setRetriesForExternalTasksDto, Map<String, String> additionalHeaders) Set Retries Async Sets the number of retries left to execute external tasks by id asynchronously.voidUnlock Unlocks an external task by id.voidUnlock Unlocks an external task by id.
-
Constructor Details
-
ExternalTaskApi
public ExternalTaskApi() -
ExternalTaskApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
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 ApiExceptionComplete 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 ApiExceptionExtend 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 ApiExceptionFetch 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
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 ApiExceptionGet 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
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 ApiExceptionGet 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 (> 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 ApiExceptionGet 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 (> 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 (> 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 ApiExceptionGet 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 (> 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 (> 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 ApiExceptionGet 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 (> 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 ApiExceptionHandle 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 ApiExceptionHandle 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
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 ApiExceptionLock 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 ApiExceptionGet 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 ApiExceptionGet 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
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 ApiExceptionSet 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
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 ApiExceptionSet 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 ApiExceptionSet 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 ApiExceptionSet 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
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
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
-