views:

9

answers:

0

We need to run different version of the code-based workflows without closing application.

Our workflows are packet in assembly, for example, WorkflowSet.dll. Here we have a workflow Workflow1: public sealed partial class Workflow1: SequentialWorkflowActivity {… }

We can create workflow instance:

Assembly workflowAssembly = Assembly.LoadFrom(“WorkflowSet.dll”); Type workflowType = workflowAssembly.GetType(“Workflow1”); WorkflowRuntime workflowRuntime = new WorkflowRuntime(); WorkflowInstance instance = workflowRuntime.CreateWorkflow(workflowType); instance.Start();

Question. How to reload assembly contaning the workflow? We can stop runtime engine but we can’t unload assembly holding our workflow type.