Edit

Share via


WorkflowRuntime.WorkflowUnloaded Event

Definition

Occurs when the workflow instance is unloaded from memory.

public:
 event EventHandler<System::Workflow::Runtime::WorkflowEventArgs ^> ^ WorkflowUnloaded;
public event EventHandler<System.Workflow.Runtime.WorkflowEventArgs> WorkflowUnloaded;
member this.WorkflowUnloaded : EventHandler<System.Workflow.Runtime.WorkflowEventArgs> 
Public Custom Event WorkflowUnloaded As EventHandler(Of WorkflowEventArgs) 
Public Event WorkflowUnloaded As EventHandler(Of WorkflowEventArgs) 

Event Type

Remarks

A workflow instance can be unloaded from memory by an explicit call to Unload, or implicitly by the workflow run-time engine according to its own semantics. For example, the workflow run-time engine unloads a workflow instance if the instance becomes idle and the runtime has a WorkflowPersistenceService added for which UnloadOnIdle is true.

The workflow run-time engine raises the WorkflowUnloaded event after the state of the workflow instance has been successfully persisted but before the instance is invalidated in memory. Therefore, a WorkflowPersisted event precedes the WorkflowUnloaded event.

For the WorkflowUnloaded event, the sender contains the WorkflowRuntime and WorkflowEventArgs contains the WorkflowInstance associated with the event.

For more information about handling events, see Handling and raising events.

Applies to