Toolkit 1.1
Creating Activity Diagrams

Diagrams

 

How to make Activity Diagram?

Open the toolkit as explained earlier and select the Activity tab. Your window should look like this:

Activity diagrams provide a visual reference for documenting sequences of tasks making up a single activity. The tool kit has a tool bar which features all the elements that can be used to make an activity diagram.

How to work with elements, used to represent the activity diagram of a system?

Click on each tab in the tool bar to see all the symbols that the tool kit supports.

First click on the use case tab and then click on the white screen, You will notice an use case element on the screen. Similarly try clicking all the element on the tool bar and put them on the screen. Your screen should look like this:

Notice:

  1. The properties applet changes for every element, showing mainly the color, dimensions, HTML link and Graph link. The 'State' and 'Action State' elements have more properties such as the name and border size.

  2. The properties can be changed by changing the text in the respective text areas. Notice the changes appearing on the screen.

How to change the size of the elements directly on the screen using the mouse?

Click on the element, you will notice small green boxes on the edges of the selected element. Click on those boxes and simultaneously drag the mouse to adjust its size according to your use.

Example

Let us take the example of a CD Player to learn how to make a use case of any system using the toolkit.

  • Primary Actor(s) : Music Fan!, External Power Source.
    Description : The Music Fan turns the CD player On (or off).
    Preconditions : The CD player is turned off (or on)
    Flow of Events : The music fan! presses a switch to turn the CD player on (or off):
    1. If the CD player is off, pressing the switch will turn the CD player off.
    2. If the CD player is on, pressing the switch will turn the CD player off.
    Post conditions : The CD player is turned on (or off)
    Alternative Flow of Events : An adequate CD player power source may be unavailable:
    1. Flat (regular) batteries should be replaced.
    2. Rechargeable batteries should be recharged.
    3. Or, connect CD player to AC/DC power source.
    Assumptions : Battery and AC/DC power sources are available.
  1. Select the initial state icon on the tool bar and then click on the screen. Similarly select the final state icon and place it on the screen. 

  2. Now click on the action state icon and the click the screen to place it at the place you want to according to your activity diagram. Repeat the same procedure for the second action state.

  3. Select the decision icon from the tool bar and place it on the screen.

  4. Now select the state element from the tool bar and place it on the screen twice.

    Your screen should look like this, If not then select each the element and move it to place them in the positions shown below::

  5. Change the name of the elements using the properties applet and notice the change on the screen when you press 'enter' key.
  6. Use the control flow and the action flow to connect the different states. Click on the each icon tab and then click on the screen. Select the arrow and drag it to the corresponding elements.

  7. Now select the swim lane icon and click the screen where you want to place the swim lane

  8. Change the name of the swim lane using the respective property applet.

  9. We have assumed that the battery or AC/DC power is available, so now let us connect the above made activity diagram with with the source of power. 

  10. Continue working with the same screen. And place three action state and two states on the screen according to your model. Also place the decision box in the center as seen below.

  11. Connect all the elements with control flows and action flows.

  12. Using the Property applet change the names of the states according to your model and then make a swim lane as described earlier.