ActivityExecutionContextManager.CompleteExecutionContext Method

Definition

Marks an execution context as completed.

Overloads

CompleteExecutionContext(ActivityExecutionContext)

Marks an execution context as completed.

CompleteExecutionContext(ActivityExecutionContext, Boolean)

Marks an execution context as completed.

CompleteExecutionContext(ActivityExecutionContext)

Marks an execution context as completed.

C#
public void CompleteExecutionContext(System.Workflow.ComponentModel.ActivityExecutionContext childContext);

Parameters

childContext
ActivityExecutionContext

The designated ActivityExecutionContext.

Exceptions

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

childContext is not contained in this instance's ExecutionContexts.

Remarks

The workflow runtime enables this operation to succeed only if the activity in the execution context being completed is in the Closed state. The forcePersist Boolean parameter indicates whether the completed execution context should be persisted so that it is available for retrieval at a later time (for example, for compensation to run).

The overload of CompleteExecutionContext that does not have the forcePersist parameter effectively uses a value of false, so that by default, completed execution contexts are not persisted.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

CompleteExecutionContext(ActivityExecutionContext, Boolean)

Marks an execution context as completed.

C#
public void CompleteExecutionContext(System.Workflow.ComponentModel.ActivityExecutionContext childContext, bool forcePersist);

Parameters

childContext
ActivityExecutionContext

The designated ActivityExecutionContext.

forcePersist
Boolean

Boolean that indicates whether the completed context will be persisted.

Exceptions

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

childContext is not contained in this instance's ExecutionContexts.

Remarks

The workflow runtime enables this operation to succeed only if the activity in the execution context being completed is in the Closed state. The forcePersist Boolean parameter indicates whether the completed execution context should be persisted so that it is available for retrieval at a later time (for example, for compensation to run).

The overload of CompleteExecutionContext that does not have the forcePersist parameter effectively uses a value of false, so that by default, completed execution contexts are not persisted.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1