Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm currently doing my OCPJEA assignment.

I have to draw several sequence diagrams for the use cases presented in the documentation. One of the use cases (A) state that after some interaction, the system executes another use case (B).

I've already drawn the diagram for B, is there any way in UML2 to show inclusion, or do I have to duplicate all those interactions into A?

share|improve this question

It looks like an official notation for this kind of referencing was introduced with UML v.2 and is called ref

Usually, all your sequence diagrams will contain a label in the upper left corner to identify your diagram. For example: sd:login-verification. Using this label, you can then reference this sequence diagram from within another one by drawing a simple box onto the concerned lifeline.

This box must mention ref in its upper left corner together with the name of the referenced diagram in the middle of the box. In addition, you have to pass those instance(s) that are used within the referenced diagram.

  |  ref  /                                     |
  |-------                                      |
  |   login-verification(user, token) : bool    |
  |                                             |

I think that the following article might be quite helpful as it gives a concrete example. Have a look at the section called "Beyond the basics" where they talk about "Referencing another sequence diagram".

Article: UML basics : The sequence diagram

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.