Element Creation Mappings
To start mapping your model with Virtual Bench, you must have imported your types and flows, according to the method described in the related page.
WHAT IS IT?
Create an element creation mapping allows to dynamically create an element during the execution of the scenario.
CREATE AN ELEMENT CREATION MAPPING
Create mapping from an executable
In the example below, we are going to create a mapping that will create a "text" when the flow "alert user that the program is finished" is received.
First, you have to go to the "Executable" list, in the specific project tab.
- You can create an Element creation mapping, by clicking on the "Create an element creation mapping" button:


- Clicking on "Next", you will open the editing page which will allow you to configure the element.

- Click on "Save" to add this mapping to the list of existing mappings.

- You will then need to instantiate your element creation mapping in the Scenario tab by clicking on the '+' button, as shown below. Finally, you will need to select the type of element to be added, the context in which you want to add it, the websocket connection concerned and finally the name of the element creation mapping.

ADD DYNAMIC MAPPINGS

When you edit the element creation mapping, you can add dynamic mappings to the created element. These mappings will enable the dynamically created element to send a flow under certain conditions, or to modify the element when receiving flows. There are several possibilities for the dynamically created element: receive a Model to Simu flow, receive a Simu to Simu flow or send a Simu to Model flow.
In order to be available, the mapping must be defined beforehand. Moreover, the type of the element you instantiate must also be the same as the type to which your mapping applies. To create a mapping, follow one of these three methods: create model to simu mapping, create simu to model mapping, create simu to simu mapping.