Enum Class JoinDecision

java.lang.Object
java.lang.Enum<JoinDecision>
com.axelor.workflow.split.JoinDecision
All Implemented Interfaces:
Serializable, Comparable<JoinDecision>, Constable

public enum JoinDecision extends Enum<JoinDecision>
Where one activation of a split stands: whether its join may continue, and if not, whether it ever will. decide(java.lang.Integer, int, int) is a pure function of three counts, so the synchronous walk and the durable protocol cannot disagree on the arithmetic.
  • Enum Constant Details

    • PENDING

      public static final JoinDecision PENDING
      Something can still arrive; the join waits.
    • CONTINUE

      public static final JoinDecision CONTINUE
      The policy is met: continue past the join, cancelling whatever is left under a quorum.
    • END

      public static final JoinDecision END
      Every branch ended before the join, so there is nothing to continue with and the owner simply finishes. Only all produces this.
    • FAIL

      public static final JoinDecision FAIL
      The quorum can no longer be met; the run fails, since nothing would ever release the join.
  • Method Details

    • values

      public static JoinDecision[] 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 JoinDecision 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
    • decide

      public static JoinDecision decide(Integer threshold, int arrived, int pending)
      Parameters:
      threshold - arrivals a quorum needs, or null for all
      arrived - accepted arrivals at the join so far (A)
      pending - branches that can still arrive (P) — not started, running, parked, or blocked on a nested split
    • thresholdOf

      public static Integer thresholdOf(WorkflowPlan.JoinPolicy policy)
      A quorum's size, or null when the policy is all.
    • stored

      public String stored()
      The decision as the split row stores it.