You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: nexus_sync_operations/README.md
+16-5Lines changed: 16 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,24 @@
1
-
This sample shows how to create a Nexus service that is backed by a long-running workflow and
2
-
exposes operations that execute updates and queries against that workflow. The long-running
3
-
workflow, and the updates/queries are private implementation detail of the nexus service: the caller
4
-
does not know how the operations are implemented.
1
+
This sample shows how to create a Nexus service that is backed by an entity workflow and
2
+
exposes synchronous operations that execute queries, updates, signals, and signal-with-start
3
+
operations against that workflow.
4
+
5
+
The entity workflow follows the entity pattern:
6
+
- Runs indefinitely in a loop, processing operations as they arrive
7
+
- Maintains state that persists across operations
8
+
- Periodically continues-as-new to prevent history from growing too large
9
+
- Waits for all handlers to finish before continuing as new
10
+
11
+
The entity workflow and the queries/updates/signals are private implementation details of the
12
+
nexus service: the caller does not know how the operations are implemented.
5
13
6
14
### Sample directory structure
7
15
8
16
-[service.py](./service.py) - shared Nexus service definition
9
17
-[caller](./caller) - a caller workflow that executes Nexus operations, together with a worker and starter code
10
-
-[handler](./handler) - Nexus operation handlers, together with a workflow used by one of the Nexus operations, and a worker that polls for both workflow, activity, and Nexus tasks.
18
+
-[handler](./handler) - Nexus operation handlers, entity workflow implementation, and a worker that polls for workflow, activity, and Nexus tasks
19
+
-[workflows.py](./handler/workflows.py) - entity workflow that follows the entity pattern
0 commit comments