Professional Documents
Culture Documents
workflows and their associated activities. The SqlTrackingQuery class provides high-level access to the data that is contained in the tracking database. However, you can also use direct queries against the SQL tracking service database views for more detailed information. These views map directly to the underlying SQL tracking service table schemas.
Workflow
The Workflow table stores the workflow definition of all workflow types that have been tracked by the SqlTrackingService. It is populated the first time a workflow is instantiated and the SqlTrackingService is enabled for this workflow type.
Column WorkflowTypeId
Description Links to the Type table that stores the type name and the assembly name where the workflow type appears.
WorkflowDefinition
Activity
The Activity table stores all the activity types appearing in the corresponding workflow types.
Column WorkflowTypeId
Description Links to the Type table that stores the type name and the assembly name where the workflow type appears.
msdn.microsoft.com/en-us/library/vstudio/aa347864(v=vs.90).aspx
1/12
9/21/13
QualifiedName
ActivityTypeId
Links to the Type table that stores the type name and the assembly name where the activity type appears.
ParentQualifiedName
If the activity is composed in another activity, this field holds the activityqualified name of the parent activity.
Type
The Type table stores all the type information and the assembly names in which the types occur. This includes workflow types, activity types, and any other types used within the SqlTrackingService . For example, if you tracked a string as a Tracking Data Item, the string type information is stored in this table.
Column TypeId
TypeFullName
AssemblyFullName
IsInstanceType
Boolean value that indicates whether the workflow instance is an XOML-only instance (in this case, the type and the assembly full names will be null).
WorkflowInstance
The WorkflowInstance table maintains the list of all the workflow instances that have been tracking in the tracking database.
Column WorkflowInstanceInternalId
Description Unique internal ID that is given to the workflow instance by the database. It is used as a foreign key to join other tables in the database.
WorkflowInstanceId
msdn.microsoft.com/en-us/library/vstudio/aa347864(v=vs.90).aspx
9/21/13
ContextGuid
CallerInstanceId
CallPath
Complete call path that is used in case the workflow instance is called by a workflow instance, which in turn is called by another workflow instance.
CallerContextGuid
CallerParentContextGuid
Context information about the parent workflow instance of the calling instance.
WorkflowTypeId
InitializedDateTime
CreatedDateTime
DbInitializedDateTime
Database date and time when the workflow instance record was initialized.
EndDateTime
DbEndDateTime
Database date and time when the workflow instance record was committed.
ActivityInstance
The ActivityInstance table is used to store the instances of activities that are being tracked. There is a many-to-one relationship from this table to the WorkflowInstance table.
Column
Description
msdn.microsoft.com/en-us/library/vstudio/aa347864(v=vs.90).aspx
3/12
9/21/13
WorkflowInstanceInternalId
ActivityInstanceId
QualifiedName
ContextGuid
ParentContextGuid
WorkflowInstanceEventId
ActivityExecutionStatusEvent
The ActivityExecutionStatusEvent table stores the different states that an activity has gone through in its life cycle. For a given activity in a given workflow instance, there can be multiple activity states. Only one of them is the current state.
Column ActivityExecutionStatusEventId
WorkflowInstanceInternalId
EventOrder
ActivityInstanceId
ExecutionStatusId
Link to the ActivityExecutionStatus table, which stores the different status descriptions.
EventDateTime
msdn.microsoft.com/en-us/library/vstudio/aa347864(v=vs.90).aspx
4/12
9/21/13
DbEventDateTime
ActivityExecutionStatus
The ActivityExecutionStatus table is a reference table that stores the literal values of all the execution states that an activity can go through.
Column ExecutionStatusId
Description
TrackingDataItem
For each activity state, the TrackingDataItem table stores a set of data-like variables, properties, and so on, if the SqlTrackingService is tracking these items (as indicated by the tracking profile). The tracking profile can specify which workflow attributes must be tracked when a particular activity reaches a particular status.
Column TrackingDataItemId
Description Unique ID that represents the record for a given artifact for a given status of an activity, which belongs to a particular workflowInstance.
WorkflowInstanceInternalId
EventId
EventTypeId
Type of the event where the tracking data item was extracted.
FieldName
FieldTypeId
Type ID of the variable (data item) that is tracked. This is referencing the type table.
msdn.microsoft.com/en-us/library/vstudio/aa347864(v=vs.90).aspx
5/12
9/21/13
Data_Str
String value of the data that is tracked (if it is a primitive type and can be converted to string).
Data_Blob
Binary large object value of the value of the data tracked (if it is a nonprimitive type and can be binary serialized).
DataNonSerializable
Flag to indicate that there was data, but it could not be converted to a string or binary serialized.
TrackingDataItemAnnotation
The TrackingDataItemAnnotation table stores any annotation that is made in the workflow for a given tracking data item. The annotations are indicated by the tracking profile.
Column TrackingDataItemId
Description ID of the tracking data item for which the annotation is being stored.
WorkflowInstanceInternalId
Annotation
EventAnnotation
The EventAnnotation table stores any annotation that is associated with workflow events.
Column WorkflowInstanceInternalId
EventId
EventTypeId
Annotation
msdn.microsoft.com/en-us/library/vstudio/aa347864(v=vs.90).aspx
6/12
9/21/13
WorkflowInstanceEvent
The WorkflowInstanceEvent table stores the different events that a workflow has gone through in its life cycle. There can be multiple events for a given workflow instance; however, only one of them is the current event.
Column WorkflowInstanceEventId
WorkflowInstanceInternalId
EventDateTime
EventOrder
EventArgTypeId
EventArg
DbEventDateTime
TrackingWorkflowEvent
The TrackingWorkflowEvent table stores the literal values of all the events that a workflow can go through.
Column TrackingWorkflowEventId
Description
UserEvent
The UserEvent table stores the different events that are emitted and tracked by custom user track
msdn.microsoft.com/en-us/library/vstudio/aa347864(v=vs.90).aspx 7/12
9/21/13
Column UserEventId
WorkflowInstanceInternalId
EventOrder
ActivityInstanceId
Unique ID of the activity in which the user event occurred (where the code emitting the event occurs in the workflow code).
EventDateTime
UserDataKey
Key value passed in the user event (when you use the TrackData method).
UserDataTypeId
Type ID in the Type table of the user data that is being tracked.
UserData_Str
String value of the data that is tracked (if it is a primitive type and can be converted to string).
UserData_Blob
Binary large object value of the value of the data tracked (if it is a nonprimitive type and can be binary serialized).
DataNonSerializable
Flag to indicate that there was data, but it could not be converted to a string or binary serialized.
DbEventDateTime
AddedActivity
The AddedActivity table stores the activities that are added to the workflow when a workflow change
msdn.microsoft.com/en-us/library/vstudio/aa347864(v=vs.90).aspx 8/12
9/21/13
occurs. There can be many activities added for each workflow change.
Column WorkflowInstanceInternalId
WorkflowInstanceEventId
QualifiedName
ActivityTypeId
Link to the Type table to indicate the type and assembly name for the activity that was added as part of the dynamic change.
ParentQualifiedName
AddedActivityAction
Serialized value of the ActivityChangeAction object created from the dynamic update event
Order
RemovedActivity
The RemovedActivity table stores all the activities that were removed by a workflow change. Many activities can be removed for each workflow change.
Column WorkflowInstanceInternalId
WorkflowInstanceEventId
QualifiedName
ParentQualifiedName
msdn.microsoft.com/en-us/library/vstudio/aa347864(v=vs.90).aspx
9/21/13
RemovedActivityAction
Serialized value of the ActivityChangeAction object created from the dynamic update event
Order
TrackingProfile
The TrackingProfile table stores the tracking profile for a given workflow type.
Column TrackingProfileId
Version
Version of the tracking profile, which should correspond to the version of the Tracking Profile (TrackingProfile.Version or version attribute in the Tracking Profile XML)
WorkflowTypeId
Link to the Type table that stores the type name and assembly name of the workflow.
TrackingProfileXml
InsertDateTime
TrackingProfileInstance
The TrackingProfileInstance table stores the tracking profiles associated with specific workflow instances. This is used when different profiles are used for different workflow instances.
Column InstanceId
Description Workflow instance internal ID for which the tracking profile is being stored.
TrackingProfileXml
msdn.microsoft.com/en-us/library/vstudio/aa347864(v=vs.90).aspx
10/12
9/21/13
UpdatedDateTime
DefaultTrackingProfile
The DefaultTrackingProfile table stores the default tracking profile. If a tracking profile is not associated with a given workflow type, the default tracking profile is used.
Column Version
Description Version number of the tracking profile, which should correspond to the version of the Tracking Profile (TrackingProfile.Version or version attribute in the Tracking Profile XML)
TrackingProfileXml
InsertDateTime
TrackingPartitionInterval
The TrackingPartitionInterval table stores the partition interval to enable partitioning for data maintenance. This only occurs when the PartitionOnCompletion property of the SqlTrackingService class is set to true . The default is monthly ("m"). You can set it to daily ("d"), or yearly ("y").
Column Interval
TrackingPartitionSetName
The TrackingPartitionSetName table holds information about the partition set name.
Column PartitionId
Name
msdn.microsoft.com/en-us/library/vstudio/aa347864(v=vs.90).aspx
11/12
9/21/13
CreatedDateTime
EndDateTime
PartitionInterval
See Also
Reference
SqlTrackingService
Other Resources
Community Additions
2013 Microsoft. All rights reserved.
msdn.microsoft.com/en-us/library/vstudio/aa347864(v=vs.90).aspx
12/12