UML Designer User's Guide

Adding responsibility elements

Consider Catalog, which we have identified as a thing in the library catalog example. Based on our use cases, Catalog (which we have identified as a thing) might have the following responsibilities:

To add these responsibilities of Catalog to the model, follow these steps:

  1. Select Things in the middle pane of the Relationships Browser.
  2. Select Catalog from the list of things.
  3. Select New>Responsibility from the pop-up menu of Catalog. A window appears prompting you for the details of the new responsibility.
  4. Type Add catalog entry and select OK.
  5. For Idiom, accept the default (Action). This responsibility describes something Catalog does.

    Don't worry about participants for now; we will deal with those shortly.

  6. Repeat the same procedure for the other responsibilities listed above.

Similarly, you can create responsibilities for actors by following the same steps. Select the actor Librarian and add the following responsibilities:

Note:Because Actor elements are not transformed into protocols, actor responsibilities do not have idioms.

Using another idiom

All of the responsibilities we have added for Catalog have been simple "action" responsibilities. However, consider another Thing, Catalog Entry; it does not have to do anything except keep track of its own attributes (author, title, and accession number). We can define these as responsibilities using the Value idiom to give us a head start on implementation later.

To add these responsibilities, follow these steps:

  1. In the Relationships Browser, select Catalog Entry from the list of things.
  2. Select New>Responsibility from the pop-up menu. A window appears prompting you for the details of the new responsibility.
  3. For Idiom, select Value. This responsibility describes something Catalog Entry keeps.
  4. In the Responsibility Namefield, type Author. (We phrase this responsibility as a noun because it describes a value rather than an action.)
  5. For Max Cardinality, select 1.
  6. Optionally, we could specify a participant defining the type of the value being kept. At this point, though, we aren't really interested in how the author will be represented, so accept the default and select OK.
  7. Repeat the same process for two other responsibilities, Title and Accession Number.

Because we used the Value idiom for these responsibilities, UML Designer can generate appropriate sets of messages when we transform Catalog Entry into a protocol. We'll see how this works in Protocols.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]