Skip to content

Commit b854df4

Browse files
Clarify NexusOperationCancellationType (#2630)
1 parent acf7473 commit b854df4

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

temporal-sdk/src/main/java/io/temporal/workflow/ChildWorkflowCancellationType.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ public enum ChildWorkflowCancellationType {
2626
*/
2727
TRY_CANCEL,
2828

29-
/** Do not request cancellation of the child workflow */
29+
/**
30+
* Do not request cancellation of the child workflow and immediately report cancellation to the
31+
* caller.
32+
*/
3033
ABANDON,
3134
}

temporal-sdk/src/main/java/io/temporal/workflow/NexusOperationCancellationType.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
* CanceledFailure} thrown from the Nexus operation method. If the caller exits without waiting, the
1010
* cancellation request may not be delivered to the handler, regardless of indicated cancellation
1111
* type.
12+
*
13+
* <p>Note: Nexus operation cancellation can fail if the operation handler fails the cancellation
14+
* request. In this case, the operation will throw the exception from the handler if cancellation
15+
* has not already been reported to the caller.
1216
*/
1317
@Experimental
1418
public enum NexusOperationCancellationType {
@@ -28,6 +32,8 @@ public enum NexusOperationCancellationType {
2832
*/
2933
TRY_CANCEL,
3034

31-
/** Do not request cancellation of the operation. */
35+
/**
36+
* Do not request cancellation of the operation and immediately report cancellation to the caller.
37+
*/
3238
ABANDON,
3339
}

0 commit comments

Comments
 (0)