• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

temporalio / sdk-java / #349

03 Aug 2026 05:42AM UTC coverage: 68.221% (+0.08%) from 68.143%
#349

push

github

web-flow
Add Standalone Activities to Temporal Nexus Operation Handler (#2918)

* Enable Nexus activity operations without regressing workflow updates

Compose standalone activity support with the workflow-update Nexus model already present on master. Shared token, callback, link, client, and cancellation paths retain both operation families.

Constraint: Preserve the workflow-update token and API contracts from master
Rejected: Choose one conflict side | each side would drop a supported Nexus operation family
Confidence: high
Scope-risk: moderate
Reversibility: clean
Directive: Keep activity execution at token type 2 and workflow update at token type 3
Tested: Focused temporal-sdk token, link, invoker, client, async activity, and cancellation tests
Not-tested: Full repository suite and real-server-only standalone activity cases

* Make sure we test attaching

* Make sure to handle ActivityAlreadyStartedException

* Add test with SANO

* Bump test server

7220 of 12610 branches covered (57.26%)

Branch coverage included in aggregate %.

182 of 283 new or added lines in 15 files covered. (64.31%)

13 existing lines in 3 files now uncovered.

29918 of 41828 relevant lines covered (71.53%)

0.72 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/temporal-sdk/src/main/java/io/temporal/nexus/CancelActivityExecutionInput.java
1
package io.temporal.nexus;
2

3
import io.temporal.common.Experimental;
4
import java.util.Objects;
5
import javax.annotation.Nullable;
6

7
/**
8
 * Input to {@link TemporalOperationHandler#cancelActivityExecution} describing the activity
9
 * execution to cancel.
10
 */
11
@Experimental
12
public final class CancelActivityExecutionInput {
13

14
  private final String activityId;
15
  private final @Nullable String runId;
16

NEW
17
  public CancelActivityExecutionInput(String activityId, @Nullable String runId) {
×
NEW
18
    this.activityId = Objects.requireNonNull(activityId);
×
NEW
19
    this.runId = runId;
×
NEW
20
  }
×
21

22
  /** Returns the activity ID extracted from the operation token. */
23
  public String getActivityId() {
NEW
24
    return activityId;
×
25
  }
26

27
  /**
28
   * Returns the activity run ID extracted from the operation token, or {@code null} if absent.
29
   *
30
   * <p>Run ID is only present on operation tokens that were generated by this SDK AFTER the start
31
   * activity RPC completed. Tokens originating from the activity completion callback header do not
32
   * carry a run ID.
33
   */
34
  @Nullable
35
  public String getRunId() {
NEW
36
    return runId;
×
37
  }
38
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc