Marek Šneberger: [go client]
Hello from Czech republic!
Is there some documentation / explanation in which case to use
NewFailJobCommand() and what is the difference?
korthout: Hi @Marek Šneberger
They are both described in the gRPC reference: https://docs.camunda.io/docs/reference/grpc
• use FailJob when a technical error occurred
• use ThrowError when a business error occurred
In Bpmn a business error can be modeled in the process using error events: https://docs.camunda.io/docs/reference/bpmn-workflows/error-events/error-events
Technical errors should be left out of the process definition and handled exceptionally (an incident is raised, stopping the execution of the process, after the problem has been resolved, the incident can be resolved)
Note: This post was generated by Slack Archivist from a conversation in the Zeebe Slack, a source of valuable discussions on Zeebe (get an invite). Someone in the Slack thought this was worth sharing!
If this post answered a question for you, hit the Like button - we use that to assess which posts to put into docs.