Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to express the below events in an activity diagram:

  • An alternative flow, such as "at step x of basic flow, user clicks cancel instead of ok".
  • An alternative entry to the use case, such as "instead of click the bold button, use can press Ctrl-B".
  • An error, such as "when user clicks save, the system is unable to save the file to disk."

How can I do these?

Thank you.

share|improve this question
up vote 2 down vote accepted

you need something called constraints or guardian conditions.enter image description here

see where it says [loopguard] in that diagram? you can put [if user does x] implying the next state won't occur until the condition is true.

for the second question, I'd just write "user presses ctrl+B or selects Bold" in the same state circle or as a note to the side.

for the third question, you can use exceptions. It looks like this: enter image description here

share|improve this answer
    
IMO you make several mistake here:1) you use concurrent node instead of decision node. 2) This is an Activity diagram, not a State Machine, so in your boxes, you should have "first Action" or "first Activity" instead of "first State". – Adrian Maire Jan 6 at 8:57

I'm not an expert on diagramming, but I like using shapes with multiple points to specify an alternative path, such as Diamonds or Triangles

enter image description here

share|improve this answer

protected by gnat May 23 '14 at 5:30

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.