Use Cases
Cases
To understand usecases, we must first understand what are cases. A case element is a type of calculation that produces a result intended to achieve a specific objective regarding a given subject. A case is a general element that provides the basis for Analysis, Verification, and Use Cases. A case must have a subject; the subject is a parameter represented by another model element. A case can have an objective and can also have actors. The actors in a use case are parameters and not elements. The body of a case can be specified using sub-actions and sub-calculations needed to achieve the case objective.
Use Cases
A use case element is a case that specifies the required behavior of its subject relative to one or more actors. It requires a subject; this subject is a model element, such as a part and for the use cases to behave as parameters, the Director property must have a defined value. A use case has an objective, and the objective of the use case is to provide an observable result of value to one or more of its actors. A use case is typically specified as a sequence of interactions between the subject and the various actors. These interactions can be modeled as a message. This following image shows Use Cases used in a System Structure Diagram.
You can decompose / nest (create inside an existing element symbol) use cases in the following ways:
Use drag and drop to nest the items
Use the context menu to create a nested item.
Create a nested item from the diagram.
Creating Use Cases
You can create Use Cases from the System Structure Diagram toolbar and also from the context menu.
To create Use Case from the diagram toolbar:
a. On the System Structure Diagram toolbar, click the Use Case button.
b. Click on the diagram canvas. This creates a Use Case.
To create a Use Case from the context menu, tight-click the package in which you want to create the Use Case and select New > SysML2 > Requirements > Use Case.
You can use SysML1 Use cases within a SysML 2.0 model although with limited ability to link to SysML 2.0 elements.
Subjects and Actors
Every Use case should have a subject, which is a model element, such as a Part. Such Parts can also be Actors within the Use case if the Direction property of the Part is set to an appropriate value. To illustrate this, consider the following example.
1. Create a System Structure Diagram. Right-click on a SysML 2.0 model or a package and select New > SysML2 > Structure > System Structure Diagram.
2. Create a Use case.
3. Create two Parts inside the Use case.
4. Change the Direction property of Part1 to in and the Direction property of Part2 to out. This changes the characteristic of Part2 to be the Actor within the Use case.
Was this helpful?