Trigger related

The following table provides the trigger related EL expressions.

Routing EL expression Example
string getFileContent (string filePath, int beginIndex, int length, string charset)

Returns a string that is a sub-string of the file’s content.

Example:

When the file contains 1234567890 the getFileContent (file, 1, 3, "UTF8") will return 234.

string getFileContentTail (string filePath, int beginIndex, int length, string charset)

Returns a string that is a sub-string of the file’s content. The reading of the file begins at the end.

Example:

When the file contains 1234567890 the getFileContentTail (file, 1, 3, "UTF8") will return 789.

byte[] getFileContentBytes (string filePath, int offset, int length) Reads up to the specified number of bytes of data starting from a specified offset into an array of bytes from the beginning of the file. An attempt is made to read as many bytes as possible, but a smaller number may be read.
byte[] getFileContentBytesTail (string filePath, int offset, int length) Reads up to the specified number of bytes of data from a specified offset into an array of bytes starting from the end of the file. An attempt is made to read as many bytes as possible, but a smaller number may be read.

The functions which return a string can be used in Expressions and Predicates for route triggering, as well as in other fields in which the expression language is supported.

The functions which return bytes cannot be used in Expressions and Predicates for route triggering. The extraction of file is used for file content composition (for example, trigger file content in a Send To Partner route step).

Note When functions which return bytes are used in trigger file content, they cannot be combined with string functions, because bytes will be written.
Note The filePath parameter must contain an absolute path and should be written under home folder of the user who is triggering the corresponding route.

Related Links