diff options
author | seshukm <seshu.kumar.m@huawei.com> | 2017-10-23 21:31:34 +0530 |
---|---|---|
committer | seshukm <seshu.kumar.m@huawei.com> | 2017-10-23 21:31:34 +0530 |
commit | e9a247de31950a37f08e5934060ee878aa70233e (patch) | |
tree | 92586bc548ad4f3d2a447edd29e76ab0224a5944 /bpmn/MSOInfrastructureBPMN | |
parent | df0e90472a7edc1f10cc66d10f790306fde9cffa (diff) |
fix for delete e2e service
IssueId: SO-258
Change-Id: Ib038f1a40d3a1a8604b3ba1da6b7bc7de33a074e
Signed-off-by: seshukm <seshu.kumar.m@huawei.com>
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN')
-rw-r--r-- | bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy | 69 |
1 files changed, 9 insertions, 60 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy index 7a047d4992..3cd2b282e0 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteCustomE2EServiceInstance.groovy @@ -82,72 +82,22 @@ public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
}
- //String xmlRequestDetails = vidUtils.getJsonRequestDetailstoXml(siRequest)
- //execution.setVariable("requestDetails", xmlRequestDetails)
-
- //modelInfo
- String serviceModelInfo = jsonUtil.getJsonValue(siRequest, "requestDetails.modelInfo")
- if (isBlank(serviceModelInfo)) {
- msg = "Input serviceModelInfo is null"
- utils.log("DEBUG", msg, isDebugEnabled)
- } else
- {
- execution.setVariable("serviceModelInfo", serviceModelInfo)
- //utils.log("DEBUG", "modelInfo" + serviceModelInfo, isDebugEnabled)
- }
-
- //requestInfo
- String productFamilyId = jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.productFamilyId")
- if (isBlank(productFamilyId))
- {
- msg = "Input productFamilyId is null"
+
+ String serviceType = execution.getVariable("serviceType")
+ if (isBlank(serviceType)) {
+ msg = "Input serviceType' is null"
utils.log("DEBUG", msg, isDebugEnabled)
- //exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
} else {
- execution.setVariable("productFamilyId", productFamilyId)
+ execution.setVariable("serviceType", serviceType)
}
- String source = jsonUtil.getJsonValue(siRequest, "requestDetails.requestInfo.source")
- execution.setVariable("source", source)
-
//subscriberInfo
- String globalSubscriberId = jsonUtil.getJsonValue(siRequest, "requestDetails.subscriberInfo.globalSubscriberId")
+ String globalSubscriberId = jsonUtil.getJsonValue(siRequest, "globalSubscriberId")
if (isBlank(globalSubscriberId)) {
msg = "Input globalSubscriberId' is null"
utils.log("DEBUG", msg, isDebugEnabled)
} else {
execution.setVariable("globalSubscriberId", globalSubscriberId)
}
-
- //requestParameters
- String subscriptionServiceType = jsonUtil.getJsonValue(siRequest, "requestDetails.requestParameters.subscriptionServiceType")
- if (isBlank(subscriptionServiceType)) {
- msg = "Input subscriptionServiceType is null"
- utils.log("DEBUG", msg, isDebugEnabled)
- //exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
- } else {
- execution.setVariable("subscriptionServiceType", subscriptionServiceType)
- }
-
- /*
- * Extracting User Parameters from incoming Request and converting into a Map
- */
- def jsonSlurper = new JsonSlurper()
- def jsonOutput = new JsonOutput()
-
- Map reqMap = jsonSlurper.parseText(siRequest)
-
- //InputParams
- def userParams = reqMap.requestDetails?.requestParameters?.userParams
-
- Map<String, String> inputMap = [:]
- if (userParams) {
- userParams.each {
- userParam -> inputMap.put(userParam.name, userParam.value)
- }
- }
-
- utils.log("DEBUG", "User Input Parameters map: " + userParams.toString(), isDebugEnabled)
- execution.setVariable("serviceInputParams", inputMap)
} catch (BpmnError e) {
throw e;
@@ -164,11 +114,10 @@ public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor utils.log("DEBUG", " *** sendSyncResponse *** ", isDebugEnabled)
try {
- String requestId = execution.getVariable("msoRequestId")
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
-
+ String operationId = execution.getVariable("operationId")
+
// RESTResponse (for API Handler (APIH) Reply Task)
- String syncResponse = """{"requestReferences":{"instanceId":"${serviceInstanceId}","requestId":"${requestId}"}}""".trim()
+ String syncResponse = """{"operationId":"${operationId}"}""".trim()
utils.log("DEBUG", " sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse, isDebugEnabled)
sendWorkflowResponse(execution, 202, syncResponse)
|