Enum Class InitialVersioningBehavior

java.lang.Object
java.lang.Enum<InitialVersioningBehavior>
io.temporal.common.InitialVersioningBehavior
All Implemented Interfaces:
Serializable, Comparable<InitialVersioningBehavior>, Constable

@Experimental public enum InitialVersioningBehavior extends Enum<InitialVersioningBehavior>
Specifies the versioning behavior for the first task of a new workflow run started via continue-as-new.
  • Enum Constant Details

    • AUTO_UPGRADE

      public static final InitialVersioningBehavior AUTO_UPGRADE
      Start the new run with VersioningBehavior.AUTO_UPGRADE behavior for the first task, upgrading to the latest version. After the first workflow task completes, the workflow uses whatever versioning behavior is specified in the workflow code.
    • USE_RAMPING_VERSION

      public static final InitialVersioningBehavior USE_RAMPING_VERSION
      Use the Ramping Version of the workflow's task queue at start time, regardless of the workflow's Target Version.

      After the first workflow task completes, the workflow uses whatever VersioningBehavior is specified in the workflow code. If there is no Ramping Version by the time that the first workflow task is dispatched, it is sent to the Current Version.

      It is highly discouraged to use this if the workflow is annotated with VersioningBehavior.AUTO_UPGRADE behavior, because this setting only applies to the first task of the workflow. If, after the first task, the workflow is AutoUpgrade, it behaves like a normal AutoUpgrade workflow and goes to the Target Version, which may be the Current Version instead of the Ramping Version.

      Note that if the workflow being continued has a Pinned override, that override is inherited by the new workflow run regardless of the InitialVersioningBehavior specified in the continue-as-new command. Versioning Override always takes precedence until it is removed manually via UpdateWorkflowExecutionOptions.

  • Method Details

    • values

      public static InitialVersioningBehavior[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static InitialVersioningBehavior valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null