I am writing custom activity for sharepoint workflow and I don’t know how I can use current workflow item, SPWeb or SPSite.
I see http://blogs.microsoft.co.il/blogs/davidbi/archive/2008/07/21/How-to-get-the-context-item-in-workflow-activity-sharepoint.aspx but xml routines of this solution is too bad for me.
Perhaps there is another code-only solution to get context item in Workflow activity?
The answer to this is a couple steps:
STEP 1: Here is the code for the properties (my class is named GetEmails which you will need to rename to be your class):
STEP 2: Then in your .actions file add to your block the mappings for those properties (note the entries for __ListID, __ListItem, __Context, and __ActivationProperties):
STEP 3:
Here is an example execute function: