4

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?

Christophe
81.9k11 gold badges135 silver badges201 bronze badges
asked Jul 16, 2013 at 7:44

1 Answer 1

2

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

answered Dec 19, 2013 at 14:32

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.