|
1 | | -This sample shows how to expose a long-running workflow's queries, updates, and signals as Nexus |
| 1 | +This sample shows how to expose a long-running Workflow's queries, updates, and signals as Nexus |
2 | 2 | operations. There are two self-contained examples, each in its own directory: |
3 | 3 |
|
4 | | -| | `callerpattern/` | `ondemandpattern/` | |
5 | | -|---|---|---| |
6 | | -| **Pattern** | Signal an existing workflow | Create and run workflows on demand, and send signals to them | |
7 | | -| **Who creates the workflow?** | The handler worker starts it on boot | The caller starts it via a Nexus operation | |
8 | | -| **Who knows the workflow ID?** | Only the handler | The caller chooses and passes it in every operation | |
9 | | -| **Nexus service** | `NexusGreetingService` | `NexusRemoteGreetingService` | |
| 4 | +| | `callerpattern/` | `ondemandpattern/` | |
| 5 | +|--------------------------------|--------------------------------------|--------------------------------------------------------------| |
| 6 | +| **Pattern** | Signal an existing Workflow | Create and run Workflows on demand, and send signals to them | |
| 7 | +| **Who creates the Workflow?** | The handler worker starts it on boot | The caller starts it via a Nexus operation | |
| 8 | +| **Who knows the Workflow ID?** | Only the handler | The caller chooses and passes it in every operation | |
| 9 | +| **Nexus service** | `NexusGreetingService` | `NexusRemoteGreetingService` | |
10 | 10 |
|
11 | 11 | Each directory is fully self-contained for clarity. The `GreetingWorkflow`, activity, and |
12 | 12 | `Language` enum are **identical** between the two -- only the Nexus service definition and its |
13 | | -handler implementation differ. This highlights that the same workflow can be exposed through |
| 13 | +handler implementation differ. This highlights that the same Workflow can be exposed through |
14 | 14 | Nexus in different ways depending on whether the caller needs lifecycle control. |
15 | 15 |
|
16 | 16 | See each directory's README for running instructions. |
0 commit comments