websequencediagrams.com has developed a unique service for generating sequence diagrams based off an intuitive text language. The basic service is free to use, images are watermarked with the company logo at the bottom. For about $100 you can get your own image server with no watermarks and support for advanced diagram features. I’m using the private image server for this posting.
The tool comes with a web based interface where you can enter text and generate diagrams in real time. There is also a javascript API that allows you to embed text in HTML and have the image generated dynamically when the page loads.
Generating Sequence Diagrams
The following text:
User->TopicService: Search(topic, query)
TopicService->Repository: Content Cached?
Repository-->TopicService: Yes (Cache Results) / No
opt Content Not Cached
TopicService->ContentProvider: Search(query)
ContentProvider-->TopicService: Search Results
TopicService->Repository: Cache Results (topic, query)
end
TopicService->User: Search Results
results in the following image:

What I really like about this approach over something like Viso is that you have source text that can actually be tracked via source control. It’s just like any other type of source code. This makes for easy refactoring if operation or service names change.
The use of Loop and Parallel
The following diagram shows the use of a loop and the parallel operation (parallel only available with paid version).
loop Loop Through Keywords
Processor->IndexingService: keyword
parallel {
IndexingService->Google: query
IndexingService->Flickr:
IndexingService->YouTube:
}
parallel {
Google-->IndexingService: results
Flickr-->IndexingService:
YouTube-->IndexingService:
}
IndexingService->IndexingService: Index Results
end
Results in the following diagram:

There are a number of output formats including the following:
- Plain UML
- Rose
- QSD
- Napkin (what’s shown in this post)
- VS2010
- MScGen
- OmegApple
- Blue Modern
- Green Earth
- Round Green
Here is the above diagram in Round Green:

Code Generation Potential
If you can model out the relationships between operations in services, you could potentially auto generate the sequence text. Taking this concept further you can generate the sequence text and HTML that wraps it - generating completely automated sequence documentation.
To do this you need a model that expresses services, the operations they expose, and the mappings between the operations. You also need a way to traverse the graph of mappings between operations. This is the hard part, but once it’s done it can provide a lot of value because you can generate sequence text automatically.
Tool Assessment
Overall this is a great product. The folks behind the service have put a lot of thought into making sequence diagrams extremely easy and functional. I have already started using the javascript API for my own documentation needs, by writing out sequence text in HTML documents. I’d recommend this tool to any software architect / technical analyst / system integrator type person.