O'Reilly logo

Microsoft® Windows® Workflow Foundation Step by Step by Kenn Scribner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Loading Instances

WorkflowInstance exhibits the two unload methods—Unload and TryUnload—but it has only a single Load method. It doesn’t matter how the workflow instance was stored in the database. Once it is stored, you use WorkflowInstance.Load to bring it back into executing status again. We’ll now add the appropriate code to our WorkflowPersister application to make this happen.

Load a persisted workflow

  1. With the WorkflowPersister application open for editing in Visual Studio, open the source code file for the main application form for editing and locate the button3_Click event handler.

  2. Add this code to the button3_Click event handler:

    button3.Enabled = false; try { _instance.Load(); } // try catch (Exception ex) { MessageBox.Show(String.Format("Exception ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required