Activity Diagram Examples
Here we provide several examples of UML activity diagrams:
Online customer can browse or search items, view specific item, add it to shopping cart, view and update shopping cart, do checkout. User can view shopping cart at any time.
An example of activity diagram describing behavior of the Purchase Ticket use case. Activity is started by Commuter actor who needs to buy a ticket.
Order processing example. Requested order is input parameter of the activity. After order is accepted and all required information is filled in, payment is accepted and order is shipped.
An example of document management activity. Document is created, reviewed, updated, approved, and at some point archived. This activity diagram shows responsibilities of different roles and flow or sequence of document changes. Partitions represent different roles participating in the activity - Author, Reviewer, Approver, and Owner.
Electronic prescriptions activity diagram example - prescribers could send prescriptions electronically to a pharmacy of the patient's choice where patient can pick it up.
An example of activity to resolve an issue in software design. After ticket is created by some authority and the issue is reproduced, issue is identified, resolution is determined, issue is fixed and verified, and ticket is closed, if issue was resolved.
Example of activity of manual activation of trial (provisional) product which was protected with the HASP SL soft license of Sentinel HASP software protection and licensing product.
Activity which describes Single Sign-On (SSO) to Google Apps. To interact with partner companies Google uses single sign-on based on OASIS SAML 2.0 protocol. Google acts as service provider with services such as Gmail or Start Pages. Partner companies act as identity providers and control user names, passwords, and other information used to identify, authenticate and authorize users for web applications that Google hosts.
Online Shopping Activity Diagram
An example of activity diagram for online shopping. Online customer can browse or search items, view specific item, add it to shopping cart, view and update shopping cart, checkout. User can view shopping cart at any time. Checkout is assumed to include user registration and login.
This example is not using partitions, most of the actions are assumed to be fulfilled by online customer.
An example of activity diagram for online shopping.
Process Order
An example of business flow activity of order processing, based on the Example 12.35 from [UML 2.4.1 Specification]. Requested order is input parameter of the activity. After order is accepted and all required information is filled in, payment is accepted and order is shipped. Note, that this business flow allows order shipment before invoice is sent or payment is confirmed.
An example of business flow activity to process order.
This example is not using partitions, so it is not clear who is responsible to fulfill each specific action.
Document Management Process
An example of formal Document Management Process activity. Partitions are shown here as horizontal swimlanes and represent different roles participating in the activity - Author, Reviewer, Approver, and Owner.
Document is created, reviewed, updated, approved, and at some point archived. This activity diagram shows responsibilities of different roles and flow or sequence of document changes. Alternative type of diagram - state machine diagram - could also be used in this case to show how document changes its state over time.
An example of Document Management Process activity.
Resolve Issue
An example of activity to resolve an issue in software design. After ticket is created by some authority and the issue is reproduced, issue is identified, resolution is determined, issue is fixed and verified, and ticket is closed, if issue was resolved.
This example is not using partitions, so it is not very clear who is responsible to fulfill each specific action.
An example of activity to resolve an issue in software design.
Single Sign-On for Google Apps
An example of activity describing Single Sign-On (SSO) to Google Apps. To interact with partner companies Google uses single sign-on based on OASIS SAML 2.0 protocol. Google acts as service provider with services such as Gmail or Start Pages. Partner companies act as identity providers and control user names, passwords, and other information used to identify, authenticate and authorize users for web applications that Google hosts. Each partner provides Google with the URL of its SSO service as well as the public key that Google will use to verify SAML responses.
When a user attempts to use some hosted Google application, such as Gmail, Google generates a SAML authentication request and sends redirect request back to the user's browser. Redirect points to the specific identity provider. SAML authentication request contains the encoded URL of the Google application that the user is trying to reach.
The partner identity provider authenticates the user by either asking for valid login credentials or by checking for its own valid authentication cookies. The partner generates a SAML response and digitally signes it. The response is forwarded to Google's Assertion Consumer Service (ACS).
Google's ACS verifies the SAML response using the partner's public key. If the response is valid and user identity was confirmed by identity provider, ACS redirects the user to the destination URL. Otherwise user will see error message.
An example of activity for Single Sign-On to Google Apps.
