Serializing Versioned Workflows Using Microsoft WF

I have a simple business process with the following conditions

  • Users need to change the workflow themselves with desinger
  • A workflow is a long workflow, so it will be serialized

Is there a way to automate the version control task of various workflow assemblies?

+4
source share
3 answers

Versions of various workflow assemblies are not a trivial task and have many complications. Here you can find a series of posts that relate to just that.

+3
source

You can override the WF constructor in your application so that end users change workflows. When you accept a designer, you pretty much control what they can do. For example, you can prevent them from deleting or disabling actions and allow them to add certain new actions to a predefined area of ​​the workflow. The best approach is to save these workflows as XOML files and run them as such. This means that you cannot add code to the workflow, but you can define your base workflow class derived from SequentialWorkflowActivity (or the state equivalent) and use it as the base workflow class. This allows you to add code and properties. For example, you can still add CodeActivity, but you need to associate the code with the base class.

Serialization of a workflow or dehydration, as it is called, is used to execute workflows to save them to disk. This uses standard .NET binary serialization and can be quite complicated due to the lengthy nature of the workflow. But it doesn’t matter when you know what to look for. See http://msmvps.com/blogs/theproblemsolver/archive/2008/09/10/versioning-long-running-workfows.aspx for a series of blog posts.

Not sure if you need it, but there is an opportunity to change already running workflows. To do this, use the WorkflowChanges object. See here http://wiki.windowsworkflowfoundation.eu/default.aspx/WF/RuntimeModificationOfWorkflows.html for more details.

+2
source

Here is another article on the flow control version:

http://www.adefwebserver.com/DotNetNukeHELP/Workflow/VacationRequest3.htm

Basically, you can work with versions that use assemblies if:

  • Any assembly used with workflows must be durable.
  • If the assembly uses an interface, it must also be strong and placed in a separate assembly.
  • The entry in the web.config file can tell asp.net where to find the proper assembly.
0
source

Source: https://habr.com/ru/post/1277017/


All Articles