Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. string ResumeWorkflowURL = WorkflowServiceURL + "/" + Country + "/" + "ResumeWorkflow" + "/" + ResumeWFID + "/" + CommandAction;
  2.  
  3. string PostParams = """ + LoggedInEID + "@#" + Code + "@#" + Comments + """;
  4.  
  5. //Post with WebClient UploadData
  6. byte[] postArray = Encoding.ASCII.GetBytes(PostParams);
  7. _WorkflowClient.Headers.Add(System.Net.HttpRequestHeader.ContentType, "application/json");
  8. byte[] responseBytes = _WorkflowClient.UploadData(ResumeWorkflowURL, postArray);
  9. string ResumeSuccess = Encoding.UTF8.GetString(responseBytes);
  10.  
  11. if (bool.Parse(ResumeSuccess))
  12. {
  13. //Dummy delay to finish the state transition // temp fix
  14. System.Threading.Thread.Sleep(WorkflowConstants.TimerDelay2);
  15.  
  16. }
  17. else
  18. {
  19. return false;
  20. }
  21. //}
  22. }
  23. else
  24. {
  25. //Update the current state to Draft if there is no state updated before !
  26. qmsDAL.UpdateDefaultWorkPacketStatus(WPID, LoggedInEID);
  27. }
  28.  
  29. //Log the details to Workflow log for the current WP ID
  30. // To be covered as part of WP Log Implementation
  31. // Logging Thru Workflow or Application ?
  32.  
  33. return true;
  34. }
  35. catch (Exception ex)
  36. {
  37. Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
  38. return false;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement