This documentation is archived and is not being maintained.

WorkflowRuntime.WorkflowSuspended Event

Occurs when a workflow instance is suspended.

Namespace: System.Workflow.Runtime
Assembly: System.Workflow.Runtime (in system.workflow.runtime.dll)

public event EventHandler<WorkflowSuspendedEventArgs> WorkflowSuspended
/** @event */
public void add_WorkflowSuspended (EventHandler<WorkflowSuspendedEventArgs> value)

/** @event */
public void remove_WorkflowSuspended (EventHandler<WorkflowSuspendedEventArgs> value)

In JScript, you can handle the events defined by a class, but you cannot define your own.
Not applicable.

The workflow instance can be suspended by the host through a call to the Suspend method, by a SuspendActivity activity, or implicitly by the workflow runtime engine. For example, the workflow runtime engine temporarily suspends the instance when it applies dynamic changes to the instance.

For the WorkflowSuspended event, sender will contain the WorkflowRuntime and WorkflowSuspendedEventArgs will contain the WorkflowInstance and a string that describes the reason the instance was suspended.

For more information about handling events, see Consuming Events.

The following code example demonstrates how you can use WorkflowRuntime functionality from a workflow host. The code associates the WorkflowSuspended with an event handler, a method named OnWorkflowSuspended.

This code example is part of the Suspend and Terminate SDK sample from the Program.cs file. For more information, see Suspend and Terminate Sample.

workflowRuntime.WorkflowSuspended += OnWorkflowSuspend;

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0