SqlTrackingQuery.TryGetWorkflow(Guid, SqlTrackingWorkflowInstance) Méthode

Définition

Essaie d'obtenir des données de requête pour une instance de workflow spécifiée.

public:
 bool TryGetWorkflow(Guid workflowInstanceId, [Runtime::InteropServices::Out] System::Workflow::Runtime::Tracking::SqlTrackingWorkflowInstance ^ % workflowInstance);
public bool TryGetWorkflow (Guid workflowInstanceId, out System.Workflow.Runtime.Tracking.SqlTrackingWorkflowInstance workflowInstance);
member this.TryGetWorkflow : Guid * SqlTrackingWorkflowInstance -> bool
Public Function TryGetWorkflow (workflowInstanceId As Guid, ByRef workflowInstance As SqlTrackingWorkflowInstance) As Boolean

Paramètres

workflowInstanceId
Guid

Guid de l'instance de workflow pour laquelle les données de suivi sont demandées.

workflowInstance
SqlTrackingWorkflowInstance

Lorsque cette méthode retourne true, contient un SqlTrackingWorkflowInstance qui fournit l'accès aux données de suivi associées à l'instance de workflow. Ce paramètre est passé sans être initialisé.

Retours

true si les données de suivi sont disponibles pour l'instance de workflow demandée ; sinon, false.

Exceptions

ConnectionString est une référence Null (Nothing en Visual Basic).

Exemples

L'exemple de code suivant montre comment utiliser la méthode TryGetWorkflow pour récupérer un SqlTrackingWorkflowInstance.

Cet exemple de code fait partie de l'exemple du Kit de développement logiciel Workflow Monitor (SDK) et provient du fichier DatabaseService.cs. Pour plus d’informations, consultez Workflow Monitor.

internal bool TryGetWorkflow(Guid workflowInstanceId, out SqlTrackingWorkflowInstance sqlTrackingWorkflowInstance)
{
    SqlTrackingQuery sqlTrackingQuery = new SqlTrackingQuery(connectionString);
    return sqlTrackingQuery.TryGetWorkflow(workflowInstanceId, out sqlTrackingWorkflowInstance);
}
Friend Function TryGetWorkflow(ByVal workflowInstanceId As Guid, ByVal sqlTrackingWorkflowInstance As SqlTrackingWorkflowInstance) As Boolean
    Dim SqlTrackingQuery As New SqlTrackingQuery(connectionString)
    Return SqlTrackingQuery.TryGetWorkflow(workflowInstanceId, sqlTrackingWorkflowInstance)
End Function

S’applique à

Voir aussi