Hi,
I have a method in Iplugin which basically performs a HTTP_POST request for rolling back a workflow request to the previous phase. It works fine in WFM4.0, but does not in WFM 5.0.
Has anything changed in the POST statement for WFM 5.0?
The code is as follows -
[CODE]///////////////////////////////////////////////////////////////////////
// RollbackWorkflow - Rolls the workflow back to the given step.
///////////////////////////////////////////////////////////////////////
void RollbackWorkflow(string strAppId, string strPhaseID, string strStepID, string strPersonID, string strStepType)
{
string messageBody = null;
byte[] messageBytes;
string strAMSLocation = HttpContext.Current.Request.ServerVariables["HTTP_HOST"];
HttpWebRequest webRequest =(HttpWebRequest)WebRequest.Create("http://" + strAMSLocation +"/AMSInterface/AMSInterface.asmx/RollbackWFMinorStep");
webRequest.ContentType = "application/x-www-form-urlencoded";
webRequest.Method = "POST";
messageBody = "strAppID=" + strAppId +
"&strWFMajorItemID=" + strPhaseID +
"&strWFMinorItemID=" + strStepID +
"&strPersonID=" + strPersonID +
"&nWFMinorType=" + strStepType;
webRequest.ContentLength = messageBody.Length;
messageBytes = Encoding.ASCII.GetBytes(messageBody);
Stream requestStream = webRequest.GetRequestStream();
requestStream.Write(messageBytes, 0, messageBytes.Length);
requestStream.Close();
return;
}[/CODE]