Class WorkflowImplementationOptions.Builder

    • Method Detail

      • setFailWorkflowExceptionTypes

        @SafeVarargs
        public final WorkflowImplementationOptions.Builder setFailWorkflowExceptionTypes​(java.lang.Class<? extends java.lang.Throwable>... failWorkflowExceptionTypes)
        Optional: Sets how workflow worker deals with exceptions thrown from the workflow code which include non-deterministic history events (presumably arising from non-deterministic workflow definitions or non-backward compatible workflow definition changes).

        The default behavior is to fail workflow on TemporalFailure or any of its subclasses. Any other exceptions thrown from the workflow code are treated as bugs that can be fixed by a new deployment. So workflow is not failed, but it stuck in a retry loop trying to execute the code that led to the unexpected exception.

        This option allows to specify specific exception types which should lead to workflow failure instead of blockage. Any exception that extends the configured type considered matched. For example to fail workflow on any exception pass Throwable class to this method.