Package com.uber.cadence.workflow
Class ChildWorkflowOptions.Builder
- java.lang.Object
-
- com.uber.cadence.workflow.ChildWorkflowOptions.Builder
-
- Enclosing class:
- ChildWorkflowOptions
public static final class ChildWorkflowOptions.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
Builder(ChildWorkflowOptions source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChildWorkflowOptions
build()
ChildWorkflowOptions.Builder
setContextPropagators(java.util.List<ContextPropagator> contextPropagators)
Specifies the list of context propagators to use during this workflow.ChildWorkflowOptions.Builder
setCronSchedule(java.lang.String cronSchedule)
ChildWorkflowOptions.Builder
setDomain(java.lang.String domain)
Specify domain in which workflow should be started.ChildWorkflowOptions.Builder
setExecutionStartToCloseTimeout(java.time.Duration executionStartToCloseTimeout)
The time after which workflow execution is automatically terminated by Cadence service.ChildWorkflowOptions.Builder
setMemo(java.util.Map<java.lang.String,java.lang.Object> memo)
Specifies additional non-indexed information in result of list workflow.ChildWorkflowOptions.Builder
setParentClosePolicy(ParentClosePolicy parentClosePolicy)
Specifies how this workflow reacts to the death of the parent workflow.ChildWorkflowOptions.Builder
setRetryOptions(RetryOptions retryOptions)
RetryOptions that define how child workflow is retried in case of failure.ChildWorkflowOptions.Builder
setSearchAttributes(java.util.Map<java.lang.String,java.lang.Object> searchAttributes)
Specifies additional indexed information in result of list workflow.ChildWorkflowOptions.Builder
setTaskList(java.lang.String taskList)
Task list to use for decision tasks.ChildWorkflowOptions.Builder
setTaskStartToCloseTimeout(java.time.Duration taskStartToCloseTimeout)
Maximum execution time of a single decision task.ChildWorkflowOptions.Builder
setWorkflowId(java.lang.String workflowId)
Workflow id to use when starting.ChildWorkflowOptions.Builder
setWorkflowIdReusePolicy(WorkflowIdReusePolicy workflowIdReusePolicy)
Specifies server behavior if a completed workflow with the same id exists.ChildWorkflowOptions
validateAndBuildWithDefaults()
-
-
-
Constructor Detail
-
Builder
public Builder()
-
Builder
public Builder(ChildWorkflowOptions source)
-
-
Method Detail
-
setDomain
public ChildWorkflowOptions.Builder setDomain(java.lang.String domain)
Specify domain in which workflow should be started.TODO: Resolve conflict with WorkflowClient domain.
-
setWorkflowId
public ChildWorkflowOptions.Builder setWorkflowId(java.lang.String workflowId)
Workflow id to use when starting. If not specified a UUID is generated. Note that it is dangerous as in case of client side retries no deduplication will happen based on the generated id. So prefer assigning business meaningful ids if possible.
-
setWorkflowIdReusePolicy
public ChildWorkflowOptions.Builder setWorkflowIdReusePolicy(WorkflowIdReusePolicy workflowIdReusePolicy)
Specifies server behavior if a completed workflow with the same id exists. Note that under no conditions Cadence allows two workflows with the same domain and workflow id run simultaneously.-
AllowDuplicateFailedOnly is a default value. It means that workflow can start if
previous run failed or was cancelled or terminated.
-
AllowDuplicate allows new run independently of the previous run closure status.
-
RejectDuplicate doesn't allow new run independently of the previous run closure status.
-
setExecutionStartToCloseTimeout
public ChildWorkflowOptions.Builder setExecutionStartToCloseTimeout(java.time.Duration executionStartToCloseTimeout)
The time after which workflow execution is automatically terminated by Cadence service. Do not rely on execution timeout for business level timeouts. It is preferred to use in workflow timers for this purpose.
-
setTaskStartToCloseTimeout
public ChildWorkflowOptions.Builder setTaskStartToCloseTimeout(java.time.Duration taskStartToCloseTimeout)
Maximum execution time of a single decision task. Default is 10 seconds. Maximum accepted value is 60 seconds.
-
setTaskList
public ChildWorkflowOptions.Builder setTaskList(java.lang.String taskList)
Task list to use for decision tasks. It should match a task list specified when creating aWorker
that hosts the workflow code.
-
setRetryOptions
public ChildWorkflowOptions.Builder setRetryOptions(RetryOptions retryOptions)
RetryOptions that define how child workflow is retried in case of failure. Default is null which is no reties.
-
setCronSchedule
public ChildWorkflowOptions.Builder setCronSchedule(java.lang.String cronSchedule)
-
setParentClosePolicy
public ChildWorkflowOptions.Builder setParentClosePolicy(ParentClosePolicy parentClosePolicy)
Specifies how this workflow reacts to the death of the parent workflow.
-
setMemo
public ChildWorkflowOptions.Builder setMemo(java.util.Map<java.lang.String,java.lang.Object> memo)
Specifies additional non-indexed information in result of list workflow.
-
setSearchAttributes
public ChildWorkflowOptions.Builder setSearchAttributes(java.util.Map<java.lang.String,java.lang.Object> searchAttributes)
Specifies additional indexed information in result of list workflow.
-
setContextPropagators
public ChildWorkflowOptions.Builder setContextPropagators(java.util.List<ContextPropagator> contextPropagators)
Specifies the list of context propagators to use during this workflow.
-
build
public ChildWorkflowOptions build()
-
validateAndBuildWithDefaults
public ChildWorkflowOptions validateAndBuildWithDefaults()
-
-