The OMG UML specification (UML Superstructure Specification, v2.1.1, p.355) states:Ī conditional node is a structured activity node that represents an exclusive choice among some number of alternatives.Ī conditional node consists of one or more clauses. Removing a Clause from between two other Clauses adjusts the numerical order for example, if Clause 2 is removed from between Clause 1 and Clause 3, Clause 3 is renamed as Clause 2, and any further Clauses are also moved up one place. This immediately removes the Clause's corresponding partitions from the diagram, along with all their contained Activity elements. To remove a Clause, highlight it in the list and click on the Delete button. New Test and Body partitions are immediately added to the element on the diagram, and you can populate these partitions with Activity elements, which are then identified in the 'Nodes' panel. The remaining fields in the 'Clause(s)' panel are cleared so that you can add Decider and Body Output Action Pins. This inserts a new Clause in the list, and identifies which is the preceding (Predecessor) Clause and (if appropriate) which is the following (Successor) Clause. To add another Clause, click on the Add button underneath the 'Clause(s)' list. An element must be completely contained in the Body partition to be listed there - if it overlaps with the Test partition in any way, it is treated as being part of the Test partition. Click on the 'Body' radio button to list the elements contained in the Body partition. The 'Nodes' panel, by default, lists the Actions and Activities contained in the Test partition. If the required Action Pin does not already exist, you can click on the Add New button on the dialog to automatically create an Output pin under the appropriate parent node.įor the 'Result' and 'Body Output' entries, you can check on the exact location of each Action Pin by right-clicking on the entry and selecting the 'Find in Project Browser' option. The 'Select Pin' dialog reveals only Output pins as appropriate to the context. Click on the Save button to save the Clause definition. For each Clause you add an Action Pin for the Decider and for the Body Output. On this tab, in the 'Result' panel, add an Action Pin to hold the result for the node, clicking on the Add button to display the 'Select Pins' dialog.Ī Conditional Node automatically contains one Clause containing a Test partition and a Body partition, and a Decider Pin and Body Output Pin. However, for the Conditional Node you also display the Element Properties window, which has an additional 'Condition' tab. Much of this you can complete as for any other element. When you create a Conditional Node, the element 'Properties' dialog displays. If you try to shrink the node below the structure size, the node automatically defaults to the 'best fit' size. The elements are aligned on the top left of the partition, so that resizing the node maintains the organization of the structure within and between the partitions. You define Conditional Nodes by dragging other Activity diagram elements from the Toolbox page into the appropriate partition of the element, and linking and organizing the structure as required. The representation of a Conditional Node on an Activity diagram resembles this: The Conditional Node itself has a result ActionPin that makes available the overall result of the Node (the output of the first Body to be executed). You can have more than one Clause, so that if the Test condition is not satisfied its Body is ignored and processing moves to the next Clause and evaluates another Test condition.Įach Clause has a 'Decider' ActionPin to hold the result of the Test, and a 'Body Output' ActionPin to hold the result of the Body's actions (if executed).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |