Error: Type 'ClientException' in assembly 'SourceCode.Workflow.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d' is not marked as serializable

  • 15 November 2010
  • 5 replies
  • 1 view

Badge +4

 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();


5 replies

Badge +6

Does it work on prod if you remove the server event.

Badge +5

When you drop the code in a console app, does it throw an exception in the ACC env?


Let me know.


Regards,
Frikkie!

Badge +4

Hi frikkie,


It is working in a console app in ACC env. The same code is not working inside serverItem.


Any suggestion?


Thanks,


Nithya

Badge +5

It seems that there might be an exception of some sort that is not serializable and we need to determine what it is.  Try a couple of different things in your code like hardcoded values for the connection string and input parameters.


Let me know what you see.


Frikkie!

Badge +5

Also enable full hostserver logging and enable stack trace as per this article:
http://www.k2underground.com/blogs/johnny/archive/2007/10/06/how-do-i-use-logging-in-k2-blackpearl.aspx

Reply