Creating a payload of
freeform text
Freeform gives you the ability to provide specific text anywhere within the output data. You can compose the content and then add other values within the text using macros and mapped variables.
- On the Transport Map window, under the
ToEnterprise
section, click the Format down-arrow,
and then select Freeform
When Freeform is selected as the format, the payload is ASCII encoded.
The To Enterprise section changes to accommodate the freeform format. - Click the Line Delimiter down-arrow to display these
options.
CarriageReturnLineFeed
Carriage return line feed. This option is used in conjunction with custom text to insert the carriage return code (0x0d0a) when the destination of the output is on a Windows platform.
LineFeed
Line feed. This option is used in conjunction with custom text to insert the carriage return code (0x0a) when the destination of the output is on a UNIX-based platform.
The CarriageReturnLineFeed and LineFeed options are used to insert a platform specific carriage return code into the freeform output payload. A hexadecimal code for each option is the code that is used to represent the line feed characters internally. For example if you know that the ultimate destination of the payload is on a UNIX-based platform, you must choose LineFeed as the line feed character instead of pressing the Enter key using the keyboard. If you use the Enter key and you are running the Workbench on Windows, then the wrong carriage return character would be entered in the free form text.
Using the Custom Message box, you can type a message and then add a macro or map variable. If map variables are required, you can create them using the Input tab at the top of the Transport Map window. When they are added to the Input tab, they also become available to add to the message. - In the Custom Message box, type the text to
use.
- From the right pane, double-click the macro that
you want to add. The macro is added to the message at
the cursor insertion point.
For this example, the timestamp macro was added.
If map variables are required, they will appear in the list under the macros. You can also double-click a map variable to add it to the text message; however, you must associate the map variable to a device variable on the trigger definition. At runtime, when the trigger executes, the value of the variable is added to the text message. - To test the freeform message, click
Validate.
A window appears with the sample output results. - To close the window, click
OK.
- To save the transport map, click Save.
The transport map becomes available to be used as an action in a trigger. If you are using map variables in the freeform text, you must also associate the map variables in the trigger action definition.