Class WorkflowOptions.Builder

  • Enclosing class:

    public static final class WorkflowOptions.Builder
    extends java.lang.Object
    • 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​(io.temporal.api.enums.v1.WorkflowIdReusePolicy workflowIdReusePolicy)
        Specifies server behavior if a completed workflow with the same id exists. Note that under no conditions Temporal allows two workflows with the same namespace and workflow id run simultaneously.
        • AllowDuplicateFailedOnly is a default value. It means that workflow can start if previous run failed or was canceled 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.