public enum ActivityCancellationType extends java.lang.Enum<ActivityCancellationType>
CanceledFailure
. The different modes of this behavior are available
and specified by this enum.Enum Constant and Description |
---|
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 with
CanceledFailure immediately. |
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
with
CanceledFailure |
WAIT_CANCELLATION_COMPLETED
Wait for the Activity Execution to confirm any requested cancellation.
|
Modifier and Type | Method and Description |
---|---|
static ActivityCancellationType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ActivityCancellationType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ActivityCancellationType WAIT_CANCELLATION_COMPLETED
ActivityCompletionException
. 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 with CanceledFailure
only
after cancellation confirmation from the Activity Execution has been received.public static final ActivityCancellationType TRY_CANCEL
CanceledFailure
public static final ActivityCancellationType ABANDON
CanceledFailure
immediately.public static ActivityCancellationType[] values()
for (ActivityCancellationType c : ActivityCancellationType.values()) System.out.println(c);
public static ActivityCancellationType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null