Working with notifications

Using the Email Template form, create the text for the email message.

To construct a general message that references Optiva objects specific to a workflow, precede the objects with % and enclose the object in brackets.

Example Description
[%1] Inserts the first custom parameter into the message; use [%2], [%3], and so on for subsequent custom parameters.
[%ACTIONCODE] Inserts the current action code into the message.
[%SOURCEUSER] Inserts the current user who performed the action.
[%STARTUSER] Inserts the user who started the workflow.
[%TASKUSER] Inserts the username of the taskuser who caused the message to be sent.
[%WIPALLUSERS] Inserts all users, members of groups and members of roles that are connected to a workflow.
[%WIPGROUPS] Inserts members of all groups that are connected to a workflow.
[%WIPID] Inserts the workflow ID into the message.
[%WIPLINEID] Inserts the line number for the workflow.
[%WIPROLES] Inserts members of all roles that are connected to a workflow.
[%WIPUSERS] Inserts all users that are connected to a workflow.

Example

In the template code, the appropriate parameters replace the arguments enclosed in brackets when the message is sent.

The text in the template code reads:


Workflow [%WIPID] Action [%ACTIONCODE] has been rejected.
Reason: Formula [%1] belonging to class: [%2] has been rejected by 
[%TASKUSER].

The workflow script is:


Dim oClass As Object = ObjProperty("CLASS", "", "")
Dim lNotify As Long = Notify("RL_ADMIN","REJECT",1,1, Context._OBJECTKEY,
oClass)

The notification message reads:


From: <address>
Sent: <date>
To: <address>
Subject: Workflow 2464 Action LAB_MANAGER has been rejected. 
Reason: Formula PIZZA_SAUCE\003 belonging to class: CLASS A = Finished 
Product has been rejected by JOE_SMITH.