Loop in UML activity diagram using a region

前端 未结 1 1439
死守一世寂寞
死守一世寂寞 2021-02-01 05:56

I am modeling a loop in an UML activity diagram. It works well with simple condition nodes (diagram 1), but I am looking for a more expressive way to emphasise the loop

1条回答
  •  一生所求
    2021-02-01 06:22

    In UML, the activity final node represents a completion, so it is correct in a loop region as you use it, it is the normal completion of the content of your loop (which in turns leads to the next iteration). As a side note, I advise you to also use an initial node for the beginning of your loop.

    And there is also the flow final node, that represents an exit, instead of a completion. Thus, you can use it to represent the "break" statement, instead of the interrupting edge you use. In this case you have to integrate the "further message processing node", in the "yes" branch, just before this flow final node.

    The interrupting edge is rather for interruptions coming from outside the current processing. The region is interruptible, and some events (usually noted with receive nodes) may completely interrupt it no matter the progress of the region content. Here it is not the case.

    Concerning the iterating character, there is nothing very visual, unfortunately. I tend to use an object node on top of the region, just beside the initial node.

    0 讨论(0)
提交回复
热议问题