summaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/so-bpmn-building-blocks/pom.xml6
-rw-r--r--bpmn/so-bpmn-infrastructure-common/pom.xml8
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy14
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy70
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/pom.xml8
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn1
6 files changed, 54 insertions, 53 deletions
diff --git a/bpmn/so-bpmn-building-blocks/pom.xml b/bpmn/so-bpmn-building-blocks/pom.xml
index a8a6441740..98232639e6 100644
--- a/bpmn/so-bpmn-building-blocks/pom.xml
+++ b/bpmn/so-bpmn-building-blocks/pom.xml
@@ -1,5 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.onap.so</groupId>
<artifactId>bpmn</artifactId>
@@ -83,7 +83,7 @@
</goals>
</pluginExecutionFilter>
<action>
- <ignore></ignore>
+ <ignore/>
</action>
</pluginExecution>
</pluginExecutions>
diff --git a/bpmn/so-bpmn-infrastructure-common/pom.xml b/bpmn/so-bpmn-infrastructure-common/pom.xml
index ab0ac25a99..9bc9cc59a6 100644
--- a/bpmn/so-bpmn-infrastructure-common/pom.xml
+++ b/bpmn/so-bpmn-infrastructure-common/pom.xml
@@ -1,5 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.onap.so</groupId>
<artifactId>bpmn</artifactId>
@@ -107,7 +107,7 @@
</goals>
</pluginExecutionFilter>
<action>
- <ignore></ignore>
+ <ignore/>
</action>
</pluginExecution>
</pluginExecutions>
@@ -199,7 +199,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
- <version>22.0</version>
+
</dependency>
<dependency>
<groupId>com.fasterxml.uuid</groupId>
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
index 7fa8b4409b..808bbc1898 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVnf.groovy
@@ -259,6 +259,9 @@ class DoCreateVnf extends AbstractServiceTaskProcessor {
AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
if(resourceClient.exists(uri)){
+ Map<String, String> keys = uri.getURIKeys()
+ execution.setVariable("globalCustomer", keys.get("global-customer-id"))
+ execution.setVariable("serviceType", keys.get("service-type"))
execution.setVariable("GENGS_siResourceLink", uri.build().toString())
}else{
@@ -307,14 +310,9 @@ class DoCreateVnf extends AbstractServiceTaskProcessor {
//Get Service Instance Info
String serviceInstanceId = getVariableEnforced(execution, "DoCVNF_serviceInstanceId")
- String siRelatedLink = getVariableEnforced(execution, "GENGS_siResourceLink")
-
- int custStart = siRelatedLink.indexOf("customer/")
- int custEnd = siRelatedLink.indexOf("/service-subscriptions")
- String globalCustId = siRelatedLink.substring(custStart + 9, custEnd)
- int serviceStart = siRelatedLink.indexOf("service-subscription/")
- int serviceEnd = siRelatedLink.indexOf("/service-instances/")
- String serviceType = siRelatedLink.substring(serviceStart + 21, serviceEnd)
+
+ String globalCustId = execution.getVariable("global-customer-id")
+ String serviceType = execution.getVariable("service-type")
Map<String, String> payload = new LinkedHashMap<>();
payload.put("vnf-id", vnfId);
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy
index a79483f6e9..eb736f8ffe 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteServiceInstance.groovy
@@ -305,45 +305,47 @@ public class DoDeleteServiceInstance extends AbstractServiceTaskProcessor {
}
AAIResultWrapper wrapper = resourceClient.get(uri)
- List<AAIResourceUri> uriList = wrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.ALLOTTED_RESOURCE)
- uriList.addAll(wrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.GENERIC_VNF))
- uriList.addAll(wrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.L3_NETWORK))
-
- if(uriList.isEmpty){
- Optional<ServiceInstance> si = wrapper.asBean(ServiceInstance.class)
- String orchestrationStatus = si.get().getOrchestrationStatus()
- String serviceType = si.get().getServiceType()
- execution.setVariable("serviceType", serviceType)
- execution.setVariable("serviceRole", si.get().getServiceRole())
-
- if("TRANSPORT".equalsIgnoreCase(serviceType)){
- if("PendingDelete".equals(orchestrationStatus)){
- execution.setVariable("skipDeactivate", true)
- }else{
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "ServiceInstance of type TRANSPORT must in PendingDelete status to allow Delete. Orchestration-status: " + orchestrationStatus)
+ if(wrapper.getRelationships().isPresent()){
+ List<AAIResourceUri> uriList = wrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.ALLOTTED_RESOURCE)
+ uriList.addAll(wrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.GENERIC_VNF))
+ uriList.addAll(wrapper.getRelationships().get().getRelatedAAIUris(AAIObjectType.L3_NETWORK))
+
+ if(uriList.isEmpty()){
+ Optional<ServiceInstance> si = wrapper.asBean(ServiceInstance.class)
+ String orchestrationStatus = si.get().getOrchestrationStatus()
+ String serviceType = si.get().getServiceType()
+ execution.setVariable("serviceType", serviceType)
+ execution.setVariable("serviceRole", si.get().getServiceRole())
+
+ if("TRANSPORT".equalsIgnoreCase(serviceType)){
+ if("PendingDelete".equals(orchestrationStatus)){
+ execution.setVariable("skipDeactivate", true)
+ }else{
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "ServiceInstance of type TRANSPORT must in PendingDelete status to allow Delete. Orchestration-status: " + orchestrationStatus)
+ }
}
- }
- String svcTypes = UrnPropertiesReader.getVariable("sdnc.si.svc.types",execution) ?: ""
- List<String> svcList = Arrays.asList(svcTypes.split("\\s*,\\s*"));
- boolean isSdncService= false
- for(String listEntry : svcList){
- if(listEntry.equalsIgnoreCase(serviceType)){
- isSdncService = true
- break;
+ String svcTypes = UrnPropertiesReader.getVariable("sdnc.si.svc.types",execution) ?: ""
+ List<String> svcList = Arrays.asList(svcTypes.split("\\s*,\\s*"));
+ boolean isSdncService= false
+ for(String listEntry : svcList){
+ if(listEntry.equalsIgnoreCase(serviceType)){
+ isSdncService = true
+ break;
+ }
}
- }
- execution.setVariable("sendToSDNC", true)
- if(execution.getVariable("sdncVersion").equals("1610")){
- if(!isSdncService){
- execution.setVariable("sendToSDNC", false)
+ execution.setVariable("sendToSDNC", true)
+ if(execution.getVariable("sdncVersion").equals("1610")){
+ if(!isSdncService){
+ execution.setVariable("sendToSDNC", false)
+ }
}
- }
- }else{
- execution.setVariable("siInUse", true)
- msoLogger.debug("Stopped deleting Service Instance, it has dependencies")
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Stopped deleting Service Instance, it has dependencies")
+ }else{
+ execution.setVariable("siInUse", true)
+ msoLogger.debug("Stopped deleting Service Instance, it has dependencies")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Stopped deleting Service Instance, it has dependencies")
+ }
}
}else{
exceptionUtil.buildAndThrowWorkflowException(execution, 500, "ServiceInstance not found in aai")
diff --git a/bpmn/so-bpmn-infrastructure-flows/pom.xml b/bpmn/so-bpmn-infrastructure-flows/pom.xml
index 1a3a64bcc8..4db7b3ff66 100644
--- a/bpmn/so-bpmn-infrastructure-flows/pom.xml
+++ b/bpmn/so-bpmn-infrastructure-flows/pom.xml
@@ -1,5 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.onap.so</groupId>
<artifactId>bpmn</artifactId>
@@ -62,7 +62,7 @@
</goals>
</pluginExecutionFilter>
<action>
- <ignore></ignore>
+ <ignore/>
</action>
</pluginExecution>
</pluginExecutions>
@@ -170,7 +170,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
- <version>22.0</version>
+
</dependency>
<dependency>
<groupId>org.mockito</groupId>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn
index 9ea6a9b5c4..5833244c7c 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateVcpeResCustService.bpmn
@@ -454,6 +454,7 @@ CreateVcpeResCustService.prepareCreateAllottedResourceTXC(execution)]]></bpmn2:s
<camunda:in source="cloudRegionId" target="cloudRegionId" />
<camunda:in source="serviceInstanceName" target="serviceInstanceName" />
<camunda:in source="homingModelIds" target="homingModelIds" />
+ <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_11efpvh</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1jbuf1t</bpmn2:outgoing>