Issue: SimplePageFlowInstanceStoreProvider sample in PageFlowQuickstart is incomplete

The PageFlow Quickstart contains SimplePageFlowInstanceStoreProvider. This class is a very simple implementation of IPageFlowInstanceStore, the purpose of which was to allow the PageFlow Quickstart to run without the need to set and install a database. Several of the methods implemented for the interface are no-op methods. As a result, we do not recommend using this sample provider in a real-world application.

If (and only if) you edit the Quickstart's PageFlow so that Abandonable=AllowandSaveInstance and Constrained=false, this simple, incomplete provider will cause an infinite loop. The simple fix is to replace the implementation of GetLastRunningInstance with this code:

public Guid GetLastRunningInstance()
{
   if (_pageFlow == null || !_pageFlow.Status.Equals(PageFlowStatus.Running))
   {
      return Guid.Empty;
   }
   else
   {
      return _pageFlow.Id;
   }
}


Last edited Jun 14, 2007 at 7:19 PM by MichaelPuleio, version 3

Comments

No comments yet.