aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
authorsubhash kumar singh <subhash.kumar.singh@huawei.com>2018-04-23 12:52:44 +0000
committersubhash kumar singh <subhash.kumar.singh@huawei.com>2018-04-23 13:46:37 +0000
commit969907feeede6079bed85c930f2819fad9125e19 (patch)
tree43daf82531743cfd2e22affd136d830f80397300 /bpmn
parent2b544715bd299ec1d45ca55f79f0e88646f8f600 (diff)
Add generic workflow for delete NS
Add generic workflow for delete NS. Change-Id: I2bc1fe01aec3066e7ec6d8627c8bdcb79ce262fc Issue-ID: SO-422 Signed-off-by: subhash kumar singh <subhash.kumar.singh@huawei.com>
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy47
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVFCNSResource.bpmn146
2 files changed, 193 insertions, 0 deletions
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
new file mode 100644
index 0000000000..be099eb9af
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy
@@ -0,0 +1,47 @@
+
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.bpmn.infrastructure.scripts
+
+import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.openecomp.mso.bpmn.core.json.JsonUtils
+import org.openecomp.mso.bpmn.common.scripts.ExceptionUtil
+
+
+public class DeleteVFCNSResource extends AbstractServiceTaskProcessor {
+
+ String Prefix = "DCUSE_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+
+ public void preProcessRequest (DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO"," ***** start preProcessRequest *****", isDebugEnabled)
+
+ utils.log("INFO"," ***** end preProcessRequest *****", isDebugEnabled)
+ }
+
+ public void postProcessRequest (DelegateExecution execution) {
+ utils.log("INFO"," ***** start postProcessRequest *****", isDebugEnabled)
+
+ utils.log("INFO"," ***** end postProcessRequest *****", 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
new file mode 100644
index 0000000000..514abb0d52
--- /dev/null
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVFCNSResource.bpmn
@@ -0,0 +1,146 @@
+<?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3">
+ <bpmn:process id="DeleteVFCNSResource" name="DeleteVFCNSResource" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1" name="Start Custom Delete E2E NS">
+ <bpmn:outgoing>SequenceFlow_0x2e9we</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0x2e9we" sourceRef="StartEvent_1" targetRef="Task_0yl3rau" />
+ <bpmn:sequenceFlow id="SequenceFlow_00vpfm3" sourceRef="Task_0yl3rau" targetRef="Task_14gmbq4" />
+ <bpmn:sequenceFlow id="SequenceFlow_1s4cyms" sourceRef="Task_14gmbq4" targetRef="Task_1e27uaw" />
+ <bpmn:endEvent id="EndEvent_07ew0rf" name="End Custom Delete E2E NS">
+ <bpmn:incoming>SequenceFlow_152xb4z</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_152xb4z" sourceRef="Task_1e27uaw" targetRef="EndEvent_07ew0rf" />
+ <bpmn:scriptTask id="Task_0yl3rau" name="DoCustomDeleteE2ENS prepare" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0x2e9we</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_00vpfm3</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def ddsi = new DeleteVFCNSResource()
+ddsi.preProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="Task_1e27uaw" name="Post delet NS resource" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1s4cyms</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_152xb4z</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def ddsi = new DeleteVFCNSResource()
+ddsi.postProcessRequest(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="Task_14gmbq4" name="Call Delete NS Instance" calledElement="DoDeleteVFCNetworkServiceInstance">
+ <bpmn:extensionElements>
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="serviceInstanceId" target="serviceId" />
+ <camunda:in source="operationId" target="operationId" />
+ <camunda:in source="resourceTemplateId" target="resourceTemplateId" />
+ <camunda:in source="resourceInstanceId" target="resourceInstanceId" />
+ <camunda:in source="resourceType" target="resourceType" />
+ <camunda:in source="operationType" target="operationType" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_00vpfm3</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1s4cyms</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:subProcess id="SubProcess_11qmm22" triggeredByEvent="true">
+ <bpmn:startEvent id="StartEvent_0zwedl6">
+ <bpmn:outgoing>SequenceFlow_0yro7o2</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_10tfowz">
+ <bpmn:incoming>SequenceFlow_0p0ayci</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_0tdtqwh" name="Log / Print Unexpected Error">
+ <bpmn:incoming>SequenceFlow_0yro7o2</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0p0ayci</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0yro7o2" sourceRef="StartEvent_0zwedl6" targetRef="ScriptTask_0tdtqwh" />
+ <bpmn:sequenceFlow id="SequenceFlow_0p0ayci" sourceRef="ScriptTask_0tdtqwh" targetRef="EndEvent_10tfowz" />
+ </bpmn:subProcess>
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteVFCNSResource">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="330" y="336" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="312" y="372" width="76" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0x2e9we_di" bpmnElement="SequenceFlow_0x2e9we">
+ <di:waypoint xsi:type="dc:Point" x="366" y="354" />
+ <di:waypoint xsi:type="dc:Point" x="530" y="354" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="448" y="333" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_00vpfm3_di" bpmnElement="SequenceFlow_00vpfm3">
+ <di:waypoint xsi:type="dc:Point" x="630" y="354" />
+ <di:waypoint xsi:type="dc:Point" x="774" y="354" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="702" y="333" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1s4cyms_di" bpmnElement="SequenceFlow_1s4cyms">
+ <di:waypoint xsi:type="dc:Point" x="874" y="354" />
+ <di:waypoint xsi:type="dc:Point" x="1018" y="354" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="946" y="333" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_07ew0rf_di" bpmnElement="EndEvent_07ew0rf">
+ <dc:Bounds x="1313" y="336" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1293" y="376" width="76" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_152xb4z_di" bpmnElement="SequenceFlow_152xb4z">
+ <di:waypoint xsi:type="dc:Point" x="1118" y="354" />
+ <di:waypoint xsi:type="dc:Point" x="1313" y="354" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1215.5" y="333" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1ssr09e_di" bpmnElement="Task_0yl3rau">
+ <dc:Bounds x="530" y="314" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_092ktxo_di" bpmnElement="Task_1e27uaw">
+ <dc:Bounds x="1018" y="314" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_00p99pt_di" bpmnElement="Task_14gmbq4">
+ <dc:Bounds x="774" y="314" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_11qmm22_di" bpmnElement="SubProcess_11qmm22" isExpanded="true">
+ <dc:Bounds x="636" y="539" width="350" height="200" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_0zwedl6_di" bpmnElement="StartEvent_0zwedl6">
+ <dc:Bounds x="667" y="606" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="639" y="644" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_10tfowz_di" bpmnElement="EndEvent_10tfowz">
+ <dc:Bounds x="931" y="606" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="904" y="645" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0tdtqwh_di" bpmnElement="ScriptTask_0tdtqwh">
+ <dc:Bounds x="763" y="584" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0yro7o2_di" bpmnElement="SequenceFlow_0yro7o2">
+ <di:waypoint xsi:type="dc:Point" x="703" y="624" />
+ <di:waypoint xsi:type="dc:Point" x="763" y="624" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="688" y="603" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0p0ayci_di" bpmnElement="SequenceFlow_0p0ayci">
+ <di:waypoint xsi:type="dc:Point" x="863" y="624" />
+ <di:waypoint xsi:type="dc:Point" x="931" y="624" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="852" y="603" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
lugin</artifactId> <goals> <goal>generate-builders</goal> </goals> <versionRange>[0.0,)</versionRange> </pluginExecutionFilter> <action> <execute /> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata> </configuration> </plugin> </plugins> </pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>unpack</id> <phase>generate-sources</phase> <goals> <goal>unpack</goal> </goals> <configuration> <artifactItems> <artifactItem> <groupId>org.onap.aai.traversal</groupId> <artifactId>aai-traversal</artifactId> <version>1.6.3</version> <outputDirectory>${project.build.directory}/antlr</outputDirectory> <includes>**/*.g4</includes> </artifactItem> <artifactItem> <groupId>org.onap.aai.schema-service</groupId> <artifactId>aai-schema</artifactId> <outputDirectory>${project.build.directory}/swagger</outputDirectory> <includes>**/*.yaml</includes> </artifactItem> </artifactItems> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.onap.so</groupId> <artifactId>fluent-builder-maven-plugin</artifactId> <version>${project.version}</version> <executions> <execution> <goals> <goal>generate-builders</goal> </goals> <configuration> <destination>${project.build.directory}/generated-sources</destination> <destinationClasspath>org.onap.aaiclient.client.generated.fluentbuilders</destinationClasspath> <builderName>AAIFluentTypeBuilder</builderName> <swaggerLocation>${project.build.directory}/swagger/onap/aai_swagger_yaml/aai_swagger_v19.yaml</swaggerLocation> <singularBuilderClass>org.onap.aaiclient.client.aai.entities.uri.AAIFluentSingleType</singularBuilderClass> <pluralBuilderClass>org.onap.aaiclient.client.aai.entities.uri.AAIFluentPluralType</pluralBuilderClass> <topLevelBuilderClass>org.onap.aaiclient.client.aai.entities.uri.AAIFluentTopLevelType</topLevelBuilderClass> <baseBuilderClass>org.onap.aaiclient.client.graphinventory.GraphInventoryFluentTypeBase</baseBuilderClass> <singularClass>org.onap.aaiclient.client.aai.AAIObjectType</singularClass> <pluralClass>org.onap.aaiclient.client.aai.AAIObjectPlurals</pluralClass> <nameClass>org.onap.aaiclient.client.aai.AAIObjectName</nameClass> <singleFragmentClass>org.onap.aaiclient.client.aai.entities.uri.AAISingleFragment</singleFragmentClass> <pluralFragmentClass>org.onap.aaiclient.client.aai.entities.uri.AAIPluralFragment</pluralFragmentClass> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> <execution> <id>add-source</id> <phase>generate-sources</phase> <goals> <goal>add-source</goal> </goals> <configuration> <sources> <source>${project.build.directory}/generated-sources/fluent/</source> </sources> </configuration> </execution> </executions> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>org.onap.so</groupId> <artifactId>common</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <scope>compile</scope> <optional>true</optional> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-rs-client</artifactId> <version>3.2.5</version> <optional>true</optional> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-annotations</artifactId> </dependency> <dependency> <groupId>com.fasterxml.jackson.module</groupId> <artifactId>jackson-module-jaxb-annotations</artifactId> </dependency> <dependency> <groupId>com.fasterxml.jackson.jaxrs</groupId> <artifactId>jackson-jaxrs-json-provider</artifactId> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> </dependency> <dependency> <groupId>org.onap.logging-analytics</groupId> <artifactId>logging-slf4j</artifactId> </dependency> <dependency> <groupId>org.onap.logging-analytics</groupId> <artifactId>logging-filter-base</artifactId> </dependency> <dependency> <groupId>org.onap.logging-analytics</groupId> <artifactId>logging-filter-spring</artifactId> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.hamcrest</groupId> <artifactId>hamcrest-all</artifactId> <version>1.3</version> <scope>test</scope> </dependency> <dependency> <groupId>javax.ws.rs</groupId> <artifactId>javax.ws.rs-api</artifactId> <version>2.1</version> </dependency> <dependency> <groupId>com.github.tomakehurst</groupId> <artifactId>wiremock-standalone</artifactId> <version>2.13.0</version> <scope>test</scope> <exclusions> <exclusion> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty</artifactId> </exclusion> <exclusion> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> </exclusion> <exclusion> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> </exclusion> <exclusion> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-annotations</artifactId> </exclusion> <exclusion> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> </exclusion> <exclusion> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> </exclusion> <exclusion> <groupId>org.skyscreamer</groupId> <artifactId>jsonassert</artifactId> </exclusion> <exclusion> <groupId>xmlunit</groupId> <artifactId>xmlunit</artifactId> </exclusion> <exclusion> <groupId>com.jayway.jsonpath</groupId> <artifactId>json-path</artifactId> </exclusion> <exclusion> <groupId>net.sf.jopt-simple</groupId> <artifactId>jopt-simple</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>com.shazam</groupId> <artifactId>shazamcrest</artifactId> <version>0.11</version> <scope>test</scope> <exclusions> <exclusion> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> </exclusion> <exclusion> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.onap.aai.schema-service</groupId> <artifactId>aai-schema</artifactId> </dependency> <dependency> <groupId>com.jayway.jsonpath</groupId> <artifactId>json-path</artifactId> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> </dependency> <dependency> <groupId>org.antlr</groupId> <artifactId>antlr4-runtime</artifactId> <version>4.7</version> </dependency> <dependency> <groupId>net.jodah</groupId> <artifactId>failsafe</artifactId> <version>2.0.1</version> </dependency> <dependency> <groupId>org.reflections</groupId> <artifactId>reflections</artifactId> <version>0.9.11</version> </dependency> </dependencies> </project>