Skip to main content

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.

Full lesson walkthrough in the selected color theme.

Starting Lifecycle​

The diagram already contains initial and final nodes, the Created, Paid, and Completed states, and the transitions of the success path.

Loading image...
The previous lesson's success path provides the basis for alternative transitions

Canceled State​

Select New: State. Name it Canceled and describe the outcome: order processing stopped before completion.

Loading image...
The separate state records an alternative processing outcome

After saving, the state appears beside the main path. It remains unconnected and does not yet affect the existing sequence.

Loading image...
The state is ready to be connected to the lifecycle

Alternative Transitions​

Create a relationship from Created to Canceled. Name the transition Canceled before Payment and describe its cause.

Loading image...
The source and target establish the first alternative path

Add two more transitions:

  • Paid → Canceled — Canceled after Payment;
  • Canceled → End — Cancellation Closed.
Loading image...
An order may be canceled before or after payment and then reach the final node

Transition Rule​

Select Canceled after Payment. Its properties expose the three parts of a formal rule: triggering event, guard condition, and resulting effect.

Loading image...
The properties specify the trigger, condition, and outcome

Set Event / trigger to Cancellation Requested. This event initiates the transition eligibility check.

Loading image...
The event identifies what initiated the transition

Set Guard to Refund Available. The condition shown in square brackets must be true for the transition to occur.

Loading image...
The guard restricts post-payment cancellation

Set Action to Create Refund. This effect runs after the event is received and the guard passes.

Loading image...
The effect records what the transition performs

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.

Loading image...
The diagram shows the success path, two cancellation paths, and the refund rule

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.