Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
A service behavior that controls when idle workflow instances are unloaded and persisted.
<configuration>
<system.ServiceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<workflowIdle>
<behaviors>
<serviceBehaviors>
<behavior name="String">
<workflowIdle timeToPersist="TimeSpan"
timeToUnload="TimeSpan" />
</behavior>
</serviceBehaviors>
</behaviors>
The following sections describe attributes, child elements, and parent elements.
Attribute | Description |
---|---|
timeToPersist | A Timespan value that specifies the duration between the time the workflow becomes idle and is persisted. The default value is TimeSpan.MaxValue. The duration begins to elapse when the workflow instance becomes idle. This attribute is useful if you want to persist a workflow instance more aggressively while still keeping the instance in memory for as long as possible. This attribute is only valid if its value is less than the timeToUnload attribute. If it is greater, it is ignored. If this attribute elapses before the value specified by the timeToUnload attribute, 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. |
timeToUnload | A Timespan value that specifies the duration between the time the workflow becomes idle and is unloaded. The default value is 1 minute. Unloading a workflow implies that it is also persisted. If this attribute is set to zero the workflow instance is persisted and unloaded immediately after the workflow becomes idle. Setting this attribute to TimeSpan.MaxValue effectively disables the unload operation. Idle workflow instances are never unloaded. |
None.
Element | Description |
---|---|
<behavior> of <serviceBehaviors> | Specifies a behavior element. |
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register now