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.
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.
Return to the workspace. The Order Processing domain already contains the
class diagram; create the new view alongside it.
Create the Diagram
Select Create, enter Order Lifecycle, add a description, and choose
State Diagram.
After saving, the diagram appears beside the domain model. Select it and choose Open.
The empty diagram can create states and relationships or add existing ones from the model. Objects can be reused in several views.
Main States
Select New: State. Name the first element Start and describe it as the
entry point to the lifecycle.
Create Created, Paid, Completed, and the technical End node in the same
way. At this stage, all five objects look the same.
Transition Sequence
Select New: Relationship. Choose Start as the source and Created as the
target, name it Order Created, and add a description.
Add three more transitions:
Created→Paid—Payment Confirmed;Paid→Completed—Delivery Completed;Completed→End—Order Closed.
Initial and Final Nodes
Select Start and set State Type to Initial. The ordinary state block is
replaced by the standard initial-node symbol.
Set the End state type to Final. Clear the selection to see the order's
primary success path from creation to closure.
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.