8

For example an activity diagram for a simple program:

  1. Get User data.
  2. If User Exists DO something, ELSE do nothing.
  3. End.

I often see diagrams with multiple endpoints but also with just one. Should activity diagrams merge both ways to one final state, regardless of the previous paths?

11

Multiple endpoints are acceptable within an activity diagram.

Here's a number of sites backing up that assertion.


every activity diagram should have at least one final state symbol

with "at least one" implying that multiples are allowed.


An activity diagram has a start and may have multiple endpoints.


An activity diagram has a start and may have multiple end points. The UML 2 also provides for a flow final (a circle with a cross) that indicates that the process stops.

1

It makes sense to end the activity diagram at 1 point if the activity will return no value to caller or if it is returning the same object (or value) in all cases except a major error. If the activity may result in separate actions multiple end points would be valid. In your example, I would prefer a single end point. As an example of multiple end points would be a controller sending different messages to different devices based on a condition.

1

Here you are speaking on one timeline only. But even in it there could be many end points - due to branching. And on the diagram you can have many timelines, each with its endpoints. On your timeline one endpoint will be enough, but we can say nothing about other timelines.

protected by gnat May 22 '14 at 17:07

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.