Aug 2, 2012

Running child activities in a custom SharePoint Designer activity

I ran into the simple question of how to run child activities I had dragged into my custom SequenceActivity.  I naively assumed they would run automatically but that's not the case.

1. Drag and drop activities into your custom activity (Sharepoint or standard WWF activities)
2. In the Execute method you override, call the context.ExecuteActivity method on each child activity in the EnabledActivities collection.
3. Bind to at least one close event for a child activity in order to be able to close the parent activity.
4. In the Execute method, set the context.ExecutionStatus to Running.

There are more details in the example from MSDN:

No comments:

Post a Comment