HOW TO: Programmatically set/pass WorkflowContext from a Visual Studio workflow to a custom workflow action in SharePoint 2010

This post is a contribution from Himani Sharma, an engineer with the SharePoint Developer Support team. Scenario: You have a workflow custom action that you’d like to be used in SharePoint 2010 workflow.  This activity uses Microsoft.SharePoint.WorkflowActions.WorkflowContext to obtain WorkflowContext and hence use the workflow instance specific properties like ItemId, ListId, TaskListGuid, WorkflowInstanceId etc., Analysis:…

1