aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOInfrastructureBPMN/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/main')
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy11
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy19
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteE2EServiceInstance.bpmn26
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn24
4 files changed, 61 insertions, 19 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy
index 003210f602..98a1a43035 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy
@@ -337,12 +337,13 @@ public class DoDeleteE2EServiceInstance extends AbstractServiceTaskProcessor {
try {
utils.log("DEBUG", " ***** Inside prepareDecomposeService of create generic e2e service ***** ", isDebugEnabled)
- String modelInvariantUuid = execution.getVariable("model-invariant-id")
+ String modelInvariantUuid = execution.getVariable("model-invariant-id-original")
+ String modelVersionId = execution.getVariable("model-version-id-original")
//here modelVersion is not set, we use modelUuid to decompose the service.
String serviceModelInfo = """{
"modelInvariantUuid":"${modelInvariantUuid}",
- "modelUuid":"${modelUuid}",
- "modelVersion":""
+ "modelUuid":"",
+ "modelVersion":"${modelVersionId}"
}"""
execution.setVariable("serviceModelInfo", serviceModelInfo)
@@ -357,16 +358,18 @@ public class DoDeleteE2EServiceInstance extends AbstractServiceTaskProcessor {
public void postDecomposeService(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG", " ***** Inside processDecomposition() of create generic e2e service flow ***** ", isDebugEnabled)
+ utils.log("DEBUG", " ***** Inside processDecomposition() of delete generic e2e service flow ***** ", isDebugEnabled)
try {
ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
List<Resource> deleteResourceList = serviceDecomposition.getServiceResources()
execution.setVariable("deleteResourceList", deleteResourceList)
+ execution.setVariable("resourceInstanceIDs", execution.getVariable("serviceRelationShip"))
} catch (Exception ex) {
String exceptionMessage = "Bpmn error encountered in create generic e2e service flow. processDecomposition() - " + ex.getMessage()
utils.log("DEBUG", exceptionMessage, isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
}
+ utils.log("DEBUG", " ***** exit processDecomposition() of delete generic e2e service flow ***** ", isDebugEnabled)
}
public void preInitResourcesOperStatus(DelegateExecution execution){
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy
index 6c150df754..38dca886b4 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy
@@ -41,6 +41,23 @@ import org.openecomp.mso.bpmn.infrastructure.properties.BPMNProperties
import static org.apache.commons.lang3.StringUtils.isBlank
import static org.apache.commons.lang3.StringUtils.isBlank
+
+/**
+ * input for script :
+ * msoRequestId
+ * isDebugLogEnabled
+ * globalSubscriberId
+ * serviceType
+ * serviceInstanceId
+ * URN_mso_workflow_sdncadapter_callback
+ * serviceInputParams
+ * deleteResourceList
+ * resourceInstanceIDs
+ *
+ * output from script:
+ *
+ */
+
public class DoDeleteResourcesV1 extends AbstractServiceTaskProcessor {
String Prefix="DDR_"
@@ -132,7 +149,7 @@ public class DoDeleteResourcesV1 extends AbstractServiceTaskProcessor {
List<String> resourceSequence = new ArrayList<String>()
// get delete resource list and order list
- List<Resource> delResourceList = execution.getVariable("delResourceList")
+ List<Resource> delResourceList = execution.getVariable("deleteResourceList")
// existing resource list
List<ServiceInstance> existResourceList = execution.getVariable("realNSRessources")
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteE2EServiceInstance.bpmn
index a08471abed..ac8e60778b 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteE2EServiceInstance.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteE2EServiceInstance.bpmn
@@ -132,17 +132,39 @@ def dcsi= new DoDeleteE2EServiceInstance()
dcsi.prepareDecomposeService(execution)]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:callActivity id="Task_0mhdfuu" name="Call Decompose Service" calledElement="DecomposeService">
+ <bpmn:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="requestParameters" target="requestParameters" />
+ <camunda:out source="rollbackData" target="rollbackData" />
+ <camunda:out source="rolledBack" target="rolledBack" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="serviceDecomposition" target="serviceDecomposition" />
+ </bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_0fo5vw5</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0orw2f8</bpmn:outgoing>
</bpmn:callActivity>
- <bpmn:scriptTask id="Task_1yx1n05" name="Post Decompose Service">
+ <bpmn:scriptTask id="Task_1yx1n05" name="Post Decompose Service" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_0orw2f8</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0ha8ix9</bpmn:outgoing>
<bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def dcsi= new DoDeleteE2EServiceInstance()
dcsi.postDecomposeService(execution)]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:callActivity id="Task_1f5dlsv" name="Delete Resources" calledElement="DoDeleteResource" camunda:calledElementTenantId="DoDeleteResources">
+ <bpmn:callActivity id="Task_1f5dlsv" name="Delete Resources" calledElement="DoDeleteResourcesV1">
+ <bpmn:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="URN_mso_workflow_sdncadapter_callback" target="URN_mso_workflow_sdncadapter_callback" />
+ <camunda:in source="serviceInputParams" target="serviceInputParams" />
+ <camunda:in source="deleteResourceList" target="deleteResourceList" />
+ <camunda:in source="resourceInstanceIDs" target="resourceInstanceIDs" />
+ </bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1j08ko3</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1cevtpy</bpmn:outgoing>
</bpmn:callActivity>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn
index d8dea30ad8..f74dab147b 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteResourcesV1.bpmn
@@ -1,32 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3">
- <bpmn:process id="DoDeleteResourceV1" name="DoDeleteResourceV1" isExecutable="true">
+ <bpmn:process id="DoDeleteResourcesV1" name="DoDeleteResourcesV1" isExecutable="true">
<bpmn:startEvent id="StartEvent_1" name="Start Resource Delete">
<bpmn:outgoing>SequenceFlow_0stqur4</bpmn:outgoing>
</bpmn:startEvent>
- <bpmn:scriptTask id="ScriptTask_0ngvt9d" name="Prepare Delete Resource Recipe">
+ <bpmn:scriptTask id="ScriptTask_0ngvt9d" name="Prepare Delete Resource Recipe" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_1oil1t3</bpmn:incoming>
<bpmn:incoming>SequenceFlow_13nyd1j</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1qm7owo</bpmn:outgoing>
<bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
String resourceName = execution.getVariable("resourceType")
-def ddrs = new DoDeleteResource()
+def ddrs = new DoDeleteResourcesV1()
ddrs.preResourceDelete(execution, resourceName )]]></bpmn:script>
</bpmn:scriptTask>
- <bpmn:scriptTask id="ScriptTask_15zy0jf" name="Execute Delete Resource Recipe">
+ <bpmn:scriptTask id="ScriptTask_15zy0jf" name="Execute Delete Resource Recipe" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_1qm7owo</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1ly5jrs</bpmn:outgoing>
<bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
String resourceName = execution.getVariable("resourceType")
-def ddr = new DoDeleteResource()
+def ddr = new DoDeleteResourcesV1()
ddr.executeResourceDelete(execution, resourceName )]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:scriptTask id="ScriptTask_1gf78zz" name="Parse Next Resource" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_1ly5jrs</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0i1gez5</bpmn:outgoing>
<bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-def ddr = new DoDeleteResource()
-ddsr.parseNextResource(execution)]]></bpmn:script>
+def ddr = new DoDeleteResourcesV1()
+ddr.parseNextResource(execution)]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:exclusiveGateway id="ExclusiveGateway_0rtr0n7" name="Is All Resource Deleted">
<bpmn:incoming>SequenceFlow_0i1gez5</bpmn:incoming>
@@ -97,21 +97,21 @@ ex.processJavaException(execution)]]></bpmn:script>
<bpmn:incoming>SequenceFlow_14dezx8</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_13nyd1j</bpmn:outgoing>
<bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-def ddrs = new DoDeleteResource()
+def ddrs = new DoDeleteResourcesV1()
ddrs.sequenceResource(execution)]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="SequenceFlow_13nyd1j" sourceRef="ScriptTask_12460xo" targetRef="ScriptTask_0ngvt9d" />
<bpmn:sequenceFlow id="SequenceFlow_14dezx8" sourceRef="Task_1ue68b0" targetRef="ScriptTask_12460xo" />
- <bpmn:scriptTask id="Task_1ue68b0" name="Preprocess Incoming Request">
+ <bpmn:scriptTask id="Task_1ue68b0" name="Preprocess Incoming Request" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_0stqur4</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_14dezx8</bpmn:outgoing>
<bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-def ddrs = new DoDeleteResource()
+def ddrs = new DoDeleteResourcesV1()
ddrs.preProcessRequest(execution)]]></bpmn:script>
</bpmn:scriptTask>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteResourceV1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteResourcesV1">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="-70" y="255" width="36" height="36" />
<bpmndi:BPMNLabel>
@@ -301,4 +301,4 @@ ddrs.preProcessRequest(execution)]]></bpmn:script>
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
-</bpmn:definitions> \ No newline at end of file
+</bpmn:definitions>