Hi
We have written our own worklist frontend in C# and are using the K2 API to retrieve and start tasks. We are able to start tasks correctly. When we come to retrieve tasks using its processID we are able to retrieve the task but the data fields values appear to be null and so throw an exception, the data field names are visable. I have checked in the workspace and the datafields values are populated.
If we get the process from a worklist instead of by a processID then we are then able to view the values of the datafields. The code we are using did work using .net 2003 so i am wondering if the API for retrieving by processId has changed?
The code we are using that works correctly is:
WorklistItem worklistItem = k2Connection.OpenWorklistItem(k2SerialNumber, "ASP", true);
String caseReference = workListItem.ProcessInstance.DataFields["caseReference "].Value.ToString();
The code which returns an error in the value is:
ProcessInstance processInstance = Process.OpenProcess("localhost", processID);
String caseReference = processInstance.DataFields["caseReference "].Value.ToString();
And the error i recieve is:
Message = "Communication error with server
WSASend failed: An operation was attempted on something that is not a socket.
"
Thanks in advance