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.

      • setEnableUpsertVersionSearchAttributes

        public WorkflowImplementationOptions.Builder setEnableUpsertVersionSearchAttributes​(boolean enableUpsertVersionSearchAttributes)
        Enable upserting version search attributes on Workflow.getVersion(java.lang.String, int, int). This will cause the SDK to automatically add the TemporalChangeVersion search attributes to the workflow when getVersion is called. This search attribute is a keyword list of all the getVersion calls made in the workflow. The format of each entry is "-". This allows for easy discovery of what versions are being used in your namespace.

        Note: This change is backwards compatible, so it is safe to enable or disable this options with running workflows. However, if this options is enabled, it is not safe to rollback to a previous version of the SDK that does not support this option.

        The default value is false. This may change in future releases.