Edit

Share via


WorkflowEnvironment.WorkBatch Property

Definition

Gets the current work batch.

public:
 static property System::Workflow::Runtime::IWorkBatch ^ WorkBatch { System::Workflow::Runtime::IWorkBatch ^ get(); };
public static System.Workflow.Runtime.IWorkBatch WorkBatch { get; }
static member WorkBatch : System.Workflow.Runtime.IWorkBatch
Public Shared ReadOnly Property WorkBatch As IWorkBatch

Property Value

The IWorkBatch that represents the current work batch.

Remarks

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.

Applies to