UML activity diagram decision without decision node

左心房为你撑大大i 提交于 2019-12-10 10:31:58

问题


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?


回答1:


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




回答2:


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.


来源:https://stackoverflow.com/questions/22599761/uml-activity-diagram-decision-without-decision-node

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!