Action chart element.
block is the simplest way to route the algorithm
flow. The block has two exit branches - true
You can define any sequence of actions for either of the two
branches using other action chart blocks. When the control
the "decision" block, it decides which branch to take. If the condition defined
for this "decision" block is met (i.e. it evaluates to true), true
taken. Otherwise, false
branch is taken.
Drag the Decision 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 "decision" block will be inserted into this place.
Go to the Properties view. Specify the condition in the Condition field. Condition is Java expression that produces a boolean result. You will see it shown in the block on the diagram.
chart blocks defining the required
execute in any branch of this "decision" block. Place block
into insertion point of the corresponding branch as shown in
Condition – Boolean condition of this "decision" element. When the control reaches the "decision" block, it decides which branch to take. If the condition defined for this "decision" block is met (i.e. it evaluates to true), true branch is taken. Otherwise, false branch is taken.
Label – You can add here some comments, explaining the meaning of this "decision" element. The comments will be shown inside the block instead of the "decision" code.
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.
To invert true and false branches
If you want to invert actions that will be taken on true and false, right-click (Mac OS: Ctrl+click) the "decision" block in the graphical editor and choose Invert the decision from the popup menu.
By default, the "decision" branches are located in the following way: true branch exits from the right corner of the block, and false - from the left one. However, you can adjust the layout of the branches.
To adjust the "decision" branches layout
Right-click (Mac OS: Ctrl+click) the "decision" block in the graphical editor and choose the option you need from the Draw branches submenu of the popup menu. The choices have intuitive names and descriptive figures. Emphasized branch on these figures denotes true branch:
Action charts. Defining algorithms visually
Editing action chart blocks