Hi
The workflow I'm looking at is unchanged since it entered production at the start of 2007. Since then we have had over 275 process instances run without any problems. The first event in the process uses the "Workspace" SharePoint template to create a new SharePoint site.
Today it has thrown an error "System.Exception: System.Net.WebException: The operation has timed out". Ok, I thought, maybe something happened on the web server while we were creating the site. I verify that I can access the site collection etc, then press "Repair Error". Now I get a new exception in service manager: "The web address address of new site] is already in use".
So I go and check and indeed it is - the web service created the site just fine. I delete the site, repair error again and the server churns a way for a minute or two before rethrowing the original "operation has timed out". Except again, it has actually created the site just fine.
This is the code - bog standard with the only modification (I think) being that we use a string variable for the template rather than set it directly with a literal value:
// Call Web Service to create the Workspace
if (! (SpsList.CreateWorkSpace(Site, WorkSpaceName.ToString(), WorkSpaceTitle.ToString(),
WorkSpaceDescription.ToString(), strTemplate, false, false, ref Result, ref ErrorMessage))) {
// Error Occurred in CreateWorkSpace - Raise Error
throw new System.Exception(ErrorMessage);
} else {
System.Xml.XmlDocument ResultXmlDoc = new System.Xml.XmlDocument();
ResultXmlDoc.LoadXml(Result);
WorkSpaceUrl = ResultXmlDoc.SelectSingleNode("Results/Url").InnerText;
}
K2.ProcessInstance.DataFieldsT"Somedatafield"].Value = WorkSpaceUrl;
}
One interesting thing is that "Somedatafield" is not getting set; although like I say the site is created properly.
The web service is not failing in other processes - I have tested and they are all working fine.
I worked around if for this issue by simply modifying the code when repairing the error to prevent it from trying to create the site again, and simply assigning the datafield to the value of the URL.
I would really like to know what's happening here. But how can I troubleshoot inside the web service? Particularly as it seems to be functioning correctly, it's just apparently not returning for some reason. This only started today, on this one workflow.
Many thanks in advance,
Richard