Skip to Content
Technical Articles
Author's profile photo Alexander Bundschuh

Best practices ESR in Eclipse – Part 6: Mapping

This is the sixth and last blog in a blog series about new capabilities in ESR in Eclipse. If you want to get an overview of all features that have been shipped with SAP Process Orchestration 7.5 SP02, check out the blog Best practices ESR in Eclipse – Part 1: Overview of new capabilities with 7.5 SP02. In the current blog, I will cover new capabilities that were built into the mapping tool in ESR in Eclipse.

Expand and collapse

When the source or target structures used in a message mapping has deep nested structures, navigating through this is easier with Expand All and Collapse All options. In the message mapping editor, select the respective node in your structure, and select Expand All from the context menu.

SNAG-0000.png

This expands the whole structure.

SNAG-0001.png

Default matcher

Default matcher allows you to automatically map fields with same structures. This helps you to accelerate the creation of mappings where structures resemble each others. This is actually not a new feature, however I like to show this here since this is somehow hidden and hence not known to many. If you like to map similar structures, select the respective node in the source structure via right mouse click, and drag&drop it to the respective node in the target structure. Important here, you need to click on the right mouse and not the left.

SNAG-0003 - Copy.png

When dropping, select Execute Default Matcher from the context menu.

SNAG-0006.png

Fields with same names are automatically mapped.

SNAG-0007.png

Easier connection

So far, connecting the mapping bricks in a field mapping was a bit hard since the connection dots were too small. Now, when you hover over a connection dot, it enlarges a bit so that you can better grab it.

SNAG-0001.png

Error markers

In message monitor, error marks on each target field are shown, if the field is mandatory but not mapped, or if the mapping for this field is incomplete. In the Problems view, you get all errors displayed. From there you can fix the errors in the message mapping by navigating to the respective field which is in error.

SNAG-0002.png

Copy mapping expressions

When creating a new field mapping in the message mapping you may re-use complex expressions that you have already modeled in another field mapping, and hence saving effort and time. In the graphical expression editor of your message mapping, select the last brick of your mapping expression that you like to re-use, and select Copy from the context menu.

SNAG-0000.png

As you can see below, the highlighted expression is taken into the clip board.

SNAG-0001.png

Open the other field mapping, and select Paste from the context menu.

SNAG-0002.png

The copied expression is pasted into the expression editor.

SNAG-0003.png

Show value of constant function

For the standard Constant mapping function, so far you have to open each Constant brick to display the actual constant value. Now, the actual value is displayed without need of opening the bricks; if the value is too long to fit into the width of the brick, you can hover over the brick, and the value is displayed in the tool tip.

SNAG-0000.png

Display queue

When developing new mappings tracking the input and output queue of each mapping brick in your field mapping helps to test whether your mapping functions correctly. This can be done via the display queue capability. This feature is already supported from releases 7.31 SP16 on. As a prerequisite, you need to create a new configuration where you store the input sample file. Select the message mapping, and select Run As –> Run Configurations from the context menu.

SNAG-0000.png

In the upcoming dialog, create a new configuration. Here, maintain message mapping and sample input file.

SNAG-0001.png

In the message mapping editor, select a mapping brick and select Display Queue from the context menu.

SNAG-0002.png

This opens a new Display Queue tab where the mapping queue including context changes are displayed based on values from the input field.

SNAG-0003.png

This closes the blog series. Hope the information provided in the blog series is useful for you in your daily work, and helps you to find your way in the ESR tooling in NWDS. A list of all blogs in the blog series can be accessed from here Best practices ESR in Eclipse – Part 1: Overview of new capabilities with 7.5 SP02.

Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Eng Swee Yeoh
      Eng Swee Yeoh

      Hi Alex

      Thanks for sharing all these new capabilities in the ESR perspective. Really glad to know that the major functionality gaps are now closed especially these ones in the area of mapping.

      Keep up the good work at SAP Labs! 🙂

      Regards

      Eng Swee

      Author's profile photo Derek Colley
      Derek Colley

      Thanks for sharing!

      In this article we can see how to test a Message Mapping in Eclipse.

      Would you have any info/guidance on using the resulting XML with a tool like XMLUnit to automate (ala. CI/Jenkins) the unit tests?

      Author's profile photo Derek Colley
      Derek Colley

      ... and my next question(s):

      • automate the testing of receiver determination
      • automate the testing of ICO (inject the inbound message and catch the result, and compare the XI 3.0 to test routing and mapping [payload])

       

      Author's profile photo Matthias Fricke
      Matthias Fricke

      The described option for auto mapping seems not to work.

      1. I have exactly the same source and target message
      2. I drag source message onto target message using right mouse pointer as described
      3. The option "automatically connect" appears as desired
      4. If I select this option nothing happens

      ??