cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

WFM 5.0 Rollback Workflow Method

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]
(3) Replies
Hi Nook,

The POST operation doesn't appear to have changed in any significant way in WFM 5.0.

Is the failure occurring only for a specific template/application? When it fails, what sort of behavior do you see?
:confused: I too have seen this problem, any ideas anyone?
The POST operation doesn't appear to have changed in any significant way in WFM 5.0.

Is the failure occurring only for a specific template/application? When it fails, what sort of behavior do you see?