Platform SDK: Exchange 2000 Server

ProcessInstance CoClass

[This is preliminary documentation and subject to change.]

Defines an object used to model a work item in a workflow process.

CLSID
CD001003-8B95-11D1-82DB-00C04FB1625D
ProgID
CDOWF.ProcessInstance
Type Library
Microsoft CDO Workflow Objects for Microsoft Exchange
Inproc Server
CDOWF.DLL
Threading Model
Both
Although CDOWF objects are labeled 'BOTH', they are not in fact 'thread safe'. CDOWF objects do not support accessing one object from many threads.

Implemented Interfaces

IItem

IProcessInstance

IDataSource

Remarks

You can use the ProcessInstance object to control, record, and monitor the status of an individual workflow item. It models the state of a process instance, its relation to email posted in the workflow folder, and its expiration behavior. It also supports data access through the IDataSource interface. You don’t need to use this object explicitly unless you are writing your own workflow event sink.

Example

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 Microsoft Exchange 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, _
           adFailIfNotExists

See Also

Workflow Architecture

IItem

IProcessInstance

IDataSource