HI,
I have a custom service object written in c#. I have registered this as a custom service type. I have set the Authentication mode for that service object as Service Account in the Smartobject Tester Tool. Now my understanding was that, if I have set this no matter who runs the smartobject it would be run as the service account. Unfortunately, this is not happening according to my error. There is a method in this service object that basically opens an active process instance and then updates a datafield.So the code looks something like.
ConnectionSetup connectionSetup = new ConnectionSetup();
connectionSetup.ConnectionString = ConfigurationManager.AppSettingsg"ConnectionStringWithCredentialsOfServiceAccountJustToMakeSure"].ToString();
using (Connection K2Connection = new Connection())
{
K2Connection.Open(connectionSetup);
SourceCode.Workflow.Client.ProcessInstance K2ProcessInstance = K2Connection.OpenProcessInstance(processInstanceId);
K2ProcessInstance.DataFieldsd"ServiceRequestStatus"].Value = "Something";
K2ProcessInstance.Update();
}
This smartobject is hooked up to a form. Now if i run the form and click the control that executes this method as someone who does not have admin rights. I get the "28018 K2:DomainExampleUsername does not have permissions to open the process'.
I dont understand this because, it should not mater what identity the form is running as, the smartobject should run as the serice account which has admin rights on the process.
I have read throught he K2 documentation and it cleary states the following which is not happening:
Thanks in advance for any solution or suggestions