Extend Lock on External Task
Extends the timeout of the lock by a given amount of time.
Method
POST /external-task/{id}/extendLock
Parameters
Path Parameters
Name | Description |
---|---|
id | The id of the external task. |
Request Body
A JSON object with the following properties:
Name | Description |
---|---|
newDuration | An amount of time (in milliseconds). This is the new lock duration starting from the current moment. |
workerId | The ID of a worker who is locking the external task. |
Result
This method returns no content.
Response Codes
Code | Media type | Description |
---|---|---|
204 | Request successful. | |
400 | application/json | In case the new lock duration is negative or the external task is not locked by the given worker or not locked at all, 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. |
Example
Request
POST /external-task/anId/extendLock
Request Body:
{
"workerId": "anId",
"newDuration": 100000
}
Response
Status 204. No content.