Book a Demo

Author Topic: UML best practice: One Operation => One SD  (Read 13687 times)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
UML best practice: One Operation => One SD
« on: May 27, 2011, 04:23:22 pm »
I've written down one of my best practices to model implementations of operations using sequence diagrams.
UML Best Practice: One Operation => One Sequence Diagram
Any and all comments/congratulations/insults are welcome :)

Geert

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: UML best practice: One Operation => One SD
« Reply #1 on: May 28, 2011, 10:28:14 pm »
Geert,

I can only agree 99.98% here.  The remaining 2c are based on:

* there used to be a thing called a "found message" or something.  That is where the invocation should come from.  The object / class / object / whatever that is the focal point of the diagram quite simply has no (and should not have any) idea where the message came from.  IIRC it was  a diamond?

* At the other end of the spectrum, so to speak, a class or object ought to have right to send a message to an unknown recipient (aka at the implementation level "raise an event" (which is a concept in itself that OMG seems to have difficulty understanding (along the lines of {oh, bugger, I'm down to three nesting levels}) RAISE.EVENT.NOW(condition=too_much_water, problem=no_air,severity=" :( :o :-[ :P" )) etc

Sadly, I recall these were things called "lost messages"  :'(
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: UML best practice: One Operation => One SD
« Reply #2 on: May 29, 2011, 04:20:45 am »
Quote
* there used to be a thing called a "found message" or something.  That is where the invocation should come from.  The object / class / object / whatever that is the focal point of the diagram quite simply has no (and should not have any) idea where the message came from.  IIRC it was  a diamond?

* At the other end of the spectrum, so to speak, a class or object ought to have right to send a message to an unknown recipient (aka at the implementation level "raise an event" (which is a concept in itself that OMG seems to have difficulty understanding (along the lines of {oh, bugger, I'm down to three nesting levels}) RAISE.EVENT.NOW(condition=too_much_water, problem=no_air,severity=" :( :o :-[ :P" )) etc

Sadly, I recall these were things called "lost messages"  :'(
bruce,

I've never heard about found or lost messages, but Davide suggested on my blog to use a gate i.s.o. the first lifeline "Caller".
I just tested it, and I think this is the concept you are referring to. You can also send a message to a gate, so that could be used for your "lost message" as well.
I'm going to adjust the blogpost to use a gate i.s.o. the lifeline as it is a much more elegant solution.

Geert

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: UML best practice: One Operation => One SD
« Reply #3 on: May 29, 2011, 09:28:11 pm »
Lost and found messages are indicated by a message ending at or starting from a solid black ball (exactly like an initial connector on an Activity diagram).

As Geert states, Gates can be used to achieve the same thing, I always use Gates on my sequence diagram, since I cannot see any difference between Gates and lost/found messages. I am sure buried away in the OMG UML spec, there is some semantic difference between the two

Cheers

Phil
Models are great!
Correct models are even greater!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: UML best practice: One Operation => One SD
« Reply #4 on: June 03, 2011, 05:19:03 pm »
I've added a new feature to the EA Navigator to navigate to the implementation of an operation. It selects the Behavior element in the project browser and opens all diagrams owned by this behavior element.
More details on my blog
or download the EA Navigator 1.2 Windows Installer directly from github.

Geert

Dave_Bullet

  • EA User
  • **
  • Posts: 295
  • Karma: +0/-0
    • View Profile
Re: UML best practice: One Operation => One SD
« Reply #5 on: July 01, 2011, 06:52:44 am »
As Phil noted - I use MessageEndpoints as a "source or sink" for event driven architecture.  Handy to initiate a diagram where you don't care about who calls it (or want to terminate processing or hand off to another event).

The above is different to queue based processing where I model a queue as a type of <<message_store>> where the location of input or output is important to understanding the end to end flow of a realisation.

In the case of message end points - I create these per operation diagram (not a common re-use pair / set) as I don't want to confuse the reader thinking all messages lead to Rome.
"I know I'm close to a good design, but it's like the balloon animals, squeeze in one spot and the problem moves down the line"