Enum Class Strategy

java.lang.Object
java.lang.Enum<Strategy>
cloud.opencode.base.flow.model.Strategy
All Implemented Interfaces:
Serializable, Comparable<Strategy>, Constable

public enum Strategy extends Enum<Strategy>
Approval / vote strategy that determines how a multi-assignee step decides "approved" / "rejected". 决定多人节点如何判定"通过 / 驳回"的策略枚举。

Strategy semantics (v4 §4.3 / §4.4):

  • SEQUENTIAL - approve mode: 逐级同意(按 assignees 顺序)
  • ONE_OF_N - approve mode: 同级一人同意即通过
  • ALL - vote: 全票通过
  • ANY - vote: 一票通过
  • MAJORITY - vote: 多数赞同(> 50%)
  • VETO - vote: 一票否决
Since:
JDK 25, opencode-base-flow V1.0.5
Author:
Leon Soo
  • Enum Constant Details

    • SEQUENTIAL

      public static final Strategy SEQUENTIAL
      Sequential approval: every assignee must approve in order. 逐级同意:所有 assignees 按顺序依次审批,全部同意才通过。
      Since:
      JDK 25, opencode-base-flow V1.0.5
    • ONE_OF_N

      public static final Strategy ONE_OF_N
      Any one of the assignees may approve to pass. 同级一人同意即通过。
      Since:
      JDK 25, opencode-base-flow V1.0.5
    • ALL

      public static final Strategy ALL
      All voters must vote AGREE. 全票通过。
      Since:
      JDK 25, opencode-base-flow V1.0.5
    • ANY

      public static final Strategy ANY
      Any single AGREE vote passes. 一票通过。
      Since:
      JDK 25, opencode-base-flow V1.0.5
    • MAJORITY

      public static final Strategy MAJORITY
      More than 50% AGREE passes. 多数赞同(> 50%)通过。
      Since:
      JDK 25, opencode-base-flow V1.0.5
    • VETO

      public static final Strategy VETO
      Any single DISAGREE vetoes the step. 一票否决。
      Since:
      JDK 25, opencode-base-flow V1.0.5
  • Method Details

    • values

      public static Strategy[] 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 Strategy 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