Conversation
| public interface NexusRemoteGreetingService { | ||
|
|
||
| class RunFromRemoteInput { | ||
| private final String workflowId; |
There was a problem hiding this comment.
So part of the reason to wrap a Workflow in a Nexus service is to hide the workflow from the caller, so I wouldn't call this ID workflowId the service doesn't need to expose that it using workflows to the caller.
...temporal/samples/nexus_messaging/ondemandpattern/handler/NexusRemoteGreetingServiceImpl.java
Show resolved
Hide resolved
core/src/main/java/io/temporal/samples/nexus_messaging/README.md
Outdated
Show resolved
Hide resolved
core/src/main/java/io/temporal/samples/nexus_messaging/handler/GreetingWorkflowImpl.java
Outdated
Show resolved
Hide resolved
...rc/main/java/io/temporal/samples/nexus_messaging/caller_remote/CallerRemoteWorkflowImpl.java
Outdated
Show resolved
Hide resolved
| public class CallerStarter { | ||
|
|
||
| public static void main(String[] args) { | ||
| WorkflowServiceStubs service = WorkflowServiceStubs.newLocalServiceStubs(); |
There was a problem hiding this comment.
All samples should support env config. You can look at other samples to see how to create the client and follow the pattern there https://github.com/temporalio/samples-java/blob/main/core/src/main/java/io/temporal/samples/asyncchild/Starter.java#L22
There was a problem hiding this comment.
Thank you as I didn't know about this - but these seem to be all non-nexus examples? I looked in the other Nexus samples and they aren't using the env files - but they are passing the namespace in on the commandline instead of in code. In code seems clearer to me, but I can switch to commandline arguments if desired.
There was a problem hiding this comment.
So a bit of background, the reason why all the other samples and the other Nexus samples have this customization point is so users can easily run the samples against a local server and Temporal Cloud. The other Nexus samples simply predate the environment config approach, for this new samples lets use environment config approach since it is the standard.
|
Java code looks good, Can you share this with the SDK team and the rest of the Nexus team? |
This shows two ways to send messages through Nexus.