When an exception occurs, how to return it immediately and return the error message at the same time
When an exception occurs, how to return it immediately and return the error message at the same time
Hey @coderzjh
sorry but your post is a bit vague and unclear to me, could you please elaborate on it?
Greets
Chris
If a node reports an error during process operation, how can the process end and return an error message
Hey @coderzjh
first I need to translate your lingo in ours, please advise me when I’m wrong.
With node you mean an activity like a task in the process model, right?
With reporting an error I suppose you mean the BpmError which can be thrown via the Zeebe Client, is this correct?
If this is the case, then Error Events is what you’re looking for Error events | Camunda Cloud Docs
You can either catch it via boundary events or event sub processes and throw it again via error throw events. If you not catch it, it will cause an incident in the execution.
Does this help you?
Greets
Chris
Yes, the main reason is that if each node has an error, it must be connected to the error event node, which will make the flowchart very complex
Hey @coderzjh
not necessarily you can also have an interrupting event sub process, like it is shown here Error events | Camunda Cloud Docs
Greets
Chris
Yes, this is a good solution, but we have to build another large process to embed sub processes.
Yes, we use subprocesses like this, but we don’t use this method to solve the return exception information. I can try this method. Thank you