Skip to main content

Basic Order Lifecycle

The domain model explains an order's data. Now capture how the order changes over time, from its arrival in the system to successful completion.

Full lesson walkthrough in the selected color theme.

From Structure to Behavior​

The previous lesson connected orders, items, and products. That diagram remains the domain vocabulary; the lifecycle becomes a separate behavioral view.

Loading image...
The order structure is complete and provides the basis for the behavioral model

Return to the workspace. The Order Processing domain already contains the class diagram; create the new view alongside it.

Loading image...
Structural and behavioral views are stored in the same responsible domain

Create the Diagram​

Select Create, enter Order Lifecycle, add a description, and choose State Diagram.

Loading image...
The name and description explain its purpose, while the type determines available elements

After saving, the diagram appears beside the domain model. Select it and choose Open.

Loading image...
The new behavioral view belongs to the order-processing domain

The empty diagram can create states and relationships or add existing ones from the model. Objects can be reused in several views.

Loading image...
The palette can create new or add existing states and relationships

Main States​

Select New: State. Name the first element Start and describe it as the entry point to the lifecycle.

Loading image...
Every state receives a clear name and description

Create Created, Paid, Completed, and the technical End node in the same way. At this stage, all five objects look the same.

Loading image...
The entry point, three business states, and final node are ready to connect

Transition Sequence​

Select New: Relationship. Choose Start as the source and Created as the target, name it Order Created, and add a description.

Loading image...
The source, target, and name define the transition direction and meaning

Add three more transitions:

  • Created → Paid — Payment Confirmed;
  • Paid → Completed — Delivery Completed;
  • Completed → End — Order Closed.
Loading image...
Four directed transitions form the primary success path

Initial and Final Nodes​

Select Start and set State Type to Initial. The ordinary state block is replaced by the standard initial-node symbol.

Loading image...
The state type determines the node's standard diagram notation

Set the End state type to Final. Clear the selection to see the order's primary success path from creation to closure.

Loading image...
Initial and final nodes surround three business states and four transitions

Chapters​

  • 00:00 — purpose of the lifecycle;
  • 00:06 — returning to the workspace;
  • 00:09 — creating the diagram;
  • 00:26 — opening the diagram;
  • 00:35 — first state;
  • 00:44 — Created;
  • 00:55 — Paid;
  • 01:03 — Completed;
  • 01:20 — core states completed;
  • 01:24 — first transition;
  • 01:40 — payment confirmation;
  • 01:54 — delivery completion;
  • 02:06 — order closure;
  • 02:22 — initial node;
  • 02:36 — final node;
  • 02:47 — final diagram.

Previous lesson: Expand the Order Domain Model.

Next lesson: Order Cancellation and Transition Properties.