Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string ResumeWorkflowURL = WorkflowServiceURL + "/" + Country + "/" + "ResumeWorkflow" + "/" + ResumeWFID + "/" + CommandAction;
- string PostParams = """ + LoggedInEID + "@#" + Code + "@#" + Comments + """;
- //Post with WebClient UploadData
- byte[] postArray = Encoding.ASCII.GetBytes(PostParams);
- _WorkflowClient.Headers.Add(System.Net.HttpRequestHeader.ContentType, "application/json");
- byte[] responseBytes = _WorkflowClient.UploadData(ResumeWorkflowURL, postArray);
- string ResumeSuccess = Encoding.UTF8.GetString(responseBytes);
- if (bool.Parse(ResumeSuccess))
- {
- //Dummy delay to finish the state transition // temp fix
- System.Threading.Thread.Sleep(WorkflowConstants.TimerDelay2);
- }
- else
- {
- return false;
- }
- //}
- }
- else
- {
- //Update the current state to Draft if there is no state updated before !
- qmsDAL.UpdateDefaultWorkPacketStatus(WPID, LoggedInEID);
- }
- //Log the details to Workflow log for the current WP ID
- // To be covered as part of WP Log Implementation
- // Logging Thru Workflow or Application ?
- return true;
- }
- catch (Exception ex)
- {
- Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement