This documentation is archived and is not being maintained.

ProcessInstance CoClass

Exchange Server 2003

ProcessInstance CoClass

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. Defines an object used to model a work item in a workflow process.





Type Library

Microsoft CDO Workflow Objects for Microsoft Exchange

Inproc Server


Threading Model


Implemented Interfaces

IProcessInstance Interface

IDataSource Interface


IProcessInstance is the default interface.

You can use the ProcessInstance object to control, record, and monitor the status of an individual workflow item. It models:

  • The state of a workflow item
  • The relationship of the workflow item to e-mail posted in the workflow folder
  • What happens when a workflow item has been in a given state for too long

It also supports data access through the IDataSource interface. You do not need to use this object explicitly unless you are writing your own workflow event sink.

Caution  Although CDO for Workflow (CDOWF) are labeled BOTH, they are not in fact thread-safe. CDOWF objects do not support accessing one object from many threads.


The following example defines two variable names for the ProcessInstance object and the IDataSource interface, creates a ProcessInstance object, gets the IDataSource interface on the ProcessInstance object, and opens the ProcessInstance item with read/write access. ProcInstanceURL must be a valid URL to a ProcessInstance in a workflow folder. This example requires references to Microsoft CDO Workflow Objects for Microsoft Exchange (cdowf.dll) and Microsoft CDO for Exchange 2000 Library (cdoex.dll) in your Microsoft® Visual Basic® project.

[Visual Basic]

Dim iPd    As CDOWF.ProcessInstance
Dim iDsrc  As CDO.IDataSource

Set iPd = New CDOWF.ProcessInstance
Set iDsrc = iPd

' ProcInstanceURL must be a valid URL to a ProcessInstance item.
iDsrc.Open ProcInstanceURL, _
           Nothing, _
           adModeReadWrite, _

See Also

Workflow Design

IProcessInstance Interface

IDataSource Interface