TrackingTable Property
TrackingTable Property
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.
Returns a pointer to the recordset object containing e-mail data related to the process instance that initiated the state transition. This property is read-only.
Applies To
Type Library
Microsoft CDO Workflow Objects for Microsoft Exchange
DLL Implemented In
CDOWF.DLL
Syntax
[Visual Basic]Property TrackingTable As ADODB.Recordset
[C++]HRESULT get_TrackingTable(_Recordset** varTrackingTable);
Parameters
- varTrackingTable
Returned reference to a _Recordset Interface.
Remarks
The workflow engine uses the TrackingTable to store information regarding e-mail messages correlated with a ProcessInstance. If the engine matches a row in the ActionTable with an OnReceive event, it makes an entry in the TrackingTable for the ReceivedMessage.
The tracking table provides you with ten fields that you can use to store additional properties you want to track. These are the custom0 through custom9 fields.
Records in the TrackingTable have the following fields.
Field Name Type Maximum Size May be NULL WCHAR 512 characters No trackingid WCHAR 512 characters Yes date WCHAR 512 characters No state WCHAR 512 characters No flags WCHAR 512 characters No response WCHAR 512 characters Yes custom0 - custom9 WCHAR 512 characters Yes The following table describes tracking table field semantics.
Field Description This contains the address in the To field of outgoing forms or messages. trackingid This is a globally unique identifier (GUID) created by the workflow engine when you use SendWorkflowMessage(). The engine uses this GUID to correlate all subsequent messages associated with the ProcessInstance. date For outgoing messages, this is the sent time. For incoming messages, this is the received time. state The workflow engine puts the state of the ProcessInstance here when you use SendWorkflowMessage(). It puts the ProcessInstance state in this field for all correlated responses as well. flags This can be 'cdowfStrict', 'cdowfAdd', or 'cdowfNoTracking'. When you use SendWorkflowMessage(cdowfStrict), the engine puts 'cdowfStrict' in this field. response The workflow engine automatically copies the value of the form field "https://schemas.microsoft.com/cdo/workflow/response" into this column. You do not need to write any code. custom0 - custom9 These are ten fields that you can use to store data from your form. You need to write the script code to copy the data to the TrackingTable.
Example
The function checks all of the records in the TrackingTable for a match between the response sender and the email field of the table. If it finds an address match, it checks to see if the value in the table's state field matches the state in the current ActionTable row from which this script was called. If both match, it adds a value to a custom property field in the TrackingTable. The following example uses the TrackingTable property in a script function:
Sub AddProp()
WorkflowSession.TrackingTable.MoveFirst
For i = 0 To WorkflowSession.TrackingTable.RecordCount - 1 Step 1
If WorkflowSession.Sender = WorkflowSession.TrackingTable.fields("email").Value Then WorkflowSession.AddAuditEntry "email address matched"
If "A" = WorkflowSession.TrackingTable.fields("state").Value Then
'The state value here is hard coded you will have to
'change this for your own action table
WorkflowSession.AddAuditEntry "state matched"
WorkflowSession.TrackingTable.fields.Item("custom0").Value = WorkflowSession.ReceivedMessage.fields("Amount").Value
WorkflowSession.AddAuditEntry "added the value to the customfield"
WorkflowSession.TrackingTable.Update
End If
End If WorkflowSession.TrackingTable.MoveNext Next WorkflowSession.DeleteReceivedMessage
End Sub
See Also
Send us your feedback about the Microsoft Exchange Server 2003 SDK.
Build: June 2007 (2007.618.1)
© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.