• 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

75.0
/temporal-sdk/src/main/java/io/temporal/internal/client/NexusStartActivityRequest.java
1
package io.temporal.internal.client;
2

3
import io.nexusrpc.Link;
4
import io.temporal.client.StartActivityOptions;
5
import io.temporal.common.Experimental;
6
import io.temporal.common.interceptors.Header;
7
import java.util.List;
8
import java.util.Map;
9

10
/**
11
 * Request used to start an activity from a Nexus operation handler. Mirrors {@link
12
 * NexusStartWorkflowRequest} but carries the activity-specific scheduling payload.
13
 */
14
@Experimental
15
public final class NexusStartActivityRequest {
16
  private final String requestId;
17
  private final String callbackUrl;
18
  private final Map<String, String> callbackHeaders;
19
  private final String taskQueue;
20
  private final List<Link> links;
21
  private final String activityType;
22
  private final List<Object> args;
23
  private final StartActivityOptions options;
24
  private final Header header;
25

26
  public NexusStartActivityRequest(
27
      String requestId,
28
      String callbackUrl,
29
      Map<String, String> callbackHeaders,
30
      String taskQueue,
31
      List<Link> links,
32
      String activityType,
33
      List<Object> args,
34
      StartActivityOptions options,
35
      Header header) {
1✔
36
    this.requestId = requestId;
1✔
37
    this.callbackUrl = callbackUrl;
1✔
38
    this.callbackHeaders = callbackHeaders;
1✔
39
    this.taskQueue = taskQueue;
1✔
40
    this.links = links;
1✔
41
    this.activityType = activityType;
1✔
42
    this.args = args;
1✔
43
    this.options = options;
1✔
44
    this.header = header;
1✔
45
  }
1✔
46

47
  public String getRequestId() {
NEW
48
    return requestId;
×
49
  }
50

51
  public String getCallbackUrl() {
NEW
52
    return callbackUrl;
×
53
  }
54

55
  public Map<String, String> getCallbackHeaders() {
NEW
56
    return callbackHeaders;
×
57
  }
58

59
  public String getTaskQueue() {
NEW
60
    return taskQueue;
×
61
  }
62

63
  public List<Link> getLinks() {
NEW
64
    return links;
×
65
  }
66

67
  public String getActivityType() {
68
    return activityType;
1✔
69
  }
70

71
  public List<Object> getArgs() {
72
    return args;
1✔
73
  }
74

75
  public StartActivityOptions getOptions() {
76
    return options;
1✔
77
  }
78

79
  public Header getHeader() {
80
    return header;
1✔
81
  }
82
}
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