Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Below is some additional information and examples about what can be achieved within a Script Rule.

Script Context

(info) We host our own utilitiy class javadoc on S3, e.g. http://ppl-docs.s3-website-us-east-1.amazonaws.com/JEMH/4.1.33/com/javahollic/jira/emh/api/IJEMHVelocityContextUtils.html

API

Notes

message.getBody()

Get body content of email. Not available for preprocessing task.

message.getSubject()

Gets the Subject content of email.

message.getAllHeaders()

Get all headers of a message.

message.getHeader(name)

Get value of a message header

Parameters

  • name the name of the header to get

message.setHeader(key, value)

Set the value of a message header

Parameters

  • key (String) the name of the header to set

  • value (String) the value of the header to set

print(str)

Adds output that is recorded during execution and shown in the processing report.

Parameters

  • str (String) the string to be recorded

setOutcome(outcome, reason)

Set the processing outcome of the script

Parameters

  • outcome (String) the outcome type

  • reason (String) the reason for the outcome

Note: outcome must be written in all capitals. Valid outcomes are (IGNORE, FORWARD, DROP)

resultMap

Field processor and Script Rule only. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map

RegExp

Searches within string values for matching content.https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp

setMatch(true)

This is used to define that the script rule is a match. This will result in that Rule and Project being used to process the email.

...