Repository navigation
Add workflow-side signal-with-start through system Nexus - #3154
tconley1428 wants to merge 29 commits into
Conversation
7aa7309 to
1329cdc
Compare
This reverts commit dd65bc8.
1329cdc to
903f6bb
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved defects break batch-codec round-trips, select storage for the caller rather than the destination, and mishandle encoded headers and propagated context.
3 open issues
What changed in this PR
Adds workflow-side signal-with-start through system Nexus, building on the method-capture and converter-scoping groundwork in #3213. Generated APIs integrate with the SDK’s workflow execution, interception, and payload handling.
Changes:
- Adds typed and name-based calls, options builders, and invocation-time task queue defaults.
- Introduces operation-specific interception, destination-aware conversion, and nested system-envelope traversal.
- Adds generation tooling, documentation, and tests for codecs, external storage, concurrent destinations, and replay.
| File | Description |
|---|---|
temporal-testing/src/main/java/io/temporal/testing/TestActivityEnvironmentInternal.java |
Rejects workflow-only system operations in activity tests. |
temporal-testing/src/main/java/io/temporal/testing/internal/TracingWorkerInterceptor.java |
Forwards the signal-with-start hook. |
temporal-testing/src/main/java/io/temporal/testing/internal/devserver/SdkJavaTestServerProfile.java |
Enables server-side signal-with-start support. |
temporal-serviceclient/src/test/java/io/temporal/internal/payload/visitor/SystemNexusPayloadTest.java |
Tests nested envelope traversal and validation. |
temporal-serviceclient/src/test/java/io/temporal/internal/payload/gen/ProtoClosureRootTest.java |
Tests explicit protobuf roots and reachability. |
temporal-serviceclient/src/payloadGenerators/java/io/temporal/internal/payload/visitor/gen/PayloadVisitorGenerator.java |
Generates visitors and registries for system roots. |
temporal-serviceclient/src/payloadGenerators/java/io/temporal/internal/payload/gen/ProtoClosure.java |
Supports explicit message roots. |
temporal-serviceclient/src/main/java/io/temporal/internal/payload/visitor/Traversal.java |
Traverses and repacks marked system envelopes. |
temporal-serviceclient/src/main/java/io/temporal/internal/payload/visitor/SystemNexusPayloads.java |
Packs and validates protobuf envelopes. |
temporal-serviceclient/build.gradle |
Supplies system roots to visitor generation. |
temporal-sdk/src/test/java/io/temporal/workflow/TypedWorkflowMethodCaptureTest.java |
Tests retry and cron annotation merging. |
temporal-sdk/src/test/java/io/temporal/workflow/TemporalModelConvertersTest.java |
Tests versioning override conversion. |
temporal-sdk/src/test/java/io/temporal/workflow/nexus/SystemSignalWithStartIntegrationTest.java |
Exercises real-server execution, codecs, storage, and replay. |
temporal-sdk/src/test/java/io/temporal/workflow/nexus/SignalWithStartWorkflowTest.java |
Tests generated calls, identity rules, and defaults. |
temporal-sdk/src/test/java/io/temporal/internal/payload/storage/ExternalStorageRunnerTest.java |
Tests offloading nested payloads only. |
temporal-sdk/src/test/java/io/temporal/internal/nexus/system/SystemNexusDataConverterTest.java |
Tests converter scopes, envelopes, and destination contexts. |
temporal-sdk/src/main/nexus/workflow-service.wit |
Defines the operation and generation directives. |
temporal-sdk/src/main/nexus/SIGNAL_WITH_START.md |
Documents usage, behavior, and integration tests. |
temporal-sdk/src/main/nexus/README.md |
Documents binding generation and architecture. |
temporal-sdk/src/main/nexus/deps/nexus-temporal-types/model.wit |
Defines shared model and callable mappings. |
temporal-sdk/src/main/java/io/temporal/workflow/Workflow.java |
Exposes inherited generated operations. |
temporal-sdk/src/main/java/io/temporal/workflow/TemporalModelConverters.java |
Implements SDK-owned capture and conversion helpers. |
temporal-sdk/src/main/java/io/temporal/internal/sync/SyncWorkflowContext.java |
Executes system operations with destination-aware converters. |
temporal-sdk/src/main/java/io/temporal/internal/sync/NexusServiceStubImpl.java |
Routes system operations through dedicated hooks. |
temporal-sdk/src/main/java/io/temporal/internal/nexus/system/SystemNexusDataConverter.java |
Separates system envelopes from user conversion. |
temporal-sdk/src/main/java/io/temporal/common/interceptors/WorkflowOutboundCallsInterceptorBase.java |
Inherits generated hook forwarding. |
temporal-sdk/src/main/java/io/temporal/common/interceptors/WorkflowOutboundCallsInterceptor.java |
Includes system-operation interception. |
temporal-sdk/src/main/generated/io/temporal/workflow/WorkflowService.java |
Defines the generated Nexus service interface. |
temporal-sdk/src/main/generated/io/temporal/workflow/WorkflowOperations.java |
Provides generated signal-with-start overloads. |
temporal-sdk/src/main/generated/io/temporal/workflow/UserMetadata.java |
Represents and converts static workflow metadata. |
temporal-sdk/src/main/generated/io/temporal/workflow/SystemNexusWorkflowOutboundInterceptor.java |
Defines typed hooks, forwarding, and terminal dispatch. |
temporal-sdk/src/main/generated/io/temporal/workflow/SystemNexusOperations.java |
Dispatches operations and selects serialization contexts. |
temporal-sdk/src/main/generated/io/temporal/workflow/system-nexus-roots.txt |
Lists request and response protobuf roots. |
temporal-sdk/src/main/generated/io/temporal/workflow/SignalWithStartWorkflowResponse.java |
Provides the response model and conversion. |
temporal-sdk/src/main/generated/io/temporal/workflow/SignalWithStartWorkflowRequest.java |
Provides the request model and conversion. |
temporal-sdk/src/main/generated/io/temporal/workflow/SignalWithStartWorkflowOptions.java |
Provides reusable operation options. |
temporal-sdk/src/main/generated/io/temporal/workflow/NexgenRuntime.java |
Supplies generated sequence-decoding support. |
temporal-sdk/build.gradle |
Registers checked-in sources and explicit regeneration. |
CHANGELOG.md |
Announces workflow-side signal-with-start. |
Review effort: Balanced
| Message.Builder inner = SystemNexusPayloads.unpack(value); | ||
| dispatch(inner); |
|
AI flagged two other issues that survived my review |
|
Thought I saw bug so had AI do a bit of research and looks like yes
This is a advanced use case but I know users do this and have had to fix issues like it in the past for the Java SDK. |
|
Filed a followup item for the interceptor request id issue. |

Add workflow-side signal-with-start through generated workflow-package APIs, with typed method calls, options builders, destination-aware payload conversion, and operation-specific outbound interceptor hooks. Task queue defaults to the calling workflow’s queue at invocation.
Method capture and converter scoping landed in #3213; this PR is now based directly on main. Generated bindings, system-envelope handling, payload traversal, and workflow dispatch remain here. Bindings use nexgen 0.2.12 from temporalio/nexgen#245; ordinary SDK builds use checked-in sources and do not require Rust or nexgen.
Requires a server with
history.enableSignalWithStartFromWorkflowenabled. The dev-server profile enables it for coverage of signal-with-start, codecs, concurrent destinations, external storage, and replay. No server change is included here.