Separate goals, messages and state
Place order is a use-case goal; checkStock is a collaboration message; pending is an entity state.
Select lifelines and messages. Distinguish synchronous calls, asynchronous requests, replies and execution bars.
Read time generally downward, but vertical positions on independent lifelines do not automatically impose a global order. This player chooses one compatible linear demonstration; spacing is not milliseconds.
Read time generally downward, but vertical positions on independent lifelines do not automatically impose a global order. This player chooses one compatible linear demonstration; spacing is not milliseconds.
Read time generally downward, but vertical positions on independent lifelines do not automatically impose a global order. This player chooses one compatible linear demonstration; spacing is not milliseconds.
The alt guards are exclusive. The opt fragment is inside the successful stock operand and runs only when hasCoupon is true, so it occurs zero or one time.
The editor uses the in-stock/no-coupon case. It checks the explicit request/reply contract, endpoints and stated business preconditions, not a unique order for arbitrary UML. The player retains its three predefined scenarios.
Read time generally downward, but vertical positions on independent lifelines do not automatically impose a global order. This player chooses one compatible linear demonstration; spacing is not milliseconds.
Run the check after editing.
Place order is a use-case goal; checkStock is a collaboration message; pending is an entity state.
The alt selects stock success or failure. The opt adds coupon behavior zero or one time within the successful path.
Only sending the notification request is modelled. Delivery, persistence, retries and processing completion are not guaranteed.
This is one linear demonstration. Parallel fragments, all weak-order interleavings, creation/destruction, timeouts and exception propagation remain outside scope.
The order service requests notification and returns an order ID. Notification processing completion is not modelled.