User GuideReference ManualIntegration Scenarios
 

1.6.1. Drag and Drop Transformation

See: Managing Channels - Channel Items

Drag and Drop transformation visual editor enables to easily define transformation rules and implement transformation functions.

When specifying transformation for the first time or when changing transformation type, click on Open catalogue command and choose a drag and drop transformation from catalogue. Please refer to The Catalogue chapter for more informations about catalogue use and commands.

If you create a copy from a Babelway template you must name this copy before accessing the visual editor screen.

Drag and drop transformation visual editor

Figure 1.53. Drag and drop transformation visual editor


This transformation visual editor is divided in three panes:

  • The left pane displays incoming message definition tree plus, in first position, the Metadata node and in last position the Transformation functions node. See the Metadata chapter for more information bout their use.

  • The right pane displays outgoing message definition tree plus, in first position, the User defined metadata node. See the Metadata chapter for more information bout their use.

  • The bottom pane lists set up transformation rules.

Nodes mapping

To map an incoming message node to an outgoing message node, you only need to click on incoming message node in left pane then to drag it to right pane and drop it on outgoing message node as illustrated by arrow (1) in following figure.

As illustrated by arrow (2), the icon of nodes that are already linked displays a little chain mark.

Please note that before being able to map two nodes, parent loop nodes must be already mapped. In illustrated example, mapping (2) must be done before mapping (1) is possible.

Drag and drop mapping example

Figure 1.54. Drag and drop mapping example


All defined mapping are listed in Transformation rules table, one per table line, with following fields:

  • Type: node type.

  • Source Field: can be either a node from message in definition or a transformation function.

  • Target field: a node in message out definition.

  • Filter: you can add a filtering rule to be applied on loop elements. See Filter Function chapter for more informations.

  • If: you can add an evaluation rule to be applied on node value. See If Function chapter for more informations..

  • Format: you can add a formating rule to be applied on output value. See Format Function chapter for more informations..

Multi nodes mapping

Visual mapping is able to map two message definition tree structures. When mapping an element having children to another element having similar children structure, the system will offer you to automatically map children and loops based on their names or uid similarities. This is a very valuable when dealing with complex and often similar XML messages like in soap messages, IDOC or UBL...

Please note that this function could is eavy and might freeze your browser for a little time, specially in Firefow browser. Be patient, the system is working for you...

Multi mapping confirmation box

Figure 1.55. Multi mapping confirmation box


Transformation functions

In addition to direct mapping, you can add one or more transformation rules. Right-click on Transformation functions in message in left pane. See Message Transformation Functions for a complete list of available functions and how to use them.

In following example, a multiply operator is selected as transformation function.

Transformation rule selection example

Figure 1.56. Transformation rule selection example


Once desired function is selected and named, it appears in transformation functions list in message in pane. This specific function, multiply, requires two nodes as arguments. Once again drag and drop both selected nodes on this function as illustrated in next figure with arrows (1) and (2).

Mapped nodes are listed under transformation function and may be removed by right-clicking and selecting Remove command.

Transformation rule mapping example

Figure 1.57. Transformation rule mapping example


Once the transformation function is defined it can be in turn, mapped to a message out node. See arrow (3) on previous illustration.

Transformation functions may also be cascaded using the same drag and drop mapping. A transformation may be used as argument for another one as illustrated below with a second multiply operation that takes previous result as argument.

Nevertheless, you should make sure that you do not create unconsistent mapping by mapping one item to another one and at the same time mapping them the other way.

Transformation rule mapping example

Figure 1.58. Transformation rule mapping example


Once all your mapping and transformations are ready and additional filter, if and/or format entered, do not forget to save this transformation with Save button.

Advance properties

Optionally you can set some advanced properties like

output.notransform

= true ->do not apply transformation to the message. This is useful to create user metadata without modifying the message. It can be used in conjunction with input.binary

input.binary

= true -> the input is binary. This is useful, for instance to create a message out based on metadata only or in conjunction with output.notransform