Workflow Tracking

Workflow Composer provides a visual workflow tracking feature that is built based on the workflow tracking infrastructure available in the .NET Framework. Workflow tracking enables you to observe the execution of a workflow instance at runtime.

Workflow tracking infrastructure

  1. Tracking records are emitted from a workflow at the workflow instance level and when activities within the workflow execute.

  2. Tracking profiles are used to specify which tracking information is emitted for a workflow instance. The queries defined within the tracking profile section define the kinds of events that are returned by the subscription. For example, a tracking profile might subscribe to Started and Completed workflow event statuses. If no profile is specified, all tracking events are emitted. Tracking profiles are XML elements within a standard .NET framework config file. A Workflow Tracking Profile Editor UI is also available.

    Profile Editor

  3. A workflow tracking participant needs to be added to the workflow host to subscribe to tracking records. The tracking participant subscribes to TrackingRecord objects. It contains the logic to process a TrackingRecord (for example, writing to a file). The .NET Framework provides an ETW (Event Tracing for Windows) tracking participant with a basic profile that is installed in the machine.config file. Anthology also provides an SQL tracking participant that stores the tracking records and permits retrieval of the tracking records.

For more information about the workflow tracking and tracing infrastructure in .NET, see https://learn.microsoft.com/en-us/dotnet/framework/windows-workflow-foundation/workflow-tracking-and-tracing.

Workflow tracking relies on three database strings that are configured in the configuration file for the ServiceModuleHost.exe. For more information, see Connection Strings.

  1. dbConnection
  2. WorkflowDurableInstancingConnection
  3. WorkflowTrackingConnection

The dbConnection and WorkflowDurableInstancingConnection should point to the same SIS database, e.g., an Anthology Student database. The WorkflowTrackingConnection should point to a specific tracking database (different than the SIS database).

alert The tracking process retrieves and displays data from the tracking database. If the tracking database is not configured, Workflow Composer will display a user friendly message.

Workflow Tracking Example

After you have set up your environment for workflow tracking, use Workflow Composer for visual workflow tracking. You can:

  • View workflows that are currently executing.
  • View workflows that executed in the past.
  • Select and replay workflows.
  • Refresh the display in the Current and Historical windows.

You can troubleshoot a workflow and determine if it is executing properly based on the data being passed or returned from every activity step in a given workflow.

  1. Open the Workflow Designer and click Open Tracked Workflow.

    The Completed Workflows window is displayed. Each record indicates the following.

    • Instance Id
    • Workflow (.xaml file name)
    • State (e.g., closed, executing, idle, unloaded, completed, aborted, terminated)
    • Time

    You can sort, filter, and rearrange the columns in the grids.

    Completed Workflows

  2. Select a record and click Open. The definition of the workflow instance is loaded into the Designer pane. You can select a workflow instance and click Replay to execute the workflow again, click Refresh to update the Completed Workflow instances, or click Close to unload the workflow from the Designer pane.

  3. Click on the Workflow Activities tab below the Toolbox. The Workflow Activities pane is displayed. It contains records for the Activity steps in the currently loaded workflow.

    Workflow Tracking Tab

  4. In the Workflow Activities pane, click on the Activity step that you want to examine. The selected Activity step is highlighted in the Designer pane.

  5. Click on the Debug Properties tab.

    Debug tab

  6. In the Debug Properties pane, click right arrow to the left of Workflow Activity State Data to inspect the details of the Arguments and Variables declared at the time of the execution of the Activity step selected in the Workflow Activities tab.

    Workflow Activity State Data

  7. Click the open item below icons to inspect the details of the Arguments and Variables declared at the time of the execution of the workflow Activity step selected in the Workflow Activities tab.

    Workflow Activity State Data - Details