Use case scenario
A use case scenario can be captured in an include use case symbol with a swimlane grid, where each swimlane represents the subject and actor parameters responsible for performing specific actions, depicting the use case scenario of expected interaction between involved participants.
The swimlane grid symbol allows you to model and organize actions based on the elements that are responsible for performing those actions. For more information on swimlanes, see the Swimlane grid page.
Within the context of a part that owns or inherits an include use case, the include use case contains actions that are performed by the subject and actor parameters owned or inherited by the include use case. Thus, the swimlane grid symbol is displayed for the include use case, where each individual swimlane in the swimlane pool represents each subject and actor. You can use swimlanes to model actions and their sequencing based on the performers, i.e., subject and actors that perform each action. The subject and actor names are indicated in the swimlane headers.

The use case find person in distress is included directly under the context part drone in search and rescue mission because it is specific to this context. Swimlanes in the include use case represent subject and actor parameters as performers of the actions in their corresponding swimlanes. These parameters are related to the subparts of the contextual part via subsetting.
Prerequisites
- The include use case whose swimlanes represent the subject and actors is displayed in the view.
- The include use case's subject and actors are already related to the contextual part's subparts via subsetting. See the procedures:
Relating the include use case's subject and actors to the contextual part's subparts through subsetting via the Textual Editor
To relate the include use case's subject and actors to the contextual part's subparts through subsetting via the Textual Editor
- In the Textual Editor, within the body of the contextual part, declare an include use case with the subject and actor parameters.
- Subset the contextual part’s subparts by the appropriate parameters of the include use case.
You can now proceed to display the swimlane grid on the include use case symbol.part 'drone in search and rescue mission' {
part 'ground control station';
part 'person in distress';
part 'search drone';
include use case 'find person in distress' {
subject :> 'search drone';
actor :> 'ground control station';
actor :> 'person in distress';
}
}
Relating the include use case's subject and actors to the contextual part's subparts through subsetting via the Drag and Drop handler in a view
To relate the include use case's subject and actors to the contextual part's subparts through subsetting via the Drag and Drop handler in a view
- On the contextual part's symbol displayed in a view, create an include use case.
- Subset the contextual part’s subparts by the appropriate parameters of the include use case using the Drag and Drop handler commands Create Subject, Create Actor, or Set Subsetted Feature.
Managing swimlanes
Displaying the swimlane grid and creating additional swimlanes
To display the swimlane grid or create additional swimlanes
- To display the swimlane grid:
- Right-click the include use case symbol and in the shortcut menu, click Display, then Display Swimlanes.
The swimlane grid is displayed with swimlanes (along with any actions and connectors that may already be defined in the model), representing subject and actors owned or inherited by the part that owns or inherits the include use case.
- Right-click the include use case symbol and in the shortcut menu, click Display, then Display Swimlanes.
part 'drone in search and rescue mission' {
part 'ground control station';
part 'person in distress';
part 'search drone';
include use case 'find person in distress' {
subject :> 'search drone';
actor :> 'ground control station';
actor :> 'person in distress';
}
}

- To create additional swimlanes:
- Select the header of an existing swimlane and click the + button on the left or the right side of the swimlane, to create a swimlane to the left or the right of the existing one.
Creating a new swimlane creates an actor for the include use case, represented by the new swimlane. However, no related subpart is created for the part that owns or inherits the include use case.
- Select the header of an existing swimlane and click the + button on the left or the right side of the swimlane, to create a swimlane to the left or the right of the existing one.

part 'drone in search and rescue mission' {
part 'ground control station';
part 'person in distress';
part 'search drone';
include use case 'find person in distress' {
subject :> 'search drone';
actor :> 'ground control station';
actor :> 'person in distress';
}
}

part 'drone in search and rescue mission' {
part 'ground control station';
part 'person in distress';
part 'search drone';
include use case 'find person in distress' {
subject :> 'search drone';
actor :> 'ground control station';
actor :> 'person in distress';
actor actor1; // new actor represented by the newly created swimlane
}
}
If the include use case owns or inherits actors that are not yet displayed as swimlanes, clicking the + button displays a dropdown menu with the following categories:
- Display that has the following options:
- actor <the name of the actor that does not yet have the corresponding swimlane displayed in the view>. Click to create the corresponding swimlane.
- All. Click to create the corresponding swimlanes for all actors that are not represented in the swimlane symbol.
- Create that has the following option:
- actor. Click to create an actor, represented by a new swimlane.

part 'drone in search and rescue mission' {
part 'ground control station';
part 'person in distress';
part 'search drone';
include use case 'find person in distress' {
subject :> 'search drone';
actor :> 'ground control station';
actor :> 'person in distress'; // actor whose representative swimlane is not displayed yet, thus it is available in the Display dropdown menu
}
}
Displaying actions in swimlanes
To display actions in swimlanes
- Select one swimlane by right-clicking its header or all swimlanes by right-clicking the swimlane pool. In the shortcut menu, click Displaying elements in symbolic views, then Display Actions in the dropdown menu.
The specific swimlane's shortcut menu contains the same commands as the part element symbol (subject or actor) it represents.
Displaying parameters, connectors, or other features for element symbols in swimlanes
To display parameters, connectors, or other features for element symbols in swimlanes
- Right-click element symbol(s) in the swimlane(s). In the shortcut menu, click Displaying elements in symbolic views, then click the appropriate command in its dropdown menu.
Modeling actions with swimlanes
Creating actions in swimlanes
You may create actions and the appropriate subject's or actor's perform actions via the Textual Editor and then display the actions in swimlanes via the Displaying actions in swimlanes procedure. However, you can create actions in swimlanes using the view palette. This way, the appropriate perform actions are automatically created for the subject and actors in whose representative swimlanes the actions are created.
To create actions in swimlanes
- Display or create swimlanes for the perform action in a view.
- In the view palette, under the Actions group, click the button for the needed action.
- Click on the swimlane representing the subject or actor that you want to perform the action.
- Indicate the start and end of an action sequence using start and done actions. See the Start and done actions page.
- Connect and sequence actions using successions, flows, and succession flows. See the Action succession and flow page.
- Control the sequencing of actions using control nodes. See the Control nodes page.
Start and done actions, as well as control nodes, are not performed, thus subject/actors in whose representative swimlanes they are displayed, do not have perform actions for performing them. These actions and nodes are owned by the include use case that owns the swimlane grid symbol, while their symbols are owned by the swimlane grid symbol.

part 'drone in search and rescue mission' {
part 'ground control station';
part 'search drone';
include use case 'find person in distress' {
subject :> 'search drone';
actor :> 'ground control station';
}
}

part 'drone in search and rescue mission' {
part 'ground control station';
part 'search drone';
include use case 'find person in distress' {
subject :> 'search drone' {
perform 'fly to destination'; // perform action automatically created for the subject once the action 'fly to destination' was created in the swimlane that represents the subject 'search drone'
}
actor :> 'ground control station' {
perform 'start mission'; // perform action automatically created for the part once the action 'start mission' was created in the swimlane that represents the actor 'ground control station'
}
action 'start mission' { out md; } // action created via view
action 'fly to destination' { in md; } // action created via view
succession flow of 'Exchange Items'::'Mission Data' from 'start mission'.md to 'fly to destination'.md; // succession flow created via view
}
}
Deleting actions in swimlanes
To delete actions in swimlanes
- To delete an action element or symbol in swimlane, see the procedure Deleting an element or its symbol via a view on the Managing elements page.
Deleting an action element via swimlane deletes the appropriate perform action from the subject/actor responsible for performing the deleted action. Any associated connectors are deleted as well.
Changing which subject or actor is responsible for performing actions via swimlanes
You can move actions between swimlanes to change which subject or actor is responsible for performing these actions. The responsible subject/actor is indicated in the header of the swimlane with the keyword «performer».
To change which subject or actor is responsible for performing actions via swimlanes
- Click and drag the action symbol itself from its source swimlane to the target swimlane of the needed include use case.
Details regarding the change:
- If the source and target swimlanes are in the same swimlane grid symbol owned by the common include use case, moving an action from one swimlane to another updates which subject/actor is the owner of the perform action responsible for performing the moved action.

part 'drone in search and rescue mission' {
part 'ground control station';
part 'search drone';
include use case 'find person in distress' {
subject :> 'search drone';
actor :> 'ground control station' {
perform 'start mission'; // perform action is owned by the actor 'ground control station'
}
action 'start mission';
}
}

part 'drone in search and rescue mission' {
part 'ground control station';
part 'search drone';
include use case 'find person in distress' {
subject :> 'search drone' {
perform 'start mission'; // perform action is owned by the subject 'search drone'
}
actor :> 'ground control station';
action 'start mission';
}
}
- If the source and target swimlanes are in different swimlane grid symbols owned by different include use cases (see example below), moving an action updates:
- the moved action's owner to the new include use case;
- which subject/actor is the owner of the perform action responsible for performing the moved action;
- The same applies if the moved action is not inherited or owned by the include use case that owns the target swimlane.

part 'drone mission' {
part 'drone in any mission' {
part 'ground control station';
part 'search drone';
include use case 'locate target' {
subject :> 'search drone';
actor :> 'ground control station' {
perform 'start mission'; // the actor 'ground control station' is the owner of the perform action responsible for performing the action 'start mission'
}
action 'start mission'; // the owner of the action 'start mission' is the include use case 'locate target'
}
}
part 'drone in search and rescue mission' {
part 'ground control station';
part 'search drone';
include use case 'find person in distress' {
subject :> 'search drone';
actor :> 'ground control station';
}
}
}

part 'drone mission' {
part 'drone in any mission' {
part 'ground control station';
part 'search drone';
include use case 'locate target' {
subject :> 'search drone';
actor :> 'ground control station'; // the previously owned action 'start mission' and the perform action for performing it is moved out
}
}
part 'drone in search and rescue mission' {
part 'ground control station';
part 'search drone';
include use case 'find person in distress' {
subject :> 'search drone';
actor :> 'ground control station' {
perform 'start mission'; // the actor 'ground control station' is updated as the owner of the perform action responsible for performing the action 'start mission'
}
action 'start mission'; // the owner of the action 'start mission' is updated to the include use case 'find person in distress'
}
}
}
Deleting subject or actor responsible for performing actions via swimlanes
To delete subject or actor responsible for performing actions via swimlanes
- Select the header of the swimlane representing the subject or actor you want to delete.
- Follow the procedure Deleting an element or its symbol via a view on the Managing elements page.
Deleting subject or actor responsible for performing actions via swimlanes also deletes perform actions contained by the deleted subject/actor.
Extracting and/or reusing a common use case and adapting its actions to different contexts using swimlanes
You can reuse a common use case and adapt it to different contexts without affecting the original reused use case. A common reusable use case may be created from scratch or extracted from an include use case element. The following are descriptions with steps for achieving this, as well as two cases with visual examples demonstrating use case extraction and reusability.
Extracting a reusable use case from an include use case
- Say you have an include use case with common parameters and/or other features (actions, perform actions, successions, succession flows, etc.) that can be reused in other contexts.
For ease of extraction, it is best if the include use case's parameters do not subset any subparts of the contextual part at this stage, as all subsetting relationships are moved to the extracted use case, requiring you additional modifications to reinstate the previously specified relations for the include use case.
- Use Extract Usage command on the include use case to extract a use case with the include use case's parameters and features. As a result:
- The include use case's parameters and features are moved to the extracted use case.
The subject parameter (and any perform actions it may contain) is not moved to the extracted use case; instead, a new empty subject is created for the extracted usage. To ensure reuse:
1. Manually move the subject (and its contained elements) from the include use case to the extracted usage, replacing the newly created empty subject;
2. Make sure the include use case's subject redefines the extracted use case's subject so that the former inherits the latter's features. - The include use case reference subsets the extracted use case.
Because the extracted use case is given the same name as the include use case from which it was extracted, the include use case's keyword is changed to include and the reference subsetting symbol/keyword may not be displayed. If you want to rename the include use case, you must change the element's keyword to include use case and use the reference subsetting symbol/keyword explicitly. For more information on referencing use cases, see the Include use case page.
- The include use case's parameters and features are moved to the extracted use case.
Reusing a use case in different contexts
You can reuse (i.e., include) a common use case (extracted or created manually) in include use cases in as many other contexts as needed:
- Identify the include use case within the context for which you want to reuse a use case and its parameters/features.
- Reference subset the extracted use case. The referencing include use case element inherits the parameters of the referenced use case.
Adapting the reused use case to different contexts
You can now adapt the included use case as needed without affecting the reused use case:
- Display the swimlane grid.
- Create new swimlanes relevant to this context, which creates actors for the referencing include use case element.
- Redefine the inherited parameters.
To easily redefine the inherited parameters via the swimlane headers, right-click the header of the swimlane that represents the parameter you want to redefine. In the shortcut menu, click Refactor, then Redefine.
- Redefine the actions in these swimlanes via the Textual Editor.
If an action is not owned but simply referenced by the perform action that is an inherited feature of the parameter represented by the swimlane, the action is displayed with the ^ prefix. See the Case 2 example below.
- Remove from the view action symbols that are unnecessary in this context.
- Create actions needed in this context. They are owned by the referencing include use case element.
- Redefine the actions in these swimlanes via the Textual Editor.
Case 1. Light reuse. Reusing a use case with common parameters
In this scenario, the use case parameters are reused in different contexts. Since both include use case elements contain common parameters, you can extract the 'provide value using drones' use case and reuse it by referencing it in each include use case element.

The use case 'provide value using drone' is extracted from the include use case 'provide goods to customer' via Extract Usage command. As a result, the include use case element's parameters are moved to the extracted use case and the include use case element 'provide goods to customer' reference subsets the extracted use case. The extracted use case is also reused for the include use case element 'find person in distress' via reference subsetting. Therefore, both includes inherit the extracted use case's parameters. The inherited parameters are then adapted to the specific context by redefining them and subsetting the related subparts of the contextual part. Afterward, the use case scenario is modeled in the swimlane grid by creating actions, successions, and succession flows.
Case 2. Full reuse. Reusing a use case with common parameters and scenario
In this scenario, the common use case parameters and scenario (e.g., successions and succession flows) is reused in different contexts. Since both include use case elements contain common parameters and actions to be performed during the missions, you can extract them to the 'provide value using drones' use case and reuse it by referencing it in each include use case element.
