views:

51

answers:

1

I have created a SharePoint workflow in visual studio , I have extended this workflow from the default SharePoint approval workflow as discribed here ( http://bit.ly/b8oJAp )

The workflow is running properly. Is there a way I can get the workflow to run in the context of the user instead of th system account?

+1  A: 

There are a couple of reasons this is not as desirable as it might seem. Firstly, the wrorkflow has to do things that the user does not have permissions to do directly. Secondly, workflows are background tasks, and as such there may not be a logged in user when the code is running.

If you just need a specific task to run as a user, take a look at http://blackninjasoftware.com/2009/04/09/how-to-programmatically-impersonate-users-in-sharepoint/

Tom Clarkson