aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main/java
diff options
context:
space:
mode:
authorArthur Martella <am153x@att.com>2018-05-08 11:11:47 -0400
committerArthur Martella <am153x@att.com>2018-05-08 17:05:13 -0400
commit64dfdf283bc34c30ead91bdaecbf06661b880ced (patch)
treebaaab96ee58e14558310aeb7b97cd3af112a20ad /bpmn/MSOCommonBPMN/src/main/java
parentf2d0a4f94fb3d4ea44d2019271c28db6cdacfb79 (diff)
Remove wrapper from WorkflowResponse
When the workflow response succeeds, the requestReferences object is being wrapped by "WorkflowResponse": {"response": {... and all the other fields from the WorkflowResponse object are being included as well. Adding a WorkflowResponseSerializer didn't seem to work since the root node was still included and there was no ObjectMapper in which to set WrapRootValue to false. So this is the next best thing. Patch 2 fixes most of the broken unit tests. Change-Id: Ifa5bd02e70b23f41c9042ac207848c8ade77313a Issue-ID: SO-586 Signed-off-by: Arthur Martella <am153x@att.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main/java')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowContextHolder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowContextHolder.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowContextHolder.java
index 731b18db36..aab4faf23b 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowContextHolder.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowContextHolder.java
@@ -120,7 +120,7 @@ public class WorkflowContextHolder {
workflowResponse.setMessageCode(callbackResponse.getStatusCode());
workflowResponse.setMessage(callbackResponse.getMessage());
sendWorkflowResponseToClient(processKey, workflowContext, workflowResponse);
- return Response.ok().entity(workflowResponse).build();
+ return Response.ok().entity(workflowResponse.getResponse()).build();
}
/**
@@ -133,7 +133,7 @@ public class WorkflowContextHolder {
WorkflowResponse workflowResponse) {
msoLogger.debug(logMarker + "Sending the response for request id: " + workflowContext.getRequestId());
recordEvents(processKey, workflowResponse, workflowContext.getStartTime());
- Response response = Response.status(workflowResponse.getMessageCode()).entity(workflowResponse).build();
+ Response response = Response.status(workflowResponse.getMessageCode()).entity(workflowResponse.getResponse()).build();
AsynchronousResponse asyncResp = workflowContext.getAsynchronousResponse();
asyncResp.setResponse(response);
}