Include relationship

An include relationship between use cases means that the base use case explicitly incorporates the behavior of another use case at a location specified in the base [BRJ99]. An include relationship represents a set of operations that are repeated in several use cases and are grouped in one place for ease of use and maintenance. An included use case never stands by itself; it is always instantiated as part of a larger use case.

Let us consider again IFAS's extension documents approval system. One of the requirements was to develop an event-based system. Every time an event occurs, the next person in the approval process should be automatically notified. When an author submits a document for approval, the department chair gets immediate notification. When the department chair approves a document, the program leader gets immediate notification.

In Figure 5-7, the base use case Approve Document includes the use case Notify. The Notify use case represents a group of operations needed to send a notification message to anyone interested to know that some event has happened. Therefore, this set of operations is repeated in several places. It is convenient to group this functionality in one place, and any other use case that needs it can use it by simply including it in its definition.

Department Chair Approve Document

Notify

Figure 5-7. Base use case Approve Document includes use case Notify.

Note that both relationships extend and include use a dependency relationships. In the case of the extend use case, AddReviewer depends on Approve Document, as it is at the discretion of the department chair whether to add an additional reviewer or not. In the case of include use case, Approve Document depends on Notify to go to the next level of approval. A stereotype (i.e., extend or include) is used to show the type of the use case.

0 0

Post a comment