public static final class WorkflowImplementationOptions.Builder
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
WorkflowImplementationOptions |
build() |
WorkflowImplementationOptions.Builder |
setActivityOptions(java.util.Map<java.lang.String,ActivityOptions> activityOptions)
Set individual activity options per activityType.
|
WorkflowImplementationOptions.Builder |
setDefaultActivityOptions(ActivityOptions defaultActivityOptions)
These activity options have the lowest precedence across all activity options.
|
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).
|
@SafeVarargs public final WorkflowImplementationOptions.Builder setFailWorkflowExceptionTypes(java.lang.Class<? extends java.lang.Throwable>... failWorkflowExceptionTypes)
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.
public WorkflowImplementationOptions.Builder setActivityOptions(java.util.Map<java.lang.String,ActivityOptions> activityOptions)
Workflow.newActivityStub(Class, ActivityOptions, Map)
which has highest
precedence.activityOptions
- map from activityType to ActivityOptionspublic WorkflowImplementationOptions.Builder setDefaultActivityOptions(ActivityOptions defaultActivityOptions)
Workflow.newActivityStub(Class,
ActivityOptions)
and then by the individual activity options if any are set through setActivityOptions(Map)
defaultActivityOptions
- ActivityOptions for all activities in the workflow.public WorkflowImplementationOptions build()