{"id":25874,"date":"2021-10-29T09:16:14","date_gmt":"2021-10-29T09:16:14","guid":{"rendered":"https:\/\/ropley.com\/?page_id=25874"},"modified":"2021-10-29T09:16:14","modified_gmt":"2021-10-29T09:16:14","slug":"activity-diagram-example","status":"publish","type":"page","link":"https:\/\/ropley.com\/?page_id=25874","title":{"rendered":"Activity Diagram Example"},"content":{"rendered":"\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Activity Diagram Example<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Use Case: Make vending machine payment<\/h3>\n\n\n\n<p><strong>Participating actors:&nbsp;<\/strong>(none)<\/p>\n\n\n\n<p><strong>Preconditions:&nbsp;<\/strong>The user is part way through the purchase of an item or service.<\/p>\n\n\n\n<p><strong>Main flow description:&nbsp;<\/strong>The user inserts a coin or note. The vending machine deducts the value of the coin or note from the outstanding balance. The machine deduces that the amount paid now equals the balance outstanding, and displays a message saying enough money has been paid.<\/p>\n\n\n\n<p><strong>Postconditions &#8211; success guarantees:&nbsp;<\/strong>The remaining balance to be paid has fallen to zero.<\/p>\n\n\n\n<p><strong>Postconditions &#8211; minimal guarantees:&nbsp;<\/strong>(none)<\/p>\n\n\n\n<p><strong>DETAILED STEPS<\/strong><\/p>\n\n\n\n<p><strong>Extension point step:&nbsp;<\/strong>(unspecified)<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>STEP&nbsp;&nbsp;<\/td><td>DESCRIPTION<\/td><\/tr><tr><td>1<\/td><td>The customer inserts a coin or note<\/td><\/tr><tr><td>2<\/td><td>The system computes that the coin or a note brings the outstanding balance to zero<\/td><\/tr><tr><td>3<\/td><td>The system displays a message indicating the correct amount has been paid<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Merge point step:&nbsp;<\/strong>(none)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Alternative path<\/h3>\n\n\n\n<p><strong>Extension point:&nbsp;<\/strong>After insertion of a coin or note<\/p>\n\n\n\n<p><strong>Precondition:&nbsp;<\/strong>The amount paid has not reached the required balance<\/p>\n\n\n\n<p><strong>Alternative flow description:&nbsp;<\/strong>The customer is informed on the display that there is still an outstanding amount that needs to be paid.<\/p>\n\n\n\n<p><strong>Remerges:&nbsp;<\/strong>Back at the beginning of the make payment use case<\/p>\n\n\n\n<p><strong>DETAILED STEPS<\/strong><\/p>\n\n\n\n<p><strong>Extension point step:&nbsp;<\/strong>1<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>STEP&nbsp;&nbsp;<\/td><td>DESCRIPTION<\/td><\/tr><tr><td>1.1<\/td><td>The machine displays the remaining balance to be paid following subtraction of the value of the most recently inserted note or coin.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Merge point step:&nbsp;<\/strong>1<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Alternative path<\/h3>\n\n\n\n<p><strong>Extension point:&nbsp;<\/strong>After insertion of a note or coin<\/p>\n\n\n\n<p><strong>Precondition:&nbsp;<\/strong>Note or coin inserted exceeds outstanding balance<\/p>\n\n\n\n<p><strong>Alternative flow description:&nbsp;<\/strong>The machine determines that it has suitable change to issue a refund of the overpaid amount. The machine dispenses this change in the change tray for the customer to collect. The display shows a message telling the customer to pick up their change.<\/p>\n\n\n\n<p><strong>Remerges:&nbsp;<\/strong>An alternative end to the make payment use case<\/p>\n\n\n\n<p><strong>DETAILED STEPS<\/strong><\/p>\n\n\n\n<p><strong>Extension point step:&nbsp;<\/strong>1<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>STEP&nbsp;&nbsp;<\/td><td>DESCRIPTION<\/td><\/tr><tr><td>1a.1<\/td><td>The machine inspects its change to see if it can pay the correct change.<\/td><\/tr><tr><td>1a.2<\/td><td>The machine dispenses the correct change to the change tray.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Merge point step:&nbsp;<\/strong>(none)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Alternative path<\/h3>\n\n\n\n<p><strong>Extension point:&nbsp;<\/strong>After an overpayment of the outstanding balance<\/p>\n\n\n\n<p><strong>Precondition:&nbsp;<\/strong>The machine does not have enough change to give the customer the outstanding balance<\/p>\n\n\n\n<p><strong>Alternative flow description:&nbsp;<\/strong>The machine prompts the user saying it does not have enough change, inviting them to abort the transaction or proceed without change being given. The customer selects proceed. The machine dispenses any change it is able to give back, this being less than the total amount due to the customer.<\/p>\n\n\n\n<p><strong>Remerges:&nbsp;<\/strong>Use case ends here.<\/p>\n\n\n\n<p><strong>DETAILED STEPS<\/strong><\/p>\n\n\n\n<p><strong>Extension point step:&nbsp;<\/strong>1a.1<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>STEP&nbsp;&nbsp;<\/td><td>DESCRIPTION<\/td><\/tr><tr><td>1a.1.1<\/td><td>The machine informs the customer that it will not be able to give them all their change, and asks if they want to proceed anyway<\/td><\/tr><tr><td>1a.1.2<\/td><td>The customer selects proceed anyway.<\/td><\/tr><tr><td>1a.1.3<\/td><td>The machine dispenses what change it can into the cash tray.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Merge point step:&nbsp;<\/strong>(none)<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">The equivalent activity diagram<\/h5>\n\n\n\n<p>Note how the activity diagram uses the diamond branch symbols to show the extension and remerge points. The condition on each alternative path is shown as a UML condition on the branch arrow, enclosed in square brackets. The start and end of the use case are shown using the entry and exit point symbols of UML. These symbols were &#8216;borrowed&#8217; by UML from Petri Net modelling.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"766\" src=\"https:\/\/ropley.com\/wp-content\/uploads\/2021\/10\/ADExample.png\" alt=\"\" class=\"wp-image-25875\" srcset=\"https:\/\/ropley.com\/wp-content\/uploads\/2021\/10\/ADExample.png 768w, https:\/\/ropley.com\/wp-content\/uploads\/2021\/10\/ADExample-300x300.png 300w, https:\/\/ropley.com\/wp-content\/uploads\/2021\/10\/ADExample-150x150.png 150w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><figcaption>Activity diagram for the <em>Make vending machine payment <\/em>use case<\/figcaption><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Activity Diagram Example Use Case: Make vending machine payment Participating actors:&nbsp;(none) Preconditions:&nbsp;The user is part way through the purchase of an item or service. Main flow description:&nbsp;The user inserts a coin or note. The vending machine deducts the value of the coin or note from the outstanding balance. The machine deduces that the amount paid [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"site-sidebar-layout":"no-sidebar","site-content-layout":"plain-container","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"disabled","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"disabled","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"disabled","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-25874","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/ropley.com\/index.php?rest_route=\/wp\/v2\/pages\/25874","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ropley.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ropley.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ropley.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ropley.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=25874"}],"version-history":[{"count":1,"href":"https:\/\/ropley.com\/index.php?rest_route=\/wp\/v2\/pages\/25874\/revisions"}],"predecessor-version":[{"id":25877,"href":"https:\/\/ropley.com\/index.php?rest_route=\/wp\/v2\/pages\/25874\/revisions\/25877"}],"wp:attachment":[{"href":"https:\/\/ropley.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=25874"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}