Sets the number of retries left to execute external tasks by id synchronously. If retries are set to 0, an incident is created.

Method

PUT /external-task/retries

Parameters

Request Body

A JSON object with the following properties:

Name Description
retries The number of retries to set for the external task. Must be >= 0. If this is 0, an incident is created and the task cannot be fetched anymore unless the retries are increased again.
externalTaskIds The ids of the external tasks to set the number of retries for.
processInstanceIds The ids of process instances containing the tasks to set the number of retries for.
externalTaskQuery Query for the external tasks to set the number of retries for.
processInstanceQuery Query for the process instances containing the tasks to set the number of retries for.
historicProcessInstanceQuery Query for the historic process instances containing the tasks to set the number of retries for.

Result

This method returns no content.

Response Codes

Code Media type Description
204 Request successful.
404 application/json Returned if the task does not exist. This could indicate a wrong task id as well as a cancelled task, e.g., due to a caught BPMN boundary event. See the Introduction for the error response format.
400 application/json In case the number of retries is negative, an exception of type InvalidRequestException is returned. See the Introduction for the error response format.

Example

Request

PUT /external-task/retries-sync

Request Body:

  1. {
  2. "retries": 123
  3. "externalTaskIds": [
  4. "anExternalTask",
  5. "anotherExternalTask"
  6. ]
  7. }

Response

Status 204. No content.

原文: https://docs.camunda.org/manual/7.9/reference/rest/external-task/put-retries-sync/