WorkflowUnhandledExceptionBehavior 类
定义
一种服务行为,可用于指定工作流服务中发生未经处理的异常时所采取的操作。A service behavior that enables you to specify the action to take when an unhandled exception occurs within a workflow service.
public ref class WorkflowUnhandledExceptionBehavior : System::ServiceModel::Description::IServiceBehavior
public class WorkflowUnhandledExceptionBehavior : System.ServiceModel.Description.IServiceBehavior
type WorkflowUnhandledExceptionBehavior = class
interface IServiceBehavior
Public Class WorkflowUnhandledExceptionBehavior
Implements IServiceBehavior
- 继承
-
WorkflowUnhandledExceptionBehavior
- 实现
注解
当未在工作流中处理异常时,OnUnhandledException 和 WorkflowUnhandledExceptionBehavior 都将指示运行时的行为;但 WorkflowUnhandledExceptionBehavior 可以选择将已挂起的工作流保留在持久性存储区中,而 OnUnhandledException 无法做到这一点。Both OnUnhandledException and WorkflowUnhandledExceptionBehavior dictate the behavior of the runtime when an exception is not handled in the workflow; however, WorkflowUnhandledExceptionBehavior has the option of leaving a suspended workflow in the persistence store, while OnUnhandledException does not. 原因在于,对已挂起的工作流执行的操作是特定于宿主的,而 WorkflowApplication 则相反。The reason for this is that what happens to a suspended workflow is host-specific, and WorkflowApplication is not. 若要使用 WorkflowApplication 实现此功能,请创建一个具有此行为的自定义 PersistenceParticipant。To implement this functionality using WorkflowApplication, create a custom PersistenceParticipant that has this behavior.
有关如何使用此行为的示例,请参阅 工作流服务主机扩展性。For an example of how to use this behavior see Workflow Service Host Extensibility.
构造函数
| WorkflowUnhandledExceptionBehavior() |
初始化 WorkflowUnhandledExceptionBehavior 类的新实例。Initializes a new instance of the WorkflowUnhandledExceptionBehavior class. |
属性
| Action |
获取或设置出现未经处理的异常时采取的措施。Gets or sets the action to take when an unhandled exception occurs. |