Renaming Windows Workflows

I’m spending some time at the moment working with Windows Workflow. Specifically, getting the WF engine to drive a state machine for a Web application that uses a Web service as the ‘next state’ determinator. And it’s as much fun as it sounds.

I did run into one unexpected problem while working with WF. I had created a workflow and added a number of activities to it. After working with it for a while (including adding some values to the activities), I decided to change the name of the Workflow from Workflow1 to something a little more meaning full. When I made this change, it appeared as if the renaming functionality was doing what it was supposed to do, but upon recompilation, it turns out that it was just teasing.

All of the values for the activities are in the form of “Activity=Workflow1, Path=AuthenticateResponse”. Although the workflow was changed to ‘PLCWorkflow, none of the property values were modified. Probably because internally they are stored as strings, but it does mean that you really need to name your workflow before you start any significant work on it. Just something to keep in mind.