开发者

Rehosting the WF4 designer - how to save and execute workflows created through the rehosted designer

I'm looking for some clarity with regards to the use of Windows Workflow 4 in an integrated solution - specifically with regards to rehosting the designer and executing workflows created by eg. a business user.

Is the intention that the required custom activities are created and compiled into a dll, which is then deployed with the rehosted designer, allowing the business user to c开发者_StackOverflow中文版reate/configure workflows that make use of these activities - the business user would then save the workflow as XAML, which can be stored in a location known to the application (database, filesystem etc.), and then when it is necessary for the application to execute a workflow, it can use XamlServices.Load to load the workflow from the specific location and execute it as a DynamicActivity?

How is the workflow saved so that it can later be reserialized with properties and other configuration values? I've tried deserializing a Xaml file saved out of the designer, and also using XamlServices.save().

Are there any potential issues here with using bookmarks/persistence?

As a related question, is there any easy way to "Go back" in a workflow, without defining return branches on every flowchart element? I'm looking at integrating a workflow with a UI for a user to enter responses, which the wf will process, and make decisions based on the input. Through the UI, the user should be able to "Go Back" to a previous input.


You can use the ActivityXamlServices.Load(path) to load a XAML file. It will return an Activity, actually a DynamicActivity, and you can use a WorkflowApplication to run it.

See my blog post for an exmple.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜