Problem with PageFlow App Block CompletedState & cleanup question

Topics: Web Client Software Factory, User Forum
Apr 25, 2008 at 8:38 PM
Hi, I know PageFlow isn't in the latest WCSF and that it's separated out now into a separate deliverable but this seems to be where folks are discussing it so I figure the expertise is here :)

I'm having an issue with my PageFlow where if I set the CompletedStateName property of the PageFlow definition to the PageState corresponding to my last page in the flow, I cannot navigate to the page defined in that state either using IPageFlow.Next() or IPageFlow.Navigate(). If I leave the CompletedStateName field blank, then I can get to the page either way (and then have to call IPageFlow.Complete() once I've navigated there for cleanup purposes).

I haven't seen anyone else having this issue so I am guessing I'm doing something wrong, but I'm not sure what and haven't found sufficient examples in the documentation to figure it out. I could continue to do it without setting the CompletedStateName but I would like to know the "correct" way.

Also I have a question about "cleanup" -- I have noticed that if I don't call the IPageFlow.Complete() function, the WWF persistance and PageFlow persistance stores get out of sync and this causes errors next time I try to use the page flow. They seem to get out of sync if I shut down my debugger before finishing out the page flow (i.e. if I found an error somewhere or finished testing the piece I wanted to that doesn't require going all the way through the page flow). Obviously in production I can't control when people close their browser. So, what strategies have people used to make sure that an improperly terminated PageFlow doesn't cause errors down the line?

Thanks in advance for your thoughts,
Anye
Coordinator
Apr 26, 2008 at 6:30 AM
It has been a long time since I played with the pageflow engine in WCSF, so take the following as a best recollection...since it is late Friday night after a busy week.

I believe that the Global Bank EFT RI sample application. pageflow quickstart , and the shopping cart quickstart show examples of pageflows that are fairly complete. I would look at the samples and see if they answer your questions by the way they are put together...

Or maybe someone else, who has used it a bit more recently, will have a better response.
Good luck,
Michael Puleio - patterns & practices
Bloghttp://blogs.msdn.com/mpuleio/
Sep 11, 2008 at 8:07 PM
I am running into the same problem.  The call to Next from the state before the completed state throws an ArgumentNullException with the message "Value cannot be null. Parameter name: page".  I can call the Complete method from an event handler in the UI instead, but that defeats the separation of process from presentation.

Has anyone found a solution to this problem?

Thanks,
Dennis
Aug 28, 2011 at 2:51 PM

Hi anyeone,

It's been ages since your post but I hope this helps.

I'm working with the most recent version of the pageflow app block from wcsfcontrib. Checking through the documentation shows that

if the pageflow is constrained, you must call the navigate and next methods on the pageflow and redirecttocurrentpage to move from page to page.

I'm guessing you've configured your pageflow to be unconstrained. In this case, simply navigating to a page just sets the current stage/page in the pageflow.

In the same vein, if you want to 'restart' the pageflow, unless you've made changes to the pageflow, you can simply delete the contents of the instancestate and pageflow_instancestore tables.

Otherwise, you can simply 'resume' the pageflow or just navigate to the first page in the workflow - pageflow should auto start the pageflow for you. (if an unconstrained pageflow).

dmccarthy,

You need to define a default transition on the pagestate you're on  for IPageFlow.Next() to work or explicitly mention the name of the view i.e. IPageFlow.Navigate("ViewName");

Hope this helps...