views:

61

answers:

1

I want to create WF activity (let's call it Template Activity) with the following structure: several predefined activities (including conditions like if and so on) + one or more placeholder activities (for example sequence activities could be place holders). That mean, when I drag this activity to the workflow in designer, I will not be able to remove the predefined activities. And I will be able to add any activities to the placeholders to define custom behavior specific for the concrete workflow.

The issue is that I could not create the designer of the Template Activity to behave this way. I could not add any activities (in any place) to the Template Activity when it is dragged to the workflow in designer.

Does anybody know how I could achieve this Template Activity behavior?

A: 

Using WF3 you can't really do that. You can create custom composite activities and add new acitivities to them on when using them but they cannot already contain predefined activities and "template holes".

The way activities like the IfElseAcitivity appears to do this is by adding the default 2 branches at the time you drag the activity onto the design surface. This is done by adding a custom ActivityToolboxItem to your activity class.

Maurice