Skip to main content

Hi all


I am using the K2 BlackPoint api to start a workflow process instance from a web page.
The page is in a web site hosetd in IIS using Windows Authentication.


I have logged onto the K2 server, using my own account details, to test the page.
The web page calls the method Connection.StartProcessInstance.


The process starts but the process originator is the service account under which the web site runs and not my account.
I was expecting it to use my windows account details.


The code itself seems fairly staright forward:


{
.....
 Connection wfConnection = new Connection();


        wfConnection.Open(Properties.Settings.Default.WorkflowServer);


        ProcessInstance proc = wfConnection.CreateProcessInstance("MyProcess");
        proc.DataFieldsÂ"ReqID"].Value = reqID;
        proc.Folio = Properties.Settings.Default.WorkflowFolio;


        //start the process
        wfConnection.StartProcessInstance(proc);


 wfConnection.Close();


......
}



Many thanks
Matt


 

Hi Matt


First off Matt, is this blackpoint or blackpearl?  If blackpoint then double check with your K2 representative about using the workflow.client APIs as I believe it violates the license agreement (even though the help gives samples of doing exactly what you're trying).


If you're using blackpearl then I believe its probably just a matter of telling IIS to impersate the end user instead of using the application pool account.  This would involve modifying your sites web.conifg and adding:


<system.web>
<identity impersonate="true" />
</system.web>


Here is one site that gives a description of doing the settings in the web.config  http://www.aspdev.org/articles/web.config/


Hi Tim


thanks very much for your reply. It has solved my problem.


It is Blackpearl that I am using, that was a typo on my part.


I have modified the web.config as you suggested and the process is started with the users account


Many thanks
Matt


Reply