Here's the non-programmer in me putting myself to shame. I don't know how to write UML sequence diagrams
I'm trying to write my first one to describe the flow of logic in a Java web application framework. In words it goes like this:
Request hits front controller Front controller uses an ActionDispatcher (helper) to forward the request to an ActionController ActionController may (optionally) ask the ActionDispatcher to foward the request elsewhere (repeat any number of times). FrontController forwards to a JSP file to compose the view.
The bit I'm getting mixed up on is how to draw step 3 where the ActionController may effectivey jump backwards a step over and over.
Here's what I have so far:
I know some of my boxes should have underlines in them... I just have't figured out how to do that in the software I used yet
Originally posted by Chris Corbyn: Would I be right to be getting the feeling that people don't always write UML following a completely strict set of rules? It's more about how well it conveys what it's diagramming?
A nice, more lightweight diagramming syntax for simpler diagrams can be found at http://agiledraw.org/ (it currently has some server problems, I have contacted the admin about it).
As an aside, are you sure what you have is a loop? It sounds more like a recursion to me (not sure how to show that in a sequence diagram, sorry...).
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Joined: Jan 14, 2007
Yes, it is recursion. It's basically a filter chain, except there's no chain defined up-front. ActionDispatcher passes itself ('this') to ActionController, so if ActionController invokes its forwardToAction() method no loop has occurred, it's recursed back into the ActionDispatcher... I guess I could just change "loop" to "recursion". I have a feeling I've seen a little looped arrow to indicate recursion at a particular unit so I could probably stick that on the grouped box instead.
Joined: Jan 29, 2003
Back when I was doing a lot of diagramming I made liberal use of comments. The new fangled UML 2.0 has new decorations and shapes to indicate a lot of the things I just described in text. As long as the model doesn't have to compile and run (MDA) you only get "graded" on how well readers learn what they need to know.