David J.
David J.

Reputation: 1913

IBM's UML Sequence Example: why lack of activation for lifeline

I've found this tutorial on sequence diagrams very helpful but I'm having trouble understanding a couple of things in diagram 11: enter image description here

  1. Why is the customer lifeline not activated after sending the WithdrawCash message? My understanding is that an object awaiting a response should be activated.

  2. Why isn't the cash return message included in the opt [balance > amount]? Wouldn't this imply that the customer gets cash even in case the conditions aren't met, since cash is sent regardless (outside) of the opt?

Upvotes: 1

Views: 233

Answers (1)

qwerty_so
qwerty_so

Reputation: 36305

  1. I haven't seen the notation. But I'd simply assume that the lifetime of the caller is negligible. When browsing the specs I found a similar notation on p. 585 where there is just the dashed line:

enter image description here

  1. The opt fragment (that rectangle area) says that the contents inside is only executed optional. So the debit message is only sent when balance > amount (the guard in square brackets). The example is inaccurate as it does not handle the "no cash returned" path (some error handling).

Upvotes: 0

Related Questions