This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Showing  conditions in sequence diagrams Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Showing  conditions in sequence diagrams" Watch "Showing  conditions in sequence diagrams" New topic
Author

Showing conditions in sequence diagrams

Srinivas Pittala
Ranch Hand

Joined: May 22, 2011
Posts: 40

Hello,

Is it a good idea to show conditions(if -then-else) in sequence diagrams?

I have a following scenario:

1) SuD checks external system for a value

If that value is insufficient then

validate some rules

if rules satisfies then

send a request to Some Other component

2) How to show external systems and web services in a sequence diagrams?

Searched this forum and found

external system can be shown as an Entity and adding some notes to it
web services can be shown as object with sterio type <<web service>>

Is this the right approach?

Certified guys, please provide your suggestions.

Thanks,
Sree





Unni Pillai
Ranch Hand

Joined: Aug 22, 2010
Posts: 35

Hi Kumar,


I used if-else condition in the sequence diagrams in a limited way. As long as the diagram is not getting complicated it is ok. If you have too many condition check. then think about splitting the diagrams.I have done that for authentication in my case.

Regarding your Q2, I completely omitted , 'what kind of component' information from my sequence diagrams, according to me, it is for explaining the message flow. In real life also we don't show component details in sequence diagrams.

Unni


SCJP,SCWCD,SCEA
Srinivas Pittala
Ranch Hand

Joined: May 22, 2011
Posts: 40

Unni ,Thank you very much for your response..

Q1: I will use

Q2: I read in this forum, all the classes and public methods in a class diagram should use in sequnce diagram .
In class diagram i represented external web services as subsytem with steriotype <<webservices>>
that means i can use the same as a lifeline ..

Thanks,
Sree
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Showing conditions in sequence diagrams
 
Similar Threads
Questions on Sequence Diagrams
Component diagram
Passed SCEA with 98%
Appropriate UML diagram.
Class/Sequence diagram questions