Skip to content

Commit 05a2002

Browse files
Update some docs
1 parent 6641b14 commit 05a2002

4 files changed

Lines changed: 8 additions & 12 deletions

File tree

temporal-sdk/src/main/java/io/temporal/nexus/TemporalNexusClient.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
* Nexus-aware client wrapping {@link WorkflowClient}. Provides methods for interacting with
1616
* Temporal workflows from within a Nexus operation handler.
1717
*
18-
* <p>Obtained via the {@link TemporalOperationHandler.StartFunction} parameter. The client creates
19-
* workflow stubs internally — users pass the workflow class, a lambda that calls the workflow
20-
* method, and workflow options.
18+
* <p>Obtained via the {@link TemporalOperationHandler.StartFunction} parameter.
2119
*
2220
* <p>Usage example:
2321
*
@@ -29,7 +27,7 @@
2927
* OrderWorkflow.class,
3028
* wf -> wf.processOrder(input),
3129
* WorkflowOptions.newBuilder()
32-
* .setWorkflowId("order-" + context.getRequestId())
30+
* .setWorkflowId("order-" + input.getOrderId())
3331
* .build());
3432
* });
3533
* }

temporal-sdk/src/main/java/io/temporal/nexus/TemporalOperationCancelContext.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
import java.util.Objects;
77

88
/**
9-
* Context for a Nexus cancel operation. Combines the {@link OperationContext} and {@link
10-
* OperationCancelDetails} into a single object passed to cancel methods on {@link
11-
* TemporalOperationHandler}.
9+
* Context for a Nexus cancel operation request, passed to {@link
10+
* TemporalOperationHandler#cancelWorkflowRun}.
1211
*/
1312
@Experimental
1413
public final class TemporalOperationCancelContext {

temporal-sdk/src/main/java/io/temporal/nexus/TemporalOperationHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* OrderWorkflow.class,
2525
* wf -> wf.processOrder(input),
2626
* WorkflowOptions.newBuilder()
27-
* .setWorkflowId("order-" + context.getRequestId())
27+
* .setWorkflowId("order-" + input.getOrderId())
2828
* .build());
2929
* });
3030
* }

temporal-sdk/src/main/java/io/temporal/nexus/TemporalOperationStartContext.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
import java.util.Objects;
77

88
/**
9-
* Context for a Nexus start operation. Combines the {@link OperationContext} and {@link
10-
* OperationStartDetails} into a single object passed to {@link
11-
* TemporalOperationHandler.StartFunction}.
9+
* Context for a Nexus start operation request, passed to {@link
10+
* TemporalOperationHandler.StartFunction} alongside the {@link TemporalNexusClient} and input.
1211
*/
1312
@Experimental
1413
public final class TemporalOperationStartContext {
@@ -32,7 +31,7 @@ public String getOperation() {
3231
return operationContext.getOperation();
3332
}
3433

35-
/** Returns the request ID, commonly used as a workflow ID for idempotency. */
34+
/** Returns the request ID for this operation. */
3635
public String getRequestId() {
3736
return operationStartDetails.getRequestId();
3837
}

0 commit comments

Comments
 (0)