Annotation Type WorkflowMethod


  • @Retention(RUNTIME)
    @Target(METHOD)
    public @interface WorkflowMethod
    Indicates that the method is a workflow method. Workflow method is executed when workflow is started. Workflow completes when workflow method returns. This annotation applies only to workflow interface methods.
    • Element Detail

      • name

        java.lang.String name
        Name of the workflow type. Default is {short class name}::{method name}
        Default:
        ""
      • workflowId

        java.lang.String workflowId
        Workflow ID to use. Default is random UUID. Specifying workflow in the annotation makes sense only for singleton workflows that would ever have one instance per type running. Make sure that WorkflowIdReusePolicy is AllowDuplicate in this case.
        Default:
        ""
      • workflowIdReusePolicy

        WorkflowIdReusePolicy workflowIdReusePolicy
        How to react if there is completed workflow with the same ID.
        • AllowDuplicate - Always start a new run
          RejectDuplicate - Never allow a second run
          AllowDuplicateFailedOnly - Allow only if workflow didn't complete successfully.
        Default is AllowDuplicateFailedOnly.
Default:
com.uber.cadence.WorkflowIdReusePolicy.AllowDuplicateFailedOnly
    • taskStartToCloseTimeoutSeconds

      int taskStartToCloseTimeoutSeconds
      Maximum execution time of a single workflow task. Workflow tasks are reactions to a new events in the workflow history. Usually they are pretty short. Default is 10 seconds. Maximum allowed value is 1 minute.
      Default:
      10
    • taskList

      java.lang.String taskList
      Task list to use when delivering workflow tasks. Must be specified either through this annotation or through WorkflowOptions.
      Default:
      ""