JBoss Community Archive (Read Only)

Savara

Scenario Simulation

The scenario simulation is triggered either using the button on the toolbar, or the "Scenario->Simulate" menu item on the context menu associated with the diagram background:

images/author/download/attachments/19693826/ScenarioSimulateButton.png

This will display a dialog window to capture information used to simulate each of the roles defined in the scenario, e.g.

images/author/download/attachments/19693826/ScenarioSimulationDialogEmpty.png

The next step is to associate a model with one of the roles. This is achieved by selecting the "..." button next to the model field, which allows the user to select the model file. A model file can be anything - if the file is a supported representation, then its selection will result in the "Model Role" and "Simulator" combo boxes being populated with valid values.

The "Model Role" field displays a list of roles that are derived from the selected model. This enables the role name defined in the scenario (shown in blue associated with the border), to be associated with the role within the model.

The "Simulator" field displays the list of simulators that can be used to validate the scenario against the model. Some model types may have more than one simulator implementation - this will be discussed more in subsequent sections. When a new simulator is selected, then the "Model Role" list will be updated based on the list of model roles determined by that simulator.

Once the first model has been selected, the user will be prompted to ask whether the same model should be used for all roles in the scenario.

images/author/download/attachments/19693826/ScenarioSimulationModelSelected.png

If the model that was selected was specific to the role (i.e. it represented an implementation just relevant to the particular role), then press the No button. However if the model is associated with more than one role in the scenario (i.e. a choreography), then pressing the 'Yes' button populates the simulation dialog, using the "best guess" to select the model role relevant for the scenario role.

images/author/download/attachments/19693826/ScenarioSimulationAllModelsSet.png

When the "Simulate" button is pressed, then message events (associated with the specific roles) in the scenario are simulated against the models specified in the dialog. If the message event is valid, its node will be displayed in green. If however the event is unexpected, then it will be displayed in red. When this occurs, either select the role, message link or particular red node, and then pick the "Simulation Log" tab at the bottom, to see log information returned from the simulator regarding the erroneous role or events.

NOTE: If a scenario 'message event' has been marked as 'Error Expected', then it will be displayed with a red border - but when simulated, the color within the message event node will be green if the node failed as expected, but red if the event did not generated an error.

images/author/download/attachments/19693826/ScenarioSimulationSimulated.png

Finally the simulation can be reset,

images/author/download/attachments/19693826/ScenarioSimulationReset.png

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 09:36:01 UTC, last content change 2012-05-18 21:45:00 UTC.