Mappings

What are Mappings

Mappings represent the SMARTUNIFIER component that define when and how to exchange/transform data between two or multiple Information Models. In other words, it is acting as a translator between the different Information Models. One Mapping consists of one or multiple Rules. A Rule contains a Trigger, which defines when the exchange/transformation takes place, and a list of actions that are defining how the exchange/transformation is done.

How to create a new Mapping

Follow the steps below to create a new Mapping definition:

  • Go the Mappings perspective by clicking the “Mappings” button (1)

MappingTable
  • Following screen containing a list view of existing Mappings is displayed

  • In order to add a new Mapping, select the “Add Mapping” button at the top right corner (2)

MappingTable
  • On the following screen provide the following mandatory information: Group, Name, Version and a Description which is optional (3)

  • Click the “Add Model” button (4)

  • Select the Information Model for this Mapping and enter a name for it (5)

  • “Remove Model” button (6) removes the Model

  • After all mandatory fields are filled in, the “Save” button at the top right corner is enabled. Click the button to submit the new Mapping (7)

  • The newly created Mapping is now visible in the list view

AddNewMappingWithoutRules

How to create Rules

Follow the steps described below to create Rules:

  • Select the “Edit” button (1).

ListMappingEdit
  • Select the “Add Rule” button at the top right corner (2).

  • Two options are available:

    • Single Rule

    • Multi Rule

Note

Make sure to select Single Rule if you want to build up a rule using the code editor!

EditBMappingView

Rule Naming Convention

The name of the Rule should indicate what logic is executed when the Rule is triggered. Some examples are described below:

Example Scenarios

Good Naming

Inserting data into a database

Database_Insert

Executing a POST/PUT request on a REST server

Update_Data

Reacting to an input (e.g., StartOrder button on a MES)

StartOrder