Failed task creation handling / configuration / monitoring
Concept:
When the TaskanaTaskListener writes a CamundaTaskEvent into the outbox, it will set an initial “remaining retries” property.
Every time the adapter fails to create a task in TASKANA based on this CamundaTaskEvent from the Outbox (e.g. due to a wrong workbasket key), it will perform an amount of retries according to this property. The duration between the retries can be configured, to make the adapter wait a reasonable time for possible error recovery. With every failed attempt the remaining retries will be decreased, until it reaches 0. Once it reached 0, the adapter will not attempt any further retries. This prevents filled up logs from error messages.
Configuration:
The following properties can be set in the taskana-outbox.properties to configure the above concept:
taskana.adapter.outbox.initial.number.of.task.creation.retries
- The number of retries the adapter will attempt. Defaults to 5 if not provided
taskana.adapter.outbox.duration.between.task.creation.retries
- The duration between the retry attempts. Defaults to 1 hour (PT1H) if not provided
Outbox REST-endpoints
Purpose | HTTP-Method | Path parameter | Query parameter | HTTP body example | Endpoint example |
---|---|---|---|---|---|
Delete a failed event | DELETE | eventId | - | - | outbox-rest/events/{eventid} |
Delete all failed events | POST | - | - | - | outbox-rest/events/delete-failed-events |
Get a single event | GET | eventId | - | - | outbox-rest/events/{eventid} |
Get all failed events | GET | - | retries | - | outbox-rest/events?retries=0 |
Get a count for all failed events | GET | - | retries |
| outbox-rest/events/count?retries=0 |
Reset the remaining retries of a single failed event | PATCH | eventId | - | {“remainingRetries”:5} 5 is the number of the new remaining retries in this example and can be set to any number | outbox-rest/events/{eventId} |
Reset the remaining retries of all failed events | PATCH | - | retries | {“remainingRetries”:5} 5 is the number of the new remaining retries in this example and can be set to any number | outbox-rest/events?retries=0 |
Unlock the event | POST | eventId | - |
| outbox-rest/events/unlock-event/{eventId} |