Order Cancellation and Transition Properties
The primary order path ends with successful delivery. A realistic model must also account for cancellation before or after payment. Add both paths and formalize the post-payment cancellation rule.
Starting Lifecycle
The diagram already contains initial and final nodes, the Created, Paid, and
Completed states, and the transitions of the success path.
Canceled State
Select New: State. Name it Canceled and describe the outcome: order
processing stopped before completion.
After saving, the state appears beside the main path. It remains unconnected and does not yet affect the existing sequence.
Alternative Transitions
Create a relationship from Created to Canceled. Name the transition
Canceled before Payment and describe its cause.
Add two more transitions:
Paid→Canceled—Canceled after Payment;Canceled→End—Cancellation Closed.
Transition Rule
Select Canceled after Payment. Its properties expose the three parts of a
formal rule: triggering event, guard condition, and resulting effect.
Set Event / trigger to Cancellation Requested. This event initiates the
transition eligibility check.
Set Guard to Refund Available. The condition shown in square brackets must
be true for the transition to occur.
Set Action to Create Refund. This effect runs after the event is received
and the guard passes.
Result
SysCraft assembles the extended label in a consistent order: event, guard in square brackets, effect after a slash, and transition name. Other transitions can remain simple until their rules require formalization.
Chapters
00:00— why an alternative path is needed;00:06— creating Canceled;00:17— new state result;00:21— pre-payment cancellation transition;01:05— completed alternative paths;01:10— transition properties;01:14— event;01:21— guard;01:27— effect;01:39— final diagram.
Previous lesson: Basic Order Lifecycle.
Next lesson: Order-State Actions.