How can I add a custom exception (extending TemporalException) to workflow exception types
(WorkflowImplementationOptions.failWorkflowExceptionTypes) in Springboot? So it will not be retried.
Throwing an exception like this
throw ApplicationFailure.newNonRetryableFailure from the workflow fails the workflow. However, I am hoping to fail the workflow using a custom exception.
It’s not possible currently to specify WorkflowImplementationOptions, see feature request here.
Until it’s added would use ApplicationFailure (you don’t have to throw nonRetryable kind, workflows do not have default retry policy like activities).
Re-throwing ActivityFailure/ChildWorkflowFailure would fail workflow execution as well.
What is the use case where you want to explicitly fail the execution?