From faac8220ef71d68ac87706e521f11f445dcb2e4c Mon Sep 17 00:00:00 2001 From: Yulian Han Date: Sat, 21 Apr 2018 17:56:14 +0800 Subject: UpdateAAI lost serviceInstVersion and modeluuid bpmn ExclusiveGateway usage bug fix Change-Id: Idaa55084f5ecb0dd3636c232cebc14fa5f064307 Issue-ID: SO-578 Signed-off-by: Yulian Han --- .../scripts/DoUpdateE2EServiceInstance.groovy | 20 +++-- .../process/UpdateCustomE2EServiceInstance.bpmn | 32 ++++--- .../subprocess/DoUpdateE2EServiceInstance.bpmn | 99 +++++++++++----------- 3 files changed, 77 insertions(+), 74 deletions(-) (limited to 'bpmn/MSOInfrastructureBPMN') diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy index 38fb22572d..f29db9252f 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoUpdateE2EServiceInstance.groovy @@ -126,7 +126,11 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor { // user params String uuiRequest = execution.getVariable("uuiRequest") - utils.log("INFO","uuiRequest: " + uuiRequest, isDebugEnabled) + // target model uuid + String modelUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceUuid") + execution.setVariable("modelUuid", modelUuid) + + utils.log("INFO","modelUuid: " + modelUuid, isDebugEnabled) } catch (BpmnError e) { throw e; @@ -204,13 +208,11 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor { execution.setVariable("operationType", "create") - def hasResourcetoAdd = false + execution.setVariable("hasResourcetoAdd", false) List addResourceList = execution.getVariable("addResourceList") if(addResourceList != null && !addResourceList.isEmpty()) { - hasResourcetoAdd = true + execution.setVariable("hasResourcetoAdd", true) } - execution.setVariable("hasResourcetoAdd", hasResourcetoAdd) - utils.log("INFO"," *** Exit preProcessForAddResource *** ", isDebugEnabled) } @@ -230,12 +232,11 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor { execution.setVariable("operationType", "delete") - def hasResourcetoDelete = false + execution.setVariable("hasResourcetoDelete", false) List delResourceList = execution.getVariable("delResourceList") if(delResourceList != null && !delResourceList.isEmpty()) { - hasResourcetoDelete = true - } - execution.setVariable("hasResourcetoDelete", hasResourcetoDelete) + execution.setVariable("hasResourcetoDelete", true) + } execution.setVariable("resourceInstanceIDs", execution.getVariable("serviceRelationShip")) @@ -317,6 +318,7 @@ public class DoUpdateE2EServiceInstance extends AbstractServiceTaskProcessor { String namespace = aaiUriUtil.getNamespaceFromUri(aai_uri) utils.log("INFO","namespace: " + namespace, isDebugEnabled) + //update target model to aai String serviceInstanceData = """ ${modelUuid} diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateCustomE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateCustomE2EServiceInstance.bpmn index 6451dc6ca0..ae84d894c0 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateCustomE2EServiceInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateCustomE2EServiceInstance.bpmn @@ -158,7 +158,7 @@ csi.sendSyncError(execution)]]> def csi = new UpdateCustomE2EServiceInstance() csi.sendSyncResponse(execution)]]> - + SequenceFlow_0klbpxx SequenceFlow_14zu6wr SequenceFlow_1fueo69 @@ -174,9 +174,7 @@ csi.sendSyncResponse(execution)]]> - - - + @@ -233,10 +231,10 @@ ddsi.preCompareModelVersions(execution)]]> - + SequenceFlow_0secadm - SequenceFlow_1n8h3zt SequenceFlow_0zmd4rt + SequenceFlow_1n8h3zt @@ -301,9 +299,6 @@ csi.prepareInitServiceOperationStatus(execution)]]> SequenceFlow_1wzk6tu SequenceFlow_0kvl23y - - - SequenceFlow_0t7zinj @@ -331,7 +326,10 @@ ddsi.preUpdateServiceOperationStatus(execution)]]> - + + + + @@ -606,13 +604,6 @@ ddsi.preUpdateServiceOperationStatus(execution)]]> - - - - - - - @@ -689,6 +680,13 @@ ddsi.preUpdateServiceOperationStatus(execution)]]> + + + + + + + diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn index ca43c00952..5e00358302 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoUpdateE2EServiceInstance.bpmn @@ -35,7 +35,7 @@ csi.postProcessForAddResource(execution)]]> SequenceFlow_1qn0865 - SequenceFlow_14rubz2 + SequenceFlow_1s799cp @@ -52,7 +52,6 @@ csi.postProcessForDeleteResource(execution)]]> - SequenceFlow_04xlw7s SequenceFlow_0r6c0ci @@ -98,6 +97,7 @@ ddsi.preInitResourcesOperStatus(execution)]]> + SequenceFlow_1kx5ke9 SequenceFlow_0f76thv @@ -214,33 +214,24 @@ dcsi.preProcessAAIPUT(execution)]]> - + SequenceFlow_0yztz2p SequenceFlow_0ttlte0 SequenceFlow_01po987 - + + + SequenceFlow_01po987 - - - - - SequenceFlow_14rubz2 - SequenceFlow_0vjx5a2 - SequenceFlow_1do7kq0 - + - SequenceFlow_1do7kq0 + SequenceFlow_070o30v - - - - @@ -250,11 +241,11 @@ dcsi.preProcessAAIPUT(execution)]]> - + - SequenceFlow_0vjx5a2 + SequenceFlow_0ur34hv SequenceFlow_0w4t4ao @@ -280,6 +271,16 @@ dcsi.preProcessAAIPUT(execution)]]> SequenceFlow_1wwjugw + + SequenceFlow_1s799cp + SequenceFlow_0ur34hv + SequenceFlow_070o30v + + + + + + @@ -348,13 +349,6 @@ dcsi.preProcessAAIPUT(execution)]]> - - - - - - - @@ -589,16 +583,10 @@ dcsi.preProcessAAIPUT(execution)]]> - - - - - - - + - + @@ -608,20 +596,6 @@ dcsi.preProcessAAIPUT(execution)]]> - - - - - - - - - - - - - - @@ -644,6 +618,35 @@ dcsi.preProcessAAIPUT(execution)]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit 1.2.3-korg