summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java24
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/ArtifactInfoImpl.java2
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/NotificationDataImpl.java2
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/ResourceInfoImpl.java2
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java52
-rw-r--r--asdc-controller/src/test/java/org/onap/so/asdc/client/test/rest/ASDCRestInterfaceTest.java37
-rw-r--r--asdc-controller/src/test/resources/resource-examples/vFW/base_vfw.env38
-rw-r--r--asdc-controller/src/test/resources/resource-examples/vFW/base_vfw.yaml491
-rw-r--r--asdc-controller/src/test/resources/resource-examples/vFW/notification.json80
-rw-r--r--asdc-controller/src/test/resources/resource-examples/vFW/service-Vfw.csarbin0 -> 96717 bytes
-rw-r--r--asdc-controller/src/test/resources/resource-examples/vFW/vfw1f52feb055020_modules.json25
-rw-r--r--asdc-controller/src/test/resources/schema.sql171
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java2
-rw-r--r--bpmn/mso-infrastructure-bpmn/pom.xml11
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn4
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/HomingBB.bpmn272
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java4
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVnfBBTest.java2
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/HomingBBTest.java17
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/PnfNotificationEvent.java42
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClient.java18
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java15
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java8
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java26
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java17
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java30
26 files changed, 995 insertions, 397 deletions
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java
index 57e9c173b9..f2e875fc0c 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java
@@ -655,6 +655,7 @@ public class ASDCController {
// For each artifact, create a structure describing the VFModule in a ordered flat level
ResourceStructure resourceStructure = null;
String msoConfigPath = getMsoConfigPath();
+ boolean hasVFResource = false;
ToscaResourceStructure toscaResourceStructure = new ToscaResourceStructure(msoConfigPath);
boolean deploySuccessful = true;
String errorMessage = null;
@@ -697,7 +698,7 @@ public class ASDCController {
+ resourceStructure.getResourceInstance().getResourceUUID());
if ("VF".equals(resourceType) && !"Allotted Resource".equalsIgnoreCase(category)) {
-
+ hasVFResource = true;
for (IArtifactInfo artifact : resource.getArtifacts()) {
IDistributionClientDownloadResult resultArtifact =
this.downloadTheArtifact(artifact, iNotif.getDistributionID());
@@ -730,16 +731,19 @@ public class ASDCController {
logger.error("Exception occurred", e);
}
- // Deploy VF resource and artifacts
- logger.debug("Preparing to deploy Service: {}", iNotif.getServiceUUID());
- try {
- this.deployResourceStructure(resourceStructure, toscaResourceStructure);
- } catch (ArtifactInstallerException e) {
- deploySuccessful = false;
- errorMessage = e.getMessage();
- logger.error("Exception occurred", e);
- }
+ if (!hasVFResource) {
+
+ logger.debug("No resources found for Service: " + iNotif.getServiceUUID());
+ logger.debug("Preparing to deploy Service: {}", iNotif.getServiceUUID());
+ try {
+ this.deployResourceStructure(resourceStructure, toscaResourceStructure);
+ } catch (ArtifactInstallerException e) {
+ deploySuccessful = false;
+ errorMessage = e.getMessage();
+ logger.error("Exception occurred", e);
+ }
+ }
this.sendCsarDeployNotification(iNotif, resourceStructure, toscaResourceStructure, deploySuccessful,
errorMessage);
}
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/ArtifactInfoImpl.java b/asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/ArtifactInfoImpl.java
index b3618a8095..f4cfb1361f 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/ArtifactInfoImpl.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/ArtifactInfoImpl.java
@@ -23,9 +23,11 @@ package org.onap.so.asdc.client.test.emulators;
import java.util.ArrayList;
import java.util.List;
import org.onap.sdc.api.notification.IArtifactInfo;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.EqualsBuilder;
+@JsonIgnoreProperties(ignoreUnknown = true)
public class ArtifactInfoImpl implements IArtifactInfo {
private String artifactName;
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/NotificationDataImpl.java b/asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/NotificationDataImpl.java
index f8d7bb09f5..c61306fb77 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/NotificationDataImpl.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/NotificationDataImpl.java
@@ -29,12 +29,14 @@ import org.onap.sdc.api.notification.INotificationData;
import org.onap.sdc.api.notification.IResourceInstance;
import org.springframework.stereotype.Component;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
@Component
@JsonAutoDetect(fieldVisibility = Visibility.ANY, getterVisibility = Visibility.NONE,
setterVisibility = Visibility.NONE)
+@JsonIgnoreProperties(ignoreUnknown = true)
public class NotificationDataImpl implements INotificationData {
@JsonProperty("distributionID")
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/ResourceInfoImpl.java b/asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/ResourceInfoImpl.java
index 91597611fd..62d11ffec9 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/ResourceInfoImpl.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/ResourceInfoImpl.java
@@ -27,7 +27,9 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.onap.sdc.api.notification.IArtifactInfo;
import org.onap.sdc.api.notification.IResourceInstance;
import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+@JsonIgnoreProperties(ignoreUnknown = true)
public class ResourceInfoImpl implements IResourceInstance {
public ResourceInfoImpl() {}
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
index e61aafac2e..f3a495825c 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
@@ -261,7 +261,7 @@ public class ToscaResourceInstaller {
try {
Service existingService =
serviceRepo.findOneByModelUUID(vfResourceStructure.getNotification().getServiceUUID());
- if (existingService != null && serviceDeployed == false)
+ if (existingService != null && !serviceDeployed)
status = true;
if (status) {
logger.info(vfResourceStructure.getResourceInstance().getResourceInstanceName(),
@@ -387,12 +387,11 @@ public class ToscaResourceInstaller {
List<ASDCElementInfo> artifactListForLogging = new ArrayList<>();
try {
createToscaCsar(toscaResourceStruct);
- Service service = createService(toscaResourceStruct, vfResourceStruct);
+ createService(toscaResourceStruct, vfResourceStruct);
+ Service service = toscaResourceStruct.getCatalogService();
List<NodeTemplate> vfNodeTemplatesList = toscaResourceStruct.getSdcCsarHelper().getServiceVfList();
-
for (NodeTemplate nodeTemplate : vfNodeTemplatesList) {
-
Metadata metadata = nodeTemplate.getMetaData();
String serviceType = toscaResourceStruct.getCatalogService().getServiceType();
String vfCustomizationCategory = toscaResourceStruct.getSdcCsarHelper()
@@ -402,7 +401,6 @@ public class ToscaResourceInstaller {
}
processResourceSequence(toscaResourceStruct, service);
- processVFResources(toscaResourceStruct, service, vfResourceStructure);
List<NodeTemplate> allottedResourceList = toscaResourceStruct.getSdcCsarHelper().getAllottedResources();
processAllottedResources(toscaResourceStruct, service, allottedResourceList);
processNetworks(toscaResourceStruct, service);
@@ -410,7 +408,7 @@ public class ToscaResourceInstaller {
processNetworkCollections(toscaResourceStruct, service);
// Process Service Proxy & Configuration
processServiceProxyAndConfiguration(toscaResourceStruct, service);
-
+ logger.info("Saving Service: {} ", service.getModelName());
serviceRepo.save(service);
WatchdogComponentDistributionStatus status = new WatchdogComponentDistributionStatus(
@@ -763,48 +761,6 @@ public class ToscaResourceInstaller {
}
- protected void processVFResources(ToscaResourceStructure toscaResourceStruct, Service service,
- VfResourceStructure vfResourceStructure) throws Exception {
- logger.debug("processVFResources");
-
- List<NodeTemplate> vfNodeTemplatesList = toscaResourceStruct.getSdcCsarHelper().getServiceVfList();
- // String servicecategory = toscaResourceStruct.getCatalogService().getCategory();
- // String serviceType = toscaResourceStruct.getCatalogService().getServiceType();
-
- for (NodeTemplate nodeTemplate : vfNodeTemplatesList) {
- Metadata metadata = nodeTemplate.getMetaData();
- String vfCustomizationCategory = metadata.getValue(SdcPropertyNames.PROPERTY_NAME_CATEGORY);
- logger.debug("VF Category is : " + vfCustomizationCategory);
-
- // Do not treat Allotted Resources as VNF resources
- if (ALLOTTED_RESOURCE.equalsIgnoreCase(vfCustomizationCategory)) {
- continue;
- }
-
- String vfCustomizationUUID = metadata.getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID);
- logger.debug("VFCustomizationUUID=" + vfCustomizationUUID);
-
- IResourceInstance vfNotificationResource = vfResourceStructure.getResourceInstance();
-
- // Make sure the VF ResourceCustomizationUUID from the notification and tosca
- // customizations match before comparing their VF Modules UUID's
- logger.debug("Checking if Notification VF ResourceCustomizationUUID: "
- + vfNotificationResource.getResourceCustomizationUUID() + " matches Tosca VF Customization UUID: "
- + vfCustomizationUUID);
-
- if (vfCustomizationUUID.equals(vfNotificationResource.getResourceCustomizationUUID())) {
- logger.debug("vfCustomizationUUID: " + vfCustomizationUUID
- + " matches vfNotificationResource CustomizationUUID");
-
- processVfModules(toscaResourceStruct, vfResourceStructure, service, nodeTemplate, metadata,
- vfCustomizationCategory);
- } else {
- logger.debug("Notification VF ResourceCustomizationUUID: "
- + vfNotificationResource.getResourceCustomizationUUID() + " doesn't match "
- + "Tosca VF Customization UUID: " + vfCustomizationUUID);
- }
- }
- }
/**
* This is used to process the PNF specific resource, including resource and resource_customization.
diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/client/test/rest/ASDCRestInterfaceTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/client/test/rest/ASDCRestInterfaceTest.java
index 815f419c40..2e5ad13c21 100644
--- a/asdc-controller/src/test/java/org/onap/so/asdc/client/test/rest/ASDCRestInterfaceTest.java
+++ b/asdc-controller/src/test/java/org/onap/so/asdc/client/test/rest/ASDCRestInterfaceTest.java
@@ -42,6 +42,7 @@ import org.onap.so.asdc.client.test.emulators.DistributionClientEmulator;
import org.onap.so.asdc.client.test.emulators.NotificationDataImpl;
import org.onap.so.db.catalog.beans.AllottedResource;
import org.onap.so.db.catalog.beans.AllottedResourceCustomization;
+import org.onap.so.db.catalog.beans.Service;
import org.onap.so.db.catalog.data.repository.AllottedResourceRepository;
import org.onap.so.db.catalog.data.repository.NetworkResourceRepository;
import org.onap.so.db.catalog.data.repository.ServiceRepository;
@@ -139,6 +140,42 @@ public class ASDCRestInterfaceTest extends BaseTest {
}
@Test
+ @Transactional
+ public void test_VFW_Distrobution() throws Exception {
+
+ wireMockServer.stubFor(post(urlPathMatching("/aai/.*"))
+ .willReturn(aResponse().withStatus(200).withHeader("Content-Type", "application/json")));
+
+ ObjectMapper mapper = new ObjectMapper();
+ NotificationDataImpl request = mapper.readValue(
+ new File("src/test/resources/resource-examples/vFW/notification.json"), NotificationDataImpl.class);
+ headers.add("resource-location", "src/test/resources/resource-examples/vFW/");
+ HttpEntity<NotificationDataImpl> entity = new HttpEntity<NotificationDataImpl>(request, headers);
+
+ ResponseEntity<String> response = restTemplate.exchange(createURLWithPort("test/treatNotification/v1"),
+ HttpMethod.POST, entity, String.class);
+
+ assertEquals(Response.Status.OK.getStatusCode(), response.getStatusCode().value());
+
+ Service expectedService = new Service();
+ expectedService.setDescription("catalog service description");
+ expectedService.setModelInvariantUUID("3164f9ff-d7e7-4813-ab32-6be7e1cacb18");
+ expectedService.setModelName("vFW 2019-04-10 21:53:05");
+ expectedService.setModelUUID("e16e4ed9-3429-423a-bc3c-1389ae91491c");
+ expectedService.setModelVersion("1.0");
+
+
+
+ Service actualService = serviceRepo.findOneByModelUUID("e16e4ed9-3429-423a-bc3c-1389ae91491c");
+
+
+ if (actualService == null)
+ throw new Exception("No Allotted Resource Written to database");
+
+ assertEquals(expectedService.getModelName(), actualService.getModelName());
+ }
+
+ @Test
public void invokeASDCStatusDataNullTest() {
String request = "";
Response response = asdcRestInterface.invokeASDCStatusData(request);
diff --git a/asdc-controller/src/test/resources/resource-examples/vFW/base_vfw.env b/asdc-controller/src/test/resources/resource-examples/vFW/base_vfw.env
new file mode 100644
index 0000000000..f490db5249
--- /dev/null
+++ b/asdc-controller/src/test/resources/resource-examples/vFW/base_vfw.env
@@ -0,0 +1,38 @@
+parameters:
+ cloud_env: "openstack"
+ dcae_collector_ip: "10.0.4.1"
+ dcae_collector_port: "30235"
+ demo_artifacts_version: "1.4.0-SNAPSHOT"
+ install_script_version: "1.4.0-SNAPSHOT"
+ key_name: "vfw_key"
+ nexus_artifact_repo: "https://nexus.onap.org"
+ onap_private_net_cidr: "10.0.0.0/16"
+ onap_private_net_id: "PUT THE ONAP PRIVATE NETWORK NAME HERE"
+ onap_private_subnet_id: "PUT THE ONAP PRIVATE NETWORK NAME HERE"
+ protected_private_net_cidr: "192.168.20.0/24"
+ protected_private_net_id: "zdfw1fwl01_protected"
+ pub_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQXYJYYi3/OUZXUiCYWdtc7K0m5C0dJKVxPG0eI8EWZrEHYdfYe6WoTSDJCww+1qlBSpA5ac/Ba4Wn9vh+lR1vtUKkyIC/nrYb90ReUd385Glkgzrfh5HdR5y5S2cL/Frh86lAn9r6b3iWTJD8wBwXFyoe1S2nMTOIuG4RPNvfmyCTYVh8XTCCE8HPvh3xv2r4egawG1P4Q4UDwk+hDBXThY2KS8M5/8EMyxHV0ImpLbpYCTBA6KYDIRtqmgS6iKyy8v2D1aSY5mc9J0T5t9S2Gv+VZQNWQDDKNFnxqYaAo1uEoq/i1q63XC5AD3ckXb2VT6dp23BQMdDfbHyUWfJN"
+ public_net_id: "PUT THE PUBLIC NETWORK ID HERE"
+ sec_group: "PUT THE ONAP SECURITY GROUP HERE"
+ unprotected_private_net_cidr: "192.168.10.0/24"
+ unprotected_private_net_id: "zdfw1fwl01_unprotected"
+ vf_module_id: "vFirewall"
+ vfw_flavor_name: "PUT THE VM FLAVOR NAME HERE (m1.medium suggested)"
+ vfw_image_name: "PUT THE VM IMAGE NAME HERE (UBUNTU 1404 required)"
+ vfw_int_protected_private_floating_ip: "192.168.10.200"
+ vfw_int_protected_private_ip_0: "192.168.20.100"
+ vfw_int_unprotected_private_ip_0: "192.168.10.100"
+ vfw_name_0: "zdfw1fwl01fwl01"
+ vfw_onap_private_ip_0: "10.0.100.1"
+ vnf_id: "vFirewall_demo_app"
+ vnf_name: "vFW"
+ vpg_flavor_name: "PUT THE VM FLAVOR NAME HERE (m1.medium suggested)"
+ vpg_image_name: "PUT THE VM IMAGE NAME HERE (UBUNTU 1404 required)"
+ vpg_int_unprotected_private_ip_0: "192.168.10.200"
+ vpg_name_0: "zdfw1fwl01pgn01"
+ vpg_onap_private_ip_0: "10.0.100.2"
+ vsn_flavor_name: "PUT THE VM FLAVOR NAME HERE (m1.medium suggested)"
+ vsn_image_name: "PUT THE VM IMAGE NAME HERE (UBUNTU 1404 required)"
+ vsn_int_protected_private_ip_0: "192.168.20.250"
+ vsn_name_0: "zdfw1fwl01snk01"
+ vsn_onap_private_ip_0: "10.0.100.3"
diff --git a/asdc-controller/src/test/resources/resource-examples/vFW/base_vfw.yaml b/asdc-controller/src/test/resources/resource-examples/vFW/base_vfw.yaml
new file mode 100644
index 0000000000..6137e8ab8b
--- /dev/null
+++ b/asdc-controller/src/test/resources/resource-examples/vFW/base_vfw.yaml
@@ -0,0 +1,491 @@
+##########################################################################
+#
+#==================LICENSE_START==========================================
+#
+#
+# Copyright (c) 2017 AT&T Intellectual Property. 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============================================
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+##########################################################################
+
+heat_template_version: 2013-05-23
+
+description: Heat template that deploys vFirewall demo app for ONAP
+
+##############
+# #
+# PARAMETERS #
+# #
+##############
+
+parameters:
+ vfw_image_name:
+ type: string
+ label: Image name or ID
+ description: Image to be used for compute instance
+ vfw_flavor_name:
+ type: string
+ label: Flavor
+ description: Type of instance (flavor) to be used
+ vpg_image_name:
+ type: string
+ label: Image name or ID
+ description: Image to be used for compute instance
+ vpg_flavor_name:
+ type: string
+ label: Flavor
+ description: Type of instance (flavor) to be used
+ vsn_image_name:
+ type: string
+ label: Image name or ID
+ description: Image to be used for compute instance
+ vsn_flavor_name:
+ type: string
+ label: Flavor
+ description: Type of instance (flavor) to be used
+ public_net_id:
+ type: string
+ label: Public network name or ID
+ description: Public network that enables remote connection to VNF
+ unprotected_private_net_id:
+ type: string
+ label: Unprotected private network name or ID
+ description: Private network that connects vPacketGenerator with vFirewall
+ protected_private_net_id:
+ type: string
+ label: Protected private network name or ID
+ description: Private network that connects vFirewall with vSink
+ onap_private_net_id:
+ type: string
+ label: ONAP management network name or ID
+ description: Private network that connects ONAP components and the VNF
+ onap_private_subnet_id:
+ type: string
+ label: ONAP management sub-network name or ID
+ description: Private sub-network that connects ONAP components and the VNF
+ unprotected_private_net_cidr:
+ type: string
+ label: Unprotected private network CIDR
+ description: The CIDR of the unprotected private network
+ protected_private_net_cidr:
+ type: string
+ label: Protected private network CIDR
+ description: The CIDR of the protected private network
+ onap_private_net_cidr:
+ type: string
+ label: ONAP private network CIDR
+ description: The CIDR of the protected private network
+ vfw_int_unprotected_private_ip_0:
+ type: string
+ label: vFirewall private IP address towards the unprotected network
+ description: Private IP address that is assigned to the vFirewall to communicate with the vPacketGenerator
+ vfw_int_protected_private_ip_0:
+ type: string
+ label: vFirewall private IP address towards the protected network
+ description: Private IP address that is assigned to the vFirewall to communicate with the vSink
+ vfw_onap_private_ip_0:
+ type: string
+ label: vFirewall private IP address towards the ONAP management network
+ description: Private IP address that is assigned to the vFirewall to communicate with ONAP components
+ vfw_int_protected_private_floating_ip:
+ type: string
+ label: same value as vpg_int_unprotected_private_ip_0
+ description: IP to inform OpenStack to enable vfw protected private port to allow packets coming from the packet generator
+ vpg_int_unprotected_private_ip_0:
+ type: string
+ label: vPacketGenerator private IP address towards the unprotected network
+ description: Private IP address that is assigned to the vPacketGenerator to communicate with the vFirewall
+ vpg_onap_private_ip_0:
+ type: string
+ label: vPacketGenerator private IP address towards the ONAP management network
+ description: Private IP address that is assigned to the vPacketGenerator to communicate with ONAP components
+ vsn_int_protected_private_ip_0:
+ type: string
+ label: vSink private IP address towards the protected network
+ description: Private IP address that is assigned to the vSink to communicate with the vFirewall
+ vsn_onap_private_ip_0:
+ type: string
+ label: vSink private IP address towards the ONAP management network
+ description: Private IP address that is assigned to the vSink to communicate with ONAP components
+ vfw_name_0:
+ type: string
+ label: vFirewall name
+ description: Name of the vFirewall
+ vpg_name_0:
+ type: string
+ label: vPacketGenerator name
+ description: Name of the vPacketGenerator
+ vsn_name_0:
+ type: string
+ label: vSink name
+ description: Name of the vSink
+ vnf_id:
+ type: string
+ label: VNF ID
+ description: The VNF ID is provided by ONAP
+ vnf_name:
+ type: string
+ label: VNF NAME
+ description: The VNF NAME is provided by ONAP
+ vf_module_id:
+ type: string
+ label: vFirewall module ID
+ description: The vFirewall Module ID is provided by ONAP
+ dcae_collector_ip:
+ type: string
+ label: DCAE collector IP address
+ description: IP address of the DCAE collector
+ dcae_collector_port:
+ type: string
+ label: DCAE collector port
+ description: Port of the DCAE collector
+ key_name:
+ type: string
+ label: Key pair name
+ description: Public/Private key pair name
+ pub_key:
+ type: string
+ label: Public key
+ description: Public key to be installed on the compute instance
+ install_script_version:
+ type: string
+ label: Installation script version number
+ description: Version number of the scripts that install the vFW demo app
+ demo_artifacts_version:
+ type: string
+ label: Artifacts version used in demo vnfs
+ description: Artifacts (jar, tar.gz) version used in demo vnfs
+ nexus_artifact_repo:
+ type: string
+ description: Root URL for the Nexus repository for Maven artifacts.
+ cloud_env:
+ type: string
+ label: Cloud environment
+ description: Cloud environment (e.g., openstack, rackspace)
+ sec_group:
+ type: string
+ description: ONAP Security Group
+
+#############
+# #
+# RESOURCES #
+# #
+#############
+
+resources:
+ random-str:
+ type: OS::Heat::RandomString
+ properties:
+ length: 4
+
+ my_keypair:
+ type: OS::Nova::KeyPair
+ properties:
+ name:
+ str_replace:
+ template: vnfname_base_rand
+ params:
+ base: { get_param: key_name }
+ rand: { get_resource: random-str }
+ vnfname: { get_param: vnf_name }
+ public_key: { get_param: pub_key }
+ save_private_key: false
+
+ # NETWORK_ROLE: unprotected_private
+ # NETWORK_TYPE: internal
+ int_unprotected_private_network:
+ type: OS::Neutron::Net
+ properties:
+ name:
+ str_replace:
+ template: vnfname_netid
+ params:
+ netid: { get_param: unprotected_private_net_id }
+ vnfname: { get_param: vnf_name }
+
+ # NETWORK_ROLE: protected_private
+ # NETWORK_TYPE: internal
+ int_protected_private_network:
+ type: OS::Neutron::Net
+ properties:
+ name:
+ str_replace:
+ template: vnfname_netid
+ params:
+ netid: { get_param: protected_private_net_id }
+ vnfname: { get_param: vnf_name }
+
+ # NETWORK_ROLE: unprotected_private
+ # NETWORK_TYPE: internal
+ int_unprotected_private_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network: { get_resource: int_unprotected_private_network }
+ cidr: { get_param: unprotected_private_net_cidr }
+
+ # NETWORK_ROLE: protected_private
+ # NETWORK_TYPE: internal
+ int_protected_private_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ network: { get_resource: int_protected_private_network }
+ cidr: { get_param: protected_private_net_cidr }
+
+ ### Virtual Firewall instantiation ###
+
+ # VM_TYPE: vfw
+ # NETWORK_ROLE: protected_private
+ # NETWORK_TYPE: internal
+ vfw_0_int_unprotected_private_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: int_unprotected_private_network }
+ fixed_ips: [{"subnet": { get_resource: int_unprotected_private_subnet }, "ip_address": { get_param: vfw_int_unprotected_private_ip_0 }}]
+ security_groups:
+ - { get_param: sec_group }
+
+ # VM_TYPE: vfw
+ # NETWORK_ROLE: protected_private
+ # NETWORK_TYPE: internal
+ vfw_0_int_protected_private_port_0:
+ type: OS::Neutron::Port
+ properties:
+ allowed_address_pairs: [{ "ip_address": { get_param: vfw_int_protected_private_floating_ip }}]
+ network: { get_resource: int_protected_private_network }
+ fixed_ips: [{"subnet": { get_resource: int_protected_private_subnet }, "ip_address": { get_param: vfw_int_protected_private_ip_0 }}]
+ security_groups:
+ - { get_param: sec_group }
+
+ # VM_TYPE: vfw
+ # NETWORK_ROLE: onap_private
+ # NETWORK_TYPE: external
+ vfw_0_onap_private_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: onap_private_net_id }
+ fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vfw_onap_private_ip_0 }}]
+ security_groups:
+ - { get_param: sec_group }
+
+ # VM_TYPE: vfw
+ vfw_server_0:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: vfw_image_name }
+ flavor: { get_param: vfw_flavor_name }
+ name: { get_param: vfw_name_0 }
+ key_name: { get_resource: my_keypair }
+ networks:
+ - network: { get_param: public_net_id }
+ - port: { get_resource: vfw_0_int_unprotected_private_port_0 }
+ - port: { get_resource: vfw_0_int_protected_private_port_0 }
+ - port: { get_resource: vfw_0_onap_private_port_0 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ vnf_name: { get_param: vnf_name }
+ user_data_format: RAW
+ user_data:
+ str_replace:
+ params:
+ __dcae_collector_ip__ : { get_param: dcae_collector_ip }
+ __dcae_collector_port__ : { get_param: dcae_collector_port }
+ __demo_artifacts_version__ : { get_param: demo_artifacts_version }
+ __install_script_version__ : { get_param: install_script_version }
+ __vfw_private_ip_0__ : { get_param: vfw_int_unprotected_private_ip_0 }
+ __vfw_private_ip_1__ : { get_param: vfw_int_protected_private_ip_0 }
+ __vfw_private_ip_2__ : { get_param: vfw_onap_private_ip_0 }
+ __unprotected_private_net_cidr__ : { get_param: unprotected_private_net_cidr }
+ __protected_private_net_cidr__ : { get_param: protected_private_net_cidr }
+ __onap_private_net_cidr__ : { get_param: onap_private_net_cidr }
+ __cloud_env__ : { get_param: cloud_env }
+ __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
+ template: |
+ #!/bin/bash
+
+ # Create configuration files
+ mkdir /opt/config
+ echo "__dcae_collector_ip__" > /opt/config/dcae_collector_ip.txt
+ echo "__dcae_collector_port__" > /opt/config/dcae_collector_port.txt
+ echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
+ echo "__install_script_version__" > /opt/config/install_script_version.txt
+ echo "__vfw_private_ip_0__" > /opt/config/vfw_private_ip_0.txt
+ echo "__vfw_private_ip_1__" > /opt/config/vfw_private_ip_1.txt
+ echo "__vfw_private_ip_2__" > /opt/config/vfw_private_ip_2.txt
+ echo "__unprotected_private_net_cidr__" > /opt/config/unprotected_private_net_cidr.txt
+ echo "__protected_private_net_cidr__" > /opt/config/protected_private_net_cidr.txt
+ echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt
+ echo "__cloud_env__" > /opt/config/cloud_env.txt
+ echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.txt
+
+ # Download and run install script
+ apt-get update
+ apt-get -y install unzip
+ if [[ "__install_script_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+ curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vfw&a=vfw-scripts&e=zip&v=__install_script_version__" -o /opt/vfw-scripts-__install_script_version__.zip
+ unzip -j /opt/vfw-scripts-__install_script_version__.zip -d /opt v_firewall_install.sh
+ cd /opt
+ chmod +x v_firewall_install.sh
+ ./v_firewall_install.sh
+
+
+ ### Virtual Packet Generator instantiation ###
+
+ vpg_0_int_unprotected_private_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: int_unprotected_private_network }
+ fixed_ips: [{"subnet": { get_resource: int_unprotected_private_subnet }, "ip_address": { get_param: vpg_int_unprotected_private_ip_0 }}]
+ security_groups:
+ - { get_param: sec_group }
+
+ vpg_0_onap_private_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: onap_private_net_id }
+ fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vpg_onap_private_ip_0 }}]
+ security_groups:
+ - { get_param: sec_group }
+
+ vpg_server_0:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: vpg_image_name }
+ flavor: { get_param: vpg_flavor_name }
+ name: { get_param: vpg_name_0 }
+ key_name: { get_resource: my_keypair }
+ networks:
+ - network: { get_param: public_net_id }
+ - port: { get_resource: vpg_0_int_unprotected_private_port_0 }
+ - port: { get_resource: vpg_0_onap_private_port_0 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ vnf_name: { get_param: vnf_name }
+ user_data_format: RAW
+ user_data:
+ str_replace:
+ params:
+ __fw_ipaddr__: { get_param: vfw_int_unprotected_private_ip_0 }
+ __protected_net_cidr__: { get_param: protected_private_net_cidr }
+ __sink_ipaddr__: { get_param: vsn_int_protected_private_ip_0 }
+ __demo_artifacts_version__ : { get_param: demo_artifacts_version }
+ __install_script_version__ : { get_param: install_script_version }
+ __vpg_private_ip_0__ : { get_param: vpg_int_unprotected_private_ip_0 }
+ __vpg_private_ip_1__ : { get_param: vpg_onap_private_ip_0 }
+ __unprotected_private_net_cidr__ : { get_param: unprotected_private_net_cidr }
+ __onap_private_net_cidr__ : { get_param: onap_private_net_cidr }
+ __cloud_env__ : { get_param: cloud_env }
+ __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
+ template: |
+ #!/bin/bash
+
+ # Create configuration files
+ mkdir /opt/config
+ echo "__fw_ipaddr__" > /opt/config/fw_ipaddr.txt
+ echo "__protected_net_cidr__" > /opt/config/protected_net_cidr.txt
+ echo "__sink_ipaddr__" > /opt/config/sink_ipaddr.txt
+ echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
+ echo "__install_script_version__" > /opt/config/install_script_version.txt
+ echo "__vpg_private_ip_0__" > /opt/config/vpg_private_ip_0.txt
+ echo "__vpg_private_ip_1__" > /opt/config/vpg_private_ip_1.txt
+ echo "__unprotected_private_net_cidr__" > /opt/config/unprotected_private_net_cidr.txt
+ echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt
+ echo "__cloud_env__" > /opt/config/cloud_env.txt
+ echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.txt
+
+ # Download and run install script
+ apt-get update
+ apt-get -y install unzip
+ if [[ "__install_script_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+ curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vfw&a=vfw-scripts&e=zip&v=__install_script_version__" -o /opt/vfw-scripts-__install_script_version__.zip
+ unzip -j /opt/vfw-scripts-__install_script_version__.zip -d /opt v_packetgen_install.sh
+ cd /opt
+ chmod +x v_packetgen_install.sh
+ ./v_packetgen_install.sh
+
+
+ ### Virtual Sink instantiation ###
+
+ vsn_0_int_protected_private_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: int_protected_private_network }
+ fixed_ips: [{"subnet": { get_resource: int_protected_private_subnet }, "ip_address": { get_param: vsn_int_protected_private_ip_0 }}]
+ security_groups:
+ - { get_param: sec_group }
+
+ vsn_0_onap_private_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: onap_private_net_id }
+ fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vsn_onap_private_ip_0 }}]
+ security_groups:
+ - { get_param: sec_group }
+
+ vsn_server_0:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: vsn_image_name }
+ flavor: { get_param: vsn_flavor_name }
+ name: { get_param: vsn_name_0 }
+ key_name: { get_resource: my_keypair }
+ networks:
+ - network: { get_param: public_net_id }
+ - port: { get_resource: vsn_0_int_protected_private_port_0 }
+ - port: { get_resource: vsn_0_onap_private_port_0 }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ vnf_name: { get_param: vnf_name }
+ user_data_format: RAW
+ user_data:
+ str_replace:
+ params:
+ __protected_net_gw__: { get_param: vfw_int_protected_private_ip_0 }
+ __unprotected_net__: { get_param: unprotected_private_net_cidr }
+ __install_script_version__ : { get_param: install_script_version }
+ __vsn_private_ip_0__ : { get_param: vsn_int_protected_private_ip_0 }
+ __vsn_private_ip_1__ : { get_param: vsn_onap_private_ip_0 }
+ __protected_private_net_cidr__ : { get_param: protected_private_net_cidr }
+ __onap_private_net_cidr__ : { get_param: onap_private_net_cidr }
+ __cloud_env__ : { get_param: cloud_env }
+ __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
+ template: |
+ #!/bin/bash
+
+ # Create configuration files
+ mkdir /opt/config
+ echo "__protected_net_gw__" > /opt/config/protected_net_gw.txt
+ echo "__unprotected_net__" > /opt/config/unprotected_net.txt
+ echo "__install_script_version__" > /opt/config/install_script_version.txt
+ echo "__vsn_private_ip_0__" > /opt/config/vsn_private_ip_0.txt
+ echo "__vsn_private_ip_1__" > /opt/config/vsn_private_ip_1.txt
+ echo "__protected_private_net_cidr__" > /opt/config/protected_private_net_cidr.txt
+ echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt
+ echo "__cloud_env__" > /opt/config/cloud_env.txt
+ echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.txt
+
+ # Download and run install script
+ apt-get update
+ apt-get -y install unzip
+ if [[ "__install_script_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+ curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vfw&a=vfw-scripts&e=zip&v=__install_script_version__" -o /opt/vfw-scripts-__install_script_version__.zip
+ unzip -j /opt/vfw-scripts-__install_script_version__.zip -d /opt v_sink_install.sh
+ cd /opt
+ chmod +x v_sink_install.sh
+ ./v_sink_install.sh
diff --git a/asdc-controller/src/test/resources/resource-examples/vFW/notification.json b/asdc-controller/src/test/resources/resource-examples/vFW/notification.json
new file mode 100644
index 0000000000..4e93df510b
--- /dev/null
+++ b/asdc-controller/src/test/resources/resource-examples/vFW/notification.json
@@ -0,0 +1,80 @@
+{
+ "distributionID": "3d1c9f3c-550e-41c3-bfb6-800f8274a40c",
+ "resources": [
+ {
+ "artifacts": [
+ {
+ "artifactChecksum": "NDg0ZDJjYTIzNDhlZmFkZjRjMzM5MTkzOGFhZTU5ZjI=",
+ "artifactDescription": "Auto-generated VF Modules information artifact",
+ "artifactName": "vfw1f52feb055020_modules.json",
+ "artifactTimeout": 120,
+ "artifactType": "VF_MODULES_METADATA",
+ "artifactURL": "vfw1f52feb055020_modules.json",
+ "artifactUUID": "7ff1c5cb-8ca1-43b1-8f97-05c0d8c879ec",
+ "artifactVersion": "1",
+ "relatedArtifactsInfo": []
+ },
+ {
+ "artifactChecksum": "MDQyYTIxMTlhZDdlMzdiNjBjNjdjZTFhMWE0NThmMzc=",
+ "artifactDescription": "created from csar",
+ "artifactName": "base_vfw.yaml",
+ "artifactTimeout": 120,
+ "artifactType": "HEAT",
+ "artifactURL": "base_vfw.yaml",
+ "artifactUUID": "4f0b1b88-09ab-43b9-9506-57de3c69433a",
+ "artifactVersion": "2",
+ "generatedArtifact": {
+ "artifactChecksum": "MjQ2YWIxOTY2M2E0ZjAzMTI4NjVkNWZkZGRmM2VmMGI=",
+ "artifactDescription": "Auto-generated HEAT Environment deployment artifact",
+ "artifactName": "base_vfw.env",
+ "artifactTimeout": 120,
+ "artifactType": "HEAT_ENV",
+ "artifactURL": "base_vfw.env",
+ "artifactUUID": "005bc362-b40f-4c54-82bc-2716147f9c3a",
+ "artifactVersion": "2",
+ "generatedFromUUID": "4f0b1b88-09ab-43b9-9506-57de3c69433a"
+ },
+ "relatedArtifactsInfo": []
+ },
+ {
+ "artifactChecksum": "MjQ2YWIxOTY2M2E0ZjAzMTI4NjVkNWZkZGRmM2VmMGI=",
+ "artifactDescription": "Auto-generated HEAT Environment deployment artifact",
+ "artifactName": "base_vfw.env",
+ "artifactTimeout": 120,
+ "artifactType": "HEAT_ENV",
+ "artifactURL": "base_vfw.env",
+ "artifactUUID": "005bc362-b40f-4c54-82bc-2716147f9c3a",
+ "artifactVersion": "2",
+ "relatedArtifactsInfo": []
+ }
+ ],
+ "category": "Generic",
+ "resourceType": "VF",
+ "resourceCustomizationUUID": "0451bf8d-49e1-4f7f-960f-2e24f27c9f42",
+ "resourceInstanceName": "vFW 1f52feb0-5502 0",
+ "resourceInvariantUUID": "459f18ec-aaee-40d1-8fae-60fec2aae37f",
+ "resourceName": "vFW 1f52feb0-5502",
+ "resourceUUID": "1b1346cb-bf0b-4097-9d1b-5a041c536897",
+ "resourceVersion": "1.0",
+ "subcategory": "Abstract"
+ }
+ ],
+ "serviceArtifacts": [
+ {
+ "artifactChecksum": "YWNkZTJmYmVmYTg0NTdjMzg0MjVjZTliOTRiYTQ5YjM=",
+ "artifactDescription": "TOSCA definition package of the asset",
+ "artifactName": "service-Vfw20190410215305-csar.csar",
+ "artifactTimeout": 0,
+ "artifactType": "TOSCA_CSAR",
+ "artifactURL": "service-Vfw.csar",
+ "artifactUUID": "f4fcb0ba-40d3-46d2-819e-3b69eda88fcf",
+ "artifactVersion": "1"
+ }
+ ],
+ "serviceDescription": "catalog service description",
+ "serviceInvariantUUID": "3164f9ff-d7e7-4813-ab32-6be7e1cacb18",
+ "serviceName": "vFW 2019-04-10 21:53:05",
+ "serviceUUID": "e16e4ed9-3429-423a-bc3c-1389ae91491c",
+ "serviceVersion": "1.0",
+ "workloadContext": "Production"
+}
diff --git a/asdc-controller/src/test/resources/resource-examples/vFW/service-Vfw.csar b/asdc-controller/src/test/resources/resource-examples/vFW/service-Vfw.csar
new file mode 100644
index 0000000000..fe0b9f3131
--- /dev/null
+++ b/asdc-controller/src/test/resources/resource-examples/vFW/service-Vfw.csar
Binary files differ
diff --git a/asdc-controller/src/test/resources/resource-examples/vFW/vfw1f52feb055020_modules.json b/asdc-controller/src/test/resources/resource-examples/vFW/vfw1f52feb055020_modules.json
new file mode 100644
index 0000000000..944adbd0d2
--- /dev/null
+++ b/asdc-controller/src/test/resources/resource-examples/vFW/vfw1f52feb055020_modules.json
@@ -0,0 +1,25 @@
+[
+ {
+ "vfModuleModelName": "Vfw1f52feb05502..base_vfw..module-0",
+ "vfModuleModelInvariantUUID": "062e75f9-ccbd-4946-8d31-92118efac741",
+ "vfModuleModelVersion": "1",
+ "vfModuleModelUUID": "3f99a421-abd0-4e5e-a9e4-3b9b8464ddb6",
+ "vfModuleModelCustomizationUUID": "12c7bf93-9021-41cf-8c65-86856cfab11d",
+ "isBase": true,
+ "artifacts": [
+ "4f0b1b88-09ab-43b9-9506-57de3c69433a",
+ "005bc362-b40f-4c54-82bc-2716147f9c3a"
+ ],
+ "properties": {
+ "min_vf_module_instances": "1",
+ "vf_module_label": "base_vfw",
+ "max_vf_module_instances": "1",
+ "vfc_list": "",
+ "vf_module_description": "",
+ "vf_module_type": "Base",
+ "availability_zone_count": "",
+ "volume_group": "false",
+ "initial_count": "1"
+ }
+ }
+] \ No newline at end of file
diff --git a/asdc-controller/src/test/resources/schema.sql b/asdc-controller/src/test/resources/schema.sql
index 2db2dfb5bf..0b48b2e35f 100644
--- a/asdc-controller/src/test/resources/schema.sql
+++ b/asdc-controller/src/test/resources/schema.sql
@@ -1,7 +1,6 @@
--------START Catalog DB SCHEMA --------
use catalogdb;
-
set foreign_key_checks=0;
DROP TABLE IF EXISTS `allotted_resource`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
@@ -1170,7 +1169,7 @@ CREATE TABLE `vnfc_instance_group_customization` (
set foreign_key_checks=1;
CREATE TABLE IF NOT EXISTS `pnf_resource` (
- `ORCHESTRATION_MODE` varchar(20) NOT NULL DEFAULT 'HEAT',
+ `ORCHESTRATION_MODE` varchar(20) DEFAULT NULL,
`DESCRIPTION` varchar(1200) DEFAULT NULL,
`CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`MODEL_UUID` varchar(200) NOT NULL,
@@ -1208,6 +1207,170 @@ CREATE TABLE IF NOT EXISTS `pnf_resource_customization_to_service` (
PRIMARY KEY (`SERVICE_MODEL_UUID`,`RESOURCE_MODEL_CUSTOMIZATION_UUID`)
)ENGINE=InnoDB DEFAULT CHARSET=latin1;
+CREATE TABLE IF NOT EXISTS `workflow` (
+ `ID` int(11) NOT NULL AUTO_INCREMENT,
+ `ARTIFACT_UUID` varchar(200) NOT NULL,
+ `ARTIFACT_NAME` varchar(200) NOT NULL,
+ `NAME` varchar(200) NOT NULL,
+ `OPERATION_NAME` varchar(200) DEFAULT NULL,
+ `VERSION` double NOT NULL,
+ `DESCRIPTION` varchar(1200) DEFAULT NULL,
+ `BODY` longtext DEFAULT NULL,
+ `RESOURCE_TARGET` varchar(200) NOT NULL,
+ `SOURCE` varchar(200) NOT NULL,
+ `TIMEOUT_MINUTES` int(11) DEFAULT NULL,
+ `ARTIFACT_CHECKSUM` varchar(200) DEFAULT 'MANUAL RECORD',
+ `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT current_timestamp(),
+ PRIMARY KEY (`ID`),
+ UNIQUE KEY `UK_workflow` (`ARTIFACT_UUID`,`NAME`,`VERSION`,`SOURCE`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE IF NOT EXISTS `vnf_resource_to_workflow` (
+ `ID` int(11) NOT NULL AUTO_INCREMENT,
+ `VNF_RESOURCE_MODEL_UUID` varchar(200) NOT NULL,
+ `WORKFLOW_ID` int(11) NOT NULL,
+ PRIMARY KEY (`ID`),
+ UNIQUE KEY `UK_vnf_resource_to_workflow` (`VNF_RESOURCE_MODEL_UUID`,`WORKFLOW_ID`),
+ KEY `fk_vnf_resource_to_workflow__workflow1_idx` (`WORKFLOW_ID`),
+ KEY `fk_vnf_resource_to_workflow__vnf_res_mod_uuid_idx` (`VNF_RESOURCE_MODEL_UUID`),
+ CONSTRAINT `fk_vnf_resource_to_workflow__vnf_resource1` FOREIGN KEY (`VNF_RESOURCE_MODEL_UUID`) REFERENCES `vnf_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `fk_vnf_resource_to_workflow__workflow1` FOREIGN KEY (`WORKFLOW_ID`) REFERENCES `workflow` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE IF NOT EXISTS `activity_spec` (
+ `ID` INT(11) NOT NULL AUTO_INCREMENT,
+ `NAME` VARCHAR(200) NOT NULL,
+ `DESCRIPTION` VARCHAR(1200) NOT NULL,
+ `VERSION` DOUBLE NOT NULL,
+ `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ID`),
+ UNIQUE INDEX `UK_activity_spec` (`NAME` ASC, `VERSION` ASC))
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = latin1;
+
+CREATE TABLE IF NOT EXISTS `user_parameters` (
+ `ID` INT(11) NOT NULL AUTO_INCREMENT,
+ `NAME` VARCHAR(200) NOT NULL,
+ `PAYLOAD_LOCATION` VARCHAR(500) NULL,
+ `LABEL` VARCHAR(200) NOT NULL,
+ `TYPE` VARCHAR(200) NOT NULL,
+ `DESCRIPTION` VARCHAR(1200) NULL,
+ `IS_REQUIRED` TINYINT(1) NOT NULL,
+ `MAX_LENGTH` INT(11) NULL,
+ `ALLOWABLE_CHARS` VARCHAR(200) NULL,
+ `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ID`),
+ UNIQUE INDEX `UK_user_parameters` (`NAME` ASC))
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = latin1;
+
+CREATE TABLE IF NOT EXISTS `workflow_activity_spec_sequence` (
+ `ID` INT(11) NOT NULL AUTO_INCREMENT,
+ `WORKFLOW_ID` INT(11) NOT NULL,
+ `ACTIVITY_SPEC_ID` INT(11) NOT NULL,
+ `SEQ_NO` INT(11) NOT NULL,
+ PRIMARY KEY (`ID`),
+ UNIQUE INDEX `UK_workflow_activity_spec_sequence` (`WORKFLOW_ID` ASC, `ACTIVITY_SPEC_ID` ASC, `SEQ_NO` ASC),
+ INDEX `fk_workflow_activity_spec_sequence__activity_spec_idx` (`ACTIVITY_SPEC_ID` ASC),
+ INDEX `fk_workflow_activity_spec_sequence__workflow_actifact_uuid_idx` (`WORKFLOW_ID` ASC),
+ CONSTRAINT `fk_workflow_activity_spec_sequence__activity_spec1`
+ FOREIGN KEY (`ACTIVITY_SPEC_ID`)
+ REFERENCES `activity_spec` (`ID`)
+ ON DELETE CASCADE
+ ON UPDATE CASCADE,
+ CONSTRAINT `fk_workflow_activity_spec_sequence__workflow1`
+ FOREIGN KEY (`WORKFLOW_ID`)
+ REFERENCES `workflow` (`ID`)
+ ON DELETE CASCADE
+ ON UPDATE CASCADE)
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = latin1;
+
+CREATE TABLE IF NOT EXISTS `activity_spec_parameters` (
+ `ID` INT(11) NOT NULL AUTO_INCREMENT,
+ `NAME` VARCHAR(200) NOT NULL,
+ `TYPE` VARCHAR(200) NOT NULL,
+ `DIRECTION` VARCHAR(200) NULL,
+ `DESCRIPTION` VARCHAR(1200) NULL,
+ `CREATION_TIMESTAMP` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (`ID`),
+ UNIQUE INDEX `UK_activity_spec_parameters` (`NAME` ASC, `DIRECTION` ASC))
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = latin1;
+
+CREATE TABLE IF NOT EXISTS `activity_spec_categories` (
+ `ID` INT(11) NOT NULL AUTO_INCREMENT,
+ `NAME` VARCHAR(200) NOT NULL,
+ PRIMARY KEY (`ID`),
+ UNIQUE INDEX `UK_activity_spec_categories` (`NAME` ASC))
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = latin1;
+
+CREATE TABLE IF NOT EXISTS `activity_spec_to_activity_spec_categories` (
+ `ID` INT(11) NOT NULL AUTO_INCREMENT,
+ `ACTIVITY_SPEC_ID` INT(11) NOT NULL,
+ `ACTIVITY_SPEC_CATEGORIES_ID` INT(11) NOT NULL,
+ PRIMARY KEY (`ID`),
+ UNIQUE INDEX `UK_activity_spec_to_activity_spec_categories` (`ACTIVITY_SPEC_ID` ASC, `ACTIVITY_SPEC_CATEGORIES_ID` ASC),
+ INDEX `fk_activity_spec_to_activity_spec_categories__activity_spec_idx` (`ACTIVITY_SPEC_CATEGORIES_ID` ASC),
+ INDEX `fk_activity_spec_to_activity_spec_categories__activity_spec_idx1` (`ACTIVITY_SPEC_ID` ASC),
+ CONSTRAINT `fk_activity_spec_to_activity_spec_categories__activity_spec1`
+ FOREIGN KEY (`ACTIVITY_SPEC_ID`)
+ REFERENCES `activity_spec` (`ID`)
+ ON DELETE CASCADE
+ ON UPDATE CASCADE,
+ CONSTRAINT `fk_activity_spec_to_activity_spec_categories__activity_spec_c1`
+ FOREIGN KEY (`ACTIVITY_SPEC_CATEGORIES_ID`)
+ REFERENCES `activity_spec_categories` (`ID`)
+ ON DELETE CASCADE
+ ON UPDATE CASCADE)
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = latin1;
+
+CREATE TABLE IF NOT EXISTS `activity_spec_to_activity_spec_parameters` (
+ `ID` INT(11) NOT NULL AUTO_INCREMENT,
+ `ACTIVITY_SPEC_ID` INT(11) NOT NULL,
+ `ACTIVITY_SPEC_PARAMETERS_ID` INT(11) NOT NULL,
+ PRIMARY KEY (`ID`),
+ INDEX `fk_activity_spec_to_activity_spec_params__act_sp_param_id_idx` (`ACTIVITY_SPEC_PARAMETERS_ID` ASC),
+ UNIQUE INDEX `UK_activity_spec_to_activity_spec_parameters` (`ACTIVITY_SPEC_ID` ASC, `ACTIVITY_SPEC_PARAMETERS_ID` ASC),
+ INDEX `fk_activity_spec_to_activity_spec_parameters__act_spec_id_idx` (`ACTIVITY_SPEC_ID` ASC),
+ CONSTRAINT `fk_activity_spec_to_activity_spec_parameters__activity_spec_1`
+ FOREIGN KEY (`ACTIVITY_SPEC_ID`)
+ REFERENCES `activity_spec` (`ID`)
+ ON DELETE CASCADE
+ ON UPDATE CASCADE,
+ CONSTRAINT `fk_activity_spec_to_activity_spec_parameters__activ_spec_param1`
+ FOREIGN KEY (`ACTIVITY_SPEC_PARAMETERS_ID`)
+ REFERENCES `activity_spec_parameters` (`ID`)
+ ON DELETE CASCADE
+ ON UPDATE CASCADE)
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = latin1;
+
+CREATE TABLE IF NOT EXISTS `activity_spec_to_user_parameters` (
+ `ID` INT(11) NOT NULL AUTO_INCREMENT,
+ `ACTIVITY_SPEC_ID` INT(11) NOT NULL,
+ `USER_PARAMETERS_ID` INT(11) NOT NULL,
+ PRIMARY KEY (`ID`),
+ UNIQUE INDEX `UK_activity_spec_to_user_parameters` (`ACTIVITY_SPEC_ID` ASC, `USER_PARAMETERS_ID` ASC),
+ INDEX `fk_activity_spec_to_user_parameters__user_parameters1_idx` (`USER_PARAMETERS_ID` ASC),
+ INDEX `fk_activity_spec_to_user_parameters__activity_spec1_idx` (`ACTIVITY_SPEC_ID` ASC),
+ CONSTRAINT `fk_activity_spec_to_user_parameters__activity_spec1`
+ FOREIGN KEY (`ACTIVITY_SPEC_ID`)
+ REFERENCES `activity_spec` (`ID`)
+ ON DELETE CASCADE
+ ON UPDATE CASCADE,
+ CONSTRAINT `fk_activity_spec_to_user_parameters__user_parameters1`
+ FOREIGN KEY (`USER_PARAMETERS_ID`)
+ REFERENCES `user_parameters` (`ID`)
+ ON DELETE CASCADE
+ ON UPDATE CASCADE)
+ENGINE = InnoDB
+DEFAULT CHARACTER SET = latin1;
+
+
+
--------START Request DB SCHEMA --------
CREATE DATABASE requestdb;
USE requestdb;
@@ -1477,3 +1640,7 @@ create table if not exists model (
CONSTRAINT uk1_model UNIQUE (`MODEL_TYPE`, `MODEL_VERSION_ID`),
FOREIGN KEY (`RECIPE`) REFERENCES `model_recipe` (`MODEL_ID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+
+
+
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
index de77ca66e7..2d066285a4 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
@@ -749,7 +749,7 @@ public class BBInputSetup implements JavaDelegate {
instanceGroup.setModelInfoInstanceGroup(
this.mapperLayer.mapCatalogInstanceGroupToInstanceGroup(null, catalogInstanceGroup));
instanceGroup.getModelInfoInstanceGroup().setFunction(vnfcInstanceGroupCust.getFunction());
- instanceGroup.setDescription(vnfcInstanceGroupCust.getDescription());
+ instanceGroup.getModelInfoInstanceGroup().setDescription(vnfcInstanceGroupCust.getDescription());
genericVnf.getInstanceGroups().add(instanceGroup);
}
}
diff --git a/bpmn/mso-infrastructure-bpmn/pom.xml b/bpmn/mso-infrastructure-bpmn/pom.xml
index eb58732796..4dd7a467ea 100644
--- a/bpmn/mso-infrastructure-bpmn/pom.xml
+++ b/bpmn/mso-infrastructure-bpmn/pom.xml
@@ -150,13 +150,14 @@
<dependencies>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
- <artifactId>camunda-bpm-spring-boot-starter</artifactId>
- <version>${camunda.springboot.version}</version>
- </dependency>
- <dependency>
- <groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
<version>${camunda.springboot.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.camunda.bpmn</groupId>
+ <artifactId>camunda-engine-rest-core</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn
index ea762c8719..7bb97939dd 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn
@@ -1,5 +1,5 @@
<?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.8.2">
+<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="AssignVnfBB" name="AssignVnfBB" isExecutable="true">
<bpmn:startEvent id="Start_AssignVnfBB">
<bpmn:outgoing>SequenceFlow_0zaz9o2</bpmn:outgoing>
@@ -24,7 +24,7 @@
<bpmn:sequenceFlow id="SequenceFlow_1nle8kc" sourceRef="Task_createInstanceGroups" targetRef="ExclusiveGateway_02tchpp" />
<bpmn:sequenceFlow id="SequenceFlow_11jum90" name="no" sourceRef="ExclusiveGateway_02tchpp" targetRef="ExclusiveGateway_1blf52g" />
<bpmn:sequenceFlow id="SequenceFlow_1uiok7v" name="yes" sourceRef="ExclusiveGateway_02tchpp" targetRef="Task_callHoming">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("callHoming")}]]></bpmn:conditionExpression>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("homing")}]]></bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_0v8d14a" sourceRef="Task_callHoming" targetRef="ExclusiveGateway_1blf52g" />
<bpmn:callActivity id="Task_callHoming" name="Call Homing" calledElement="HomingBB">
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/HomingBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/HomingBB.bpmn
index cd62636b77..b66ecfa329 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/HomingBB.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/HomingBB.bpmn
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="_vwRmIBsREeeIQtzUKIjH4g" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.1" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="_vwRmIBsREeeIQtzUKIjH4g" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:process id="HomingBB" name="HomingBB" isExecutable="true">
<bpmn2:startEvent id="start">
- <bpmn2:outgoing>SequenceFlow_1x9usa6</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_0jtjlbu</bpmn2:outgoing>
</bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_1x9usa6" sourceRef="start" targetRef="sniroOofCheck" />
<bpmn2:subProcess id="bpmnErrorSubprocess" name="Error Handling Subprocess" triggeredByEvent="true">
<bpmn2:endEvent id="endBpmnError">
<bpmn2:incoming>SequenceFlow_1rf4vs8</bpmn2:incoming>
@@ -43,7 +42,7 @@ ex.processJavaException(execution)]]></bpmn2:script>
<bpmn2:sequenceFlow id="SequenceFlow_0kamg53" name="" sourceRef="startJavaError" targetRef="processJavaException" />
<bpmn2:sequenceFlow id="SequenceFlow_1o7154s" name="" sourceRef="processJavaException" targetRef="endJavaError" />
</bpmn2:subProcess>
- <bpmn2:callActivity id="receiveAsyncCallback" name="Receive Async Callback" calledElement="ReceiveWorkflowMessage" camunda:modelerTemplate="receiveWorkflowMessage">
+ <bpmn2:callActivity id="receiveAsyncCallback" name="Receive Async Callback" camunda:modelerTemplate="receiveWorkflowMessage" calledElement="ReceiveWorkflowMessage">
<bpmn2:extensionElements>
<camunda:in source="true" target="isDebugLogEnabled" />
<camunda:out source="WorkflowException" target="WorkflowException" />
@@ -52,278 +51,145 @@ ex.processJavaException(execution)]]></bpmn2:script>
<camunda:in source="asyncTimeout" target="RCVWFMSG_timeout" />
<camunda:out source="WorkflowResponse" target="asyncResponse" />
</bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_1qbnm82</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1fipbmk</bpmn2:outgoing>
+ <bpmn2:incoming>SequenceFlow_0qrwjzu</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_03cy5y5</bpmn2:outgoing>
</bpmn2:callActivity>
- <bpmn2:sequenceFlow id="SequenceFlow_1fipbmk" sourceRef="receiveAsyncCallback" targetRef="sniroOofCheck2" />
- <bpmn2:sequenceFlow id="SequenceFlow_01apjvo" sourceRef="processSniroSolution" targetRef="ExclusiveGateway_1kvzxpb" />
<bpmn2:endEvent id="end">
- <bpmn2:incoming>SequenceFlow_1urt5i6</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_138xgla</bpmn2:incoming>
<bpmn2:terminateEventDefinition />
</bpmn2:endEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_0lc15i7" sourceRef="callSniro" targetRef="ExclusiveGateway_1ckp059" />
- <bpmn2:sequenceFlow id="SequenceFlow_1dtador" name="Sniro" sourceRef="sniroOofCheck" targetRef="callSniro" />
- <bpmn2:sequenceFlow id="SequenceFlow_1qbnm82" sourceRef="ExclusiveGateway_1ckp059" targetRef="receiveAsyncCallback" />
- <bpmn2:sequenceFlow id="SequenceFlow_08k112s" name="Sniro" sourceRef="sniroOofCheck2" targetRef="processSniroSolution" />
- <bpmn2:sequenceFlow id="SequenceFlow_0m6nhqg" name="Oof" sourceRef="sniroOofCheck" targetRef="callOof">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[${execution.getVariable("homingService") == "oof"}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_0kvax6n" sourceRef="callOof" targetRef="ExclusiveGateway_1ckp059" />
- <bpmn2:sequenceFlow id="SequenceFlow_0oixz4g" name="Oof" sourceRef="sniroOofCheck2" targetRef="processOofSolution">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[${execution.getVariable("homingService") == "oof"}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_0ph4paa" sourceRef="processOofSolution" targetRef="ExclusiveGateway_1kvzxpb" />
- <bpmn2:sequenceFlow id="SequenceFlow_1urt5i6" sourceRef="ExclusiveGateway_1kvzxpb" targetRef="end" />
- <bpmn2:serviceTask id="callSniro" name="&#10;SNIRO&#10;Post&#10;(demands)&#10;" camunda:expression="${SniroHoming.callSniro(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
- <bpmn2:incoming>SequenceFlow_1dtador</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_0lc15i7</bpmn2:outgoing>
+ <bpmn2:serviceTask id="callHoming" name="Homing&#10;Post&#10;(Send demand)&#10;" camunda:expression="${HomingV2.callHoming(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+ <bpmn2:incoming>SequenceFlow_0jtjlbu</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0qrwjzu</bpmn2:outgoing>
</bpmn2:serviceTask>
- <bpmn2:serviceTask id="processSniroSolution" name="&#10;Process&#10;Solution&#10;" camunda:expression="${SniroHoming.processSolution(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)), asyncResponse)}">
- <bpmn2:incoming>SequenceFlow_08k112s</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_01apjvo</bpmn2:outgoing>
+ <bpmn2:serviceTask id="processHomingSolution" name="Homing&#10;Process&#10;Solution&#10;" camunda:expression="${HomingV2.processSolution(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)), asyncResponse)}">
+ <bpmn2:incoming>SequenceFlow_03cy5y5</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_138xgla</bpmn2:outgoing>
</bpmn2:serviceTask>
- <bpmn2:serviceTask id="callOof" name="&#10;OOF&#10;Post&#10;(demands)&#10;" camunda:expression="${OofHoming.callSniro(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
- <bpmn2:incoming>SequenceFlow_0m6nhqg</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_0kvax6n</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:serviceTask id="processOofSolution" name="&#10;Process&#10;Solution&#10;" camunda:expression="${OofHoming.processSolution(InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)), asyncResponse)}">
- <bpmn2:incoming>SequenceFlow_0oixz4g</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_0ph4paa</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:inclusiveGateway id="sniroOofCheck" name="Homing&#10;Service?&#10;" default="SequenceFlow_1dtador">
- <bpmn2:incoming>SequenceFlow_1x9usa6</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1dtador</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_0m6nhqg</bpmn2:outgoing>
- </bpmn2:inclusiveGateway>
- <bpmn2:inclusiveGateway id="ExclusiveGateway_1ckp059">
- <bpmn2:incoming>SequenceFlow_0lc15i7</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_0kvax6n</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1qbnm82</bpmn2:outgoing>
- </bpmn2:inclusiveGateway>
- <bpmn2:inclusiveGateway id="sniroOofCheck2" name="Homing&#10;Service?" default="SequenceFlow_08k112s">
- <bpmn2:incoming>SequenceFlow_1fipbmk</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_08k112s</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_0oixz4g</bpmn2:outgoing>
- </bpmn2:inclusiveGateway>
- <bpmn2:inclusiveGateway id="ExclusiveGateway_1kvzxpb">
- <bpmn2:incoming>SequenceFlow_01apjvo</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_0ph4paa</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1urt5i6</bpmn2:outgoing>
- </bpmn2:inclusiveGateway>
+ <bpmn2:sequenceFlow id="SequenceFlow_0jtjlbu" sourceRef="start" targetRef="callHoming" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0qrwjzu" sourceRef="callHoming" targetRef="receiveAsyncCallback" />
+ <bpmn2:sequenceFlow id="SequenceFlow_03cy5y5" sourceRef="receiveAsyncCallback" targetRef="processHomingSolution" />
+ <bpmn2:sequenceFlow id="SequenceFlow_138xgla" sourceRef="processHomingSolution" targetRef="end" />
</bpmn2:process>
<bpmn2:error id="Error_10hit0u" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
<bpmn2:error id="Error_1lwpypa" name="Java Lang Exception" errorCode="java.lang.Exception" />
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="HomingBB">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="start">
- <dc:Bounds x="135" y="275" width="36" height="36" />
+ <dc:Bounds x="153" y="275" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="108" y="311" width="90" height="20" />
+ <dc:Bounds x="126" y="311" width="90" height="20" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1x9usa6_di" bpmnElement="SequenceFlow_1x9usa6">
- <di:waypoint xsi:type="dc:Point" x="171" y="293" />
- <di:waypoint xsi:type="dc:Point" x="291" y="293" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="186" y="278" width="90" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="SubProcess_16p12qo_di" bpmnElement="bpmnErrorSubprocess" isExpanded="true">
- <dc:Bounds x="254" y="496" width="409" height="168" />
+ <dc:Bounds x="312" y="405" width="409" height="168" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="SubProcess_12gjiy8_di" bpmnElement="javaExceptionSubProcess" isExpanded="true">
- <dc:Bounds x="284" y="679" width="350" height="159" />
+ <dc:Bounds x="342" y="588" width="350" height="159" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_07tjq3v_di" bpmnElement="endBpmnError">
- <dc:Bounds x="579" y="570" width="36" height="36" />
+ <dc:Bounds x="637" y="479" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="552" y="611" width="90" height="0" />
+ <dc:Bounds x="610" y="520" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="StartEvent_1qiitb2_di" bpmnElement="startBpmnError">
- <dc:Bounds x="299" y="570" width="36" height="36" />
+ <dc:Bounds x="357" y="479" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="272" y="611" width="90" height="0" />
+ <dc:Bounds x="330" y="520" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_03hs6s9_di" bpmnElement="processMsoWorkflowException">
- <dc:Bounds x="406" y="548" width="100" height="80" />
+ <dc:Bounds x="464" y="457" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_19gqykh_di" bpmnElement="processJavaException">
- <dc:Bounds x="410" y="727" width="100" height="80" />
+ <dc:Bounds x="468" y="636" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="StartEvent_1fbpeuw_di" bpmnElement="startJavaError">
- <dc:Bounds x="318" y="749" width="36" height="36" />
+ <dc:Bounds x="376" y="658" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="291" y="790" width="90" height="0" />
+ <dc:Bounds x="349" y="699" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_0jbvnr0_di" bpmnElement="endJavaError">
- <dc:Bounds x="567" y="749" width="36" height="36" />
+ <dc:Bounds x="625" y="658" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="540" y="790" width="90" height="0" />
+ <dc:Bounds x="598" y="699" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1rf4vs8_di" bpmnElement="SequenceFlow_1rf4vs8">
- <di:waypoint xsi:type="dc:Point" x="506" y="588" />
- <di:waypoint xsi:type="dc:Point" x="579" y="588" />
+ <di:waypoint xsi:type="dc:Point" x="564" y="497" />
+ <di:waypoint xsi:type="dc:Point" x="637" y="497" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="498" y="573" width="90" height="0" />
+ <dc:Bounds x="556" y="482" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_00nlh7l_di" bpmnElement="SequenceFlow_00nlh7l">
- <di:waypoint xsi:type="dc:Point" x="335" y="588" />
- <di:waypoint xsi:type="dc:Point" x="363" y="588" />
- <di:waypoint xsi:type="dc:Point" x="363" y="588" />
- <di:waypoint xsi:type="dc:Point" x="406" y="588" />
+ <di:waypoint xsi:type="dc:Point" x="393" y="497" />
+ <di:waypoint xsi:type="dc:Point" x="421" y="497" />
+ <di:waypoint xsi:type="dc:Point" x="421" y="497" />
+ <di:waypoint xsi:type="dc:Point" x="464" y="497" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="333" y="588" width="90" height="0" />
+ <dc:Bounds x="391" y="497" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0kamg53_di" bpmnElement="SequenceFlow_0kamg53">
- <di:waypoint xsi:type="dc:Point" x="354" y="767" />
- <di:waypoint xsi:type="dc:Point" x="410" y="767" />
+ <di:waypoint xsi:type="dc:Point" x="412" y="676" />
+ <di:waypoint xsi:type="dc:Point" x="468" y="676" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="337" y="752" width="90" height="0" />
+ <dc:Bounds x="395" y="661" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1o7154s_di" bpmnElement="SequenceFlow_1o7154s">
- <di:waypoint xsi:type="dc:Point" x="510" y="767" />
- <di:waypoint xsi:type="dc:Point" x="567" y="767" />
+ <di:waypoint xsi:type="dc:Point" x="568" y="676" />
+ <di:waypoint xsi:type="dc:Point" x="625" y="676" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="494" y="752" width="90" height="0" />
+ <dc:Bounds x="552" y="661" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="CallActivity_031b5m3_di" bpmnElement="receiveAsyncCallback">
- <dc:Bounds x="547" y="253" width="100" height="80" />
+ <dc:Bounds x="464" y="253" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1fipbmk_di" bpmnElement="SequenceFlow_1fipbmk">
- <di:waypoint xsi:type="dc:Point" x="647" y="293" />
- <di:waypoint xsi:type="dc:Point" x="677" y="293" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="617" y="272" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_01apjvo_di" bpmnElement="SequenceFlow_01apjvo">
- <di:waypoint xsi:type="dc:Point" x="847" y="214" />
- <di:waypoint xsi:type="dc:Point" x="885" y="214" />
- <di:waypoint xsi:type="dc:Point" x="885" y="268" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="821" y="193" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="EndEvent_07i1a5x_di" bpmnElement="end">
- <dc:Bounds x="1034" y="275" width="36" height="36" />
+ <dc:Bounds x="837" y="275" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1006" y="315" width="90" height="12" />
+ <dc:Bounds x="809" y="315" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0lc15i7_di" bpmnElement="SequenceFlow_0lc15i7">
- <di:waypoint xsi:type="dc:Point" x="462" y="214" />
- <di:waypoint xsi:type="dc:Point" x="500" y="214" />
- <di:waypoint xsi:type="dc:Point" x="500" y="267" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="436" y="193" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1dtador_di" bpmnElement="SequenceFlow_1dtador">
- <di:waypoint xsi:type="dc:Point" x="316" y="268" />
- <di:waypoint xsi:type="dc:Point" x="316" y="214" />
- <di:waypoint xsi:type="dc:Point" x="362" y="214" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="322.2567567567568" y="221" width="25" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1qbnm82_di" bpmnElement="SequenceFlow_1qbnm82">
- <di:waypoint xsi:type="dc:Point" x="525" y="292" />
- <di:waypoint xsi:type="dc:Point" x="547" y="292" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="536" y="271" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_08k112s_di" bpmnElement="SequenceFlow_08k112s">
- <di:waypoint xsi:type="dc:Point" x="702" y="268" />
- <di:waypoint xsi:type="dc:Point" x="702" y="214" />
- <di:waypoint xsi:type="dc:Point" x="747" y="214" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="707.7837837837837" y="221" width="25" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0m6nhqg_di" bpmnElement="SequenceFlow_0m6nhqg">
- <di:waypoint xsi:type="dc:Point" x="316" y="318" />
- <di:waypoint xsi:type="dc:Point" x="316" y="368" />
- <di:waypoint xsi:type="dc:Point" x="362" y="368" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="323" y="344" width="19" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0kvax6n_di" bpmnElement="SequenceFlow_0kvax6n">
- <di:waypoint xsi:type="dc:Point" x="462" y="368" />
- <di:waypoint xsi:type="dc:Point" x="500" y="368" />
- <di:waypoint xsi:type="dc:Point" x="500" y="317" />
+ <bpmndi:BPMNShape id="ServiceTask_0rcv8sl_di" bpmnElement="callHoming">
+ <dc:Bounds x="292" y="253" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0fs2fyg_di" bpmnElement="processHomingSolution">
+ <dc:Bounds x="649" y="253" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0jtjlbu_di" bpmnElement="SequenceFlow_0jtjlbu">
+ <di:waypoint xsi:type="dc:Point" x="189" y="293" />
+ <di:waypoint xsi:type="dc:Point" x="292" y="293" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="481" y="347" width="0" height="12" />
+ <dc:Bounds x="240.5" y="272" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0oixz4g_di" bpmnElement="SequenceFlow_0oixz4g">
- <di:waypoint xsi:type="dc:Point" x="702" y="318" />
- <di:waypoint xsi:type="dc:Point" x="702" y="368" />
- <di:waypoint xsi:type="dc:Point" x="747" y="368" />
+ <bpmndi:BPMNEdge id="SequenceFlow_0qrwjzu_di" bpmnElement="SequenceFlow_0qrwjzu">
+ <di:waypoint xsi:type="dc:Point" x="392" y="293" />
+ <di:waypoint xsi:type="dc:Point" x="464" y="293" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="708.3513513513514" y="345" width="19" height="12" />
+ <dc:Bounds x="428" y="272" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0ph4paa_di" bpmnElement="SequenceFlow_0ph4paa">
- <di:waypoint xsi:type="dc:Point" x="847" y="368" />
- <di:waypoint xsi:type="dc:Point" x="885" y="368" />
- <di:waypoint xsi:type="dc:Point" x="885" y="318" />
+ <bpmndi:BPMNEdge id="SequenceFlow_03cy5y5_di" bpmnElement="SequenceFlow_03cy5y5">
+ <di:waypoint xsi:type="dc:Point" x="564" y="293" />
+ <di:waypoint xsi:type="dc:Point" x="649" y="293" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="866" y="347" width="0" height="12" />
+ <dc:Bounds x="606.5" y="272" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1urt5i6_di" bpmnElement="SequenceFlow_1urt5i6">
- <di:waypoint xsi:type="dc:Point" x="910" y="293" />
- <di:waypoint xsi:type="dc:Point" x="1034" y="293" />
+ <bpmndi:BPMNEdge id="SequenceFlow_138xgla_di" bpmnElement="SequenceFlow_138xgla">
+ <di:waypoint xsi:type="dc:Point" x="749" y="293" />
+ <di:waypoint xsi:type="dc:Point" x="837" y="293" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="972" y="272" width="0" height="12" />
+ <dc:Bounds x="793" y="272" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ServiceTask_0388svf_di" bpmnElement="callSniro">
- <dc:Bounds x="362" y="174" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ServiceTask_1o0vjzl_di" bpmnElement="processSniroSolution">
- <dc:Bounds x="747" y="174" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ServiceTask_0rcv8sl_di" bpmnElement="callOof">
- <dc:Bounds x="362" y="328" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ServiceTask_0fs2fyg_di" bpmnElement="processOofSolution">
- <dc:Bounds x="747" y="328" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="InclusiveGateway_0ssv6eg_di" bpmnElement="sniroOofCheck">
- <dc:Bounds x="291" y="268" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="344" y="283" width="43" height="36" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="InclusiveGateway_0pf91to_di" bpmnElement="ExclusiveGateway_1ckp059">
- <dc:Bounds x="475" y="267" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="500" y="321" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="InclusiveGateway_17vx4ua_di" bpmnElement="sniroOofCheck2">
- <dc:Bounds x="677" y="268" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="730" y="281" width="43" height="24" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="InclusiveGateway_1610p1j_di" bpmnElement="ExclusiveGateway_1kvzxpb">
- <dc:Bounds x="860" y="268" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="885" y="322" width="0" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java
index 2a0fef0caa..5ef4d7ea98 100644
--- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java
+++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java
@@ -34,7 +34,7 @@ import org.junit.After;
import org.junit.Before;
import org.junit.runner.RunWith;
import org.onap.so.TestApplication;
-import org.onap.so.bpmn.buildingblock.SniroHomingV2;
+import org.onap.so.bpmn.buildingblock.HomingV2;
import org.onap.so.bpmn.common.DelegateExecutionImpl;
import org.onap.so.bpmn.common.validation.BuildingBlockValidatorRunner;
import org.onap.so.bpmn.infrastructure.aai.tasks.AAICommonTasks;
@@ -230,7 +230,7 @@ public abstract class BaseBPMNTest {
protected SDNCClient sdncClient;
@MockBean
- protected SniroHomingV2 sniroHoming;
+ protected HomingV2 homing;
@MockBean
protected NamingServiceDeleteTasks namingServiceDeleteTasks;
diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVnfBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVnfBBTest.java
index 9943e39ef6..f46331fdd4 100644
--- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVnfBBTest.java
+++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVnfBBTest.java
@@ -33,7 +33,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution;
public class AssignVnfBBTest extends BaseBPMNTest {
@Test
public void sunnyDayAssignVnfBBTest() throws InterruptedException, IOException {
- variables.put("callHoming", true);
+ variables.put("homing", true);
mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub");
ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignVnfBB", variables);
assertThat(pi).isNotNull();
diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/HomingBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/HomingBBTest.java
index f1bb1462d6..bca4d3a979 100644
--- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/HomingBBTest.java
+++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/HomingBBTest.java
@@ -25,12 +25,9 @@ import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doThrow;
import org.camunda.bpm.engine.delegate.BpmnError;
import org.camunda.bpm.engine.runtime.ProcessInstance;
-import org.junit.Ignore;
import org.junit.Test;
import org.onap.so.bpmn.BaseBPMNTest;
-import org.onap.so.bpmn.buildingblock.SniroHomingV2;
import org.onap.so.bpmn.common.BuildingBlockExecution;
-import org.springframework.boot.test.mock.mockito.MockBean;
public class HomingBBTest extends BaseBPMNTest {
@@ -40,28 +37,28 @@ public class HomingBBTest extends BaseBPMNTest {
mockSubprocess("ReceiveWorkflowMessage", "Mock ReceiveWorkflowMessage", "GenericStub");
ProcessInstance pi = runtimeService.startProcessInstanceByKey("HomingBB", variables);
assertThat(pi).isNotNull();
- assertThat(pi).isStarted().hasPassedInOrder("start", "sniroOofCheck", "callSniro", "ExclusiveGateway_1ckp059",
- "receiveAsyncCallback", "sniroOofCheck2", "processSniroSolution", "ExclusiveGateway_1kvzxpb", "end");
+ assertThat(pi).isStarted().hasPassedInOrder("start", "callHoming", "receiveAsyncCallback",
+ "processHomingSolution", "end");
assertThat(pi).isEnded();
}
@Test
public void testHomingV2_error_bpmnError() {
- doThrow(new BpmnError("MSOWorkflowException")).when(sniroHoming).callSniro(any(BuildingBlockExecution.class));
+ doThrow(new BpmnError("MSOWorkflowException")).when(homing).callHoming(any(BuildingBlockExecution.class));
ProcessInstance pi = runtimeService.startProcessInstanceByKey("HomingBB", variables);
assertThat(pi).isNotNull();
- assertThat(pi).isStarted().hasPassed("start", "sniroOofCheck", "startBpmnError", "bpmnErrorSubprocess",
+ assertThat(pi).isStarted().hasPassed("start", "callHoming", "startBpmnError", "bpmnErrorSubprocess",
"processMsoWorkflowException", "endBpmnError").hasNotPassed("callReceiveAsync");
assertThat(pi).isEnded();
}
@Test
public void testHomingV2_error_javaException() {
- doThrow(new RuntimeException("Test")).when(sniroHoming).callSniro(any(BuildingBlockExecution.class));
+ doThrow(new RuntimeException("Test")).when(homing).callHoming(any(BuildingBlockExecution.class));
ProcessInstance pi = runtimeService.startProcessInstanceByKey("HomingBB", variables);
assertThat(pi).isNotNull();
- assertThat(pi).isStarted().hasPassed("start", "sniroOofCheck", "callSniro", "startJavaError",
- "processJavaException", "javaExceptionSubProcess", "endJavaError").hasNotPassed("callReceiveAsync");
+ assertThat(pi).isStarted().hasPassed("start", "callHoming", "startJavaError", "processJavaException",
+ "javaExceptionSubProcess", "endJavaError").hasNotPassed("callReceiveAsync");
assertThat(pi).isEnded();
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/PnfNotificationEvent.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/PnfNotificationEvent.java
deleted file mode 100644
index 267ddbf6a7..0000000000
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/PnfNotificationEvent.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
- * ================================================================================
- * 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.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.bpmn.infrastructure.pnf;
-
-import org.springframework.context.ApplicationEvent;
-
-public class PnfNotificationEvent extends ApplicationEvent {
-
- private String pnfCorrelationId;
-
- /**
- * Create a new ApplicationEvent.
- *
- * @param source the object on which the event initially occurred (never {@code null})
- */
- public PnfNotificationEvent(Object source, String pnfCorrelationId) {
- super(source);
- this.pnfCorrelationId = pnfCorrelationId;
- }
-
- public String getPnfCorrelationId() {
- return pnfCorrelationId;
- }
-}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClient.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClient.java
index e2dc375cd1..94ceddae97 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClient.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClient.java
@@ -23,40 +23,30 @@ package org.onap.so.bpmn.infrastructure.pnf.delegate;
import org.camunda.bpm.engine.RuntimeService;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;
-import org.onap.so.bpmn.infrastructure.pnf.PnfNotificationEvent;
+import org.camunda.bpm.engine.runtime.Execution;
import org.onap.so.bpmn.infrastructure.pnf.dmaap.DmaapClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
@Component
-public class InformDmaapClient implements JavaDelegate, ApplicationListener<PnfNotificationEvent> {
+public class InformDmaapClient implements JavaDelegate {
private Logger logger = LoggerFactory.getLogger(getClass());
private DmaapClient dmaapClient;
- private DelegateExecution execution;
@Override
public void execute(DelegateExecution execution) {
String pnfCorrelationId = (String) execution.getVariable(ExecutionVariableNames.PNF_CORRELATION_ID);
RuntimeService runtimeService = execution.getProcessEngineServices().getRuntimeService();
+ String processBusinessKey = execution.getProcessBusinessKey();
dmaapClient.registerForUpdate(pnfCorrelationId, () -> runtimeService.createMessageCorrelation("WorkflowMessage")
- .processInstanceBusinessKey(execution.getProcessBusinessKey()).correlateWithResult());
- this.execution = execution;
+ .processInstanceBusinessKey(processBusinessKey).correlateWithResult());
}
@Autowired
public void setDmaapClient(DmaapClient dmaapClient) {
this.dmaapClient = dmaapClient;
}
-
- @Override
- public void onApplicationEvent(PnfNotificationEvent event) {
- logger.info("Received application event for pnfCorrelationId: {}", event.getPnfCorrelationId());
- RuntimeService runtimeService = execution.getProcessEngineServices().getRuntimeService();
- runtimeService.createMessageCorrelation("WorkflowMessage")
- .processInstanceBusinessKey(execution.getProcessBusinessKey()).correlateWithResult();
- }
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java
index 2869111485..96562fe90f 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java
@@ -35,11 +35,9 @@ import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
-import org.onap.so.bpmn.infrastructure.pnf.PnfNotificationEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.ApplicationEventPublisher;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
@@ -55,11 +53,8 @@ public class PnfEventReadyDmaapClient implements DmaapClient {
private volatile ScheduledThreadPoolExecutor executor;
private volatile boolean dmaapThreadListenerIsRunning;
- private ApplicationEventPublisher applicationEventPublisher;
-
@Autowired
- public PnfEventReadyDmaapClient(Environment env, ApplicationEventPublisher applicationEventPublisher) {
- this.applicationEventPublisher = applicationEventPublisher;
+ public PnfEventReadyDmaapClient(Environment env) {
httpClient = HttpClientBuilder.create().build();
pnfCorrelationIdToThreadMap = new ConcurrentHashMap<>();
topicListenerDelayInSeconds = env.getProperty("pnf.dmaap.topicListenerDelayInSeconds", Integer.class);
@@ -135,9 +130,11 @@ public class PnfEventReadyDmaapClient implements DmaapClient {
}
private void informAboutPnfReadyIfPnfCorrelationIdFound(String pnfCorrelationId) {
- unregister(pnfCorrelationId);
- PnfNotificationEvent pnfNotificationEvent = new PnfNotificationEvent(this, pnfCorrelationId);
- applicationEventPublisher.publishEvent(pnfNotificationEvent);
+ Runnable runnable = unregister(pnfCorrelationId);
+ if (runnable != null) {
+ logger.debug("dmaap listener gets pnf ready event for pnfCorrelationId: {}", pnfCorrelationId);
+ runnable.run();
+ }
}
}
}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java
index c67b44e44a..e755214362 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java
@@ -20,15 +20,17 @@
package org.onap.so.bpmn.infrastructure.pnf.delegate;
-import org.camunda.bpm.engine.delegate.DelegateExecution;
-import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.junit.Test;
public class CancelDmaapSubscriptionTest {
+ private static final String TEST_PNF_CORRELATION_ID = "testPnfCorrelationId";
+
@Test
public void shouldCancelSubscription() throws Exception {
// given
@@ -37,7 +39,7 @@ public class CancelDmaapSubscriptionTest {
delegate.setDmaapClient(dmaapClientTest);
DelegateExecution delegateExecution = mock(DelegateExecution.class);
when(delegateExecution.getVariable(eq(ExecutionVariableNames.PNF_CORRELATION_ID)))
- .thenReturn("testPnfCorrelationId");
+ .thenReturn(TEST_PNF_CORRELATION_ID);
when(delegateExecution.getProcessBusinessKey()).thenReturn("testBusinessKey");
dmaapClientTest.registerForUpdate("testPnfCorrelationId", () -> {
});
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java
index 96c3db0ccc..df060ed014 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java
@@ -20,6 +20,13 @@
package org.onap.so.bpmn.infrastructure.pnf.delegate;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.inOrder;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verifyZeroInteractions;
+import static org.mockito.Mockito.when;
import org.camunda.bpm.engine.ProcessEngineServices;
import org.camunda.bpm.engine.RuntimeService;
import org.camunda.bpm.engine.delegate.DelegateExecution;
@@ -27,14 +34,8 @@ import org.camunda.bpm.engine.runtime.MessageCorrelationBuilder;
import org.junit.Before;
import org.junit.Test;
import org.mockito.InOrder;
-import org.onap.so.bpmn.infrastructure.pnf.PnfNotificationEvent;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.*;
public class InformDmaapClientTest {
-
@Before
public void setUp() throws Exception {
informDmaapClient = new InformDmaapClient();
@@ -73,19 +74,6 @@ public class InformDmaapClientTest {
inOrder.verify(messageCorrelationBuilder).correlateWithResult();
}
- @Test
- public void onApplicationEvent_validPnfNotificationEvent_expectedOutput() {
-
- PnfNotificationEvent pnfNotificationEvent = new PnfNotificationEvent(this, "testPnfCorrelationId");
-
- informDmaapClient.execute(delegateExecution);
- informDmaapClient.onApplicationEvent(pnfNotificationEvent);
-
- InOrder inOrder = inOrder(messageCorrelationBuilder);
- inOrder.verify(messageCorrelationBuilder).processInstanceBusinessKey("testBusinessKey");
- inOrder.verify(messageCorrelationBuilder).correlateWithResult();
- }
-
private DelegateExecution mockDelegateExecution() {
DelegateExecution delegateExecution = mock(DelegateExecution.class);
when(delegateExecution.getVariable(eq(ExecutionVariableNames.PNF_CORRELATION_ID)))
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java
index 9f31e2a5df..19e08d9d59 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java
@@ -23,12 +23,10 @@
package org.onap.so.bpmn.infrastructure.pnf.dmaap;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyObject;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
@@ -49,12 +47,9 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
-import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
-import org.onap.so.bpmn.infrastructure.pnf.PnfNotificationEvent;
import org.onap.so.bpmn.infrastructure.pnf.dmaap.PnfEventReadyDmaapClient.DmaapTopicListenerThread;
-import org.springframework.context.ApplicationEventPublisher;
import org.springframework.core.env.Environment;
@RunWith(MockitoJUnitRunner.class)
@@ -85,9 +80,6 @@ public class PnfEventReadyDmaapClientTest {
private Runnable threadMockToNotifyCamundaFlow;
private ScheduledThreadPoolExecutor executorMock;
- @Mock
- private ApplicationEventPublisher applicationEventPublisher;
-
@Before
public void init() throws NoSuchFieldException, IllegalAccessException {
when(env.getProperty(eq("pnf.dmaap.port"), eq(Integer.class))).thenReturn(PORT);
@@ -99,7 +91,7 @@ public class PnfEventReadyDmaapClientTest {
when(env.getProperty(eq("pnf.dmaap.consumerGroup"))).thenReturn(CONSUMER_GROUP);
when(env.getProperty(eq("pnf.dmaap.topicListenerDelayInSeconds"), eq(Integer.class)))
.thenReturn(TOPIC_LISTENER_DELAY_IN_SECONDS);
- testedObject = new PnfEventReadyDmaapClient(env, applicationEventPublisher);
+ testedObject = new PnfEventReadyDmaapClient(env);
testedObjectInnerClassThread = testedObject.new DmaapTopicListenerThread();
httpClientMock = mock(HttpClient.class);
threadMockToNotifyCamundaFlow = mock(Runnable.class);
@@ -131,10 +123,7 @@ public class PnfEventReadyDmaapClientTest {
assertEquals(captor1.getValue().getURI().getPath(),
"/" + URI_PATH_PREFIX + "/" + EVENT_TOPIC_TEST + "/" + CONSUMER_GROUP + "/" + CONSUMER_ID + "");
- /**
- * Two PNF returned from HTTP request.
- */
- verify(applicationEventPublisher, times(2)).publishEvent(any(PnfNotificationEvent.class));
+ verify(threadMockToNotifyCamundaFlow).run();
verify(executorMock).shutdown();
}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java
index b0517ace3d..f51ea006d2 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java
@@ -36,6 +36,7 @@ import java.util.UUID;
import org.camunda.bpm.engine.runtime.Execution;
import org.camunda.bpm.engine.runtime.ProcessInstance;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
import org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers;
import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader;
@@ -51,8 +52,10 @@ import org.springframework.beans.factory.annotation.Autowired;
/**
* Basic Integration test for createVcpeResCustService_Simplified.bpmn workflow.
*/
+@Ignore
public class CreateVcpeResCustServiceSimplifiedTest extends BaseBPMNTest {
+ private static final long WORKFLOW_WAIT_TIME = 1000L;
private Logger logger = LoggerFactory.getLogger(getClass());
private static final String TEST_PROCESSINSTANCE_KEY = "CreateVcpeResCustService_simplified";
@@ -101,7 +104,7 @@ public class CreateVcpeResCustServiceSimplifiedTest extends BaseBPMNTest {
}
@Test
- public void workflow_validInput_expectedOuput() {
+ public void workflow_validInput_expectedOuput() throws InterruptedException {
mockCatalogDb();
mockRequestDb();
@@ -112,26 +115,25 @@ public class CreateVcpeResCustServiceSimplifiedTest extends BaseBPMNTest {
runtimeService.startProcessInstanceByKey(TEST_PROCESSINSTANCE_KEY, testBusinessKey, variables);
assertThat(pi).isNotNull();
- Execution execution = runtimeService.createExecutionQuery().processDefinitionKey("CreateAndActivatePnfResource")
- .activityId("WaitForDmaapPnfReadyNotification").singleResult();
+ Thread.sleep(WORKFLOW_WAIT_TIME);
- if (!execution.isSuspended() && !execution.isEnded()) {
- try {
+ Execution execution = runtimeService.createExecutionQuery().processInstanceBusinessKey(testBusinessKey)
+ .messageEventSubscriptionName("WorkflowMessage").singleResult();
- runtimeService.signal(execution.getId());
- } catch (Exception e) {
- logger.info(e.getMessage(), e);
- }
+ assertThat(execution).isNotNull();
+
+ int waitCount = 10;
+ while (!pi.isEnded() && waitCount >= 0) {
+ Thread.sleep(WORKFLOW_WAIT_TIME);
+ waitCount--;
}
- assertThat(pi).isStarted().hasPassedInOrder("createVCPE_startEvent", "preProcessRequest_ScriptTask",
+ assertThat(pi).isEnded().hasPassedInOrder("createVCPE_startEvent", "preProcessRequest_ScriptTask",
"sendSyncAckResponse_ScriptTask", "ScriptTask_0cdtchu", "DecomposeService", "ScriptTask_0lpv2da",
"ScriptTask_1y241p8", "CallActivity_1vc4jeh", "ScriptTask_1y5lvl7", "GeneratePnfUuid", "Task_14l19kv",
"Pnf_Con", "setPONR_ScriptTask", "postProcessAndCompletionRequest_ScriptTask",
"callCompleteMsoProcess_CallActivity", "ScriptTask_2", "CreateVCPE_EndEvent");
- assertThat(pi).isEnded();
-
List<ExecutionServiceInput> detailedMessages = grpcNettyServer.getDetailedMessages();
assertThat(detailedMessages).hasSize(2);
try {
@@ -144,6 +146,8 @@ public class CreateVcpeResCustServiceSimplifiedTest extends BaseBPMNTest {
}
private void checkConfigAssign(ExecutionServiceInput executionServiceInput) {
+
+ logger.info("Checking the configAssign request");
ActionIdentifiers actionIdentifiers = executionServiceInput.getActionIdentifiers();
/**
@@ -173,6 +177,8 @@ public class CreateVcpeResCustServiceSimplifiedTest extends BaseBPMNTest {
}
private void checkConfigDeploy(ExecutionServiceInput executionServiceInput) {
+
+ logger.info("Checking the configDeploy request");
ActionIdentifiers actionIdentifiers = executionServiceInput.getActionIdentifiers();
/**