Enum Class ChildWorkflowCancellationType

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

public enum ChildWorkflowCancellationType extends Enum<ChildWorkflowCancellationType>
Defines behaviour of the parent workflow when CancellationScope that wraps child workflow execution request is canceled. The result of the cancellation independently of the type is a CanceledFailure thrown from the child workflow method.
  • Enum Constant Details

    • WAIT_CANCELLATION_COMPLETED

      public static final ChildWorkflowCancellationType WAIT_CANCELLATION_COMPLETED
      Wait for child cancellation completion.
    • WAIT_CANCELLATION_REQUESTED

      public static final ChildWorkflowCancellationType WAIT_CANCELLATION_REQUESTED
      Request cancellation of the child and wait for confirmation that the request was received. Doesn't wait for actual cancellation.
    • TRY_CANCEL

      public static final ChildWorkflowCancellationType TRY_CANCEL
      Initiate a cancellation request and immediately report cancellation to the parent. Note that it doesn't guarantee that cancellation is delivered to the child if parent exits before the delivery is done. It can be mitigated by setting ParentClosePolicy to ParentClosePolicy.PARENT_CLOSE_POLICY_REQUEST_CANCEL.
    • ABANDON

      public static final ChildWorkflowCancellationType ABANDON
      Do not request cancellation of the child workflow and immediately report cancellation to the caller.
  • Method Details

    • values

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