Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drawing Call Flow with sequence Diagram leads to ambiguity

I want to draw a Sequence Diagram Where

A -> B.run()
B.run() -> B.m1()
B.m1() -> B.m2()

So far I've come up with these.

http://i51.tinypic.com/eja5bl.jpg http://i52.tinypic.com/1449s3.jpg

But Here I cannot mention it clearly that B.m2() is called by B.m1() Rather it looks like B.run() Calls both B.m1() and B.m2() serially.

------------- EDIT ----------------

This is What I Currently have drawn http://i55.tinypic.com/21276kk.jpg

Well Is my Current Diagram Okay ?? What I want is this. (Call Flow)

SpiritAdapter -> SpiritEngine::run(spirit:string, method:string, args[])
SpiritEngine::run(spirit:string, method:string, args[]) -> SpiritEngine::executeLogic(spirit:string, method:string, args[])
SpiritEngine::executeLogic(spirit:string, method:string, args[]) -> SpiritEngine::spirit(spirit:string, method:string, args[])
SpiritEngine::spirit(spirit:string, method:string, args[]) -> new SpiritAbstractor
SpiritEngine::executeLogic(spirit:string, method:string, args[]) -> SpiritAbstractor::method(args)
SpiritEngine::run(spirit:string, method:string, args[]) -> SpiritEngine::storeXDO()
like image 485
Neel Basu Avatar asked Sep 21 '10 11:09

Neel Basu


People also ask

What is call message in sequence diagram?

Call Message A message defines a particular communication between Lifelines of an Interaction. Call message is a kind of message that represents an invocation of operation of target lifeline.

What is sequence flow diagram?

A sequence diagram is a Unified Modeling Language (UML) diagram that illustrates the sequence of messages between objects in an interaction. A sequence diagram consists of a group of objects that are represented by lifelines, and the messages that they exchange over time during the interaction.

How do you represent asynchronous call in sequence diagram?

Solid arrow heads represent synchronous calls, open arrow heads represent asynchronous messages, and dashed lines represent reply messages. If a caller sends a synchronous message, it must wait until the message is done, such as invoking a subroutine.


2 Answers

You can add a small bar over B.m2() and then place a self pointing arrow, for example.

alt text

Self message vs recursive call

alt text

like image 198
KMån Avatar answered Oct 03 '22 21:10

KMån


The uml spec allows for a nested call to be shown visually: the called lifeline should be overlaid on the calling lifeline. See e.g. determineAvailableReport() call in this example.

Whether your tool supports it of course is another matter...

like image 31
sfinnie Avatar answered Oct 03 '22 21:10

sfinnie