On to Iteration 3, and Activity Diagrams CSSE 574: Session 6, Part 1 Steve Chenoweth Phone: Office (812) 877-8974 Cell (937) 657-3885 Email: chenowet@rose-hulman.edu
On to Iteration 3: NextGen POS Failover to local services Uh oh, Visa s offline Support for POS devices Credit payment authorization Persistence POS devices from http://www.posability.ca/hardware.htm
Iteration 3: Monopoly Lots, Railroads, and Utilities Purchasing property Collecting rent
UML Activity Diagrams Essentially Modern Version of Flowcharts and/or Data Flow Diagrams Easy to understand Used to model: Business processes Workflows Data Flows Complex algorithms/ucs 4
Basic Activity Diagram UML Syntax Fulfillment start Customer Service Partitions. Show different parties involved in the process Finance Object Node. An object produced or used by actions. This allows us to model data flows or object flows. Receive Video Order Action. It does something. There is an automatic transition on its completion. A transition supports modeling of control flow. Fork. One incoming transition, and multiple outgoing parallel transitions and/or object flows. Fill Order Send Invoice Invoice Order Deliver Order Receive Payment Join. Multiple incoming transitions and/or object flows; one outgoing transition. The outgoing continuation does not happen until all the inputs arrive from all flows. Close Order end of activity 5
Post Office Showdown That track ( Battle Without Honor or Humanity ) like Ride of the Valkyries improves any activity. (- Quentin Tarantino, maybe?)
Classic Data Flow Diagram DFD for Automated Course Registration System accept/deny reply process Applicant application 1 Check Course Availability application application 2 Check Applicant Qualification external actor course data student data data flow Courses Applications Students data store, such as a DB, DB table, or file And the UML equivalent is 7
Example of Data Flow Modeling via an Activity Diagram
Hierarchy Representation: Rake Symbol the rake symbol (which represents a hierarchy) indicates this activity is expanded in a sub-activity diagram Fill Order Deliver Order avoids the problem that these are always huge figures! 9
Expanded Delivery Order Activity Diagram Deliver Order Decision: Any branch happens. Mutual exclusion [ else ] [ rush ] Merge: Any input leads to continuation. This is in contrast to a join, in which case all the inputs have to arrive before it continues. Deliver Regular Deliver Rush 10
Signal Notation Receive Video Order A time signal 30 days since sent last invoice, and no payment received Fill Order Send Invoice Resend Invoice Deliver Order Receive Payment Cancel request Accept a signal Close Order Cancel Order 11
NextGen POS: Reducing Complexity Customer Cashier NextGen POS Authorization Service Shop and Fill Cart Cart Enter Cart Items Calculate Taxes and Discounts [ cash payment ] [ else ] Submit Authorization Request Authorize Payment Receipt Create Receipt Hand Over Items NextGen Process Sale UC benefits from activity diagram due to its complexity 12
Activity Diagram Guidelines Use when need to depict processes with complex flow Conditional or iterative Use rake notation for sub-activity diagrams Keeps parent diagram simple Maintain a consistent level of abstraction within a diagram 13
Just for fun Your Turn! Sketch an activity diagram for creating an account, with username and password, on a website. Be sure to include swim lanes for the User, the System, and an external CAPTCHA Service. Your diagram should include a check that the password is valid, a check that the username has not already been used, and a check that the user entered the CAPTCHA text correctly. The last two checks should be done in parallel, the first by the System and the second by the CAPTCHA Service.