← All guides Temporal

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

Step 1 — Add a Temporal diagram

  1. On the package, click Add Diagram.
  2. Under Temporal, pick the diagram you need (see the table below).
  3. 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.
DiagramDrawn asShows
Workflow logicActivity diagramOne Workflow's steps, waits and timers, what happens on failure, and the compensations
Workflow contractsClass diagramWorkflow and Activities interfaces, Signal / Query / Update handlers, inputs, timeouts
Workers and queuesDeployment diagramWhich Workers poll which Task Queues, and what each registers
ExecutionSequence diagramOne run in time order
Nexus servicesComponent diagramWhat 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 taskQueue and workflowIdPattern (e.g. saga-{accountId}).
  • «Activities» on an interface, with an «Activity» on each operation: startToCloseTimeout and scheduleToCloseTimeout, written as Temporal writes them (2s, 5m, 1h30m), and an optional retryPolicy pointing 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» (mode Sync or Async, and for Async the handlerWorkflow it 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.