Teaching Case — Two Concurrent Branches Addressing One Service
Both branches of the `par` run at the same time and both send to the ledger, so as drawn the order of arrival is not determined — and neither branch shows the other. The engine reports the ledger and stays silent about the forking lifeline, which is in every branch by construction as both the sender and the recipient of the replies; getting that narrowing wrong makes the check fire on every realistic `par`. A lifeline that IS safe to address concurrently says so with `concurrent`, and is then exempt by declaration rather than by this engine guessing which services are stateless.
Make it your own.
sequence "Settlement fan-out"
participant Saga "Settlement saga"
participant Ledger "Ledger"
participant Notifier "Notifier"
queue Events "Event bus" concurrent
par
branch "debit"
Saga -> Ledger : debit(4200)
Ledger reply Saga : posted
Saga async Events: debited
branch "fee"
Saga -> Ledger : debit(35)
Ledger reply Saga : posted
Saga async Events: fee.posted
end
Saga async Notifier : settled