Workflow Objects

Workflow Objects

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Microsoft® Exchange Server 2003 workflow components include the workflow engine and workflow event sink. The engine and event sink create the run-time objects that implement your design and provide your script with the correct data. You can use the WorkflowSession object in condition and action scripts that you add with Workflow Designer for Exchange 2000 Server.

The properties of the WorkflowSession object expose the functionality of the IAuditTrail, ISessionProps, IMembers, and IWorkflowMessage interfaces. The IAuditTrail Interface provides a way to log workflow activity for auditing, performance analysis, and debugging. The IWorkflowMessage Interface enables your workflow application to use e-mail messages in workflow processes.

WorkflowSession Object

The workflow engine passes this intrinsic object to the script host environment. The WorkflowSession object provides the following functionality to your script.

  • A Fields collection representing the ProcessInstance that is undergoing transition. Using the Fields collection, your script can modify the ProcessInstance properties. For example, if new contact information is saved in a folder, your script can add sales region ID and regional manager ID fields and insert data into those fields.
  • Write access to the AuditTrail. Your script can pass errors and other information back to the WorkflowSession object that is logged by your audit trail provider. An audit trail provider is a registered Component Object Model (COM) object that implements the IAuditTrail Interface.
  • A method for sending and tracking e-mail notifications and responses associated with a specific ProcessInstance in its TrackingTable Property. Your script can use the recordset returned by this property to tabulate responses or work with custom form data.
  • The ability to control item-level security of the item undergoing transition. The WorkflowSession object exposes the ItemReaders and ItemAuthors collections. Your scripts can modify these collections to give readers and authors exclusive privileges to documents.
  • Run-time environment information such as the names of the domain and server that workflow is running on and the context of the user who triggered the workflow transition.

For a graphical representation of the WorkflowSession object model, see CDO for Workflow Objects.

AuditTrailEventLog Object

You can access the audit trail using the WorkflowSession object by calling the AddAuditEntry Method. The AuditTrailEventLog CoClass is provided with the workflow components. This is a sample provider that you can use to write to the application log in Event Viewer. The Workflow Designer uses this provider by default. You can develop your own provider by implementing the IAuditTrail Interface.

WorkflowMessage Object

The WorkflowMessage object provides several e-mail features for workflow applications. Using this object, you can do the following:

  • Send e-mail in Restricted Mode, where object instantiation is prevented.
  • Track responses to workflow e-mails.
  • Make workflow e-mails part of the workflow transaction so that a "send" is aborted if the transaction fails.

A WorkflowMessage object is not cocreatable; you access its functionality through the WorkflowSession object. The WorkflowSession object provides the GetNewWorkflowMessage Method for sending e-mail notifications. The WorkflowMessage interface contains a subset of the IMessage interface and adds one unique method: SendWorkflowMessage.

The topics in the following section provide additional information about the WorkflowSession object:

The WorkflowSession Object

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.