Package io.temporal.workflow
Enum ChildWorkflowCancellationType
- java.lang.Object
-
- java.lang.Enum<ChildWorkflowCancellationType>
-
- io.temporal.workflow.ChildWorkflowCancellationType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ChildWorkflowCancellationType>
public enum ChildWorkflowCancellationType extends java.lang.Enum<ChildWorkflowCancellationType>
Defines behaviour of the parent workflow whenCancellationScope
that wraps child workflow execution request is canceled. The result of the cancellation independently of the type is aCanceledFailure
thrown from the child workflow method.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ABANDON
Do not request cancellation of the child workflowTRY_CANCEL
Initiate a cancellation request and immediately report cancellation to the parent.WAIT_CANCELLATION_COMPLETED
Wait for child cancellation completion.WAIT_CANCELLATION_REQUESTED
Request cancellation of the child and wait for confirmation that the request was received.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ChildWorkflowCancellationType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ChildWorkflowCancellationType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 settingParentClosePolicy
toParentClosePolicy.PARENT_CLOSE_POLICY_REQUEST_CANCEL
.
-
ABANDON
public static final ChildWorkflowCancellationType ABANDON
Do not request cancellation of the child workflow
-
-
Method Detail
-
values
public static ChildWorkflowCancellationType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ChildWorkflowCancellationType c : ChildWorkflowCancellationType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ChildWorkflowCancellationType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-