PageFlow Provider IPageFlow return

Topics: Web Client Software Factory, Project Management Forum, UIP Application Block discussion, User Forum
Aug 9, 2007 at 10:07 AM
PageFlowProvider.GetPageFlow returns IPageFlow
but if i have "public sealed partial class AdminPageFlow : PageFlow"
how i can use ALL methodes properties that defined in AdminPageFlow not only in IPageFlow ????
how can i get "AdminPageFlow" not only IPageFlow ???

Aug 11, 2007 at 6:50 PM
If you really need to force an specific pageFlow class, just cast it to AdminPageFlow.
Aug 30, 2007 at 8:44 PM
Unfortunately, it isn't this simple. The actual return type from the factory is WorkflowFoundationPageFlow which implements IPageFlow, and not the custom workflow type that is created in the designer. That type is not castable to (in your case) AdminPageFlow.

There is a workflow definition which is of type AdminPageFlow contained in the return type's Definition property (which is of type IPageFlowDefinition, and must be cast to WorkflowFoundationPageFlowDefinition to access the definition's Definition property).

I am right now struggling with this very issue, I really need to get back "my" pageflow object, with its state, so I can list current pageflows and their (custom) properties.