Search code examples
umlactivity-diagram

Activity diagram final node in errors


I would like to ask, if a final node in some activity can represent two different outcomes.

For example in use case buy premium account I can have two outcomes: IF I have enough credit then I will end the activity with bought premium account ELSE I end the activity with some error page that the user doesn't have enough credit.

Can I use the same final node in this case?


Solution

  • Yes you can with something like the image two actions and a final node

    More see the comment about figure 15.44 in UML specification: "In Figure 15.44, two ways to reach an ActivityFinalNode exist; but it is the result of exclusive “or” branching, not a “race” situation like the example in Figure 15.43. This example uses two Activity FinalNodes, which has the same semantics as using one with two incoming edges."

    It means that a FinalNodes may have two incoming edges, and the norm explains that the first flow which reaches the FinalNode terminates the activity what ever the other flow, and there is something special for output activity parameters.