Enum Class ActivityCancellationType
- All Implemented Interfaces:
Serializable,Comparable<ActivityCancellationType>,Constable
In case of an activity's call scope cancellation the corresponding activity stub call fails with
a
CanceledFailure. The different modes of this behavior are available
and specified by this enum.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDo not request cancellation of the Activity Execution at all (no request is sent to the server) and immediately report cancellation to the Workflow Execution by causing the activity stub call to fail withCanceledFailureimmediately.In case of activity's scope cancellation send an Activity cancellation request to the server, and report cancellation to the Workflow Execution by causing the activity stub call to fail withCanceledFailureWait for the Activity Execution to confirm any requested cancellation. -
Method Summary
Modifier and TypeMethodDescriptionstatic ActivityCancellationTypeReturns the enum constant of this class with the specified name.static ActivityCancellationType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
WAIT_CANCELLATION_COMPLETED
Wait for the Activity Execution to confirm any requested cancellation. An Activity Execution must Heartbeat to receive a cancellation notification throughActivityCompletionException. This can block the cancellation of a Workflow Execution for a long time if the Activity Execution doesn't Heartbeat or chooses to ignore the cancellation request. The activity stub call will fail withCanceledFailureonly after cancellation confirmation from the Activity Execution has been received. -
TRY_CANCEL
In case of activity's scope cancellation send an Activity cancellation request to the server, and report cancellation to the Workflow Execution by causing the activity stub call to fail withCanceledFailure -
ABANDON
Do not request cancellation of the Activity Execution at all (no request is sent to the server) and immediately report cancellation to the Workflow Execution by causing the activity stub call to fail withCanceledFailureimmediately.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-