Configuring Arbortext Publishing Engine > Setting Configuration Parameters > Specifying Queues > Configuring a Notifier
  
Configuring a Notifier
You can configure a transaction notifier to report the progress of a queued transaction. An example is a notifier that can send email notification to a client when a queued transaction has been completed.
Notifiers are configured in e3config.xml. A notifier accepts parameters that control its operation, as well as an optional TestSet to respond only to certain types of transactions. A notifier Java object implements the class com.arbortext.e3.E3Notifier, found in:
PE_HOME\lib\classes\pecommon.jar
A sample Java notifier is available in:
PE_HOME\e3\samples\java\com\arbortext\e3\queue\MailNotifier.java
For more information on using JavaMail, consult the JavaMail documentation at:
http://java.sun.com/products/javamail
A notifier can send an email message when a transaction meets the following criteria:
The request contains a query parameter that matches the notifier's TestSet specification, if one is specified.
The request includes a query parameter that matches the value of the notifier's request-parameter
The message will be sent to the email address provided using the parameter name specified by request-parameter and the email address specified by the parameter’s value.
The following parameters can be specified in e3config.xml to control the behavior of the sample notifier. All parameters except request-parameter and target-states will be passed to the JavaMail package.
com.arbortext.e3.request-parameter (required)
Specifies the name of a request parameter. The notifier will only send email about state changes in transactions whose requests include this parameter’s value. Email will be sent to the address given by the value of this parameter. There is no default value.
Parameter name="request-parameter" value="queue-email"
The HTTP query must then include a parameter such as:
queue-mail="user@host"
In the query, you would replace the value of user and host with the email address where you want to send notification.
com.arbortext.e3.target-states (required)
Specifies which states are of interest in a comma-separated list of state names. Case and white space are ignored. There is no default value.
initializing
waiting
queued
processing
complete
cancelled
States are explained in Transaction States.
mail.from (required)
Specifies the return address for each email message. Used by the InternetAddress.getLocalAddress method to specify the email address.
mail.host (optional)
Specifies the default Mail server, usually in the form mailhost.yourcompany.com.
The default value is the localhost, so you will likely need to specify your mail host.
mail.transport.protocol (optional)
Specifies the protocol to use for sending email, for example, IMAP. The default is SMTP.
You can use mail.debug to specify the debug mode for troubleshooting. Setting this to true will turn on debug mode. The default value is false, which turns it off. You can also use the JavaMail Session.setDebug method to control the debug mode.
Depending on the protocol being used, the system could be prompted for more information or you may have more than one type of supported protocol. However, it's not likely you will need to implement any of the following on your productions system. Be sure you completely understand what is required for your protocol before using these parameters.
mail.user (optional)
Specifies the user name for connecting to the email server. The default value is mail.user.
The JavaMail Transport object has a connect method that uses this property to obtain the user name, if the mail.protocol.user property is not supplied.
mail.protocol.host (optional)
Specifies the Mail server using the specified protocol. If not specified, the value falls back to the mail.host property and SMTP is presumed. For example, you could specify IMAP for protocol.
mail.protocol.user (optional)
Specifies the protocol to use for the specified user when connecting to the Mail server. If not specified, the value falls back to mail.user property.