Platform SDK: Exchange 2000 Server |
[This is preliminary documentation and subject to change.]
You begin by creating a new CDO for Workflow ProcessDefinition object and an ActiveX Data Objects Connection. Bind to the folder with the Connection object. With the open connection, set the desired properties on the ProcessDefinition object. Use the Recordset object built at run-time and set the ActionTable property on the process definition object. See Creating ActionTable Columns and Adding ActionTable Rows for examples of how to do this. Finally, save the ProcessDefinition properties to the URL and commit the transaction.
Dim iPD As New CDOWF.ProcessDefinition Dim conn As New ADODB.Connection sDomainURL = "file://./backofficestorage/" _ & Environ("USERDNSDOMAIN") & _ "/Public Folders/" sFolderURL = sDomainURL & sFolderName sProcDefURL = sFolderURL & "/" & sProcDef conn.Provider = "ExOleDb.DataSource" conn.Open sFolderURL conn.BeginTrans With iPD .ActionTable = Rs 'Rs is open ADODB.Recordset built at runtime .AuditTrailProvider = "CdoWf.AuditTrailEventLog" .CommonScriptURL = sCommonScriptURL .Mode = cdowfPrivilegedMode .Fields("DAV:ishidden") = True End With iPD.DataSource.SaveTo sProcDefURL, _ conn, _ adModeReadWrite, _ adCreateOverwrite Or adCreateNonCollection conn.CommitTrans