umlactivity-diagramuml-decision-node

Can the input of a decision node be the output of another decision node in UML?


Let's say I have a decision node. I want the output of that decision node to be the input of another decision node, without having to create another action in the middle. Is it possible to do that in UML?


Solution

  • In short

    Yes, this is possible.

    What does it mean?

    There are two kind of flows in an activity diagram:

    The rule for a decision node, is that if the primary incoming edge is a control flow, all the outgoing edges shall be control flows. Conversely, if the primary incoming edge is an object flow, all the outgoing edges shall be object flows.

    In this regard, it is important to keep in mind that a decision node is not an activity that creates an output; It just routes the incoming control flow tokens or objects to the right branch.

    So you can definitively take the output of a first decision node as input for the second decision node. The only constraint is that the incoming flow of the second node is of the same kind as for the first node.