camunda / camunda

Process Orchestration Framework
https://camunda.com/platform/
3.11k stars 567 forks source link

Proposal: Extend FailJobResponse and ThrowErrorResponse with incidentKey #16580

Open ivsokol-ht opened 4 months ago

ivsokol-ht commented 4 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 4 months ago

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

aleksander-dytko commented 4 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 2 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 4 weeks ago

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