Bewerken

Delen via


WorkflowIdleBehavior.TimeToPersist Property

Definition

Gets or sets a value that specifies the TimeSpan that occurs between the time the workflow becomes idle and is persisted.

public:
 property TimeSpan TimeToPersist { TimeSpan get(); void set(TimeSpan value); };
public TimeSpan TimeToPersist { get; set; }
member this.TimeToPersist : TimeSpan with get, set
Public Property TimeToPersist As TimeSpan

Property Value

The time span used to determine when a workflow is persisted.

Remarks

The TimeSpan begins to elapse when the workflow instance becomes idle. This property is useful if you want to persist a workflow instance more aggressively while still keeping the instance in memory for as long as possible. The default value for this property is MaxValue. The TimeToPersist property is only valid if its value is less than TimeToUnload. If it is greater, it is ignored. If the TimeSpan specified by TimeToPersist elapses before the TimeSpan specified by TimeToUnload, persistence must complete before the workflow is unloaded. This implies that the unload operation may be delayed until the workflow is persisted. The persistence layer is responsible for handling any retries for transient errors and only throws exceptions on non-recoverable errors. Therefore, any exceptions thrown during persistence are treated as fatal and the workflow instance is aborted.

Applies to