Message Enricher

Message Enricher

Message Enricher

The Message Enricher is a Service which can enrich the MessageParts in the ConnectMessage. This means you can change MessageParts or even create them.

 

In the table below, you will find an explanation about these properties. All attributes with a ‘*’ are mandatory.

 

Attribute

Description

Name*

By default, we fill this out with the technical ‘tag’, followed by a serial number. Changing the name is optional.

Enabled

Set this value to true, if you want this service to be enabled at startup

Overwrite

Here, you can specify whether the existing properties have to be overwritten by choosing ‘true’ or ‘false’. On default the properties will not be overwritten.

Messagepart

Here, you can change or create MessageParts.

By pressing  , you can create one or more extra MessagePart property lines. The MessagePart properties are explained in the table below. You can also remove a MessagePart property line by pressing the   button next to the MessagePart property line you want to remove.

 

In the table below, you will find an explanation about the properties of a MessagePart. All attributes with a ‘*’ are mandatory.

Attribute

Description

Message Part function

Function to execute on the ConnectMessage. When using 'move' or 'copy', you should define the 'Source Part Name' from where the part will be copied or moved to the part named in 'Part Name'. 'Add' and 'delete' are used to add or delete the part named in 'Part Name'.

Part Name*

Name of MessagePart to add. Use this field to define the MessagePart's name. When using Add, Move, Copy a new MessagePart with this name will be created if it does not exist yet.

Part value

Value of MessagePart to add. Use this field to define the MessagePart's content.

Part type

Type of the value of the MessagePart. You can choose between TEXT, BYTE_ARRAY, DOCUMENT, FILE and OBJECT. By default this is set to TEXT.

Source Part Name

Name of the source MessagePart for either copy or move operations.

Overwrite existing value

Here, you can specify whether the existing MessagePart has to be overwritten by choosing ‘true’ or ‘false’. On default the MessagePart will not be overwritten.

  

Working with header properties in other components

If you are using message enrichers to influence header properties in other components you need to know that values modified or added to a header of a messages or message part, take preference above the values of the component itself. This is not always visible in the component using the header properties. The values added in the component may not be used at all. In some cases you must enter a value into the specific field of a component, but you know already that this value will not be used, but extracted from a header property. If this is the case and you know you will use a header property for a specific field, type a field value that indicates that this value will be replaced/overruled by a header property. For instance: header-value or dummy.

For instance create a header enricher and add the header 'header1' with value 'thisisatest'.

add a message enricher where you add a TEXT part with the name mypart and the value :headers[header1]

Now add a FileDrop and check the file dropped. It you you put a empty file in, with a FilePickup, you should see the text in the output file.