StackOverflowException in PageFlow QuickStart

Topics: Web Client Software Factory
Aug 17, 2007 at 7:31 PM
Edited Aug 17, 2007 at 7:37 PM
When I run the PageFlow QuickStart and click the home button the application throws a StackOverflowException. It appears that the ProcessRequest method and ProcessWithRunningInstance method in WorkFlowFoundationPageFlowProvider call each other. Here are a couple snippets:

public ProcessResult ProcessRequest(string url)
{
    Guid instanceId = _store.GetLastRunningInstance();  
          
    if (instanceId != Guid.Empty)
    {
        IPageFlow instance = GetPageFlow(instanceId);
        *return ProcessWithRunningInstance(instance, url);*
    }
    else
    {
        return ProcessWithNoRunningInstance(url);
    }
}
 
private ProcessResult ProcessWithRunningInstance(IPageFlow instance, string url)
{
    ProcessResult result = new ProcessResult(false, string.Empty);
 
    if (instance.CurrentPage.Url != url)
    {
        if (instance.Definition.ContainsUrl(url))
        {
            Page requestedPage = instance.Definition.GetPageFromUrl(url);
            if (instance.CanRedirectTo(requestedPage.Name))
            {
                instance.SetCurrentPage(requestedPage.Name);
            }
            else
            {
                result = new ProcessResult(true, instance.CurrentPage.Url);
            }
        }
        else
        {	
            switch (instance.Definition.Abandonable)
            {
                      case AbandonBehavior.AllowAndDiscardInstance :
                          instance.Abort(false);
                          result = ProcessRequest(url);
                          break;
                      case AbandonBehavior.AllowAndSaveInstance :
                          instance.Suspend();
                          *result = ProcessRequest(url);*
                          break;
                      case AbandonBehavior.Prevent :
                          result = new ProcessResult(true, instance.CurrentPage.Url);
                          break;
                  }                    
        }
    }
    return result;
}