How to run another activity in a customized activity of TFS 2012 build process template?

423 views Asked by At

I'm writing a customized activity for TFS build process workflow, e.g. guideline here.

In my C# CodeActivity .Execute() method, I want to run another activity, e.g. ConvertWorkspaceItem as descibed here.

How can I do that?

1

There are 1 answers

0
Silvestre On

Try doing some research with a NativeActivity instead of a CodeActivity, so the execution context allows you to schedule other child activities. E.g.:

class YourActivity : NativeActivity
{
    protected override void Execute(NativeActivityContext context)
    {
        ConvertWorkspaceItem it = new ConvertWorkspaceItem();
        context.ScheduleActivity(it);
    }
}