Hi All,
I have written the below code inside the serverEvent code in k2 process to finish the serverItem.
This code is working fine in Development environment. The same code is not working in ACC Environment. It's throwing error "Type 'ClientException' in assembly 'SourceCode.Workflow.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d' is not marked as serializable.
Also verified the connection string and server, process level rights in ACC environment. It looks correct.
Any suggestion/solutions? please help me out.
Code inside ServerEvent:
(string table) K2Server= serverName;
(string table) K2ServerConnectionString = "Integrated=True;IsPrimaryLogin=True;Authenticate=True;
EncryptedPassword=False;Host=serverName;Port=5252;UserID=xxx;
WindowsDomain=xxx;Password=xxx;SecurityLabelName=K2"
SourceCode.Workflow.Client.Connection connection = new SourceCode.Workflow.Client.Connection(); connection.Open(K2.StringTable["K2Server"],K2.StringTable["K2ServerConnectionString"]); SourceCode.Workflow.Client.ProcessInstance pi = connection.OpenProcessInstance(procid); string sno = pi.DataFields["SerialNo"].Value.ToString();
connection.OpenServerItem(sno).Finish();
connection.Close();