title: Loop in UML activity diagram using a region
body: <p>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 <strong>emphasise the loop semantic</strong>.
  So I came to "regions" or "interruptible regions" which are shown <a href="http://www.pst.ifi.lmu.de/~stoerrle/V/AD-4b-ExpansionNJC.pdf" rel="noreferrer">here</a> and <a href="http://sparxsystems.com/enterprise_architect_user_guide/12.1/building_models/loop_and_conditional_nodes2.html" rel="noreferrer">there</a>, but I couldn't find many really satisfying examples.</p>
  
  <p>My example is a function which processes messages of a given list. The loop aborts as soon as the first valid message is found, then the message is processed and the function returns true. Otherwise, it returns false (please no comments on sense or nonsense, it's only for the sake of a sample).</p>
  
  <p>Diagram 1: uses a good old activity diagram conditional node. It is easier to follow the control flow along the arrows, admittedly, but there is no "The LOOP", there is just an "if".</p>
  
  <p>Diagram 2:</p>
  
  <ul>
  <li>is the (positive) exit condition correct, using an interrupting edge? True, it could be part of the [test] section of the loop along with the iterator.</li>
  <li>BTW: how is the iterating character of a for-loop best expressed in UML?</li>
  <li>Is the activity final node inside the loop body correct (i.e. when the conditional "message valid?" yields "no")? It somehow feels wrong to use a final node here, but how else can I express the control flow <em>of one loop</em>?</li>
  </ul>
  
  <p>The functionality of both diagrams should be equivalent:</p>
  
  <p><img src="https://i.stack.imgur.com/KU1Hv.png" alt="loop with conditional node"></p>
  
  <p><img src="https://i.stack.imgur.com/ygYdp.png" alt="loop with region"></p>
  
  <hr>
  
  <p>Edit: Another diagram which implements the suggestions from Steph:</p>
  
  <ul>
  <li>Initial and final node inside the loop body</li>
  <li>"further processing" is now inside the loop body. Well... OK here but there might be other loops where I would rather have it outside. Then I might change the design anyway...</li>
  <li>The "next message" can also be seen as the <em>iterator object</em> itself instead of the <em>action</em> "(provide the) next message" from the original diagram.</li>
  <li>The two object flow arrows might be a bit overkill, but I think they are correct.</li>
  </ul>
  
  <p><img src="https://i.stack.imgur.com/15Qgu.png" alt="enter image description here"></p>