Enum Class SubFlowReusePolicy

java.lang.Object
java.lang.Enum<SubFlowReusePolicy>
io.superdurable.dex.SubFlowReusePolicy
All Implemented Interfaces:
Serializable, Comparable<SubFlowReusePolicy>, Constable

public enum SubFlowReusePolicy extends Enum<SubFlowReusePolicy>
Controls how a SubFlow condition resolves an execution that already uses its generated Flow ID.

The server first compares normalized request IDs, making a retried start idempotent regardless of this policy. It then describes the existing execution and applies the selected state machine.

  • Enum Constant Details

    • ATTACH

      public static final SubFlowReusePolicy ATTACH
      Attaches to a running execution or returns any existing terminal result.
    • RESTART_IF_PREVIOUS_EXITS_ABNORMALLY

      public static final SubFlowReusePolicy RESTART_IF_PREVIOUS_EXITS_ABNORMALLY
      Attaches to running or completed executions and restarts an abnormally closed execution.

      This is the default. Failed, canceled, timed-out, and terminated executions are abnormal.

    • ALWAYS_RESTART

      public static final SubFlowReusePolicy ALWAYS_RESTART
      Starts a new execution and terminates an existing running execution.
  • Method Details

    • values

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