WorkflowEnvironment.WorkBatch Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets the current work batch.

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

public static IWorkBatch WorkBatch { get; }

Property Value

Type: System.Workflow.Runtime.IWorkBatch

The IWorkBatch that represents the current work batch.

The WorkBatch property allows hosts or host services to participate in the current transaction by adding pending work items to the current work batch. A host or a host service that wants to participate in the current transaction must implement the IPendingWork interface and use IWorkBatch.Add to add pending work items to WorkBatch. Durable services should add items to WorkBatch to keep the state of their data stores consistent with the state of the workflow instance. The out-of-box durable services, SqlTrackingService and SqlWorkflowPersistenceService, both implement this functionality.

.NET Framework
Available since 3.0
Return to top