From 2443cd84e0c62261c0c1ec7657ebf4c1ab7a954d Mon Sep 17 00:00:00 2001 From: deepikasatheesh Date: Fri, 4 Feb 2022 09:37:44 +0000 Subject: [PATCH] Fix bugs in modify &terminate flow Issue-ID: SO-3847 Signed-off-by: deepikasatheesh Change-Id: Ib6d2817bcf3e340713a2f72630915173344b81d5 --- .../scripts/DoAllocateAccessNSSI.groovy | 5 +- .../scripts/DoCreateSliceServiceInstance.groovy | 2 +- .../resources/subprocess/DoAllocateAccessNSSI.bpmn | 262 ++++++++++----------- .../subprocess/DoDeallocateAccessNSSI.bpmn | 209 ++++++++-------- 4 files changed, 231 insertions(+), 247 deletions(-) diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy index 9800428c68..a11270465a 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy @@ -369,7 +369,6 @@ class DoAllocateAccessNSSI extends AbstractServiceTaskProcessor { modifySliceParams.addProperty("snssaiList", snssaiList) modifySliceParams.addProperty("sliceProfileId", sliceProfileId) modifySliceParams.addProperty("nsiInfo", nsiInfo) - modifySliceParams.addProperty("scriptName", scriptName) execution.setVariable("modifySliceParams", modifySliceParams.toString()) //create operation status in request db @@ -639,15 +638,15 @@ class DoAllocateAccessNSSI extends AbstractServiceTaskProcessor { ANServiceInstance.setServiceType(execution.getVariable("sst") as String) ANServiceInstance.setOrchestrationStatus(serviceStatus) String serviceInstanceLocationid = jsonUtil.getJsonValue(execution.getVariable("sliceProfile"), "pLMNIdList") as String - ANServiceInstance.setServiceInstanceLocationId(serviceInstanceLocationid) + ANServiceInstance.setServiceInstanceLocationId(jsonUtil.StringArrayToList(serviceInstanceLocationid).get(0)) ANServiceInstance.setServiceRole(serviceRole) List snssaiList = jsonUtil.StringArrayToList(execution.getVariable("snssaiList") as String) String snssai = snssaiList.get(0) - ANServiceInstance.setEnvironmentContext(snssai) String modelInvariantUuid = execution.getVariable("modelInvariantUuid") String modelUuid = execution.getVariable("modelUuid") as String ANServiceInstance.setModelInvariantId(modelInvariantUuid) ANServiceInstance.setModelVersionId(modelUuid) + ANServiceInstance.setEnvironmentContext(execution.getVariable("networkType")) //Network Type ANServiceInstance.setWorkloadContext("AN") String serviceFunctionAn = jsonUtil.getJsonValue(execution.getVariable("sliceProfile") as String, "resourceSharingLevel") ANServiceInstance.setServiceFunction(serviceFunctionAn) diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceInstance.groovy index 5476cb5afa..35b4199909 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceInstance.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceInstance.groovy @@ -117,7 +117,7 @@ class DoCreateSliceServiceInstance extends AbstractServiceTaskProcessor{ String modelUuid = modelInfo.getModelUuid() ss.setModelInvariantId(modelInvariantUuid) ss.setModelVersionId(modelUuid) - String serviceInstanceLocationid = serviceProfile.get("plmnIdList") + String serviceInstanceLocationid = serviceProfile.get("pLMNIdList") ss.setServiceInstanceLocationId(serviceInstanceLocationid) String snssai = serviceProfile.get("sNSSAI") ss.setEnvironmentContext(snssai) diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoAllocateAccessNSSI.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoAllocateAccessNSSI.bpmn index 85aa7c2bf5..374ce4c459 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoAllocateAccessNSSI.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoAllocateAccessNSSI.bpmn @@ -1,5 +1,5 @@ - + Flow_163f3sq @@ -19,7 +19,7 @@ def nss = new DoAllocateAccessNSSI() nss.getSubnetCapabilities(execution) - Flow_1gxbsoi + Flow_0833cha Flow_1xw4abx import org.onap.so.bpmn.infrastructure.scripts.* def nss = new DoAllocateAccessNSSI() @@ -50,7 +50,7 @@ nss.prepareOperationStatusUpdate(execution) Flow_0ll5x3u - + @@ -80,7 +80,7 @@ nss.prepareTnMhRequest(execution) - Flow_0bd6dhi + Flow_06qv0en @@ -432,14 +432,7 @@ nss.updateAaiWithRANInstances(execution) - - - Flow_0833cha - Flow_1gxbsoi - import org.onap.so.bpmn.infrastructure.scripts.* -def nss = new DoAllocateAccessNSSI() -nss.updateAairelationships(execution) - + Flow_18rrdsq @@ -510,7 +503,6 @@ nss.prepareFailedOperationStatusUpdate(execution) - Flow_0rb4j9r @@ -561,11 +553,37 @@ nss.prepareFailedOperationStatusUpdate(execution) #{(execution.getVariable("IsRANNfAlonePresent" ) == true)} + + Flow_0bd6dhi + Flow_06qv0en + import org.onap.so.bpmn.infrastructure.scripts.* +def nss = new DoAllocateAccessNSSI() +nss.updateAairelationships(execution) + + + + + + + + + + + + + + + + + + + + @@ -584,14 +602,24 @@ nss.prepareFailedOperationStatusUpdate(execution) + + + + + + + + + + + + + + - - - - @@ -604,7 +632,15 @@ nss.prepareFailedOperationStatusUpdate(execution) - + + + + + + + + + @@ -691,6 +727,14 @@ nss.prepareFailedOperationStatusUpdate(execution) + + + + + + + + @@ -765,64 +809,20 @@ nss.prepareFailedOperationStatusUpdate(execution) - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - + + + @@ -836,15 +836,6 @@ nss.prepareFailedOperationStatusUpdate(execution) - - - - - - - - - @@ -860,12 +851,6 @@ nss.prepareFailedOperationStatusUpdate(execution) - - - - - - @@ -893,6 +878,12 @@ nss.prepareFailedOperationStatusUpdate(execution) + + + + + + @@ -902,6 +893,12 @@ nss.prepareFailedOperationStatusUpdate(execution) + + + + + + @@ -929,6 +926,9 @@ nss.prepareFailedOperationStatusUpdate(execution) + + + @@ -938,6 +938,9 @@ nss.prepareFailedOperationStatusUpdate(execution) + + + @@ -980,59 +983,26 @@ nss.prepareFailedOperationStatusUpdate(execution) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + + - + - - - - - + + + + + + + + @@ -1068,6 +1038,12 @@ nss.prepareFailedOperationStatusUpdate(execution) + + + + + + @@ -1083,6 +1059,18 @@ nss.prepareFailedOperationStatusUpdate(execution) + + + + + + + + + + + + @@ -1095,6 +1083,18 @@ nss.prepareFailedOperationStatusUpdate(execution) + + + + + + + + + + + + diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateAccessNSSI.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateAccessNSSI.bpmn index ae81364f90..15aa7e1eb5 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateAccessNSSI.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeallocateAccessNSSI.bpmn @@ -1,5 +1,5 @@ - + Flow_14g5p2j @@ -623,13 +623,14 @@ deallocator.deleteRanNfSliceProfileInAAI(execution) Flow_12wqmdr - Flow_15ok12u + Flow_0kuminm import org.onap.so.bpmn.infrastructure.scripts.* def deallocator = new DoDeAllocateAccessNSSI() deallocator.deleteTNSliceProfileInAAI(execution) - Flow_183aijy + Flow_0kuminm + Flow_0e6ug2u Flow_1nh3x4j import org.onap.so.bpmn.infrastructure.scripts.* def deallocator = new DoDeAllocateAccessNSSI() @@ -693,23 +694,53 @@ deallocator.deleteANNSSI(execution) Flow_0412ven Flow_12wqmdr - Flow_0r8ldai + Flow_0e6ug2u - + + #{(execution.getVariable("IsRANNfAlonePresent" ) == true)} - - - Flow_0r8ldai - Flow_15ok12u - Flow_183aijy - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -976,58 +1007,15 @@ deallocator.deleteANNSSI(execution) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - + - - - - - - - - - - - - @@ -1046,6 +1034,12 @@ deallocator.deleteANNSSI(execution) + + + + + + @@ -1067,6 +1061,12 @@ deallocator.deleteANNSSI(execution) + + + + + + @@ -1112,59 +1112,8 @@ deallocator.deleteANNSSI(execution) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -1331,6 +1280,12 @@ deallocator.deleteANNSSI(execution) + + + + + + @@ -1343,6 +1298,36 @@ deallocator.deleteANNSSI(execution) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.16.6