Subscribing to Workflow Runtime Events

It might seem like there isn’t a lot to WorkflowRuntime, at least from a methods and properties perspective. You can start it, you can stop it, and you can ask it to initiate workflow instances. That’s about it.

It’s a bit more interesting than that, however, and you begin to see the complexity of the runtime environment when you look at the events WorkflowRuntime exposes. Table 2-3 doesn’t provide an exhaustive list, but it does indicate the events you’ll use most often.

Table 2-3. WorkflowRuntime Events

Event

Purpose

Started

Raised when the workflow runtime is started.

Stopped

Raised when the workflow runtime is stopped.

WorkflowCompleted

Raised when a workflow instance has completed.

WorkflowIdled

Raised when a workflow ...

Get Microsoft® Windows® Workflow Foundation Step by Step now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.