User GuideReference ManualIntegration Scenarios
 

2.2.6. Get attachment from the received PDF/ZIP

See: Managing Channels - Message Edit Functions

You can now get any number of attachments from the received PDF/ZIP, in Message In

If you have any files that you want to send as attachment with the message out, you can simply add it to the message in by add the properties described here under as new properties in the Advanced Properties of your Message In definition.

Advanced properties of the Message In definition

Figure 2.26. Advanced properties of the Message In definition


The parameter can be created directly using the link in the advanced properties or you can add it manually by the following

Enter the value in the Property name field and its value in the Value field as illustrated in the above figure. Click on the Add command to validate this property or on the Remove command to erase it.

The properties that should be added to detach your file are:

attachment:a_name_you_choose

"a_name_you_choose" is reference to the file(s) during the processing

Value: like timesheet.xls or timesheet.*\.xls or .*\.doc is regex pattern to match the file(s) in PDF/ZIP. For instance, [timesheet.*.xls] this will match the following files: timesheet.mpa.xls and timesheet.mco.xls

The comma separated list of matching files name is binded in the metadata of the message with the name [attachment:a_name_you_choose]

To put it back on the produced PDF/ZIP, in Message Out add the following parameter in Advanced Properties section

attachment:a_name_you_choose

"a_name_you_choose" is name you choosed in the Message In section

Value: like timesheet{com_babelway_messaging_context_message_reference}.xls is name to use to store the file in the PDF/ZIP. Note that all the files matching the pattern specified in the Message In section will be attached.

To reuse the original attachment names, simply use the following metadata: {com_babelway_messaging_current_in_attachment_name}

Special features:

If you want to preserve the original message, you can use a special value as explained below:

attachment:original_zipped

Value: {com_babelway_messaging_context_message}

This will store the original message in its zipped / pdf... format in a metadata [attachment:original_zipped]

attachment:original_unzipped

Value: {com_babelway_messaging_context_message_unwrapped}

This will store the original message in a metadata [attachment:original_unzipped]