PageFlow Instance Error

Topics: Web Client Software Factory
May 17, 2007 at 5:38 AM
Hello there.

I am having errors with pageflows. Once i change the definition of a certain pageflow (like adding a new activity), my code crashes on the pageflow provider GetPageFlow method

        if (myPageflow == null)
        {
                    myPageflow = _pageFlowProvider.GetPageFlow(typeof(TPageFlow));                  //Code crashes here
        }
        return myPageflow;

The error information is something like the below:

The page flow definition MyApp.PageFlows.MyPageFlow, MyApp.PageFlows, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null has been updated and the persisted page flow instance with the id 4a181568-b471-4787-89f7-42a4adf0309b is not compatible. Please start a new page flow instance

Can anybody tell me how to solve this problem?

Thanks,
Developer
May 17, 2007 at 5:21 PM
Hi, the problem is that you have an instance of that pageflow suspended or running persisted at the database. Since workflow foundation uses binary serializer to deserialize an old structure of the page flow in a new structure, it blows up.

To solve this problem, go to your database manager and delete the page flow instance with the id “4a181568-b471-4787-89f7-42a4adf0309b” from the tables InstanceState and pageflow_InstanceStore.

Please let me know if this helps,

Ezequiel Jadib
http://staff.southworks.net/blogs/ejadib
Jun 1, 2007 at 1:08 PM
Yes it did help.

Thanks
Raghu