Skip to main content

Hi Guys,


I was wondering how I would go about specifying a specific user(eg...Admin) to kick off a workflow, or execute actions on
certain activities on the workflow. It should not be the logged in individual/user having rights to perform those functions,
but the specified user.


Thank you.

You can impersonate the user and start the process.


Connection conn = OpenK2ClientConnection();
    //Impersonate
    using( Impersonation.Impersonate(userName, conn )
    {
        //Do whatever work you need to do as the impersonated user
        connection.StartProcessInstance(processInstance, false);
    }


Refer to K2 documentation for sample code.


Thank you very much Sujeeth.


I'll try is out and let you know how it went.


Reply