Export (0) Print
Expand All

WorkflowApplication.PersistableIdle Property

.NET Framework 4.6 and 4.5

Gets or sets the ActivityFunc that is invoked when the current workflow instance is idle and can be persisted.

Namespace:  System.Activities
Assembly:  System.Activities (in System.Activities.dll)

public Func<WorkflowApplicationIdleEventArgs, PersistableIdleAction> PersistableIdle { get; set; }

Property Value

Type: System.Func<WorkflowApplicationIdleEventArgs, PersistableIdleAction>
The ActivityFunc that is invoked when the current workflow instance is idle and can be persisted.

When a workflow becomes idle and can be persisted, both Idle and PersistableIdle are invoked, in that order. The PersistableIdle handler returns one of the PersistableIdleAction enumeration values of None, Persist, or Unload.

The following example handles the PersistableIdle handler and instructs the runtime to persist and unload the workflow.

wfApp.PersistableIdle = delegate(WorkflowApplicationIdleEventArgs e)
{
    // Instruct the runtime to persist and unload the workflow 
    return PersistableIdleAction.Unload;
};

.NET Framework

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4
Show:
© 2015 Microsoft