Update response for delete e2e service
[so.git] / bpmn / MSOInfrastructureBPMN / src / main / groovy / org / openecomp / mso / bpmn / infrastructure / scripts / DeleteCustomE2EServiceInstance.groovy
index d218adc..ebf9ae7 100644 (file)
@@ -73,9 +73,9 @@ public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor
                        \r
 \r
                        String requestId = execution.getVariable("mso-request-id")\r
-                       execution.setVariable("msoRequestId", requestId)\r
+                       execution.setVariable("msoRequestId", requestId)                        \r
                        utils.log("INFO", "Input Request:" + siRequest + " reqId:" + requestId, isDebugEnabled)\r
-                       \r
+               \r
                        String serviceInstanceId = execution.getVariable("serviceInstanceId")\r
                        if (isBlank(serviceInstanceId)) {\r
                                msg = "Input serviceInstanceId' is null"\r
@@ -114,7 +114,9 @@ public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor
                        } else {\r
                                execution.setVariable("subscriptionServiceType", subscriptionServiceType)\r
                        }\r
-\r
+                       String operationId = jsonUtil.getJsonValue(siRequest, "operationId")\r
+                       execution.setVariable("operationId", operationId)\r
+                                       \r
                        execution.setVariable("operationType", "DELETE")\r
                } catch (BpmnError e) {\r
                        throw e;\r
@@ -129,13 +131,9 @@ public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor
        public void sendSyncResponse (DelegateExecution execution) {\r
                def isDebugEnabled=execution.getVariable("isDebugLogEnabled")\r
                utils.log("INFO", " *** sendSyncResponse  *** ", isDebugEnabled)\r
-\r
                try {\r
-                       String requestId = execution.getVariable("msoRequestId")\r
-                       String serviceInstanceId = execution.getVariable("serviceInstanceId")\r
-\r
-                       // RESTResponse (for API Handler (APIH) Reply Task)\r
-                       String syncResponse = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()\r
+                       String operationId = execution.getVariable("operationId")\r
+                       String syncResponse = """{"operationId":"${operationId}"}""".trim()\r
                        utils.log("INFO", " sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse, isDebugEnabled)\r
                        sendWorkflowResponse(execution, 202, syncResponse)\r
 \r