camunda / camunda

Process Orchestration Framework
https://camunda.com/platform/
3.34k stars 610 forks source link

Proposal: Extend FailJobResponse and ThrowErrorResponse with incidentKey #16580

Closed ivsokol-ht closed 3 months ago

ivsokol-ht commented 8 months ago

Hi all,

As per documentation on https://docs.camunda.io/docs/apis-tools/zeebe-api/gateway-service/#failjob-rpc , if the retries argument is zero or negative, an incident is raised. Also, when calling ThrowError, incident can also be raised - https://docs.camunda.io/docs/apis-tools/zeebe-api/gateway-service/#throwerror-rpc.

In order to resolve the incident, ResolveIncident RPC must be invoked (https://docs.camunda.io/docs/apis-tools/zeebe-api/gateway-service/#resolveincident-rpc). My issue is that input in ResolveIncident is incidentKey, which cannot be found in any RPC response. As per forum comment https://forum.camunda.io/t/how-to-resolveincident/36643, incidentKey must be retrieved from exported data. This means that input in RPC API depends on totally different domain (exporters).

Proposal is to extend FailJobResponse and ThrowErrorResponse with int64 incidentKey = 1 that will be populated if corresponding method creates an incident.

Alternative option is as discussed in forum - rely on exporter storage (elastic or something else) to correlate job and incident.

Thanks in advance, Ivan Sokol

megglos commented 8 months ago

@aleksander-dytko can you please assess this feature request in terms of prio?

aleksander-dytko commented 8 months ago

Hi @ivsokol-ht, thanks for raising this feature request.

The problem makes sense to solve - I want to get the necessary data from Zeebe API to resolve the incident.

@megglos Let's prioritize the problem to solve for 8.6 release to provide a better developer experience. I would propose to find do a quick spike to find the solution for that.

megglos commented 6 months ago

@aleksander-dytko can you please follow-up with the team in an upcoming planning how this compares in terms of priority to other topics.

korthout commented 5 months ago

@aleksander-dytko Please have a look at the comments in #18681 as well.

megglos commented 3 months ago

we decided to go for @korthout proposal https://github.com/camunda/camunda/issues/16580#issuecomment-2158373775 and won't deliver this with 8.6

megglos commented 3 months ago

@korthout please close this as well and create a new proposal issue

korthout commented 3 months ago

Closing this in favor of decoupled incident handling, see arguments here: