Edit

Share via


WorkflowApplication.PersistableIdle Property

Definition

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

C#
public Func<System.Activities.WorkflowApplicationIdleEventArgs,System.Activities.PersistableIdleAction> PersistableIdle { get; set; }

Property Value

The delegate that is invoked when the current workflow instance is idle and can be persisted.

Examples

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

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

Remarks

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.

Applies to

Product Versions
.NET Framework 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