Skip to content

Commit 9eda0ed

Browse files
committed
added-diagram
1 parent aa13da7 commit 9eda0ed

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

315 KB
Loading

src/content/docs/workflows/examples/dynamic-workers-and-workflows.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ This setup has two parts:
3737
- **Worker Loader**: Worker which receives the request and creates (or loads) the Dynamic Worker.
3838
- **Workflow class**: Your registered Workflow class which receives the persisted params, reloads the same Dynamic Worker code, and calls its `run()` method with the `WorkflowStep` object.
3939

40+
![Dynamic Workers and Workflows architecture diagram](/src/assets/images/workflows/dynamic-workflows.png)
41+
4042
Once the Worker Loader has [loaded the Dynamic Worker](/dynamic-workers/getting-started/#run-a-dynamic-worker), the Dynamic Worker calls `env.WORKFLOW.create()` to trigger an instance of the Workflow. The Worker Loader then stores the `workerId` of the Dynamic Worker in case the isolate spins down during the Workflow's exeuction.
4143

4244
If the instance is long-running -- for example, if it includes a step.waitForEvent() -- then the Workflow engine may hibernate, and the Dynamic Worker isolate will shut down until the event occurs. When the Workflow resumes, the Worker Loader reloads its code using the workerId of the `Dynamic Worker`.

0 commit comments

Comments
 (0)