TimeToPersist Property
Collapse the table of content
Expand the table of content

WorkflowIdleBehavior.TimeToPersist Property

.NET Framework (current version)
 

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

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

public TimeSpan TimeToPersist { get; set; }

Property Value

Type: System.TimeSpan

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

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.

.NET Framework
Available since 4.0
Return to top
Show:
© 2016 Microsoft