How to show multiple/consecutive actions in sequence diagram

572 views
Skip to first unread message

ashwin s rao

unread,
Sep 13, 2010, 11:26:34 AM9/13/10
to UMLf...@googlegroups.com
Hi All,
How do you show multiple/consecutive actions in a sequence diagram. For example if an action starts at a point, say showing a form which then followed by another action say right-clicking and creating new form.
 
How should such action be displayed in UML sequence diagram. Should I draw two separate UML diagrams but the two are related or some how combine the UML diagram but don't know how?
 
Thanks again.

remesh

unread,
Sep 14, 2010, 12:17:17 AM9/14/10
to UML Forum
Use a "Fragment" of type "Seq" and place all these operations inside
the fragment.

ashwin s rao

unread,
Sep 14, 2010, 10:25:39 AM9/14/10
to umlf...@googlegroups.com
Hi Remesh,
What do you mean by "fragment"...could you please explain.

--
You received this message because you are subscribed to the Google Groups "UML Forum" group.
To post to this group, send email to umlf...@googlegroups.com.
To unsubscribe from this group, send email to umlforum+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/umlforum?hl=en.


H. S. Lahman

unread,
Sep 14, 2010, 10:50:46 AM9/14/10
to umlf...@googlegroups.com
Responding to rao...


How do you show multiple/consecutive actions in a sequence diagram. For example if an action starts at a point, say showing a form which then followed by another action say right-clicking and creating new form.

Sequence Diagrams do not describe actions. (One uses Activity Diagrams or Abstract Action Language to describe what goes on within entity actions.) They describe collaborations expressed as messages between entities. Those messages <may> trigger response actions in the receiver. At best they only identify actions when the message is a Call Event because the message is also the method (action) signature. The purpose of the SD is to describe the overall flow of control between entities by daisy-chaining messages together in a particular sequence.

In your example the actions seem to be triggered by external user requests (e.g., "show form" or "create form"). In that case it is conventional to represent that external actor as a swimlane. The messages mapping to the key clicks would then be directed to the software entities whose actions would respond to the actor's request (i.e., to other swimlanes representing the software entities).

Note that the reason the SD is called a Sequence Diagram is because the messages cascade in a particular sequence as one moves down the swimlanes. So the notion of consecutive actions is implicit in the way one constructs the diagram (e.g., messages lower down in the diagram are issued after messages higher up are consumed).


 
How should such action be displayed in UML sequence diagram. Should I draw two separate UML diagrams but the two are related or some how combine the UML diagram but don't know how?

That depends. Is creating a new form always done after the user has shown a form? If so, one uses a single SD to capture that particular sequence. OTOH, if the showing of forms and creation of forms are completely different activities (e.g., steps in different, unrelated use cases) then one would probably use separate diagrams because the sequencing is random. If the requests are closely related but could be issued in any order, then one should probably use a Collaboration Diagram since the external interactions are inherently asynchronous.

-- 
Life is the only flaw in an otherwise perfect nonexistence
   -- Schopenhauer

H. S. Lahman
H.la...@verizon.net
software blog: http://pathfinderpeople.blogs.com/hslahman/index.html
Reply all
Reply to author
Forward
0 new messages