Model a Temporal application.
EOModeller's Temporal profile models applications built on Temporal, the durable-execution platform: Workflows and their Activities, the timeouts and retries that make them reliable, Saga compensations, the Workers and Task Queues that run them, and Nexus services between teams. It's ordinary UML with stereotypes, so every diagram is a view of one model that AI assistants and code generation can read.
Before you start
- A model open in the editor, and a package to put the Temporal diagrams in.
- The worked example in Redrawing the Saga pattern for Temporal shows all five diagrams below on one model.
Step 1 — Add a Temporal diagram
- On the package, click Add Diagram.
- Under Temporal, pick the diagram you need (see the table below).
- Click Create. The diagram gets its viewpoint and the Temporal stylesheet, and the package gets the Temporal profile if it hasn't got it yet.
| Diagram | Drawn as | Shows |
|---|---|---|
| Workflow logic | Activity diagram | One Workflow's steps, waits and timers, what happens on failure, and the compensations |
| Workflow contracts | Class diagram | Workflow and Activities interfaces, Signal / Query / Update handlers, inputs, timeouts |
| Workers and queues | Deployment diagram | Which Workers poll which Task Queues, and what each registers |
| Execution | Sequence diagram | One run in time order |
| Nexus services | Component diagram | What each Namespace offers through Nexus, and who calls it |
Step 2 — Use the Temporal stereotypes
Apply stereotypes from Properties → Stereotypes on an element, or on an operation in its list. The ones you'll use most:
- «Workflow» on an interface or class: its
taskQueueandworkflowIdPattern(e.g.saga-{accountId}). - «Activities» on an interface, with an «Activity» on each operation:
startToCloseTimeoutandscheduleToCloseTimeout, written as Temporal writes them (2s,5m,1h30m), and an optionalretryPolicypointing at a class marked «RetryPolicy». - «Signal», «Query» and «Update» on a Workflow's handler operations.
- On a Workflow logic diagram: «Activity» on each step's action and «Compensation» on the actions that undo them. Draw an exception handler flow from a step to where the undo starts, and a «compensates» dependency from each compensation to the step it undoes.
- «Worker» on a node with its
taskQueue, «polls» a «TaskQueue», and «registers» the Workflows and Activities it runs. - Nexus: «NexusService» on an interface whose operations are «NexusOperation» (
modeSync or Async, and for Async thehandlerWorkflowit starts), a «NexusEndpoint» that «exposes» it, and «callsNexus» from the caller.
Each stereotyped element gets an icon badge on its corner, and the Temporal stylesheet colours it: green steps, magenta compensations with dashed failure flows, violet Workflows, near-black runtime and blue Nexus. Turn on Legend on the diagram's Appearance tab to show what the colours mean.
Step 3 — Check it
The validation panel runs Temporal's own rules as you model:
- Errors for what Temporal would reject: an Activity (or compensation) with no start-to-close or schedule-to-close timeout, a duration it can't read, two handlers with the same name, a Nexus operation over 60 days.
- Warnings once Workers are drawn: a Task Queue no Worker polls, a Workflow or Activities no Worker registers, a Nexus Endpoint aimed at a queue nobody polls, a synchronous Nexus operation that starts a Workflow (synchronous handlers have 10 seconds).
- Infos: compensations that don't run newest first, and child Workflows with no parent-close policy.
With an AI assistant
An assistant connected through EOModeller's MCP server knows the Temporal profile. Ask it, for example: "In the Orders package, model our order-fulfilment Saga as a Temporal Workflow, with a Workflow logic diagram and a Workers and queues diagram, then validate it." It applies the profile, creates the elements and diagrams, and sets each diagram's stylesheet and viewpoint, as one change you can revert.