Wiki Link: [discussion:13863]
Config Based INavigationService  

Tags: Web Client Software Factory, Project Management Forum, UIP Application Block discussion, User Forum

Aug 15 2007 at 10:51 PM
I'm looking at replacing the CookiePageFlowCorrelationTokenProvider with one that's based off of an ID from the querystring. But to preserve the PageFlow between page states we'd need to pass the ID generated (a GUID) to the next page as part of the querystring.

To do that, you have to generate a class that implements INavigationService, but then you have to somehow get the WorkflowFoundationPageFlowFactory to load it. Currently WorkflowFoundationPageFlowFactory appears to generate a NavigationService from a hard coded value (as part of it's constructor). Is there a way to specifiy the NavigationService via the web.config file so that I don't have to recompile the WorkflowFoundationPageFlowFactory every time I want to update the wcsf?

Thanks,
Cam

Aug 15 2007 at 11:40 PM
Some time ago I arrived at the conclusion that it is hard coded. In that ocassion I was looking at the same approach you are implementing, and went trough all the source code and I am pretty sure it is hard coded.

Regards,
Freddy Rios

Aug 16 2007 at 5:21 PM
Should this maybe become an issue? If so what are the chances this will get fixed?

Cam

Aug 17 2007 at 7:44 PM
Hi Cameron!

Maybe, you can modify the NavigationService class in the PageFlow project of the PageFlow Application Block solution.
Compile your solution and copy to %WCSF INSTALL DIR%\Microsoft Practices Library the following dll files that were generated:

*Microsoft.Practices.PageFlow.dll
*Microsoft.Practices.PageFlow.Storage.EnterpriseLibrary.dll
*Microsoft.Practices.PageFlow.WorkflowFoundation.dll

REMEMBER TO BACKUP THE ORIGINAL FILES.

Now, if you add a PageFlow project in your WCSF solution, you will use your custom NavigationService.

Hope it helps!

Sebastian Iacomuzzi
http://staff.southworks.net/blogs/siacomuzzi

Feb 17 2008 at 12:30 AM
Edited Apr 10 2008 at 3:24 PM
Modifying the libary classes to use a custom navigationservice really isn't an optimal solution. As such, I've modified the WCSF library to allow customization of the INavigationService type at the web.config level, as:

<pageFlowProvider providerType="Microsoft.Practices.PageFlow.WorkflowFoundation.WorkflowFoundationPageFlowProvider, Microsoft.Practices.PageFlow.WorkflowFoundation" navigationType="YourINavigationServiceTypeHere" />

Issue is here: http://www.codeplex.com/websf/WorkItem/View.aspx?WorkItemId=15208
Patch is here: http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=websf&DownloadId=27695

More details, and feedback on my blog entry at http://brandonhaynes.org/GamePlan3/Default.aspx?tabid=489&EntryID=2.

Enjoy!

Updating...
© 2006-2009 Microsoft | About CodePlex | Privacy Statement | Terms of Use | Code of Conduct | Advertise With Us | Version 2009.10.27.15987