From b75aa7d6f1c9ab667b6a5b5526eb4676e36649fb Mon Sep 17 00:00:00 2001 From: subhash kumar singh Date: Wed, 25 Apr 2018 15:40:00 +0000 Subject: Add service operation initialtion in request db Add service operation initialtion in request db Change-Id: I2aed78e5cda753b5424b8a8c39e9997a7a7dd61c Issue-ID: SO-422 Signed-off-by: subhash kumar singh --- .../scripts/DeleteCustomE2EServiceInstance.groovy | 50 +++++++++++++ .../process/DeleteCustomE2EServiceInstance.bpmn | 81 +++++++++++++++++----- 2 files changed, 115 insertions(+), 16 deletions(-) (limited to 'bpmn/MSOInfrastructureBPMN/src/main') 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 ebf9ae7825..8c8543345f 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 @@ -341,4 +341,54 @@ public class DeleteCustomE2EServiceInstance extends AbstractServiceTaskProcessor public void processJavaException(DelegateExecution execution) { //TODO: } + + /** + * Init the service Operation Status + */ + public void prepareInitServiceOperationStatus(DelegateExecution execution){ + def isDebugEnabled = execution.getVariable("isDebugLogEnabled") + utils.log("DEBUG", " ======== STARTED prepareInitServiceOperationStatus Process ======== ", isDebugEnabled) + try{ + String serviceId = execution.getVariable("serviceInstanceId") + String operationId = execution.getVariable("operationId") + String userId = "" + String result = "processing" + String progress = "0" + String reason = "" + String operationContent = "Prepare service creation" + utils.log("DEBUG", "Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId, isDebugEnabled) + serviceId = UriUtils.encode(serviceId,"UTF-8") + + def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint") + execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint) + utils.log("DEBUG", "DB Adapter Endpoint is: " + dbAdapterEndpoint, isDebugEnabled) + + String payload = + """ + + + + ${serviceId} + ${operationId} + DELETE + ${userId} + ${result} + ${operationContent} + ${progress} + ${reason} + + + """ + + payload = utils.formatXml(payload) + execution.setVariable("CVFMI_updateServiceOperStatusRequest", payload) + utils.log("DEBUG", "Outgoing updateServiceOperStatusRequest: \n" + payload, isDebugEnabled) + + }catch(Exception e){ + utils.log("ERROR", "Exception Occured Processing prepareInitServiceOperationStatus. Exception is:\n" + e, isDebugEnabled) + execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during prepareInitServiceOperationStatus Method:\n" + e.getMessage()) + } + utils.log("DEBUG", "======== COMPLETED prepareInitServiceOperationStatus Process ======== ", isDebugEnabled) + } } diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn index 013b5b2504..e0747eb32e 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteCustomE2EServiceInstance.bpmn @@ -111,7 +111,7 @@ csi.sendSyncError(execution)]]> - SequenceFlow_0yowshs + SequenceFlow_1dkcu9o SequenceFlow_0zf2qyk - + + + + SequenceFlow_0yowshs + SequenceFlow_0c4t26p + + + + + + + ${CVFMI_dbAdapterEndpoint} + + + application/soap+xml + Basic QlBFTENsaWVudDpwYXNzd29yZDEk + + + ${CVFMI_updateServiceOperStatusRequest} + POST + ${statusCode} + ${response} + + http-connector + + + SequenceFlow_0c4t26p + SequenceFlow_1dkcu9o + + - + - + @@ -159,7 +190,7 @@ csi.sendSyncResponse(execution)]]> - + @@ -171,7 +202,7 @@ csi.sendSyncResponse(execution)]]> - + @@ -186,19 +217,17 @@ csi.sendSyncResponse(execution)]]> - - + + - + - - - + - + @@ -216,10 +245,10 @@ csi.sendSyncResponse(execution)]]> - - + + - + @@ -327,6 +356,26 @@ csi.sendSyncResponse(execution)]]> + + + + + + + + + + + + + + + + + + + + -- cgit 1.2.3-korg