Export (0) Print
Expand All

SqlTrackingQuery.TryGetWorkflow Method

Tries to get query data for a specified workflow instance.

Namespace:  System.Workflow.Runtime.Tracking
Assembly:  System.Workflow.Runtime (in System.Workflow.Runtime.dll)

public bool TryGetWorkflow(
	Guid workflowInstanceId,
	out SqlTrackingWorkflowInstance workflowInstance
)

Parameters

workflowInstanceId
Type: System.Guid

The Guid of the workflow instance for which the tracking data is requested.

workflowInstance
Type: System.Workflow.Runtime.Tracking.SqlTrackingWorkflowInstance%

When this method returns true, contains a SqlTrackingWorkflowInstance that provides access to the tracking data associated with the workflow instance. This parameter is passed uninitiailized.

Return Value

Type: System.Boolean
true if tracking data is available for the requested workflow instance; otherwise, false.

ExceptionCondition
InvalidOperationException

ConnectionString is a null reference (Nothing in Visual Basic).

The following code example demonstrates how to use the TryGetWorkflow method to retrieve a SqlTrackingWorkflowInstance.

This code example is part of the Workflow Monitor SDK Sample from the DatabaseService.cs file. For more information, see Workflow Monitor.

internal bool TryGetWorkflow(Guid workflowInstanceId, out SqlTrackingWorkflowInstance sqlTrackingWorkflowInstance)
{
    SqlTrackingQuery sqlTrackingQuery = new SqlTrackingQuery(connectionString);
    return sqlTrackingQuery.TryGetWorkflow(workflowInstanceId, out sqlTrackingWorkflowInstance);
}

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0

Community Additions

ADD
Show:
© 2014 Microsoft