Tracking Records
This topic applies to Windows Workflow Foundation 4 (WF4).
The workflow runtime is instrumented to emit tracking records to follow the execution of a workflow instance.
Tracking Records
The following table details the tracking records that the workflow runtime emits.
Tracking record | Description |
---|---|
Workflow life cycle records |
Emitted during various stages of the life cycle of the workflow instance. For example, a record is emitted when the workflow starts or completes. |
Activity life cycle records |
Details activity execution. These records indicate the state of a workflow activity such as when an activity is scheduled, when the activity completes, or when a fault occurs. |
Bookmark resumption records |
Emitted whenever a bookmark within a workflow instance is resumed. |
Custom tracking records |
A workflow author can create custom tracking records and emit them within a custom activity. |
All tracking-related records emitted from the WF runtime derive from the base class TrackingRecord, which contains the common set of data. Tracking records show the life cycle for a simple workflow. Each tracking record contains details about the associated tracking event, such as the InstanceId, RecordNumber, and additional information specific to the type of tracking record.
The following types of TrackingRecord objects are emitted by the workflow runtime:
WorkflowInstanceRecord - This TrackingRecord describes the life cycle of the workflow instance. For example, a record is emitted when the workflow starts or completes, and contains the state of the workflow instance. The details of this record can be found at WorkflowInstanceRecord.
WorkflowInstanceAbortedRecord - This TrackingRecord is emitted when a workflow instance aborts. The record contains the reason for the workflow instance being aborted. The details of this record can be found at WorkflowInstanceAbortedRecord.
WorkflowInstanceUnhandledExceptionRecord - This TrackingRecord is emitted if an exception occurs in the workflow instance and is not handled by any activity. The record contains the exception details. The details of this record can be found at WorkflowInstanceUnhandledExceptionRecord.
WorkflowInstanceSuspendedRecord - This TrackingRecord is emitted whenever a workflow instance is suspended. The record contains the reason for the workflow instance being suspended. The details of this record can be found at WorkflowInstanceSuspendedRecord.
WorkflowInstanceTerminatedRecord - This TrackingRecord is emitted whenever a workflow instance is terminated. The record contains the reason for the workflow instance being terminated. The details of this record can be found at WorkflowInstanceTerminatedRecord.
ActivityStateRecord - This TrackingRecord is emitted when an activity within a workflow executes. These records indicate the state of the activity within the workflow instance. The details of this record can be found at ActivityStateRecord.
ActivityScheduledRecord - This TrackingRecord is emitted when an activity schedules a child activity. This record contains details for both the parent activity (scheduling activity) and the scheduled child activity. The details of this record can be found at ActivityScheduledRecord.
FaultPropagationRecord - This TrackingRecord is emitted for each handler that looks at the record until it is handled. It is used to denote the path a fault took within the workflow instance. The details of this record can be found at FaultPropagationRecord.
CancelRequestedRecord - This TrackingRecord is emitted whenever an activity tries to cancel a child activity. This record contains details for both the parent activity and the child activity that is being canceled. The details of this record can be found at CancelRequestedRecord.
BookmarkResumptionRecord - This TrackingRecord tracks any bookmark that is successfully resumed. The details of this record can be found at BookmarkResumptionRecord.
CustomTrackingRecord - This TrackingRecord is created and emitted by a workflow author within a custom workflow activity. Custom tracking records can be populated with data to be emitted along with the records. The details of this record can be found at CustomTrackingRecord.
For example, there could be a simple Sequence activity that contains a WriteLine operation with tracking records emitted in the following order:
WorkflowInstanceRecord indicates that the workflow is starting.
ActivityScheduledRecord indicates that an activity has been scheduled. In this case it is a Sequence activity.
ActivityScheduledRecord represents the WriteLine activity.
There are two ActivityStateRecord records that represent the two activities completing.
WorkflowInstanceRecord indicates that the workflow is completing.
See Also
Other Resources
Windows Server App Fabric Monitoring
Monitoring Applications with App Fabric