Draw UML Communication Diagram

Communication diagram is a kind of UML diagram shows interactions between objects, parts or sub-system. Communication diagram provides similar detail as sequence diagram without time information. This tutorial, we are going to model the money-transfer operation of an online banking system with Visual Paradigm for UML, to see how objects communicate with each others.

March 24, 2010
User Rating: / 9
Views: 6,416
PDF Link Add comments
Edition: Community or above (Edition comparison)

  1. Create a new project. Name it as Online Banking.
  2. In the Diagram Navigator, expand the node UML Diagrams, then right click on node Communication Diagram and select New Communication Diagram from the popup menu.
    Create communication diagram in Diagram Navigator
  3. Immediately name the diagram as Transfer Money (in the name box at top left corner). Click on the background of diagram to confirm the naming.
    Set "Transfer Money" to diagram name
  4. Add swimlanes to model the partitioning of system. Select Swimlane from diagram toolbar and click on the diagram to create it. Name it as Client.
    Create "Client" Swimlane
  5. Repeat the previous step to create another swimlane Main frame below swimlane Client.
  6. Start the story from the actor. Select Actor from the diagram toolbar. Click within the swimlane Client to create an actor, and name it as User.
    Create "User" actor
  7. User will operate the system via the account page. To present this, we need to add a lifeline for Account Page, and link it up with the actor User. Move the mouse pointer over actor User, press on the resource icon Message -> LifeLine and drag to the right. Release the mouse button and name the lifeline as Account Page.
    Create "Account Page" Lifeline by resource centric interface
  8. We want to model the message pass from user to account page. Double click on the arrow marked 1, enter visit, then click on the background of diagram to confirm the change. Note that the number next to the message, 1 in this case, represent the order of message flow within the interaction being modeled.
    "Account Page" created
  9. The account page will direct user's request of transferring money to the main frame for validation and execution. Again, move the mouse pointer over lifeline Account Page and make use of the resource centric interface to create lifeline Transaction in swimlane Main frame.
  10. Name message 2 as transfer (targetAccount, amount).
    Create "Transaction" Lifeline
  11. The money transferral process involve withdrawing money from user's account, and depositing money to target account. But before these, we need to make sure user's account has enough money to undergoing the transferral. Make use of the resource centric-interface to create a lifeline User Account from lifeline Transaction. Name message 3 as hasBalance (amount) : boolean.
    User Account created
  12. Once the account balance is checked, we can withdraw money from user's account. To add the 4th message between lifeline Transaction and User Account, move the mouse pointer over the link between Transaction and User Account, click on the resource icon Create Message and name the message as withdraw (amount).
    Create "withdraw" message between "User Account" and "Transaction" Lifeline
  13. Before we continue, expand the swimlane Main frame first. Select the header of swimlane Main frame, press on the resize handler at the bottom of swimlane and drag downwards.
    Expend the "Main frame" Swimlane size
  14. Create a lifeline Target Account from lifeline Transaction, using the resource-centric interface. Name the 5th message as credit (amount).
    Create "credit(amount)" message
  15. The transaction is complete. Let's make the lifeline Transaction dispose itself. This time, move the mouse pointer over the lifeline Transaction, then click on the resource Self Message -> LifeLine.
    Create Self-message for "Transaction" Lifeline
  16. Name the 6th message as dispose().
    Create "dispose()" message
  17. Finally, we shall display a message on screen, telling user that transaction is complete. Move themouse pointer over the link between lifeline Account Page and Transaction. Click on the resource icon Create Reverse Message. Name the 7th message as displayResult().
    Create Reverse Message

  18. Finally, the diagram should look like this:
    Complete communication diagram
  19. Save the project by selecting File > Save Project. This is the end of the tutorial.

Rate this Article

Click on one of the stars below to rate this article from 1 (lowest) to 5 (highest).

You may be interested in

  1. Writing Effective Use Case
  2. UML Package Diagram
    Tagged:
  3. Draw Entity Relationship Diagram (ERD)
    Tagged:
  4. Produce UML Use Cases from Business Process Diagram (BPD)
  5. Draw UML Sequence Diagram with Keyboard
Tags of this article:

Comments (0)

Write comment

Rating

Comment

Enter the calculation result

security code