This is a sequence diagram that shows the representation of selection and loop.
frame: box around part of diagram to indicate if or loop
- if -> (opt) [condition]
- if/else -> (alt) [condition], separated by horizontal dashed line
- loop -> (loop) [condition or items to loop over]
In this example:
For each of the line item in the order - if the item value > 10,000 then dispatch through careful Distributor, else dispatch through regular distributor.
If any items fall into “needsConfirmation” condition the confirm message will be sent to the messenger.