summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOInfrastructureBPMN/src/main/groovy
diff options
context:
space:
mode:
authorsubhash kumar singh <subhash.kumar.singh@huawei.com>2018-04-25 10:05:06 +0000
committersubhash kumar singh <subhash.kumar.singh@huawei.com>2018-04-25 10:05:06 +0000
commit326db25f7ea828f5a9f69de39877b35db99a60ee (patch)
treef6840dc1a7d4fc122015ad9c1ecbdbe985c8cbef /bpmn/MSOInfrastructureBPMN/src/main/groovy
parent95fd7ba6c80038182957430073a98e713a1b5b3d (diff)
Add sync response for VFCNS delete
Add sync response for VFCNS delete Change-Id: I4917f0a83fc0c33d51b9b90d91f10dbdc023e690 Issue-ID: SO-422 Signed-off-by: subhash kumar singh <subhash.kumar.singh@huawei.com>
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/main/groovy')
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy21
1 files changed, 21 insertions, 0 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy
index be099eb9af..e9d51b2965 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy
@@ -44,4 +44,25 @@ public class DeleteVFCNSResource extends AbstractServiceTaskProcessor {
utils.log("INFO"," ***** end postProcessRequest *****", isDebugEnabled)
}
+
+ public void sendSyncResponse (DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", " *** sendSyncResponse *** ", isDebugEnabled)
+
+ try {
+ String nsInstanceId = execution.getVariable("nsInstanceId")
+ String operationStatus = execution.getVariable("operationStatus")
+ // RESTResponse for main flow
+ String createVFCResourceRestRsp = """{"nsInstanceId":"${nsInstanceId}","operationStatus":"${operationStatus}"}""".trim()
+ utils.log("DEBUG", " sendSyncResponse to APIH:" + "\n" + createVFCResourceRestRsp, isDebugEnabled)
+ sendWorkflowResponse(execution, 202, createVFCResourceRestRsp)
+ execution.setVariable("sentSyncResponse", true)
+
+ } catch (Exception ex) {
+ String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage()
+ utils.log("DEBUG", msg, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ utils.log("DEBUG"," ***** Exit sendSyncResopnse *****", isDebugEnabled)
+ }
} \ No newline at end of file