SGarratt
SGarratt

Reputation: 1004

Can I pass an Activity into an Activity and have it execute it?

I want a workflow to execute another workflow. The latter workflow will be dynamically created and passed in. Is it possible to have an InArgument that is executed by the Activity that holds it? I seem to be caught in the problem that I need to tell the CacheMetadata about the InArgument but I can't get it because I don't have a context.

Upvotes: 1

Views: 101

Answers (1)

Joao
Joao

Reputation: 7486

On Windows Workflow Foundation project on CodePlex you've a set of useful activities not available out-of-the-box on WF.

In your particular case you want to look at InvokeWorkflow which shows you how to pass and execute an Activity inside a workflow.

Furthermore, if you have the activity's XAML you might also want to look at LoadActivity and LoadAndInvokeWorkflow activities which allows you to pass not the activity object but its XAML instead.

Upvotes: 1

Related Questions