Develop a message flow and message model for simple and complex element mapping

This is the first stage of the scenario to perform simple message enrichment. This topic demonstrates how to develop a message flow and message model for simple and complex element mapping, where there is the same source and target, a different source and target, or an attribute source and target. This task also involves changing field values and creating an instance document.
  1. From the Broker Application Development perspective, create the following resources:
    1. a message set project
    2. a message set called MAPPING3_SIMPLE_messages. Ensure that the message set is namespace enabled with XML wire format.
    3. a message definition file (no target namespace) called SIMPLE.
  2. Create a message called addev1 that has the following structure:
    addev1
            ssat          (xsd:string) local attribute
            ssel          (xsd:string) local element
            dsel1        (xsd:string) local element
            atel           local complex element
                 latt       (xsd:string) attribute
            cel1          local complex element
                 intel     (xsd:int) local element
                 strel     (xsd:string) local element
            dsel2         (xsd:string) global element
            cel2           (cel2ct) global complex type
                intel        (xsd:int) local element
                fltel         (xsd:float) local element
  3. Create a message flow project called MAPPING3_SIMPLE_flows.
  4. Create a message flow called addev1 that contains the following mapping: MQInput -> Mapping -> MQOutput.
  5. Open the map in the Message Mapping editor and select message addev1 as both source and target
  6. Expand all levels of both messages and wire the elements as shown:
    ssat --- ssat
    ssel --- ssel
    dsel1 -- dsel2
    latt ---- latt
    cel1 --- cel1
    dsel2 -- dsel1
    (cel2)
       intel ---- fltel
       fltel ---- intel
  7. In the Spreadsheet pane, set the following expression:
    dsel1  |  esql:upper($source/addev1/dsel2)
    @latt  |   esql:upper($source/addev1/atel/@latt)
    (cel2)
        intel   |  $source/addev1/cel2/fltel + 10
        fltel    |  $source/addev1/cel2/intel div 10
  8. Create an instance document with the appropriate RFH2 header and the following data:
    <addev1 ssatt="hello">
    <ssel>this</ssel>
    <dsel1>first</dsel1>
    <atel latt="attrib"/>
    <cel1>
    <intel>2</intel>
    <strel>lcomp</strel>
    </cel1>
    <dsel2>second</dsel2>
    <cel2>
    <intel>252</intel>
    <fltel>3.89E+1</fltel>
    </cel2>
    </addev1>
You have created the following resources:
Now deploy the message set and message flow.

Deploy the message set and message flow

This is the second stage of the scenario to perform simple message enrichment. This topic demonstrates how to deploy the message set and message flow and run the data through the broker.
  1. Create a broker archive (bar) file called addev1.
  2. Add the message set MAPPING3_SIMPLE_messages and the message flow addev1 to the bar file.
  3. Deploy the bar file to the broker.
  4. Put the instance document on the input queue.
The output message looks like this:
<addev1 ssat="hello">
<ssel>this</ssel>
<dsel1>SECOND</dsel1>
<atel latt="ATTRIB"/>
<cel1>
<intel>2</intel>
<strel>lcomp</strel>
</cel1>
<dsel2>first</dsel2>
<cel2>
<intel>48</intel>
<fltel>2.5E+1</fltel>
</cel2>
</addev1>