Platform SDK: Exchange Server

Script Actions

The routing engine can be extended to perform application-specific actions that are implemented in script. Only the VBScript language is currently supported. The action's name is the name of a VBScript subroutine; the action's parameters are the parameters of that VBScript subroutine.

The names of the subroutines that implement script actions in a routing map must start with a "route_" prefix. When you refer to the script action in your routing map, omit the "route_" prefix for the subroutine name. Your scripts can also contain utility functions that are used internally by other script functions, but are not referenced inside a routing map. The names of the utility functions need not start with the "route_" prefix.

If you wish to provide different or additional functionality in your routing apps, you can modify the scripts in ROUTING.VBS, or write your own scripts. For example, the Route_Send function can send a work item to either an address or to a Role (as defined using the Role Administrator sample application). If your application needs to look up the email address of the next route participant using an SQL database, you could modify the Route_Send function to read a property of the work item, such as the Product ID, and use that as a key to lookup a corresponding email address in a database.

Script actions are of two types, evaluation and functional:

Evaluation Actions

The Routing Engine uses evaluation actions as the EvalFunction parameter to an ORSPLIT action. When the Routing Engine encounters an ORSPLIT action, it evaluates the subsequent evaluation action. If the evaluation action evaluates to True, the Routing Engine evaluates the next row; if False, the Routing Engine skips the next row

Action Description
IsTimeout Branches if the current item has expired.
IsReceipt Branches if the current item is a receipt, of one of the following three kinds: delivery receipt, read notification, not-read notification.
IsApprovalMsg Branches if the reply is Approve or Reject.
IsApprovedTable Branches on the overall approve/reject status for a set of parallel recipients (evaluates the complete list of votes).
IsInvalidRecip Verifies that a response message received has come from the person in the routing sequence who received the item and from whom a response is expected.
IsOOF Branches if the triggering message is an out-of-office message.
IsPost Branches if the triggering message is a Post message — a message with message class IPM.Post.

Functional Actions

The Routing Engine uses functional actions to perform a task, such as send a routing slip message.

Action Description
Send Sends a "routing-slip" e-mail message to the specified participant. The routing-slip can contain either a Microsoft Outlook Web Access link to the WorkItem, or the WorkItem itself as an attachment. The participant address can be an explicit address or a role.
Receive Processes any reply messages that successfully correlate to an existing PIM. Handles voting-button and status-tracking information.
Consolidate Takes the message body and attachments of any reply messages, and merges them into the original PIM.
FinalizeReport Creates/sends a summary report of the PIM status.
PreProcessing Performs any necessary preprocessing on the PIM, such as changing its message class to IPM.Note in order to use Outlook's tracking page.
AutoSet Provides default approval or rejection functionality for participants.