Lock External Task

Lock an external task by a given id for a specified worker and amount of time. Note: Attempting to lock an already locked external task with the same worker will succeed and a new lock duration will be set, starting from the current moment.


POST /external-task/{id}/lock


Path Parameters

Name Description
id The id of the external task.

Request Body

A JSON object with the following properties:

Name Description
lockDuration The duration to lock the external task for in milliseconds.
workerId The ID of a worker who is locking the external task.


This method returns no content.

Response Codes

Code Media type Description
204 Request successful.
400 application/json In case the lock duration is negative or the external task is already locked by a different worker, an exception of type InvalidRequestException is returned. See the Introduction for the error response format.
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.



POST /external-task/anId/lock

Request Body:

      "workerId": "anId",
      "lockDuration": 100000


Status 204. No content.

On this Page: