ACTIVITY DIAGRAMS Activity diagrams describe the dynamics of the system and are a graphical representation of sequential and/or concurrent control and data flows between ordered sequences of activities, actions and objects. Basic concepts of activity diagrams are: activities, actions, control flows, start, end, end of the flow. Activity is a specific behavior composed of logically ordered sequence of subactivities, actions and objects to perform a certain process. Action is an elementary unit of behavior specification, which represents the transformation or processing in the modeled system. Control flow is a relationship between two activities or actions, indicating that after execution of the source activity or actions the control flow will be transferred to the target activity or action. (Fig. 1) Advanced categories related to activity diagrams are: decision flows, parallel flows, data flows, partitions of activity diagrams, expansion regions, interruptible activity regions, the exception handlers. Decision flows are kind of flows where one input flow splits into two or more alternative output flows, depending on the particular condition. Conditions are placed in square brackets next to the corresponding flows. One of the outflows of the decision may be determined by the keyword “else”. This flow will be realized only when conditions defined for all other outflows are not met. The decision flow may also take the form of unification, when from a number of input flows one output flow is created. (Fig. 2 and 2a). Parallel control flows may take the form of forks or merges. The fork has one input flow and at least two output flows. Merging means collecting several input flows into one output flow. (Fig. 3) The activity diagram can also have data flows between a certain object and activities or actions affecting this object. Data flows allow for more extensive specification of activity diagrams. (Fig. 3) Partition in the activity diagram is a mechanism for grouping activity diagram elements connected with control and data flows, performing a specific common role in the diagram. The expansion region is strictly defined fragment of a diagram, with clearly specified inputs and outputs, performed repeatedly, accordingly to the number of elements in the input. The interruptible activity region is a group of activities within which, as a result of the interruption flow, the execution of all activities is immediately interrupted. The exception handler outlines the activities that should be executed if the specified exception occurs during execution of a protected action. Information Systems Analysis Karolina Muszyńska The process of creating activity diagrams should follow the following steps: - identification of basic activities based on use case scenario, - connection of activities using the control flows, - optional decomposition of activities into actions, - identification of decision and parallel control flows, - introduction of data flows, - identification of criteria and partitions of the diagram, - introduction of expansion and interruptible regions, - introduction of exception handlers. Fig. 1 User logging into operating system. Information Systems Analysis Karolina Muszyńska Fig. 2 Cash machine (diagram with a decomposed activity and decision flows) Fig. 2a Diagram of the decomposed activity Information Systems Analysis Karolina Muszyńska Fig. 3 Book rental (activity diagram with an object and data flows and with fork and merge) Information Systems Analysis Karolina Muszyńska