You can use Magic Model Analyst to simulate a Use Case model or diagram. This section illustrates the steps to simulate the Use Case model.
To simulate a use case model
Create a use case diagram. See the following example of a Use Case diagram. The figure shows the Use Case diagram in a block (a subject can be either a block or a class).
- Either right-click the Use Case diagram in the Containment tree and select Simulation > Run or click on the diagram toolbar to run the model. The classifier behaviors in the Use Case diagram are run during simulation. Magic Model Analyst creates a window to represent each Actor in the diagram (the preceding figure shows four actors: Worker1, Worker2, Worker3, and Worker4.
You can click the button, which represents what Use Case the Actor can perform, in each window to simulate it (the following figure shows the buttons Change Color and Paint).
Note
The Block connected by the Association with a Use Case is shown as an Actor, e.g. Worker3, so any Use Cases connected are shown as buttons in the GUI window of the Actor. Also, the image of the Block is shown according to the selected Image above the list of Use Case buttons.
The following figure shows the Actor's name and title, and the buttons (Change Color, Paint) representing the Use Cases the actors can perform. Once you click the button, Magic Model Analyst uses the subject (Worker1, Worker2, Worker3, and Worker4) as the context to access the Classifier Behaviors of the Use Case diagram or read the values of the properties. If the Use Case has no subject, Magic Model Analyst will run the Classifier Behavior of the Use Case. You can change the values of the properties in the Variables pane. You can import an image to represent an Actor through the Actor Specification window.
Actions associated with actors within a Use Case diagram.