Platform SDK: Exchange 2000 Server |
[This is preliminary documentation and subject to change.]
Defines the logical process for a workflow application.
IItem
IProcessDefinition
IDataSource
The ProcessDefinition COM class encapsulates the business logic and policies of a workflow application, which is used for:
The ProcessDefinition object supports data access through the IDataSource interface, which allows you to easily manage the properties of the ProcessDefinition object. You store the business logic of a workflow application as the ActionTable property of the ProcessDefinition object. The action table has been previously created as an ADODB record set. The Recordset object is documented in the MSDN™ Library, Platform SDK, Data Access Services, Microsoft Data Access 2.1 SDK, Microsoft® ActiveX® Data Objects. The action table can contain script it can reference a set of common script functions, or it can reference custom COM objects as actions or conditions.
The following example declares two variable names for a ProcessDefinition object and an IDataSource interface, creates a ProcessDefinition object in memory, gets the IDataSource interface on the ProcessDefinition object, and opens the ProcessDefinition item for read/write access. With the iPD object you can now set it's various properties and use the iDsrc interface to save the changes back to the ProcessDefinition item. ProcDefURL must be a valid URL to the ProcessDefinition item in a public 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.
Dim iPD As CDOWF.ProcessDefinition Dim iDsrc As CDO.IDataSource Set iPD = New CDOWF.ProcessDefinition Set iDsrc = iPD 'ProcDefURL must be a valid URL to a ProcessDefinition item iDsrc.Open ProcDefURL, _ Nothing, _ adModeReadWrite, _ adFailIfNotExists