Break

Action chart element.

Break block controls the flow of the loop. It stops the current iteration of the loop (and optionally quits the loop without executing the rest of the iterations).

 To insert "break" block into an action chart
  1. Drag the Break element from the  Actionchart palette onto the diagram of agent. While moving the mouse over the graphical editor you will see insertion points of action chart(s) indicated with little blue circles. Release the mouse button over the insertion point where you want to place the block. New "break" block will be inserted into this place.
  2. Go to the Properties view and choose the behavior you need to implement.
  3. Select Break and exit loop option if this block should stop the execution of the current iteration and also quit the loop without executing the rest of the statements in the loop.
  4. Otherwise, if you want to stop the execution of the current iteration and go back to the beginning of the loop to begin the next iteration, choose Break and continue loop option.  

Properties

General

Type – Defines the behavior of the break element:

Break and exit loop – if selected, the block stops the execution of the current iteration and also quits the loop without executing the rest of the statements in the loop.
Break and continue loop – if selected, the block stops the execution of the current iteration and goes back to the beginning of the loop to begin the next iteration.

Advanced

Name – The name of the element.

Fill color – Sets the fill color for the element. Click inside the control and choose a color from the set of most used ones, or choose some custom color using the Colors dialog box.


Related topics

 Action Charts. Defining Algorithms Visually

 Editing action chart blocks

 Creating an action chart. Tutorial