Message Transformation Application

You can perform following operations on a Message Transformation Application.

Viewing and Editing Properties

The following properties can be specified:


Figure: Properties - Message Transformation Application

In case you switch to the Integrator profile, UUID and ID options are displayed additionally.


Figure: UUID and UI Properties

Parameters

Arbitrary set of Input and Output Parameters can be created. Accordingly the data mapping should be done.

Configuration

To configure message transformation application, you need to provide source and target messages. Once you define the In and Out parameters in the Parameters pane, the source and target message gets configured automatically.


Figure: Configuration

Note that for the Message Transformation application, the output access point should be set to Target message, by default.

Testing the Message Transformation Application

Test - Click the Test tab. You can test the mapping of the messages using this option.

Comments

Comments - Click the Comments tab to add comments for the application. To add the comment, specify the comment in the text box and click Submit. The newest comment gets displayed at the top of the table. To delete the comment, select the comment and click the Delete icon. The user, who has submitted the comment, only that user can delete the comment. If the other user selects the comment or no comment is selected, the Delete icon remains in disabled state.


Figure: Comments

Filter Field Options

All filters except the text filter can be switched on and off with icon select buttons grouped above the tree views for input and output messages. The filter buttons support the selection of:

Text Filter

The text filter text box for source and target messages as a text entry field is displayed at the right of the other filter buttons.

The text filter allows entering space-separated filter strings. Entering filter strings initiates a case-insensitive OR-filtering of the names of all fields in all source or target messages for the containment of the specified strings. For example, when entering "hello world", there will be a filter for the words "hello" and "world". Every change in the filter string entry except adding leading or trailing spaces initiates a new filtering. The retrieved fields are displayed and if necessary, tree nodes are expanded. All other field tree nodes are omitted. The scrollpane of the tree is scrolled to the first retrieved entry. The retrieved fields are neither highlighted nor selected. The message names themselves are not filtered. The top level tree nodes representing messages are always kept visible.


Figure: Text Filter

Display only highlighted fields

To display only the highlighted fields, click the following icon.



Figure: Display Highlighted Fields

Display only non-highlighted fields

If the highlighted fields are displayed, the icon becomes grey to display only non-highlighted fields.


Figure: Display Non-highlighted Fields

Display only fields with mapping expressions

Click the following icon to display only the fields which have mapping expressions. This icon is displayed only for the target message.



Figure: Fields with Mapping Expressions

Display only fields with no mapping expressions

Click the following icon to display only the fields which have no mapping expressions. This icon is displayed only for the target message.



Figure: Fields with No Mapping Expressions

Display only fields whose mapping expression is invalid

Click the following icon to display only the fields whose mapping expression is invalid. This icon is displayed only for the target message.


Figure: Invalid Mapping Expressions

Creating Mapping Expressions

You can drag and drop the single source element on target element. A 1:1 mapping expression gets created in the Mapping column. If the types do not map a type conversion is introduced. If you select the row in the Target Message, the mapping expression is displayed in the Expression Mapping section.


Figure: Single Source Field Mapping Expressions

If a complex source field is dragged and dropped on a complex target field, all fields in the complex source field are mapped to fields in the target field whose names are equal or similar to the names of the source fields.


Figure: Complex Field Mapping

JavaScript Editor

Every mapping is performed as the evaluation of a JavaScript expression with preceding supporting statements or function definitions. The mapping expression contains a single expression which describes the content of the corresponding field in the output message for which the mapping is defined. The mapping expression can be interpreted as an assignment, for example:

<output message field> = <user-defined function>(<input message field>) +
        <JavaScript function>(<input message field>);

The JavaScript editor has following features:

Drag and Drop Source Element

You can drag and drop source element to JS editor.

Basic Mapping

Basic mapping expression can be created by drag and drop of data from source to target data. You can choose the basic mapping expression, if you like to return the value of the expression editor directly to the selected message. For example:


Figure: Basic Mapping

The message field name of the selected target message is added automatically on top of the mapping field. The value of the expression is returned to that message after evaluation.

Syntax Highlighting

The editor highlights keywords and variables in different colors.

Auto Indentation

The JavaScript editor supports auto indentation as you go on adding the code.

Active Line Highlight

When you click in the JS editor or as you add code in it, the active line is highlighted in pale blue color.

Undo / Redo

You can use Ctrl+Z and Ctrl+Y to undo and redo the last operation in the JS editor.

Line Numbers

The line numbers are displayed at the left side of the editor.

Auto-completion

The editor provides auto-completion for code keywords and all available message data. Pressing Ctrl+Space provides you with the according proposals. Auto complete feature also displays the list of available functions on the selected data.


Figure: Replace the string With