views:

549

answers:

2

In my app i have a Document class and a DocumentFact class. The DocumentFact class contains methods which will get multiple Documents from the database. These documents are stored in a datatable or dataset. Both (datatable, dataset) are private members of the documentfact class. They can be accessed via properties.

Now my question is: in a sequence diagram, is it allowed to call a property like this:

Actor      Web interface    DocumentFact          Database
  |          |                 |                      |
  |input     |                 |                      |
  |------->  |  GetDocuments   |                      |
  |          |---------------->|                      |
  |          |                 | ExecuteSelectQuery() |
  |          |                 | -------------------->|
  |          |                 |                      |
  |          |                 |      Bool            |
  |          |                 | <--------------------|
  |          |                 |                      |
  |          |                 |   GetDataSet()       |
  |          |                 | -------------------->|
  |          |                 |                      |
  |          |                 |    DataSet           |
  |          |                 |<---------------------|
  |          |                 |                      |

Where GetDataSet is a property. Is this correct? And if it is not, what is the correct way to do this?

Note: This is just a part of my sequence diagram, the rest is not relevant.

+1  A: 

I faced a similar problem while documenting my design. I have just added the text 'property' under the method call (Under the arrow). (I didn't find out the 'right' UML way of doing it.) While that isn't standard UML, as far as I know, that really got the point across. Of course, that might not work out well for you, in which case, you'll be better off with standard UML.

batbrat
+1  A: 

One important thing to remember is that UML is not a formal notation so you can do whatever you think gets the point across. If something is not clear (or you have to think too much about how to represent it) you should probably add a note.

One of the things that I found very helpful in sequence diagrams was to number the messages (or groups of messages) and have a running dialog (formatted as a numbered list) explaining what's going on (... and why you're doing it that way). You have to remember that the diagram does not stand on it's own but should be integrated into a larger body of documentation, thus, how to specifically represent a property isn't really a big deal. Just choose a representation and explain that GetDataSet is a property of Database (or whatever :).

Aaron Maenpaa
So you're saying, when I give the messages a number and explain in my documentation that number 6 (for example) is a property call, it will do?
Martijn
Yep, and it will almost certainly be clearer than whatever representation you choose for a property call alone.
Aaron Maenpaa