From 326db25f7ea828f5a9f69de39877b35db99a60ee Mon Sep 17 00:00:00 2001 From: subhash kumar singh Date: Wed, 25 Apr 2018 10:05:06 +0000 Subject: 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 --- .../scripts/DeleteVFCNSResource.groovy | 21 +++++++++ .../resources/process/DeleteVFCNSResource.bpmn | 50 +++++++++++++++------- 2 files changed, 55 insertions(+), 16 deletions(-) (limited to 'bpmn/MSOInfrastructureBPMN') 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 diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVFCNSResource.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVFCNSResource.bpmn index 514abb0d52..d7a4bba1dd 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVFCNSResource.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVFCNSResource.bpmn @@ -8,9 +8,9 @@ - SequenceFlow_152xb4z + SequenceFlow_0jvtdhv - + SequenceFlow_0x2e9we SequenceFlow_00vpfm3 @@ -57,6 +57,14 @@ ex.processJavaException(execution)]]> + + SequenceFlow_152xb4z + SequenceFlow_0jvtdhv + + + @@ -68,23 +76,23 @@ ex.processJavaException(execution)]]> - + - + - - + + - + - - + + - + @@ -94,20 +102,20 @@ ex.processJavaException(execution)]]> - - + + - + - + - + - + @@ -141,6 +149,16 @@ ex.processJavaException(execution)]]> + + + + + + + + + + -- cgit 1.2.3-korg