Advanced

The Advanced tab contains the following fields:

Field

Description

Provide Raw Message

When checked, this field specifies that the whole message is to be provided in binary form. The output schema changes to include an element named rawMessage that contains the message instead of bodyText and mimeEnvelopeElements.

The Receive Mail process starter uses the javax.mail API. This API assumes that the content type of the message is multipart/mixed. When the multipart subtype is not mixed (such as multipart/signed or multipart/alternative) or when another content type is used (for example application/*), the javax.mail API may not correctly parse the message. Checking this field allows you to send the raw message to a Java Code activity that uses the Java Activation framework to implement the appropriate handlers to process the message. For more information on how the Java Activation framework can be used for this purpose, please consult the API documentation for javax.activation and javax.mail.

You can also feed the binary message to the javax.mail.MimeMessage constructor in the form of a java.io.InputStream to construct a MimeMessage object. In that case, the default javax.mail API handler is used.

Write to File

Checking this field specifies that incoming messages whose body and attachments (or raw message size if the Provide Raw Message field is checked) exceed the specified threshold size should be written to a file instead of stored in memory. This allows you to accept large incoming messages without consuming a great deal of memory. When this field is checked, the Directory and Threshold Size fields appear.

Leaving this field unchecked specifies that incoming messages should be kept in memory.

Note: Once written, the files created by using this option are not deleted automatically. You must manage the storage used by these files and delete them when they are no longer used.

Directory

The directory to write messages that are above the specified threshold. The process engine does not attempt to create the directory if the specified directory does not exist. Therefore, create the directory before starting the process engine.

Create Non-Existing Directories

When checked, all directories in the path specified in the Directory field are created, if they do not already exist.

If this field is unchecked and there are one or more directories in the specified path in the Directory field that do not exist, an exception is raised.

Threshold Message Data Size

The maximum size (in bytes) of an incoming message that can be kept in memory. Messages larger than the specified size are written to a file in the specified directory. The file’s name is output so that subsequent activities in the process definition can access the file and read its contents.

Specifying zero (0) in this field causes all incoming messages to be saved to a file.