How to resolve the incident cause by newThrowErrorCommand

context:

zeebe 0.23.1
zeebe java client

question:
I found if there an incident caused via code

 client.newThrowErrorCommand(job.getKey())
                    .errorCode(be.getMessage())
                    .send()
                    .join();

and, if we don’t define an error catch in the task in modeler. then , the task can not reactive in client.

if i resolve the incident via operate or codes, no error will happen, but a new incident will be reported.

If we use the newFailCommand() and all are in expect.

So, what is the root cause and how to fix the incident caused via newThrowErrorCommand?

Hi @aximo,

welcome to the Zeebe community :tada:

The behavior you describe is expected. If the error is not caught then an incident is raised. This incident can not be resolved because the workflow can not be changed to catch the error event.

The incident is resolved when the activity (i.e. the service task) is left, for example, then the outer scope is completed or terminated.

This behavior is also documented here: https://docs.zeebe.io/bpmn-workflows/error-events/error-events.html#unhandled-errors

Does this make sense for you?

Best regards,
Philipp

But another question, if this case happend, how can i make the flow continue to run. I can not modify the current process defination or change my task codes to fix it?
it seems that i only can abandon this process instance, right?

Correct.

Yes.
If the workflow instance has concurrent flows then it can continue there.

However, we plan to implement workflow instance migration in the future. At this point, you will be able to fix the workflow instance by migrating it to a modified workflow.

get it, really need that feature~