An includes relationship is useful when you have a common set of steps that must be performed by many different use cases. Instead of copying the same set of steps in each use case, you can put those steps into a use case of their own, and then create an includes relationship to that use case from the others. Include relationships are depicted with a dashed line in use case diagrams.
To create an includes relationship to an existing use case:
- Open the use cases details form and edit the step that you wish to add the reference to
- Right click in the step and select Insert Use Case ID Link or press Ctrl+L
- Select the use case you wish to reference, then double click or press enter to create the reference. Tip: Start typing the name of the use case to auto-scroll.
- Optional: you may edit the text of the inserted use case so that it matches grammatically (e.g. If your use case is "Log In", you may use "User logs in")
To create an includes relationship to a new use case using existing steps (a.k.a. "refactor"):
- Select the steps you wish to move to a new use case
- Right click on a selected step and select Move steps to new Use Case...
- Fill in the name and brief description for the new use case
- Press the Create button to create the use case, or press the Create and Edit button to also bring up the use case details form
- The steps and their extensions, if any, will be moved to the new use case. The steps in the original use case will be replaced with an includes relationship to the new use case.