Replace E12WorkFlowServiceUtility.java

parent f6767720
......@@ -31,7 +31,7 @@ public class E12WorkFlowServiceUtility extends RestAPIServiceUtility
public String invokeWorkFlow(String objName, String refId , String refSer,String tokenIDfromHeader) throws ServletException, IOException {
// TODO Auto-generated method stub
BaseLogger.log("3", null, null, "Service mehtod Called --->>>");
BaseLogger.log("3", null, null, "invokeWorkFlow mehtod Called --->>>");
UserInfoBean userInfo = null;
PreparedStatement stmt = null;
......@@ -149,7 +149,7 @@ public class E12WorkFlowServiceUtility extends RestAPIServiceUtility
catch(Exception e)
{
jsonResponse.put("Status :", "Error");
jsonResponse.put("response :", e.getMessage());
jsonResponse.put("Response :", e.getMessage());
BaseLogger.log("3", userInfo, null," Exception::[ "+e.getMessage()+" ] " );
return jsonResponse.toString();
......@@ -182,7 +182,7 @@ public class E12WorkFlowServiceUtility extends RestAPIServiceUtility
BaseLogger.log("3", userInfo, null, "Inside the else block..... ");
//JSONObject jsonResponse = new JSONObject();
jsonResponse.put("Status", "error");
jsonResponse.put("Message", "ERR_MSG: Workflow is already initiated for this transaction");
jsonResponse.put("Response", "ERR_MSG: Workflow is already initiated for this transaction");
String jsonResponseString = jsonResponse.toString();
BaseLogger.log("3", userInfo, null, "CommonConstants.ENCODING [" + CommonConstants.ENCODING + "] errMsg [" + jsonResponseString + "]");
BaseLogger.log("3", null, null, " Json Response:: [" + jsonResponseString + "]");
......@@ -203,11 +203,19 @@ public class E12WorkFlowServiceUtility extends RestAPIServiceUtility
}
catch(SQLException sqe)
{
sqe.printStackTrace();
sqe.printStackTrace();
jsonResponse.put("Status :", "Error");
jsonResponse.put("Response :", sqe.getMessage());
BaseLogger.log("3", userInfo, null," Exception case 1::[ "+sqe.getMessage()+" ] " );
return jsonResponse.toString();
}
catch(Exception e)
{
e.printStackTrace();
jsonResponse.put("Status :", "Error");
jsonResponse.put("Response :", e.getMessage());
BaseLogger.log("3", userInfo, null," Exception case 2::[ "+e.getMessage()+" ] " );
return jsonResponse.toString();
}
finally
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment