Author Topic: Events of a Class in Sequence Diagram  (Read 358 times)

Amit Kumar Jain

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Events of a Class in Sequence Diagram
« on: January 17, 2009, 11:21:13 pm »
Hi,
I want to know that how events of a class are shown in the sequence diagram. Let's consider a case.
I have two classes Class A & Class B. Object of Class A has an event OnEventA and which should be handled by the object of the Class B using private function HandleOnEventA of Class B. Now how can I show the raising of OnEventA and its handling using HandleOnEventA function.

Kevin G. Watson

  • EA User
  • **
  • Posts: 217
  • Karma: +0/-0
  • I love EVERYTHING including Microsoft
    • View Profile
Re: Events of a Class in Sequence Diagram
« Reply #1 on: January 21, 2009, 04:59:39 pm »
Hi'ya... thats easy, somewhere around you've tied the onEvent to the onEventHandiler.... use that intermeadary ( or an anonymious object, perhaps with an appropriate stereotype )

ie
        message connector from onEvent  to delegate lifeline,

then

       message line from delegate lifeline to handiler lifeline.


or name the connector onEvent_OnEventHandiler, running from onEventClass to handiler class.

Kevin   [smiley=2vrolijk_08.gif]

Werlang

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Events of a Class in Sequence Diagram
« Reply #2 on: January 22, 2009, 07:08:10 am »
Hi!

I'd be happy to see alternatives too. IMHO that's language-dependant. Maybe there's not a delegate object.

If I'm want to model high-level, I'd place a message directly from ClassA to ClassB using HandleOnEventA operation. This is how I want the system to perform. To go low-level, I don't have an answer right now. How UML handles this dynamic linkage?

TIA
Keep on rockin' in the free world