Question

Is it possible to work with a sub-workflow (i.e. subset of the workflow in the designer). For example a sequence, a flowchart, or any activity inside the workflow.

My idea is something like these:

  • Save the subworkflow to a file (for example, save the selected Sequence activity)
  • Load a saved subworkflow and add it into current workflow
  • Add a sub-workflow as an item in toolbox

Are these even possible in WF4?

Was it helpful?

Solution

Sounds very much like your sub worklfows are just composite activities. Doing so is easy if you compile them as they become regular activity types and you can do with them as you like. If you don't want to compile them but use them as XAML files you will need to create a compiled wrapper activity using a DynamicActivity and the ActivityXamlServices. This is needed because activities added to a workflow or shown in the toolbox are always compiled.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top