Boomi: mapping of complex ASN structures: part VII – adding the map to the process and testing

Part I, Part II, Part III, Part IV, Part V, Part VI

Now get back to the process, and add a Map Shape between the XSLT and Stop Shapes. Connect all the shapes one by one:

Save the process and test it:

Your output should look like this:

BSN*00*1234567890*20221130*0102
HL*1**S
HL*2*1*O
PRF*PO-0000001
HL*3*2*P
MAN*GM*P1
HL*4*3*I
LIN**BP*Product A
SN1**100*KG
HL*5*2*P
MAN*GM*P2
HL*6*5*I
LIN**BP*Product A
SN1**100*KG
HL*7*2*P
MAN*GM*P3
HL*8*7*I
LIN**BP*Product B
SN1**90*KG
HL*9*2*P
MAN*GM*P4
HL*10*9*I
LIN**BP*Product B
SN1**90*KG
HL*11*2*P
MAN*GM*P5
HL*12*11*I
LIN**BP*Product A
SN1**20*KG
HL*13*11*I
LIN**BP*Product C
SN1**90*KG
CTT*13

As you can see it is exactly what we needed to get. There are a few things like cross-reference lookup for converting Units of measurement from UN/Recommendation 20 used in SAP into X12 ID 355, but you should be able to do it yourself.

This is how I would do such map. One more time, I love XSLT and can use it for very complex data transformations. This is why I decided to use it here instead of writing the logic in JS/Groovy.

PS there is another approach with XSLT for such maps – I can create an XML profile for X12 856 and generate a map between this XML and 856 (almost automatically using Boomi Suggest) and use XSLT to create EDI in XML format – in this case you would need to take care of HL-01/02 and CTT-01, but probably it would be even faster than the way we just reviewed.

PPS if there is enough interest to these lessons I’ll demonstrate how to use XSLT for non-XML to XML mapping.

Gennady Kim

2 thoughts on “Boomi: mapping of complex ASN structures: part VII – adding the map to the process and testing

  1. Pingback: Boomi: mapping of complex ASN structures: part VI – creating a map from the intermediate XML into X12 856 | EDI shortcuts

Leave a comment