Repair K2 Error


Badge +1

Hello,


I have a K2 Error caused by a code that calls a web service that requires as a parameter a Process Instance XMLField.


I verified the XML and a value was wrong. I corrected the xml and updated the xml field in _procinstxml table for that process id.


Usually, when we have these kinds of problems, after the update we could successfully repair the error using K2 Service manager.


Unfortunately, this time it didn't work. The webservice still gets as a parameter the old xml and not the updated one, even if I couldn't find the old xml in any of the k2 tables: _procinstxml, _acinstdestxml, fileondemad so I don't know where the old xml is coming from.


Any suggestion would be highly appreciated.


Thanks,


Adriana


 


 


2 replies

Badge +8

You cannot update the Process DataFields directly in the database, the DataFields are stored as part of the Process Instance (in binary). Updating values directly in the K2Log database will not have any influance on running instances and is not supported, it could void your support.

 

If it's just the DataField that needs to be updated, it should be an easy fix. You can create a simple application to update the value for the process instance, then retry the instance in Service Manager without changing any code:

SourceCode.K2ROM.Connection K2Conn = new SourceCode.K2ROM.Connection();
K2Conn.Open("K2MegaSrv");

SourceCode.K2ROM.ProcessInstance Proc = K2Conn.OpenProcessInstance(16);

Proc.XmlFields["A"].Value = "<Updated XML />";

Proc.Update();

MessageBox.Show("Updated");

The ID (16 in this example) is the process instance id and can be found from the "Process ID" field in Service Manager. Note that you require Admin permissions on the process instance to open it this way.

You can also have a look at another topic discussing error repair:

http://k2underground.com/forums/thread/15349.aspx

Badge +1

Unfortunately, I still wasn't able to repair the error for this particular instance but I could repair other ones using your suggestion.


Thank you very much!

Reply