Lecture-4.pdf
Document Details
Uploaded by Deleted User
Full Transcript
UML: Activity Diagram Activity Diagram Activity diagram is another important diagram in UML to describe the dynamic aspects of the system. Activity diagram is basically a flowchart to represent the flow from one activity to another activity. The activity can be described as an operation...
UML: Activity Diagram Activity Diagram Activity diagram is another important diagram in UML to describe the dynamic aspects of the system. Activity diagram is basically a flowchart to represent the flow from one activity to another activity. The activity can be described as an operation of the system. The control flow is drawn from one operation to another. This flow can be sequential, branched, or concurrent. Activity diagrams deal with all type of flow control by using different elements. Difference between an Activity diagram and a Flowchart Flowcharts were typically invented earlier than activity diagrams. Non programmers use Flow charts to model workflows. For example: A manufacturer uses a flow chart to explain and illustrate how a particular product is manufactured. We can call a flowchart a primitive version of an activity diagram. Business processes where decision making is involved is expressed using a flow chart. Difference between an Activity diagram and a Flowchart Programmers use activity diagrams (advanced version of a flowchart) to depict workflows. An activity diagram is used by developers to understand the flow of programs on a high level. It also enables them to figure out constraints and conditions that cause particular events. A flow chart converges into being an activity diagram if complex decisions are being made. Difference between an Activity diagram and a Flowchart Flowchart Activity Diagram Primarily used in software engineering and More versatile and can be used in various fields, business process modeling to represent the including programming, business processes, Modeling Purpose dynamic aspects of a system. They focus on algorithms, and decision-making. They are not the flow of activities within a system or a limited to software engineering. process. Have a broader range of symbols, including Use specific UML notation, with activities rectangles for processes, diamonds for decisions, represented as rounded rectangles, Symbols and Notation and various other shapes for different types of decision nodes, and arrows indicating the activities. flow of control. Can be detailed or high-level, depending on the Tend to focus on a higher level of purpose. They can include more specific symbols Level of Detail abstraction, emphasizing the flow of for different types of actions and decision- activities and how they interact. making. Flowchart Activity Diagram Commonly used in the context of software Applied in a broader range of fields, including Application Domain engineering and business process modeling business, engineering, education, and more. within the UML framework. Explicitly represent concurrency through Concurrency is often implied but may not be as Concurrency parallel activities, showing multiple explicitly represented as in activity diagrams. activities happening simultaneously. When to Use Activity Diagram The specific usage is to model the control flow from one activity to another. This control flow does not include messages. Activity diagram is suitable for modeling the activity flow of the system. An application can have multiple systems. Activity diagram also captures these systems and describes the flow from one system to another. Modeling work flow by using activities. Modeling business requirements. High level understanding of the system's functionalities. Investigating business requirements at a later stage. Overview of Activity Diagram How to Draw an activity diagram 1. Identify Activities: Define the activities that need to be represented in the diagram. These are the tasks or actions that occur within the system. 2. Identify Initial and Final States: Determine the starting point (initial state) and ending point (final state) of the process. These states represent the beginning and conclusion of the activities. 3. Add Actions: Represent activities using rounded rectangles. Write a concise label inside each rectangle to describe the activity. How to Draw an activity diagram 4. Connect Activities with Arrows: Use arrows to indicate the flow of control between activities. Arrows show the sequence in which activities occur. 5. Decision Points (Optional): If there are decision points in the process where different actions may be taken based on conditions, use diamonds to represent decision nodes. 6. Parallel Actions(Optional): If activities can occur concurrently, represent them with parallel bars. This indicates parallel processing. How to Draw an activity diagram 7. Merge and Fork Nodes (Optional): Use merge nodes to show where parallel flows converge, and fork nodes to show where parallel flows diverge. 8. Annotations and Comments: Add annotations or comments to provide additional information or clarify specific aspects of the diagram. 9. Review and Refine: Review the diagram to ensure that the flow of activities is clear and accurately represents the desired process. Make refinements as needed. Activity Diagram Notation Summary Activity Diagram Notation Summary Activity Diagram Notation Summary Activity Diagram Notation Summary Activity Diagram Notation Summary Additional Info: https://www.geeksforgeeks.org/unified-modeling-language-uml- activity-diagrams/ https://online.visual-paradigm.com/diagrams/tutorials/activity- diagram-tutorial/ Emotion Based Music Player Modeling a Word Processor 1. Open the word processing package. 2. Create a file. 3. Save the file under a unique name within its directory. 4. Type the document. 5. If graphics are necessary, open the graphics package, create the graphics, and paste the graphics into the document. 6. If a spreadsheet is necessary, open the spreadsheet package, create the spreadsheet, and paste the spreadsheet into the document. 7. Save the file. 8. Print a hard copy of the document. 9. Exit the word processing package. Process Order Student 1. An applicant wants to enroll in the university. Enrollment 2. 3. The applicant hands a filled out copy of Enrollment Form. The registrar inspects the forms. 4. The registrar determines that the forms have been filled out properly. 5. The registrar informs student to attend in university overview presentation. 6. The registrar helps the student to enroll in seminars 7. The registrar asks the student to pay for the initial tuition. Business Process for Meeting a New Client