Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: SUNITA on March 15, 2005, 12:06:22 am

Title: Call and Message
Post by: SUNITA on March 15, 2005, 12:06:22 am
What is deiffernce between call and message stimulus in sequence diagram. Call is 'secon level of activation'. Can some one expalin it with an example.
In which scenario should i use call instead of message?
Title: Re: Call and Message
Post by: thomaskilian on March 15, 2005, 04:03:59 am
Call = synchronous; Message = asynchronous ???
Title: Re: Call and Message
Post by: mikewhit on March 15, 2005, 04:04:16 am
From "Sams Teach yourself UML" -  
Quote
One type of message is a call. This is a request  from the object sending the message to the object receiving the message ... for the receiver to carry out one of its operations. Usually this entails the sender waiting for the receiver ... this message is also referred to as synchronous.
My UML book shows a call as having a solid arrowhead, whereas a message has an open arrowhead. It also suggests showing the return path (dotted arrow) from a call, even if there is no return value.
Title: Re: Call and Message
Post by: SUNITA on March 15, 2005, 04:40:29 am
Notation is solid arrow head for both call and message in EA4.5. I could not understand the difference between them. EA help says that call is 'second level of activation'.
Title: Re: Call and Message
Post by: mikewhit on March 15, 2005, 06:28:08 am
One way to consider it is to say that the originating object 'blocks' until the call in the receiving object has completed - hence you could say that the locus of control passes to the receiving object for that duration.

For a straight non-call message, the originator does not care about the immediate status of the recipient, although in principle it might re-synchronise later on by a subsequent message in the oppposite direction.

This implies that there could be a message queuing mechanism to buffer asynchronous messages.

In the case of several tasks waiting on an event, a 'notify' message might be sent to all of them when conditions changed, to tell them to re-examine their status; this would be an asynchronous message since the sender would not expect to have to wait for all the waiting tasks to become activated and respond.

An interrupt service routine would send an asynchronous message to the device driver process, since the handler could not wait for the process to be activated and to respond - "fire and forget".