2
votes

Can UML activity diagram have decision without a decision node or is it wrong? I mean, is it required to use the decision node (diamond symbol) to represent conditions?

2
Welcome to StackOverflow and +1 for a correct question.Gangnus

2 Answers

1
votes

It is legal UML. Only fUML gets formal about how a value flows into a decision for guard conditions to be compared.

1
votes

No,

  1. in activity diagram you can also use a much more elaborated element: Conditional Node - is a structured activity node that represents an exclusive choice among some number of alternatives.
  2. It also could exist in variant "conditional node with regions".
  3. If your decision has the sense of loop, you can use a Loop Node instead.
  4. Also, as in UML it is allowed to combine elements from different diagrams, you can use Alt or Loop combined fragments from Sequence Diagram elements.
  5. You can also use Sequence Node in activity diagram and hide the decision inside it.
  6. Also, you can always hide the decision in the arithmetic actions. But being acceptable in code, this way is bad in diagrams - you make them for better understanding the subject, not for shortening the code.