Platform SDK: Exchange 2000 Server |
[This is preliminary documentation and subject to change.]
The property collection for the ProcessInstance object that initiated the WorkflowSession.
[Visual Basic,VBScript] Property Fields As Fields [C++] HRESULT Fields(Fields** varFields); [IDL] HRESULT Fields([out, retval] Fields** varFields);
Use this collection to put and get properties for the ProcessInstance that initiated the session.
In general, you have three methods for assigning properties with Microsoft® ActiveX® Data Objects (ADO) and Collaboration Data Objects (CDO).
CDO Workflow does not support the second method for workflow schema properties. You can only use the second method for your own custom properties.
If you are familiar with ADO, you are used to setting properties on a record using the fields collection. For example:
Dim rec Set rec = CreateObject("ADODB.Record") ... 'Bind record object to the item on which you want to set properties ... 'Use the workflow schema name to set the property on the item rec.Fields("http://schemas.microsoft.com/cdo/workflow/currentstate") = "SomeState"
CDO Workflow supports the previous assignment type for most workflow properties, however it does not support assignment by using the Fields collection with a CDO Workflow object for workflow schema properties. . The following is not supported, for example:
... 'This is not supported workflowsession.Fields("http://schemas.microsoft.com/cdo/workflow/currentstate") = "SomeState"
If you have the workflow object, as in the previous code, simply use the workflow property. For example:
workflowsession.CurrentState = "SomeState"
You can use the Workflow object with the Fields collection in an assignment only for your custom properties. The following works, for example:
... workflowsession.Fields("YourNameSpace://workflow/yourcustomproperty") = "yourPropValue"
The previous discussion applies to all the workflow objects that support the Fields collection.