Software design - Lecture 22. The main topics covered in this chapter include: categories of UML diagrams; introduction to activity diagram; UML activity diagrams; data-flow diagrams (DFDs); activity diagram – dynamic category; basic vocabulary of activity diagram;...
1 Software Design Lecture : 22 Categories of UML Diagrams (3) Ø Ø Static ü Use case diagram ü Class diagram Dynamic ü Activity diagram Ø Implementation ü Component diagram ü Deployment diagram Introduction to Activity Diagram Ø In many ways UML Activity diagrams are the object oriented equivalent of flow charts and dataflow diagrams (DFDs). They are used to explore the logic of: Ø A complex operation Ø A complex business rule Ø A single use case Ø Several use cases Ø A business process Activity Diagram – Dynamic Category Ø It shows the flow from activity to activity within a single process ie Work Flow Ø With an activity diagram, you can also model the flow of an object as it moves from state to state at different points in the flow of control Basic Vocabulary of Activity Diagram Ø Diagrams are read from top to bottom and have branches and forks to describe conditions and parallel activities Initial State Ø The filled in circle is the starting point of the diagram. An initial node isn’t required although it does make it significantly easier to read the diagram Ø There will be only one initial state in the activity diagram Activity Ø An activity, also known as an activity state, on a UML Activity diagram typically represents the invocation of an operation, a step in a business process, or an entire business process Ø The rounded rectangles represent activities that occur Flow / Edges § The directed arrows on the diagram to show the flow between activities to complete a workflow 10 Vocabulary Ø Join § A black bar with several flows entering it and one leaving it. All flows going into the join must reach it before processing may continue. This denotes the end of parallel processing 18 Problem Statement 19 NonComputer Science Scenario Ø Consider the workflow associated with building a house. First, you select a site. Next, you commission an architect to design your house. After you've settled on the plan, your developer asks for bids to price the house. Once you agree on a price and a plan, construction can begin. Permits are secured, ground is broken, the foundation is poured, the framing is erected, and so on, until everything is done. You're then handed the keys and a certificate of occupancy, and you take possession of the house 20 21 Problem Statement 22 Ø In an order processing system, once the order is received multiple activities are initiated to complete the order process. On one side order filing is initiated and on the other end billing mechanism is initiated to receive the payment. On the order filing side delivery mechanism is finalized whether it is a rush delivery or regular delivery. In the end all the activities end to close 23 Possible Solution 24 Swim Lanes Ø At times it useful, especially when you are modeling workflows of business processes, to partition the activity states on an activity diagram into groups Ø Ø Each group representing the business organization responsible for those activities Each group is known as “Swim Lane” 25 26 Scenario • In a typical customer services call centre scenario where multiple people are sitting, when a call is received it is first decided whether it’s a call from a new customer or an existing customer, in parallel log of the call is created to have record of the communication between Call Centre Representative (CCR) for future reference. If it is a call from a new customer then the call is transferred to sales team and it the call is from an existing customer then call is transferred to helpdesk after this the process is completed 27 28 Problem Statement • In a vehicle reservation system, first step is to find the client id to determine whether the client is new or existing one, after determining the type of client, the request for the reservation of vehicle is initiated to find the to be reserved car, if the car is available then the inventory is updated along with updating the charges to calculate the new total of the bill, after new bill is generated and inventory is updated the process reserving the car is completed. At each step otherwise step is to be 29 Possible Solution 30 31 Tasks to Do Ø Create Activity diagram of Use Case Diagram and Class Diagram Ø Reverse Engineered the activity diagram given in the next slide to come up with Use Cases and Use Case 32 Possible Solution ... certificate of occupancy, and you take possession of the house 20 21 Problem Statement 22 Ø In an order processing system, once the order is received multiple activities are initiated to