views:

260

answers:

1

Hi
I have created a couple of activities and stored them as XAML. Opening them in the Workflowdesigner works great and I can Execute them. Now I would like to create a new Activity and add the activities I created to it. Basically loading it from the XAML and into the designer as part of another activity/flow.

I have tried adding my activities to the toolbox but the render as dynamicactivity and (understandably) does not work.

Any suggestions?
Is it even possible?

/Jimmy

+1  A: 

DynamicActivity and the toolbox were basically not designed to work together that way. The toolbox expects to deal with types, not class instances.

One thing you can do instead is subclass IActivityTemplateFactory and in the Create() function return DynamicActivity. But you will probably have some really weird issues once you try to save a XAML file created which contains dynamic activities. Because in fact the designer doesn't do any special treatment for DynamicActivity, and it will not get serialized as any kind of 'logical reference' to the XAML file you created it from.

Tim

Tim Lovell-Smith
Ok I see, thanks I just have to change my aproach.
Jimmy Engtröm