Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Showing conditions in sequence diagrams

Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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.


Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.

Srinivas Pittala
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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 ..

What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic