Class WorkflowOptions.Builder

  • Enclosing class:
    WorkflowOptions

    public static final class WorkflowOptions.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • setWorkflowId

        public WorkflowOptions.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 WorkflowOptions.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.
          TerminateIfRunning terminate current running workflow using the same workflow ID if exist, then start a new run in one transaction