Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently read the book 'UML Distilled' and found the sequence diagrams very useful. My question is that can we show 'data flow' as well on a sequence diagram? This is my first time on sequence diagrams.

Nice to see some examples if any.

share|improve this question
Sequence diagram is probably the most useful – user2567 Feb 13 '11 at 20:41
up vote 10 down vote accepted

Sequence Diagram UML: Sequence Diagram Tutorial

The data is included as the parameters within the messages. For example the instance buyersBank of the Bank class takes an accountNumber and returns the balance for the buyersBank instance.


I have highlighed the key points from the OMG specification. pg 491-494

  • Asynchronous Messages have an open arrow head.
  • (Default) Synchronous Messages typically represent operation calls and are shown with a filled arrow head -The reply message from a method has a dashed line.
  • Object creation Message has a dashed line with an open arrow.
  • Lost Messages are described as a small black circle at the arrow end of the Message.
  • Found Messages are described as a small black circle at the starting end of the Message.
<messageident> ::= 
([<attribute> ‘=’] <signal-or-operation-name>
[‘(‘ [<argument>[‘,’<argument>]* ‘)’]
[‘:’ <return-value>]) | ‘*’

Examples of syntax:

mymessage(14, - , 3.14, “hello”)  // second argument is undefined
v=mymsg(16, variab):96 // this is a reply message carrying the return value 96 assigning it to v
mymsg(myint=16)  // the input parameter ‘myint’ is given the argument value 16


v = attribute
mymessage = signal-or-operation-name
(16,vairab) = arguments
:96 = return value


Visual Studio 2010 Ultimate will auto-generate sequence diagrams. You can reverse engineer existing methods by right-clicking and selecting auto-generate sequence diagram.

Visual Studio 2010 Ultimate Sequence Diagram


share|improve this answer
Greetings Donald, thanks for your answer, helped a lot. I finally drew my first sequence diagram for our small crawling engine. Anyway I have another question, how can I portray how a class assigns values to internal variables of another class on a sequence diagram? – Imran Omar Bukhsh Feb 14 '11 at 19:45
One more thing, I got the chance to ask the same question to Fowler, the author of the book 'UML Distilled'. He said he has shown that in the newer edition of the book. – Imran Omar Bukhsh Feb 14 '11 at 19:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.