Complete a pageflow

Topics: User Forum
Jul 5, 2007 at 8:11 PM
I am trying to code a pageflow so that the pageflow definition determines when it is completed. However, I can't find a way for a pageflow to complete itself. If I change the final state to be the completed state, I get an exception when it tries to transition to it that the page cannot be null. I tried to make it a state activity instead of a page state and got the same results.

I want the pageflow to be separate from the logic so all I need to know from the controller is that the current state in the page flow is completed and can go on to the next state. I don't want to call the complete method in the controller because then the controller needs to know about the pageflow.
Jul 6, 2007 at 1:09 AM

How about having a dummy complete page with a presenter, and when it gets loaded the corresponding presenter/controller ends the pageflow? This could trigger the logic you want to be handled at the end of the pageflow, keeping the decision of when to end on the pageflow.
Jul 6, 2007 at 6:22 PM
Thanks Freddy.

I ended up doing something similar to that. I had the final page be the confirmation that the user actually wants to commit the results of the workflow to the database. It has a button to confirm (complete) the workflow. It also has a button that gives the user the opportunity to abort the workflow. I'm not sure it will work this way in all circumstances, but it works in this one.