Jump to Menu

How to Generate Activity Diagram from User Story?

In the world of agile, a user story can be used to record a user's problem or concern to be addressed by the system to be developed. During the discussion of user story, project team can write down the suggested usage of the system in the form of scenarios. Each scenario is a set of steps a user will take to achieve what they want, under that user story. With user story scenario, user can read and confirm if the system flow is what they preferred before the commencement of feature development.

Compatible edition(s): Enterprise, Professional, Standard

  • April 29, 2016
  • Views: 49,796
  • PDF

In order for stakeholders and project team to read the steps easier, you can optionally generate a UML activity diagram from the scenario, to visualize the steps in activity diagram. In this tutorial, we will try to write a simple user story and then generate an activity diagram from it. User story to activity diagram

Writing user story scenario

  1. Create a new project with Visual Paradigm. Select Project > New from the application toolbar.
  2. In the New Project window, enter Online Shopping as project name. Click the Create Blank Project button.
    New Project winodw
  3. Open the User Story page in UeXceler. If you are not currently opening UeXceler, select UeXceler > UeXceler from the application toolbar first, and then open the User Story page.
    Open user story page
  4. Create a general user story. Click on Add a feature that can... and enter User can add an item to shopping cart. as name.
    User story created
  5. Double click on the user story to open it.
  6. Open the Scenario page.
    Open Scenario page
  7. Enter the steps to accomplish this user story. Click on the first step and enter Open an item page.
    Enter step
  8. Press Enter and enter step 2: Select attributes (e.g. appearance, style).
    Enter step two
  9. A quantity box will be displayed when the item user selected is still available for purchasing. Let's write an if-then-else for this. Press Enter to go to the third step. Then, press Ctrl-Space to toggle the Statement Control list.
    Statement Control list toggled
  10. Select If from the Statement Control list.
    Select if
  11. Enter out of stock.
    If condition filled
  12. Let's say the system will display an "out of stock" message in this situation. Press Enter to go into the if condition. Then, press Ctrl-Space again.
  13. This step is performed by the system. Let's create a System Response. Select System Response from the Statement Control list.
    Select System Response
  14. Enter Display "Out of stock" message..
    Entered System Response
  15. A quantity box will be displayed in the 'else' case. Now, press Enter and press Ctrl-Space to toggle the Statement Control list.
  16. Select Change to Else from the Statement Control list.
    Change to 'Else'
  17. Press Enter.
  18. Toggle the Statement Control list by pressing Ctrl-Space. Select System Response from the list and enter Show quantity box..
    System Response entered
  19. Press Down to go to end if. Then, press Enter to go to step 5.
  20. The customer will then enter the quantity of item and add the item to cart. Enter Enter quantity. and Click "Add to Cart". as step 5 and 6, respectively.
    Steps entered
  21. Once the item is added to cart, the system will prompt if the customer want to continue shopping. Press Enter to create a new step. Enter a system response Prompt "Do you want to continue shopping?" as step 7.
    System Response entered
  22. If the customer has chosen "Yes", the system will then reopen the item page. Use the Statement Control list to add an if - has chosen "Yes".
    Added 'if'
  23. Press Enter to go into the if condition. Press Ctrl-Space to toggle the Statement Control list. This time, select Jump.
    Select Jump
  24. Click on the tiny arrow button next to step 1 to represent the jumping to step 1.
    Select step

Generating activity diagram from user story

We have just completed the scenario. Let's generate a UML activity diagram from it. Select Synchronize to Diagram > Synchronize to Activity Diagram from the toolbar.

Synchronize to Activity Diagram

A UML activity diagram is generated from the scenario in a second.

Activity Diagram generated

If necessary, press Ctrl-Tab to go back to the user story.

创造美好 共同成长

We use cookies to offer you a better experience. By visiting our website, you agree to the use of cookies as described in our Cookie Policy.