Skip to content

Commit 7245bf8

Browse files
Require workflow ID to be set for Nexus (#2330)
1 parent e3ef9b4 commit 7245bf8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

temporal-sdk/src/main/java/io/temporal/internal/common/InternalUtils.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ public static WorkflowStub createNexusBoundStub(
7474
throw new IllegalArgumentException("Options are expected to be set on the stub");
7575
}
7676
WorkflowOptions options = stub.getOptions().get();
77+
if (options.getWorkflowId() == null) {
78+
throw new IllegalArgumentException(
79+
"WorkflowId is expected to be set on WorkflowOptions when used with Nexus");
80+
}
7781
WorkflowOptions.Builder nexusWorkflowOptions =
7882
WorkflowOptions.newBuilder(options)
7983
.setRequestId(request.getRequestId())

0 commit comments

Comments
 (0)