Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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
add comment

2 Answers

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
add comment

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
add comment

protected by gnat May 23 at 5:30

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

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.