Is it possible to exchange a running workflow for a different workflow?

Hello everybody! Let me explain my situation:

I created an ASP.NET web-application which is based on a state machine workflow. When one of our customers is not satisfied with the default implementation of the workflow, I need to exchange the running workflow with a different workflow.

The changes to the workflow are minimal, but they are required for the customer.

Is it possible to exchange a workflow for a different one, even if it is already running and there are persisted workflow instances in the database?

If not, what can I do to accomplish this?

[823 byte] By [BastiaanMolsbeck] at [2007-12-22]
# 1

Hi Bastiaan,

take a look at this post .

Serge

SergeLuca at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 2

Thank you for your quick answer! I read your post but now I've got an other question:

How do I accomplish that my ASP.NET web-application will use the new version of the workflow without recompiling the application?

BastiaanMolsbeck at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 3

if your workflow is stored in an assembly (not Xaml here) referenced by your asp app, in the web.config you can redirect the application to a new version of the assembly without recompiling your app (of course the assembly must be versioned).

<bindingRedirect ....> in the app/web.config

Hope this helps

Serge

SergeLuca at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 4

Ah! That's a nice concept, thanks!

Does my workflow assembly need to be in the GAC or can it also be located in the "bin" folder of my ASP.NET web-application?

BastiaanMolsbeck at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 5

According to this, I don't think so

Serge

SergeLuca at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 6
Wonderful! Many thanks for your help!
BastiaanMolsbeck at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 7

another option in your scenario might be to use dynamic update. If the customer wants the workflow to be different, you can use code to change the running instance, then you don't have to create a new version and try to map onto it.

I think you'll have a hard time taking a running workflow and having it use a new version of the workflow defintion.

Matt

MattMilner-Pluralsight at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 8

It's far more work to build code that updates the workflow than just create a new workflow, based on an existing workflow.

Besides, dynamic update of a workflow is more technical which not all our employees can do. Now, our employees can easily create change the existing workflow (just minor changes) using the Visual Studio 2005 Workflow Designer. After that, they will send the changed workflow to the customer.

BastiaanMolsbeck at 2007-8-30 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...

Software Development for Windows Vista

Site Classified