Re: [SysML Forum] Multiple actors in Sequence Diagram

1,249 views
Skip to first unread message

Alessandro Minzoni

unread,
Nov 6, 2012, 1:54:04 AM11/6/12
to sysml...@googlegroups.com
I think that both Sequnce Diagram are correct if the same message is sended at all users at the same time.  SC1 differs from SC2 only for the level of detail.

AM



2012/11/5 Jong Chen <jongch...@gmail.com>
I'm new to SysML so pardon me if this question is too noobish.

Suppose I am modeling a web server.  The server has 1 administrator and any number of users (the use case diagram for this system is below).  Suppose that the system sends each user a warning message if the server is shut down (the activity diagram for this is below).  What does my sequence diagram look like?  Does it look like SC1 where a single message is sent to ":users."  Is it just understood that the shutdown message is duplicated and sent to each user attached to the server?  Or do I need to elaborate the behavior I want by having multiple users like in SC2?  By looking at the sequence diagram SC2 does feel like it is much more explicit regarding the desired behavior but it also presents problems.  The web server may have any number of users.  It is not possible to elaborate every possible combination of users in the system.  So what is the preferred way to handle this problem?  Personally I like SC1 and then adding a comment box that says that "SHUTDOWN_WARNING" message is sent to every user.  But that is mainly because I'm drawing all the sequence diagrams and I'm lazy.  How do other people feel about this?

--
You received this message because you are subscribed to the Google
Groups "SysML Forum" group.
Public website: http://www.SysMLforum.com
To post to this group, send email to sysml...@googlegroups.com
To unsubscribe from this group, send email to
sysmlforum+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sysmlforum?hl=en_US?hl=en

Remy Fannader

unread,
Nov 6, 2012, 7:58:04 AM11/6/12
to sysml...@googlegroups.com
Sequence diagrams are meant to describe execution units realizing use cases. As a consequence a SD must be triggered by one event originating from one actor. Other actors may contribute but only if asked to by the primary thread.
http://caminao.wordpress.com/how-to-implement-symbolic-representations/use-cases/
http://caminao.wordpress.com/how-to-implement-symbolic-representations/patterns/functional-patterns/use-case-patterns/

Phillip Chudley

unread,
Nov 6, 2012, 7:27:14 PM11/6/12
to sysml...@googlegroups.com

Could you have a lifeline classified to a collection class of users (for example ArrayList<Users>), and then send a message to this lifeline enclosed in a loop combined fragment, where the condition of the loop is the size of the ArrayList<Users> (for example ArrayList<Users>.Count())?

 

 

 

Regards

 

 

_dunstanthomas

 

 

 

 

 

Phil Chudley

Principal Consultant

OMG-Certified UML Professional

TOGAF-9 Certified

 

Rawlings Suite

Gunwharf Quays

Portsmouth

Hampshire

PO1 3TT

 

 

 

 

 

 

pchu...@dthomas.co.uk
www.dthomas.co.uk

office:

mobile:

+44 (0)23 9282 2254

 

 

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Registered in England: 3957367

This message is not intended to be of any legal effect or create binding legal regulations and may not be used in evidence.

 

 

 

From: sysml...@googlegroups.com [mailto:sysml...@googlegroups.com] On Behalf Of jmbruel
Sent: 06 November 2012 19:41
To: sysml...@googlegroups.com
Subject: [SysML Forum] Re: Multiple actors in Sequence Diagram

 

No, SD1 is not correct because ":Users" is ONE object (instance of the class Users, anonymous), it is not a set of Users.

SD2 is correct, but not generic. A possibility would be to have a singleton class that is an aggregation of users (Group<>----Users and

<<singleton>>Group). Sending the message to this singleton would implicitely imply sending it to all the aggregated users (joe, bob...).

 

Cheers,

 

JMB.



Le lundi 5 novembre 2012 20:40:45 UTC+1, Jong Chen a écrit :

I'm new to SysML so pardon me if this question is too noobish.

Suppose I am modeling a web server.  The server has 1 administrator and any number of users (the use case diagram for this system is below).  Suppose that the system sends each user a warning message if the server is shut down (the activity diagram for this is below).  What does my sequence diagram look like?  Does it look like SC1 where a single message is sent to ":users."  Is it just understood that the shutdown message is duplicated and sent to each user attached to the server?  Or do I need to elaborate the behavior I want by having multiple users like in SC2?  By looking at the sequence diagram SC2 does feel like it is much more explicit regarding the desired behavior but it also presents problems.  The web server may have any number of users.  It is not possible to elaborate every possible combination of users in the system.  So what is the preferred way to handle this problem?  Personally I like SC1 and then adding a comment box that says that "SHUTDOWN_WARNING" message is sent to every user.  But that is mainly because I'm drawing all the sequence diagrams and I'm lazy.  How do other people feel about this?


______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________

James Towers

unread,
Nov 7, 2012, 5:38:00 PM11/7/12
to sysml...@googlegroups.com
You could, but strictly speaking this would mean you are sending multiple messages to the group rather than one message to each member. The difference in semantics isn't wide enough (IMHO) to warrant a different construct so you could just clarify this point with a note.  

Sent from my iPhone

Holger Seemüller

unread,
Nov 8, 2012, 5:30:06 AM11/8/12
to sysml...@googlegroups.com

I think, it depends heavily on the purpose of the model:

If you are just modeling for documentation, than I think the solution with the note is the most convenient way to clarify the situation.

 

If you’d like to process the model later in a formal way, e.g. for code generation, than the situation changes dramatically! Here, the semantics of each modeling construct should be clearly defined and you should therefore have a look at the documentation of the model processing tool.

 

Best,

Holger

Tim Weilkiens

unread,
Nov 8, 2012, 12:46:13 AM11/8/12
to sysml...@googlegroups.com
Since UML2 it is not allowed to send a message to a group of objects. That semantic is also part of SysML. You can send a message to single element that represents a set. But that's different of sending a message to each element of the set.

Tim

James Towers

unread,
Nov 8, 2012, 10:46:54 AM11/8/12
to sysml...@googlegroups.com
Yes, very good point. Purpose is everything. 

Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages