Workflow Email Notifications
Changing the From Address
If you want to change the from address on a workflow email notification the following line of code will allow you to change it. You must set emailFromAddress before you use wfNotify. For example, in the entry event for a workflow, you can use this code to change the from address on email notifications.
<$emailFromAddresss=”records_management@mydomain.com”$>
Custom Email Notifications
Ever needed to notify a user that a docoument has been released and is ready for viewing? The following code can be used to do just that. It can also be easily adapted for other situations.
For example, in the exit event of your workflow step, use the following custom Idoc Script code:
<$wfMailSubject=”File <$dDocName$> has been released”$>
<$wfNotify(dDocAuthor, “user”, “WORKFLOW_RELEASED_NOTIFICATION”)$>
The first line of Idoc Script uses the wfMailSubject variable.
From the Idoc Script Reference guide:
wfMailSubject defines the subject line of a workflow e-mail notification.If no subject line is specified, the e-mail will use the default subject for the type of notification (review, reject, or workflow started). Idoc Script can be included in the subject string.
The second line of Idoc Script uses the wfNotify workflow function:
wfNotify sends an e-mail message to a specified user, alias, or workflow token.
wfNotify takes two parameters and an optional third parameter:
■ The first parameter specifies the user name, alias, or token to be notified.
■ The second parameter indicates the type, either user, alias or token.
■ The optional third parameter specifies the name of the e-mail template to use for constructing the message. (See theIdcHomeDir/resources/core/templates/templates.hda file for template definitions.)
As you can see above, I have used a custom Workflow template which I created and bundled with my component. You can download the sample template here.
Below is a picture of what an email looks like using this sample template.
Disabling Workflow Review Email Notifications
If you or your RMA admin decide not to receive email notifications when an item is ready to be reviewed, the following code will suppress this email notification. In the entry event of a workflow put the following Idoc Script:
<$wfSet(“wfJumpEntryNotifyOff”, “1″)$>











