Stopping the Workflow Runtime

If there is a way to start the workflow runtime, it makes sense that there is a way to stop it as well. And in fact there is. Looking back at Table 2-2, we see there is a StopRuntime method that matches, and countermands, StartRuntime. Calling StopRuntime unloads all executing workflows and services and shuts down the runtime environment. Of course, the appropriate place to call StopRuntime is just prior to or during your application shutdown logic, or as the AppDomain is being torn down.

Tip

Tip

Just as calling StartRuntime is not mandatory (but not a bad idea), calling StopRuntime also isn’t mandatory (but is similarly ...

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.