Linking and Nesting Page Flows

Topics: Web Client Software Factory, UIP Application Block discussion, User Forum
Aug 31, 2007 at 9:09 PM
I have looked over and over to find a sample using multiple page flows to no avail. I cannot believe that real world implementations would use only one page flow. How come there isn't any sample that uses multiple page flows ?

The use cases that I have to implement are :

- PageFlowA is completed, and PageFlowB is started
- PageFlowA is suspended, PageFlowB is started and when it is completed/aborted, PageFlowA is resumed

Right now what I have tried to suspend a page flow and pass its ID to the next page flow :

// SimplePageFlow1.Complete();

IPageFlow newPageFlow = _pageFlowProvider.GetPageFlow(typeof(SimplePageFlow2));
newPageFlow.UserData"PreviousPageFlow" = SimplePageFlow1.Id;

And in the second page flow, I resume the previous page flow :
// SimplePageFlow2.Complete();

System.Guid previousPageFlowId = (System.Guid)SimplePageFlow2.UserData"PreviousPageFlow";
IPageFlow previousPageFlow = _pageFlowProvider.GetPageFlow(previousPageFlowId);

However when I used Suspend instead of Complete, the framework does not navigate to the second page flow.
Sep 5, 2007 at 6:30 PM

Sadly, you can’t have shared transitions between different page flow.
This scenario is not inside PageFlow’s scope, as it’s detailed in the WCSF documentation (inside Page Flow Application Block topic):

Scenarios Not in Scope

This version of the Page Flow Application Block does not include support for the following scenarios:
  • Progress indicators (also known as "bread crumbs")
  • Pop-up windows
  • Shared transitions between different page flows
  • Query string management
  • Multiple sessions by the same user (for example, the user has a Web client application open in two browser instances at the same time)
  • Multiple users running applications that use the application block on the same computer (the default page flow correlation token provider, CookiePageFlowCorrelationTokenProvider, does not support this)

Sebastian Iacomuzzi
Sep 7, 2007 at 7:58 PM

Actually, I wasn't trying to implement shared transitions, but linked/nested page flows. Anyway, the problem I had was that I started from the PageFlowQuickstart sample which uses the SimplePageFlowInstanceStoreProvider. This provider doesn't allow more than 1 active page flow. So I implemented my own page flow store and I am now able to move between page flows using Suspend/Start and Complete/Resume. Still haven't found any sample on this though. Maybe I will post my sample on the WCSF Contrib site later on. There isn't any actual business logic, but it showcases the navigation between page flows.

I guess I will have to extend to Page Flow Application Block the same way I have extended the User Interface Process Application Block to encapsulate the navigation logic (storing the current page flow GUID, suspending the current page flow and starting the new page flow), query string management, entry points, and so on...

This is no big deal, I was just hoping that the successor to the UIPAB would have these features built-in. I do understand that these are "opened" frameworks, but I like to wrap it in a more "closed" framework where programmers don't have to code every piece of navigation logic between UIP (or page flows).