简体   繁体   中英

Reusing user defined workflow as an activitiy in new workflow?

I'm buiding an application which would be Workflow designer for user defined workflows. Of course I'm just rehosting WorkflowDesigner control (System.Activities.Presentation.WorkflowDesigner) in my WPF application, including Property Inspector and ToolboxControl for activities. One demand on my application is to enable defining user defined workflows. Logical user request is to reuse already defined workflows when defining new ones. Since any workflow is basically an activity it makes sense that such a thing is possible. My question is, how to enable such functionality? Assumption is that previously defined workflow should appear in toolbox (in dedicated category) ready to be dropped on workflow designer.

If you compile the XAML files generated when they created the first workflows they become types in an assembly and you can add them to the toolbox. The alternative is to use IActivityTemplateFactory implementations where you load the original XAML file using the ActivityXamlServices and return those. The second means you are not reusing the original workflow, just a copy of it. So any changes are not reflected in the places they are used.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM