+ }
+
+
+ // Get the correct code from the SVC Logic and set it in transaction
+ // transaction.setStatusCode(returnParams.getProperty("SvcLogic.code"));
+
+ if (FlowControllerConstants.FAILURE.equalsIgnoreCase(returnParams.getProperty("SvcLogic.status"))) {
+ transaction.setStatus(FlowControllerConstants.FAILURE);
+ ctx.setAttribute(
+ ctx.getAttribute(FlowControllerConstants.RESPONSE_PREFIX)
+ + FlowControllerConstants.OUTPUT_PARAM_STATUS,
+ FlowControllerConstants.OUTPUT_STATUS_FAILURE);
+ ctx.setAttribute(ctx.getAttribute(FlowControllerConstants.RESPONSE_PREFIX)
+ + FlowControllerConstants.OUTPUT_STATUS_MESSAGE, returnParams.getProperty("error-message"));
+ transaction.setStatusCode("401");
+ transaction.setState((ctx.getAttribute(transaction.getExecutionModule() + "."
+ + transaction.getExecutionRPC() + "." + FlowControllerConstants.OUTPUT_STATUS_MESSAGE)) != null
+ ? ctx.getAttribute(transaction.getExecutionModule() + "." + transaction.getExecutionRPC()
+ + "." + FlowControllerConstants.OUTPUT_STATUS_MESSAGE)
+ : null);
+ // Get error code from above instead setting here ...its for testing purpose
+
+
+ } else if (FlowControllerConstants.SUCCESS.equalsIgnoreCase(returnParams.getProperty("SvcLogic.status"))) {
+ transaction.setStatus(FlowControllerConstants.SUCCESS);
+ transaction.setStatusCode("400");
+ ctx.setAttribute(
+ ctx.getAttribute(FlowControllerConstants.RESPONSE_PREFIX)
+ + FlowControllerConstants.OUTPUT_PARAM_STATUS,
+ FlowControllerConstants.OUTPUT_STATUS_SUCCESS);
+ transaction.setState((ctx.getAttribute(transaction.getExecutionModule() + "."
+ + transaction.getExecutionRPC() + "." + FlowControllerConstants.OUTPUT_STATUS_MESSAGE)) != null
+ ? ctx.getAttribute(transaction.getExecutionModule() + "." + transaction.getExecutionRPC()
+ + "." + FlowControllerConstants.OUTPUT_STATUS_MESSAGE)
+ : null);
+ // Get error code from above instead setting here ...its for testing purpose
+ } else {
+ transaction.setStatus(FlowControllerConstants.OTHERS);
+ ctx.setAttribute(
+ ctx.getAttribute(FlowControllerConstants.RESPONSE_PREFIX)
+ + FlowControllerConstants.OUTPUT_PARAM_STATUS,
+ FlowControllerConstants.OUTPUT_STATUS_FAILURE);
+ transaction.setStatusCode("401");
+ ctx.setAttribute(ctx.getAttribute(FlowControllerConstants.RESPONSE_PREFIX)
+ + FlowControllerConstants.OUTPUT_STATUS_MESSAGE, returnParams.getProperty("error-message"));
+ }
+
+ return null;
+ // Change null to required value if required in upper level