Skip to content

Commit 350f4c2

Browse files
Call out WorkflowRunOperation.fromWorkflowHandler (#735)
1 parent 7e00384 commit 350f4c2

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

core/src/main/java/io/temporal/samples/nexus/handler/NexusServiceImpl.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ public OperationHandler<NexusService.EchoInput, NexusService.EchoOutput> echo()
4747
@OperationImpl
4848
public OperationHandler<NexusService.HelloInput, NexusService.HelloOutput> hello() {
4949
// Use the WorkflowRunOperation.fromWorkflowMethod constructor, which is the easiest
50-
// way to expose a workflow as an operation.
50+
// way to expose a workflow as an operation. To expose a workflow with a different input
51+
// parameters then the operation or from an untyped stub, use the
52+
// WorkflowRunOperation.fromWorkflowHandler constructor and the appropriate constructor method
53+
// on WorkflowHandle.
5154
return WorkflowRunOperation.fromWorkflowMethod(
5255
(ctx, details, input) ->
5356
Nexus.getOperationContext()

core/src/main/java/io/temporal/samples/nexuscontextpropagation/handler/NexusServiceImpl.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ public OperationHandler<NexusService.EchoInput, NexusService.EchoOutput> echo()
5959
@OperationImpl
6060
public OperationHandler<NexusService.HelloInput, NexusService.HelloOutput> hello() {
6161
// Use the WorkflowRunOperation.fromWorkflowMethod constructor, which is the easiest
62-
// way to expose a workflow as an operation.
62+
// way to expose a workflow as an operation. To expose a workflow with a different input
63+
// parameters then the operation or from an untyped stub, use the
64+
// WorkflowRunOperation.fromWorkflowHandler constructor and the appropriate constructor method
65+
// on WorkflowHandle.
6366
return WorkflowRunOperation.fromWorkflowMethod(
6467
(ctx, details, input) ->
6568
Nexus.getOperationContext()

0 commit comments

Comments
 (0)