For Corticon to correctly process the request message, you must ensure that XML or JSON tag names map to entity and attribute names in the Corticon rule Vocabulary.

By default, Corticon Studio specifies the entity or attribute name as the XML Element Name. If XML or JSON tag names are different from the entity or attribute names, you need to prepare the Vocabulary by manually mapping them.

Our project Vocabulary looks like this:

media/image4.png

Notice that the request message contains two tag names ‘Shipment’ and ‘itemWeight’ that do not appear in our Vocabulary. They correspond to the Cargo entity and the Cargo.weight attribute.

You need to prepare the Vocabulary by manually mapping ‘Shipment’ to Cargo and itemWeight to Cargo.weight:

  1. Open the Vocabulary file Cargo.ecore in the Tutorial-Done folder.
  2. On the Vocabulary menu, choose Add Document Mapping > Add XML/JSON Mapping.
  3. Click the Cargo entity. In the XML Element Name property, you can see the default name ‘Cargo’ in grey.
    media/image6.png
  4. Change the default name by double-clicking the property value and then entering Shipment.
    media/image7.png
  5. Similarly, change the XML Element Name for the weight attribute in Cargo to itemWeight.
    media/image8.png
  6. Save the file.

You have now prepared the Vocabulary.