aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-ve-vnfm-adapter/src/main/java/org/onap/so/adapters/vevnfm/event/AaiEvent.java44
-rw-r--r--adapters/mso-ve-vnfm-adapter/src/main/java/org/onap/so/adapters/vevnfm/event/DmaapEvent.java110
-rw-r--r--adapters/mso-ve-vnfm-adapter/src/main/java/org/onap/so/adapters/vevnfm/service/DmaapService.java30
-rw-r--r--adapters/mso-ve-vnfm-adapter/src/main/resources/application.yaml4
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/converters/sol003/etsicatalog/PkgmSubscriptionRequestConverter.java13
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementSubscriptionControllerTest.java78
-rw-r--r--adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/resources/requests/SubscriptionRequest.json45
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationService.groovy429
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSliceService.groovy263
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteSliceService.groovy322
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteCommunicationService.bpmn523
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSliceService.bpmn332
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateCommunicationService.bpmn115
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteSliceService.bpmn205
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/ServiceProfile.java50
-rw-r--r--common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParams.java413
-rw-r--r--packages/docker/src/main/docker/docker-files/Dockerfile.so-app1
-rw-r--r--packages/docker/src/main/docker/docker-files/certs/org.onap.so.jksbin3582 -> 0 bytes
-rw-r--r--packages/docker/src/main/docker/docker-files/certs/org.onap.so.keyfile27
-rw-r--r--packages/docker/src/main/docker/docker-files/certs/org.onap.so.trust.jksbin1413 -> 0 bytes
20 files changed, 2969 insertions, 35 deletions
diff --git a/adapters/mso-ve-vnfm-adapter/src/main/java/org/onap/so/adapters/vevnfm/event/AaiEvent.java b/adapters/mso-ve-vnfm-adapter/src/main/java/org/onap/so/adapters/vevnfm/event/AaiEvent.java
new file mode 100644
index 0000000000..ceabb8a020
--- /dev/null
+++ b/adapters/mso-ve-vnfm-adapter/src/main/java/org/onap/so/adapters/vevnfm/event/AaiEvent.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SO
+ * ================================================================================
+ * Copyright (C) 2020 Samsung. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.vevnfm.event;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class AaiEvent {
+
+ private final boolean vserverIsClosedLoopDisabled;
+ private final String genericVnfVnfId;
+
+ public AaiEvent(final boolean cld, final String id) {
+ this.vserverIsClosedLoopDisabled = cld;
+ this.genericVnfVnfId = id;
+ }
+
+ @JsonProperty("vserver.is-closed-loop-disabled")
+ public boolean isVserverIsClosedLoopDisabled() {
+ return vserverIsClosedLoopDisabled;
+ }
+
+ @JsonProperty("generic-vnf.vnf-id")
+ public String getGenericVnfVnfId() {
+ return genericVnfVnfId;
+ }
+}
diff --git a/adapters/mso-ve-vnfm-adapter/src/main/java/org/onap/so/adapters/vevnfm/event/DmaapEvent.java b/adapters/mso-ve-vnfm-adapter/src/main/java/org/onap/so/adapters/vevnfm/event/DmaapEvent.java
new file mode 100644
index 0000000000..dc0c5502dd
--- /dev/null
+++ b/adapters/mso-ve-vnfm-adapter/src/main/java/org/onap/so/adapters/vevnfm/event/DmaapEvent.java
@@ -0,0 +1,110 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SO
+ * ================================================================================
+ * Copyright (C) 2020 Samsung. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.adapters.vevnfm.event;
+
+import static java.time.temporal.ChronoField.INSTANT_SECONDS;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.Instant;
+import java.util.UUID;
+import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.VnfLcmOperationOccurrenceNotification;
+
+public class DmaapEvent {
+
+ public static final String MSERVICE = "microservice.stringmatcher";
+ public static final String ONSET = "ONSET";
+ public static final String VNF = "VNF";
+ public static final String VNFID = "generic-vnf.vnf-id";
+ public static final String ETSI = "ETSI";
+
+ private final String closedLoopControlName;
+ private final long closedLoopAlarmStart;
+ private final String closedLoopEventClient;
+ private final String closedLoopEventStatus;
+ private final String requestId;
+ private final String targetType;
+ private final String target;
+ private final AaiEvent aaiEvent;
+ private final String from;
+ private final String version;
+ private final VnfLcmOperationOccurrenceNotification etsiLcmEvent;
+
+ public DmaapEvent(final String closedLoopControlName, final String version,
+ final VnfLcmOperationOccurrenceNotification etsiLcmEvent) {
+ this.closedLoopControlName = closedLoopControlName;
+ this.closedLoopAlarmStart = Instant.now().getLong(INSTANT_SECONDS);
+ this.closedLoopEventClient = MSERVICE;
+ this.closedLoopEventStatus = ONSET;
+ this.requestId = UUID.randomUUID().toString();
+ this.targetType = VNF;
+ this.target = VNFID;
+ this.aaiEvent = new AaiEvent(false, etsiLcmEvent.getId());
+ this.from = ETSI;
+ this.version = version;
+ this.etsiLcmEvent = etsiLcmEvent;
+ }
+
+ public String getClosedLoopControlName() {
+ return closedLoopControlName;
+ }
+
+ public long getClosedLoopAlarmStart() {
+ return closedLoopAlarmStart;
+ }
+
+ public String getClosedLoopEventClient() {
+ return closedLoopEventClient;
+ }
+
+ public String getClosedLoopEventStatus() {
+ return closedLoopEventStatus;
+ }
+
+ @JsonProperty("requestID")
+ public String getRequestId() {
+ return requestId;
+ }
+
+ @JsonProperty("target_type")
+ public String getTargetType() {
+ return targetType;
+ }
+
+ public String getTarget() {
+ return target;
+ }
+
+ @JsonProperty("AAI")
+ public AaiEvent getAaiEvent() {
+ return aaiEvent;
+ }
+
+ public String getFrom() {
+ return from;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public VnfLcmOperationOccurrenceNotification getEtsiLcmEvent() {
+ return etsiLcmEvent;
+ }
+}
diff --git a/adapters/mso-ve-vnfm-adapter/src/main/java/org/onap/so/adapters/vevnfm/service/DmaapService.java b/adapters/mso-ve-vnfm-adapter/src/main/java/org/onap/so/adapters/vevnfm/service/DmaapService.java
index 36a4c3300d..c685ae815a 100644
--- a/adapters/mso-ve-vnfm-adapter/src/main/java/org/onap/so/adapters/vevnfm/service/DmaapService.java
+++ b/adapters/mso-ve-vnfm-adapter/src/main/java/org/onap/so/adapters/vevnfm/service/DmaapService.java
@@ -1,5 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SO
+ * ================================================================================
+ * Copyright (C) 2020 Samsung. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
package org.onap.so.adapters.vevnfm.service;
+import org.onap.so.adapters.vevnfm.event.DmaapEvent;
import org.onap.so.adapters.vnfmadapter.extclients.vnfm.lcn.model.VnfLcmOperationOccurrenceNotification;
import org.onap.so.rest.service.HttpRestServiceProvider;
import org.slf4j.Logger;
@@ -21,12 +42,19 @@ public class DmaapService {
@Value("${dmaap.topic}")
private String topic;
+ @Value("${dmaap.closed-loop.control.name}")
+ private String closedLoopControlName;
+
+ @Value("${dmaap.version}")
+ private String version;
+
@Autowired
private HttpRestServiceProvider restProvider;
public void send(final VnfLcmOperationOccurrenceNotification notification) {
try {
- final ResponseEntity<String> response = restProvider.postHttpRequest(notification, getUrl(), String.class);
+ final DmaapEvent event = new DmaapEvent(closedLoopControlName, version, notification);
+ final ResponseEntity<String> response = restProvider.postHttpRequest(event, getUrl(), String.class);
final HttpStatus statusCode = response.getStatusCode();
final String body = response.getBody();
diff --git a/adapters/mso-ve-vnfm-adapter/src/main/resources/application.yaml b/adapters/mso-ve-vnfm-adapter/src/main/resources/application.yaml
index 72198b83c1..a2a33bfb5c 100644
--- a/adapters/mso-ve-vnfm-adapter/src/main/resources/application.yaml
+++ b/adapters/mso-ve-vnfm-adapter/src/main/resources/application.yaml
@@ -35,6 +35,10 @@ vnfm:
dmaap:
endpoint: http://message-router.onap:30227
topic: /events/unauthenticated.DCAE_CL_OUTPUT
+ closed-loop:
+ control:
+ name: ClosedLoopControlName
+ version: 1.0.2
spring:
security:
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/converters/sol003/etsicatalog/PkgmSubscriptionRequestConverter.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/converters/sol003/etsicatalog/PkgmSubscriptionRequestConverter.java
index d0fd4c9e7c..6d566c07ad 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/converters/sol003/etsicatalog/PkgmSubscriptionRequestConverter.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/converters/sol003/etsicatalog/PkgmSubscriptionRequestConverter.java
@@ -50,7 +50,7 @@ public class PkgmSubscriptionRequestConverter implements
@Override
public org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.PkgmSubscriptionRequest convert(
- PkgmSubscriptionRequest pkgmSubscriptionRequest) {
+ final PkgmSubscriptionRequest pkgmSubscriptionRequest) {
final org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.PkgmSubscriptionRequest etsiCatalogManagerSubscriptionRequest =
new org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.PkgmSubscriptionRequest();
@@ -86,8 +86,10 @@ public class PkgmSubscriptionRequestConverter implements
return etsiCatalogManagerFilters;
}
- // TODO 'operationalState' in the Sol003 Swagger is type 'OperationalStateEnum'. The ETSI Catalog Manager Swagger
- // 'operationalState' is type 'List<OperationalStateEnum>'. This method needs to be updated once swagger is updated.
+ // TODO 'operationalState' in the Sol003 Swagger is type 'OperationalStateEnum'. The ETSI
+ // Catalog Manager Swagger
+ // 'operationalState' is type 'List<OperationalStateEnum>'. This method needs to be updated once
+ // swagger is updated.
private List<org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.PkgmNotificationsFilter.OperationalStateEnum> getOperationalState(
final OperationalStateEnum operationalState) {
if (operationalState != null) {
@@ -104,6 +106,7 @@ public class PkgmSubscriptionRequestConverter implements
vnfPkgId.forEach(type -> {
etsiCatalogManagerVnfPkgId.add(type);
});
+ return etsiCatalogManagerVnfPkgId;
}
return Collections.emptyList();
}
@@ -114,6 +117,7 @@ public class PkgmSubscriptionRequestConverter implements
vnfdId.forEach(type -> {
etsiCatalogManagerVnfdId.add(type);
});
+ return etsiCatalogManagerVnfdId;
}
return Collections.emptyList();
}
@@ -147,7 +151,7 @@ public class PkgmSubscriptionRequestConverter implements
private List<Version> getVersion(final List<SubscriptionsFilterVersions> sol003FilterVersions) {
if (sol003FilterVersions != null && !sol003FilterVersions.isEmpty()) {
- List<Version> etsiCatalogVersionList = new ArrayList<>();
+ final List<Version> etsiCatalogVersionList = new ArrayList<>();
sol003FilterVersions.forEach(vnfFilterVersion -> {
etsiCatalogVersionList.add(new Version().vnfSoftwareVersion(vnfFilterVersion.getVnfSoftwareVersion())
.vnfdVersions(vnfFilterVersion.getVnfdVersions()));
@@ -166,6 +170,7 @@ public class PkgmSubscriptionRequestConverter implements
notificationTypes.forEach(type -> etsiCatalogManagerNotificationTypes.add(
org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.PkgmNotificationsFilter.NotificationTypesEnum
.fromValue(type.getValue())));
+ return etsiCatalogManagerNotificationTypes;
}
return Collections.emptyList();
}
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementSubscriptionControllerTest.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementSubscriptionControllerTest.java
index ba1bf71936..7466895d97 100644
--- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementSubscriptionControllerTest.java
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementSubscriptionControllerTest.java
@@ -26,28 +26,38 @@ import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
import static org.onap.so.adapters.vnfmadapter.Constants.PACKAGE_MANAGEMENT_BASE_URL;
import static org.onap.so.client.RestTemplateConfig.CONFIGURABLE_REST_TEMPLATE;
import static org.springframework.test.web.client.match.MockRestRequestMatchers.method;
import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
import static org.springframework.test.web.client.response.MockRestResponseCreators.withStatus;
import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;
+import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
import java.security.GeneralSecurityException;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.UUID;
+import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.onap.so.adapters.vnfmadapter.Constants;
import org.onap.so.adapters.vnfmadapter.VnfmAdapterApplication;
+import org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.BasicAuth;
import org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.LinkSelf;
import org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.NsdmSubscription;
import org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.PkgmNotificationsFilter;
import org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.PkgmSubscription;
+import org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.SubscriptionAuthentication;
+import org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.Version;
+import org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.VnfProducts;
+import org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.VnfProductsProviders;
import org.onap.so.adapters.vnfmadapter.extclients.vnfm.packagemanagement.model.InlineResponse2002;
import org.onap.so.adapters.vnfmadapter.extclients.vnfm.packagemanagement.model.PkgmSubscriptionRequest;
import org.onap.so.adapters.vnfmadapter.extclients.vnfm.packagemanagement.model.SubscriptionsAuthentication;
@@ -59,6 +69,8 @@ import org.onap.so.adapters.vnfmadapter.extclients.vnfm.packagemanagement.model.
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.test.web.client.TestRestTemplate;
+import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
import org.springframework.http.HttpHeaders;
@@ -69,6 +81,7 @@ import org.springframework.http.ResponseEntity;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.client.MockRestServiceServer;
+import org.springframework.test.web.client.match.MockRestRequestMatchers;
import org.springframework.web.client.RestTemplate;
import com.google.gson.Gson;
@@ -83,6 +96,10 @@ public class Sol003PackageManagementSubscriptionControllerTest {
private final Gson gson = new Gson();
private final URI msbEndpoint = URI.create("http://msb-iag.onap:80/api/vnfpkgm/v1/subscriptions");
+ private static final String _NOTIFICATION_CALLBACK_URI =
+ "https://so-vnfm-adapter.onap:30406" + Constants.ETSI_SUBSCRIPTION_NOTIFICATION_BASE_URL;
+ private static final String LOCALHOST_URL = "http://localhost:";
+
@Autowired
@Qualifier(CONFIGURABLE_REST_TEMPLATE)
private RestTemplate restTemplate;
@@ -92,6 +109,12 @@ public class Sol003PackageManagementSubscriptionControllerTest {
@Autowired
private Sol003PackageManagementSubscriptionController sol003PackageManagementSubscriptionController;
+ @Autowired
+ private TestRestTemplate testRestTemplate;
+
+ @LocalServerPort
+ private int port;
+
private static final String ID = UUID.randomUUID().toString();
@Before
@@ -101,6 +124,11 @@ public class Sol003PackageManagementSubscriptionControllerTest {
cache.clear();
}
+ @After
+ public void after() {
+ mockRestServiceServer.reset();
+ }
+
@Test
public void testSuccessPostSubscription() throws GeneralSecurityException, URISyntaxException {
final PkgmSubscriptionRequest pkgmSubscriptionRequest = postSubscriptionForTest();
@@ -269,6 +297,47 @@ public class Sol003PackageManagementSubscriptionControllerTest {
assertEquals(HttpStatus.NOT_FOUND, responseDelete.getStatusCode());
}
+
+ @Test
+ public void testSuccessPostSubscriptionWithValidNotificationTypes() throws Exception {
+
+ final String file = getAbsolutePath("src/test/resources/requests/SubscriptionRequest.json");
+ final String json = new String(Files.readAllBytes(Paths.get(file)));
+ final PkgmSubscriptionRequest request = gson.fromJson(json, PkgmSubscriptionRequest.class);
+
+ mockRestServiceServer.expect(requestTo(msbEndpoint)).andExpect(method(HttpMethod.POST))
+ .andExpect(MockRestRequestMatchers.content().json(gson.toJson(getEtsiCatalogPkgmSubscriptionRequest())))
+ .andRespond(withSuccess(gson.toJson(buildPkgmSubscription()), MediaType.APPLICATION_JSON));
+
+
+ final ResponseEntity<InlineResponse2002> responseEntity = testRestTemplate.postForEntity(
+ LOCALHOST_URL + port + Constants.PACKAGE_MANAGEMENT_BASE_URL + "/subscriptions", request,
+ InlineResponse2002.class);
+
+ assertEquals(HttpStatus.CREATED, responseEntity.getStatusCode());
+ assertTrue(responseEntity.hasBody());
+ final InlineResponse2002 actual = responseEntity.getBody();
+ assertEquals(ID, actual.getId());
+
+
+ }
+
+ private org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.PkgmSubscriptionRequest getEtsiCatalogPkgmSubscriptionRequest() {
+ return new org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.PkgmSubscriptionRequest()
+ .filters(new PkgmNotificationsFilter()
+ .addNotificationTypesItem(
+ PkgmNotificationsFilter.NotificationTypesEnum.VNFPACKAGEONBOARDINGNOTIFICATION)
+ .addVnfdIdItem("VNFDID").addVnfPkgIdItem("VNFPKGID")
+ .addOperationalStateItem(PkgmNotificationsFilter.OperationalStateEnum.ENABLED)
+ .addVnfProductsFromProvidersItem(new VnfProductsProviders().vnfProvider("EST")
+ .addVnfProductsItem(new VnfProducts().vnfProductName("VnfProducts")
+ .addVersionsItem(new Version().vnfSoftwareVersion("vnfSoftwareVersion")
+ .addVnfdVersionsItem("version1")))))
+ .callbackUri(_NOTIFICATION_CALLBACK_URI).authentication(
+ new SubscriptionAuthentication().addAuthTypeItem(SubscriptionAuthentication.AuthTypeEnum.BASIC)
+ .paramsBasic(new BasicAuth().userName("vnfm").password("password1$")));
+ }
+
private PkgmSubscriptionRequest buildPkgmSubscriptionRequest() {
final PkgmSubscriptionRequest pkgmSubscriptionRequest = new PkgmSubscriptionRequest();
final SubscriptionsFilter sub = buildSubscriptionsFilter();
@@ -281,8 +350,8 @@ public class Sol003PackageManagementSubscriptionControllerTest {
private SubscriptionsFilter buildSubscriptionsFilter() {
final SubscriptionsFilter sub = new SubscriptionsFilter();
- final List<String> vnfdIdList = new ArrayList();
- final List<String> vnfPkgIdList = new ArrayList();
+ final List<String> vnfdIdList = new ArrayList<>();
+ final List<String> vnfPkgIdList = new ArrayList<>();
final List<NotificationTypesEnum> notificationTypes = new ArrayList<>();
final SubscriptionsFilterVnfProductsFromProviders subscriptionsFilterVnfProductsFromProviders =
new SubscriptionsFilterVnfProductsFromProviders();
@@ -324,4 +393,9 @@ public class Sol003PackageManagementSubscriptionControllerTest {
return headers;
}
+ private String getAbsolutePath(final String path) {
+ final File file = new File(path);
+ return file.getAbsolutePath();
+ }
+
}
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/resources/requests/SubscriptionRequest.json b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/resources/requests/SubscriptionRequest.json
new file mode 100644
index 0000000000..85ffb99d8d
--- /dev/null
+++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/resources/requests/SubscriptionRequest.json
@@ -0,0 +1,45 @@
+{
+ "filter":
+ {
+ "notificationTypes": [
+ "VnfPackageOnboardingNotification"
+ ],
+ "vnfProductsFromProviders": [
+ {
+ "vnfProvider": "EST",
+ "vnfProducts": [
+ {
+ "vnfProductName": "VnfProducts",
+ "versions": [
+ {
+ "vnfSoftwareVersion": "vnfSoftwareVersion",
+ "vnfdVersions": [
+ "version1"
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "vnfdId": [
+ "VNFDID"
+ ],
+ "vnfPkgId": [
+ "VNFPKGID"
+ ],
+ "operationalState": "ENABLED"
+ },
+ "callbackUri": "http://so-vnfm-adapter:9093/api/vnfpkgm/v1/subscriptions",
+ "authentication":
+ {
+ "authType": [
+ "BASIC"
+ ],
+ "paramsBasic":
+ {
+ "userName": "vnfm",
+ "password": "vnfm"
+ }
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationService.groovy
new file mode 100644
index 0000000000..00b0b37b18
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationService.groovy
@@ -0,0 +1,429 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ # Copyright (c) 2019, CMCC Technologies Co., Ltd.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License")
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ # http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so.bpmn.infrastructure.scripts
+
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.aai.domain.yang.Relationship
+import org.onap.aai.domain.yang.ServiceInstance
+import org.onap.aai.domain.yang.CommunicationServiceProfile
+import org.onap.aai.domain.yang.CommunicationServiceProfiles
+import org.onap.logging.filter.base.ONAPComponents
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.RequestDBUtil
+import org.onap.so.bpmn.core.UrnPropertiesReader
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.client.HttpClient
+import org.onap.so.client.HttpClientFactory
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import org.onap.so.db.request.beans.OperationStatus
+import org.slf4j.Logger
+import org.slf4j.LoggerFactory
+
+import javax.ws.rs.NotFoundException
+import javax.ws.rs.core.Response
+
+import static org.apache.commons.lang3.StringUtils.isBlank
+
+class DeleteCommunicationService extends AbstractServiceTaskProcessor {
+ private final String PREFIX ="DeleteCommunicationService"
+ private final Long TIMEOUT = 60 * 60 * 1000
+
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ private RequestDBUtil requestDBUtil = new RequestDBUtil()
+ private static final Logger LOGGER = LoggerFactory.getLogger(DeleteCommunicationService.class)
+
+ @Override
+ void preProcessRequest(DelegateExecution execution) {
+ execution.setVariable("prefix",PREFIX)
+ String msg = ""
+
+ LOGGER.trace("Starting preProcessRequest")
+
+ try {
+ // check for incoming json message/input
+ String siRequest = execution.getVariable("bpmnRequest")
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("msoRequestId", requestId)
+ execution.setVariable("operationType", "DELETE")
+
+ //communication service id
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if (isBlank(serviceInstanceId)) {
+ msg = "communication-service id is null"
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ LOGGER.info("Input Request: ${siRequest}, reqId: ${requestId}, serviceInstanceId: ${serviceInstanceId}")
+
+ //requestParameters
+ checkAndSetRequestParam(siRequest,"globalSubscriberId",false,execution)
+ checkAndSetRequestParam(siRequest,"serviceType",false,execution)
+ checkAndSetRequestParam(siRequest,"operationId",false,execution)
+
+ } catch (BpmnError e) {
+ throw e
+ } catch (any) {
+ msg = "Exception in preProcessRequest " + any.getCause()
+ LOGGER.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ LOGGER.trace("Exit preProcessRequest")
+ }
+
+
+ /**
+ * prepare update operation status
+ * @param execution
+ */
+ void preInitUpdateOperationStatus(DelegateExecution execution){
+ LOGGER.trace(" ======== STARTED initUpdateOperationStatus Process ======== ")
+ try{
+ execution.setVariable("result","processing")
+ execution.setVariable("progress","0")
+ execution.setVariable("operationContent","delete communication service operation start")
+ setOperationStatus(execution)
+
+ }catch(Exception e){
+ LOGGER.error("Exception Occured Processing initUpdateOperationStatus. Exception is:\n" + e)
+ execution.setVariable("CVFMI_ErrorResponse", "Error Occurred during initUpdateOperationStatus Method:\n" + e.getMessage())
+ }
+ LOGGER.trace("======== COMPLETED initUpdateOperationStatus Process ======== ")
+ }
+
+ /**
+ * send sync response
+ * @param execution
+ */
+ void sendSyncResponse(DelegateExecution execution) {
+ LOGGER.debug("Begin sendSyncResponse")
+
+ try {
+ String operationId = execution.getVariable("operationId")
+ String syncResponse = """{"operationId":"${operationId}"}""".trim()
+ sendWorkflowResponse(execution, 202, syncResponse)
+
+ } catch (Exception ex) {
+ String msg = "Exception in sendSyncResponse: " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ LOGGER.debug("Exit sendSyncResponse")
+ }
+
+ /**
+ * query CommunicationSerive from AAI
+ * save e2eslice-service instance id and service name
+ * @param execution
+ */
+ private void queryCommunicationSeriveFromAAI(DelegateExecution execution)
+ {
+ LOGGER.trace(" ***** begin queryCommunicationSeriveFromAAI *****")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ String errorMsg = "query communication service from aai failed"
+ AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, serviceInstanceId, errorMsg)
+ Optional<ServiceInstance> si = wrapper.asBean(ServiceInstance.class)
+ if(si.isPresent())
+ {
+ String serviceInstName = si.get()?.getServiceInstanceName()
+ String e2eSliceServiceInstId
+ if(si.isPresent())
+ {
+ List<Relationship> relationshipList = si.get().getRelationshipList()?.getRelationship()
+ for (Relationship relationship : relationshipList)
+ {
+ String relatedTo = relationship.getRelatedTo()
+ if (relatedTo == "service-instance")
+ {
+ String relatedLink = relationship.getRelatedLink()?:""
+ e2eSliceServiceInstId = relatedLink ? relatedLink.substring(relatedLink.lastIndexOf("/") + 1,relatedLink.length()) : ""
+ break
+ }
+ }
+ }
+ execution.setVariable("e2eSliceServiceInstanceId", e2eSliceServiceInstId)
+ execution.setVariable("serviceInstanceName", serviceInstName ?: "")
+ LOGGER.info("communication-service Id: ${serviceInstanceId}, e2eslice-service Id: ${e2eSliceServiceInstId}, serviceName: ${serviceInstName}")
+ }
+ LOGGER.debug(" ***** Exit queryCommunicationSeriveFromAAI *****")
+ }
+
+ /**
+ * query AAI
+ * @param execution
+ * @param aaiObjectType
+ * @param instanceId
+ * @return AAIResultWrapper
+ */
+ private AAIResultWrapper queryAAI(DelegateExecution execution, AAIObjectType aaiObjectType, String instanceId, String errorMsg)
+ {
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ String serviceType = execution.getVariable("serviceType")
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(aaiObjectType, globalSubscriberId, serviceType, instanceId)
+ if (!resourceClient.exists(resourceUri)) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMsg)
+ }
+ AAIResultWrapper wrapper = resourceClient.get(resourceUri, NotFoundException.class)
+ return wrapper
+ }
+
+
+ /**
+ * 再次调用deleteE2EServiceInstance接口,然后获取到operationid,
+ */
+ void sendRequest2NSMFWF(DelegateExecution execution) {
+ LOGGER.trace("begin preRequestSend2NSMF")
+ try {
+ //url:/onap/so/infra/e2eServiceInstances/v3/{serviceInstanceId}"
+ def NSMF_endpoint = UrnPropertiesReader.getVariable("mso.infra.endpoint.url", execution)
+ String url = "${NSMF_endpoint}/e2eServiceInstances/v3/${execution.getVariable("e2eSliceServiceInstanceId")}"
+
+ String requestBody = """
+ {
+ "globalSubscriberId": "${execution.getVariable("globalSubscriberId")}",
+ "serviceType": "${execution.getVariable("serviceType")}"
+ }
+ """
+ requestBody.replaceAll("\\s+", "")
+
+ String basicAuthValue = UrnPropertiesReader.getVariable("mso.infra.endpoint.auth", execution)
+ HttpClient httpClient = new HttpClientFactory().newJsonClient(new URL(url), ONAPComponents.SO)
+ httpClient.addAdditionalHeader("Authorization", basicAuthValue)
+ httpClient.addAdditionalHeader("Accept", "application/json")
+ Response httpResponse = httpClient.delete(requestBody)
+ handleNSSMFWFResponse(httpResponse, execution)
+
+ } catch (BpmnError e) {
+ throw e
+ } catch (any) {
+ String msg = "Exception in DeleteCommunicationService.preRequestSend2NSMF. " + any.getCause()
+ LOGGER.error(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+
+ LOGGER.trace("exit preRequestSend2NSMF")
+ }
+
+ /**
+ * prepare to call sub process
+ * @param execution
+ */
+ void prepareCallCheckProcessStatus(DelegateExecution execution)
+ {
+ LOGGER.debug(PREFIX + "prepareCallCheckProcessStatus Start")
+
+ def successConditions = new ArrayList<>()
+ successConditions.add("finished")
+ execution.setVariable("successConditions", successConditions)
+
+ def errorConditions = new ArrayList<>()
+ errorConditions.add("error")
+ execution.setVariable("errorConditions", errorConditions)
+
+ execution.setVariable("processServiceType", "communication service")
+ execution.setVariable("subOperationType", "DELETE")
+ execution.setVariable("initProgress", 20)
+ execution.setVariable("endProgress",90)
+
+ execution.setVariable("timeOut", TIMEOUT)
+
+ LOGGER.debug(PREFIX + "prepareCallCheckProcessStatus Exit")
+ }
+
+ /**
+ * delete communication profile from AAI
+ * @param execution
+ */
+ void delCSProfileFromAAI(DelegateExecution execution)
+ {
+ LOGGER.debug("start delete communication service profile from AAI")
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ String serviceType = execution.getVariable("serviceType")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ String profileId
+ try
+ {
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.COMMUNICATION_PROFILE_ALL, globalSubscriberId, serviceType, serviceInstanceId)
+ AAIResultWrapper wrapper = resourceClient.get(resourceUri, NotFoundException.class)
+ Optional<CommunicationServiceProfiles> csProfilesOpt = wrapper.asBean(CommunicationServiceProfiles.class)
+ if(csProfilesOpt.isPresent()){
+ CommunicationServiceProfiles csProf
+ iles = csProfilesOpt.get()
+ CommunicationServiceProfile csProfile = csProfiles.getCommunicationServiceProfile().get(0)
+ profileId = csProfile ? csProfile.getProfileId() : ""
+ }
+ resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.COMMUNICATION_SERVICE_PROFILE, globalSubscriberId, serviceType, serviceInstanceId, profileId)
+ if (!resourceClient.exists(resourceUri)) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "communication service profile was not found in aai")
+ }
+
+ resourceClient.delete(resourceUri)
+ LOGGER.debug("end delete communication service profile from AAI")
+ }
+ catch (any)
+ {
+ String msg = "delete communication service profile from aai failed! cause-"+any.getCause()
+ LOGGER.error(any.printStackTrace())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg);
+ }
+
+ }
+
+ /**
+ * delete communication service from AAI
+ * @param execution
+ */
+ void delCSFromAAI(DelegateExecution execution)
+ {
+ try
+ {
+ LOGGER.debug("start delete communication service from AAI")
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("serviceType"), execution.getVariable("serviceInstanceId"))
+ resourceClient.delete(serviceInstanceUri)
+
+ execution.setVariable("progress", "100")
+ execution.setVariable("result", "finished")
+ execution.setVariable("operationContent", "CSMF completes service terminated.")
+ setOperationStatus(execution)
+ LOGGER.debug("end delete communication service from AAI")
+ }
+ catch (any)
+ {
+ LOGGER.error("Error occured within delCSFromAAI method, cause: ${any.getCause()} ")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Error occured during delete communication service from aai")
+ }
+ }
+
+ void sendSyncError(DelegateExecution execution)
+ {
+ LOGGER.debug("Starting sendSyncError")
+
+ try {
+ String errorMessage
+ if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ errorMessage = wfe.getErrorMessage()
+ } else {
+ errorMessage = "Sending Sync Error."
+ }
+
+ String buildworkflowException =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorMessage)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ LOGGER.debug(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+
+ } catch (Exception ex) {
+ LOGGER.error("Sending Sync Error Activity Failed. " + "\n" + ex.getMessage())
+ }
+ }
+
+ /**
+ * prepare update operation status
+ * @param execution
+ */
+ void preFailedOperationStatus(DelegateExecution execution)
+ {
+ LOGGER.debug(" ======== STARTED preFailedOperationStatus Process ======== ")
+
+ execution.setVariable("progress", "100")
+ execution.setVariable("result", "error")
+ execution.setVariable("operationContent", "terminate service failure")
+
+ WorkflowException wfex = execution.getVariable("WorkflowException") as WorkflowException
+ String errorMessage = wfex.getErrorMessage()
+ errorMessage = errorMessage.length() > 200 ? errorMessage.substring(0,200) + "......" : errorMessage
+ execution.setVariable("reason", errorMessage)
+ setOperationStatus(execution)
+
+ LOGGER.debug("======== COMPLETED prepareEndOperationStatus Process ======== ")
+ }
+
+ /**
+ * prepare Operation status
+ * @param execution
+ * @param operationType
+ */
+ private void setOperationStatus(DelegateExecution execution)
+ {
+ OperationStatus operationStatus = new OperationStatus()
+ operationStatus.setServiceId(execution.getVariable("serviceInstanceId"))
+ operationStatus.setOperationId(execution.getVariable("operationId"))
+ operationStatus.setUserId(execution.getVariable("globalSubscriberId"))
+ //interface not support update
+ operationStatus.setServiceName(execution.getVariable("serviceInstanceName"))
+ operationStatus.setResult(execution.getVariable("result"))
+ operationStatus.setProgress(execution.getVariable("progress"))
+ operationStatus.setOperationContent(execution.getVariable("operationContent"))
+ operationStatus.setReason(execution.getVariable("reason")?:"")
+ operationStatus.setOperation("DELETE")
+
+ requestDBUtil.prepareUpdateOperationStatus(execution, operationStatus)
+ }
+
+ void prepareFailureStatus(DelegateExecution execution)
+ {
+ execution.setVariable("progress", "100")
+ execution.setVariable("operationContent", "terminate service failure.")
+ setOperationStatus(execution)
+ LOGGER.debug("${PREFIX}-prepareFailureStatus,result:${execution.getVariable("result")}, reason: ${execution.getVariable("reason")}")
+ }
+
+ /**
+ * check request json and save parameter to execution
+ * @param siRequest
+ * @param paraName
+ * @param isErrorException
+ * @param execution
+ */
+ private void checkAndSetRequestParam(String siRequest, String paraName, boolean isErrorException, DelegateExecution execution)
+ {
+ String msg = ""
+ String paramValue = jsonUtil.getJsonValue(siRequest, paraName)
+ if (isBlank(paramValue)) {
+ msg = "Input ${paraName} is null"
+ LOGGER.error(msg)
+ if(isErrorException)
+ {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ } else {
+ execution.setVariable(paraName, paramValue)
+ }
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSliceService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSliceService.groovy
new file mode 100644
index 0000000000..f0d43cf8d7
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteSliceService.groovy
@@ -0,0 +1,263 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (c) 2019, CMCC Technologies Co., Ltd.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.scripts
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.aai.domain.yang.ServiceProfile
+import org.onap.aai.domain.yang.ServiceProfiles
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.MsoUtils
+import org.onap.so.bpmn.common.scripts.RequestDBUtil
+import org.onap.so.bpmn.core.WorkflowException
+import org.onap.so.bpmn.core.json.JsonUtils
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import org.onap.so.db.request.beans.OperationStatus
+import org.slf4j.Logger
+import org.slf4j.LoggerFactory
+
+import javax.ws.rs.NotFoundException
+
+import static org.apache.commons.lang3.StringUtils.isBlank
+
+class DeleteSliceService extends AbstractServiceTaskProcessor {
+
+ String Prefix="DELSS_"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ JsonUtils jsonUtil = new JsonUtils()
+ private RequestDBUtil requestDBUtil = new RequestDBUtil()
+
+ private static final Logger logger = LoggerFactory.getLogger( DeleteSliceService.class)
+
+ @Override
+ void preProcessRequest(DelegateExecution execution) {
+ execution.setVariable("prefix", Prefix)
+ String msg = ""
+
+ logger.trace("Starting preProcessRequest")
+
+ try {
+ // check for incoming json message/input
+ String siRequest = execution.getVariable("bpmnRequest")
+ String requestId = execution.getVariable("mso-request-id")
+ execution.setVariable("msoRequestId", requestId)
+
+ //e2eslice-service instance id
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if (isBlank(serviceInstanceId)) {
+ msg = "e2eslice-service id is null"
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ logger.info("Input Request: ${siRequest}, reqId: ${requestId}, e2eslice-service: ${serviceInstanceId}")
+
+ //subscriberInfo
+ checkAndSetRequestParam(siRequest,"globalSubscriberId",false, execution)
+ checkAndSetRequestParam(siRequest,"serviceType",false, execution)
+ checkAndSetRequestParam(siRequest,"operationId",false, execution)
+
+ //prepare init operation status
+ execution.setVariable("progress", "0")
+ execution.setVariable("result", "processing")
+ execution.setVariable("operationType", "DELETE")
+ execution.setVariable("operationContent", "Prepare init service")
+ updateServiceOperationStatus(execution)
+
+ } catch (BpmnError e) {
+ throw e
+ } catch (Exception ex) {
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ logger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ logger.trace("Exit preProcessRequest")
+ }
+
+ /**
+ * send asynchronous response
+ * @param execution
+ */
+ void sendAsyncResponse(DelegateExecution execution) {
+ logger.trace("Staring sendSyncResponse")
+
+ try {
+ String operationId = execution.getVariable("operationId")
+ String syncResponse = """{"operationId":"${operationId}"}""".trim()
+ logger.info("sendSynchResponse: xmlSyncResponse - " + "\n" + syncResponse)
+ sendWorkflowResponse(execution, 202, syncResponse)
+
+ } catch (Exception ex) {
+ String msg = "Exception in sendSyncResponse: " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ logger.trace("Exit sendSyncResponse")
+ }
+
+ /**
+ * Deletes the slice service instance in aai
+ */
+ void deleteSliceServiceInstance(DelegateExecution execution) {
+ logger.trace("Entered deleteSliceServiceInstance")
+ try {
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("serviceType"), execution.getVariable("serviceInstanceId"))
+ resourceClient.delete(serviceInstanceUri)
+
+ execution.setVariable("progress", "100")
+ execution.setVariable("result", "finished")
+ execution.setVariable("operationContent", "NSMF completes slicing service termination.")
+ updateServiceOperationStatus(execution)
+
+ logger.trace("Exited deleteSliceServiceInstance")
+ }catch(Exception e){
+ logger.debug("Error occured within deleteSliceServiceInstance method: " + e)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Error occured during deleteSliceServiceInstance from aai")
+ }
+ }
+
+ /**
+ * update operation status
+ * @param execution
+ */
+ private void updateServiceOperationStatus(DelegateExecution execution){
+
+ OperationStatus operationStatus = new OperationStatus()
+ operationStatus.setServiceId(execution.getVariable("serviceInstanceId"))
+ operationStatus.setOperationId(execution.getVariable("operationId"))
+ operationStatus.setUserId(execution.getVariable("globalSubscriberId"))
+ operationStatus.setResult(execution.getVariable("result"))
+ operationStatus.setProgress(execution.getVariable("progress"))
+ operationStatus.setOperationContent(execution.getVariable("operationContent"))
+ operationStatus.setReason(execution.getVariable("reason"))
+ operationStatus.setOperation(execution.getVariable("operationType"))
+
+ requestDBUtil.prepareUpdateOperationStatus(execution, operationStatus)
+ }
+
+ /**
+ * delete service profile from aai
+ * @param execution
+ */
+ private void delServiceProfileFromAAI(DelegateExecution execution)
+ {
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ String serviceType = execution.getVariable("serviceType")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String profileId = ""
+
+ try
+ {
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_PROFILE_ALL, globalSubscriberId, serviceType, serviceInstanceId)
+ AAIResultWrapper wrapper = resourceClient.get(resourceUri, NotFoundException.class)
+ Optional<ServiceProfiles> serviceProfilesOpt =wrapper.asBean(ServiceProfiles.class)
+ if(serviceProfilesOpt.isPresent()){
+ ServiceProfiles serviceProfiles = serviceProfilesOpt.get()
+ ServiceProfile serviceProfile = serviceProfiles.getServiceProfile().get(0)
+ profileId = serviceProfile ? serviceProfile.getProfileId() : ""
+ }
+ resourceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_PROFILE, globalSubscriberId, serviceType, serviceInstanceId, profileId)
+ if (!resourceClient.exists(resourceUri)) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service Instance was not found in aai")
+ }
+ resourceClient.delete(resourceUri)
+ }
+ catch (any)
+ {
+ String msg = "delete service profile from aai failed! cause-"+any.getCause()
+ logger.error(any.printStackTrace())
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg);
+ }
+ }
+
+ void sendSyncError(DelegateExecution execution) {
+ logger.info("Starting sendSyncError")
+
+ try {
+ String errorMessage
+ if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
+ WorkflowException wfe = execution.getVariable("WorkflowException")
+ errorMessage = wfe.getErrorMessage()
+ } else {
+ errorMessage = "Sending Sync Error."
+ }
+
+ String buildworkflowException =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.onap/so/workflow/schema/v1">
+ <aetgt:ErrorMessage>${MsoUtils.xmlEscape(errorMessage)}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>7000</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ logger.debug(buildworkflowException)
+ sendWorkflowResponse(execution, 500, buildworkflowException)
+
+ } catch (Exception ex) {
+ logger.error("Sending Sync Error Activity Failed. " + "\n" + ex.getMessage())
+ }
+
+ }
+
+ void prepareEndOperationStatus(DelegateExecution execution){
+ logger.debug(" ======== STARTED prepareEndOperationStatus Process ======== ")
+
+ execution.setVariable("progress", "100")
+ execution.setVariable("result", "error")
+ execution.setVariable("operationContent", "NSSMF Terminate service failure")
+
+ WorkflowException wfex = execution.getVariable("WorkflowException") as WorkflowException
+ String errorMessage = wfex.getErrorMessage()
+ errorMessage = errorMessage.length() > 200 ? errorMessage.substring(0,200) + "......" : errorMessage
+ execution.setVariable("reason",errorMessage)
+ updateServiceOperationStatus(execution)
+
+ logger.debug("======== COMPLETED prepareEndOperationStatus Process ======== ")
+ }
+
+ /**
+ * check parameters from request body
+ * set to execution
+ * @param siRequest
+ * @param paraName
+ * @param isErrorException
+ * @param execution
+ */
+ private void checkAndSetRequestParam(String siRequest, String paraName, boolean isErrorException, DelegateExecution execution)
+ {
+ String msg = ""
+ String paramValue = jsonUtil.getJsonValue(siRequest, paraName)
+ if (isBlank(paramValue)) {
+ msg = "Input ${paraName} is null"
+ logger.error(msg)
+ if(isErrorException)
+ {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+
+ } else {
+ execution.setVariable(paraName, paramValue)
+ }
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteSliceService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteSliceService.groovy
new file mode 100644
index 0000000000..7c2a2be6ac
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteSliceService.groovy
@@ -0,0 +1,322 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ # Copyright (c) 2019, CMCC Technologies Co., Ltd.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License")
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ # http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so.bpmn.infrastructure.scripts
+
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.delegate.DelegateExecution
+import org.onap.aai.domain.yang.AllottedResource
+import org.onap.aai.domain.yang.AllottedResources
+import org.onap.aai.domain.yang.Relationship
+import org.onap.aai.domain.yang.ServiceInstance
+import org.onap.aai.domain.yang.SliceProfiles
+import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
+import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.client.aai.AAIObjectType
+import org.onap.so.client.aai.AAIResourcesClient
+import org.onap.so.client.aai.entities.AAIResultWrapper
+import org.onap.so.client.aai.entities.uri.AAIResourceUri
+import org.onap.so.client.aai.entities.uri.AAIUriFactory
+import org.slf4j.Logger
+import org.slf4j.LoggerFactory
+
+import javax.ws.rs.NotFoundException
+
+import static org.apache.commons.lang3.StringUtils.isBlank
+
+/**
+ * This groovy class supports the <class>DoDeleteSliceService.bpmn</class> process.
+ *
+ * Inputs:
+ * @param - msoRequestId
+ * @param - globalSubscriberId - O
+ * @param - subscriptionServiceType - O
+ * @param - serviceInstanceId
+ *
+ */
+class DoDeleteSliceService extends AbstractServiceTaskProcessor {
+ private final String PREFIX ="DoDeleteSliceService"
+ ExceptionUtil exceptionUtil = new ExceptionUtil()
+ private static final Logger LOGGER = LoggerFactory.getLogger( DoDeleteSliceService.class)
+
+ @Override
+ void preProcessRequest(DelegateExecution execution) {
+ LOGGER.debug(" *****${PREFIX} preProcessRequest *****")
+ String msg = ""
+
+ try {
+ //String requestId = execution.getVariable("msoRequestId")
+ execution.setVariable("prefix",PREFIX)
+
+ //Inputs
+ //requestDetails.subscriberInfo. for AAI GET & PUT
+ execution.getVariable("globalSubscriberId") ?: execution.setVariable("globalSubscriberId", "")
+
+ //requestDetails.requestParameters. for AAI PUT
+ execution.getVariable("serviceType") ?: execution.setVariable("serviceType", "")
+
+ //Generated in parent for AAI PUT
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ if (isBlank(serviceInstanceId)){
+ msg = "Input serviceInstanceId is null"
+ LOGGER.info(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ } catch (BpmnError e) {
+ throw e
+ } catch (Exception ex){
+ msg = "Exception in preProcessRequest " + ex.getMessage()
+ LOGGER.error(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ LOGGER.debug("*****${PREFIX} Exit preProcessRequest *****")
+ }
+
+ /**
+ * query E2ESliceService from AAI
+ * save snssai
+ * @param execution
+ */
+ void queryE2ESliceSeriveFromAAI(DelegateExecution execution)
+ {
+ LOGGER.trace(" *****${PREFIX} Start queryE2ESliceSeriveFromAAI *****")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+
+ String errorMsg = "query e2e slice service from aai failed"
+ AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, serviceInstanceId, errorMsg)
+ Optional<ServiceInstance> si =wrapper.asBean(ServiceInstance.class)
+ if(si.isPresent())
+ {
+ String snssai = si.get()?.getEnvironmentContext()
+ execution.setVariable("snssai", snssai ?: "")
+ LOGGER.info("serviceInstanceId: ${serviceInstanceId}, snssai: ${snssai}")
+ }
+ LOGGER.trace(" *****${PREFIX} Exit queryE2ESliceSeriveFromAAI *****")
+ }
+
+ /**
+ * get allotted resource from AAI
+ * save nsi id
+ * @param execution
+ */
+ void getAllottedResFromAAI(DelegateExecution execution)
+ {
+ LOGGER.trace(" *****${PREFIX} Start getAllottedResFromAAI *****")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ try
+ {
+ String errorMsg = "query allotted resource from aai failed."
+ AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.ALLOTTED_RESOURCE_ALL, serviceInstanceId, errorMsg)
+ Optional<AllottedResources> ars = wrapper?.asBean(AllottedResources.class)
+ if(ars.isPresent() && ars.get().getAllottedResource())
+ {
+ List<AllottedResource> allottedResourceList = ars.get().getAllottedResource()
+ AllottedResource ar = allottedResourceList.first()
+ String relatedLink = ar?.getRelationshipList()?.getRelationship()?.first()?.getRelatedLink()
+ String nsiId = relatedLink ? relatedLink.substring(relatedLink.lastIndexOf("/") + 1,relatedLink.length()) : ""
+ execution.setVariable("nsiId", nsiId)
+ LOGGER.info("serviceInstanceId: ${serviceInstanceId}, nsiId:${nsiId}")
+ }
+ }
+ catch(BpmnError e){
+ throw e
+ }
+ catch (Exception ex){
+ String msg = "Exception in getAllottedResFromAAI " + ex.getMessage()
+ LOGGER.error(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ LOGGER.trace(" *****${PREFIX} Exit getAllottedResFromAAI *****")
+ }
+
+ /**
+ * get nsi service instance from aai
+ * save nssi id
+ * @param execution
+ */
+ void getNSIFromAAI(DelegateExecution execution)
+ {
+ LOGGER.trace(" *****${PREFIX} Start getNSIFromAAI *****")
+ String nsiId = execution.getVariable("nsiId")
+ try
+ {
+ String errorMsg = "query nsi from aai failed."
+ AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, nsiId, errorMsg)
+ Optional<ServiceInstance> si =wrapper.asBean(ServiceInstance.class)
+ List<String> nssiIdList = []
+ String msg = "nsiId:${nsiId},nssiIdList:"
+ if(si.isPresent())
+ {
+ List<Relationship> relationshipList = si.get().getRelationshipList()?.getRelationship()
+ for (Relationship relationship : relationshipList)
+ {
+ String relatedTo = relationship.getRelatedTo()
+ if (relatedTo == "service-instance")
+ {
+ String relatedLink = relationship.getRelatedLink()?:""
+ String nssiId = relatedLink ? relatedLink.substring(relatedLink.lastIndexOf("/") + 1,relatedLink.length()) : ""
+ nssiIdList.add(nssiId)
+ msg+="${nssiId}, "
+ }
+ }
+ }
+ LOGGER.info(msg)
+ execution.setVariable("nssiIdList", nssiIdList)
+ }
+ catch(BpmnError e){
+ throw e
+ }
+ catch (Exception ex){
+ String msg = "Exception in getNSIFromAAI " + ex.getMessage()
+ LOGGER.error(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
+ }
+ LOGGER.trace(" *****${PREFIX} Exit getNSIFromAAI *****")
+ }
+
+ /**
+ * get nssi service from AAI
+ * prepare list
+ * @param execution
+ */
+ void getNSSIListFromAAI(DelegateExecution execution)
+ {
+ LOGGER.trace("*****${PREFIX} Start getNSSIListFromAAI *****")
+ List<String> nssiIdList = execution.getVariable("nssiIdList")
+ List<ServiceInstance> nssiInstanceList = []
+ String errorMsg = "query nssi list from aai failed"
+ for(String nssiId : nssiIdList)
+ {
+ AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, nssiId, errorMsg)
+ Optional<ServiceInstance> si =wrapper.asBean(ServiceInstance.class)
+ if(si.isPresent())
+ {
+ nssiInstanceList.add(si.get())
+ }
+ }
+ int size = nssiInstanceList.size()
+ int proportion = size >0 ?((90/size) as int) : 90
+ execution.setVariable("nssiInstanceList", nssiInstanceList)
+ execution.setVariable("currentNSSIIndex", 0)
+ execution.setVariable("proportion", proportion)
+ String msg ="nssiInstanceList size: ${nssiInstanceList.size()}, proportion:${proportion}"
+ LOGGER.info(msg)
+ LOGGER.trace(" *****${PREFIX} Exit getNSSIListFromAAI *****")
+ }
+
+ /**
+ * get current NSSI
+ * @param execution
+ */
+ void getCurrentNSSI(DelegateExecution execution)
+ {
+ LOGGER.trace(" *****${PREFIX} Start getCurrentNSSI *****")
+ List<ServiceInstance> nssiInstanceList = execution.getVariable("nssiInstanceList")
+ int currentIndex = execution.getVariable("currentNSSIIndex") as int
+ ServiceInstance nssi = nssiInstanceList?.get(currentIndex)
+ def currentNSSI = [:]
+ currentNSSI['nssiServiceInstanceId'] = nssi?.getServiceInstanceId()
+ currentNSSI['modelInvariantId'] = nssi?.getModelInvariantId()
+ currentNSSI['modelVersionId'] = nssi?.getModelVersionId()
+ currentNSSI['snssai'] = execution.getVariable("snssai") ?: ""
+ currentNSSI['nsiServiceInstanceId'] = execution.getVariable("nsiId") ?: ""
+ currentNSSI['operationId'] = execution.getVariable("operationId") ?: ""
+ currentNSSI['e2eServiceInstanceId'] = execution.getVariable("serviceInstanceId") ?: ""
+ currentNSSI['msoRequestId'] = execution.getVariable("msoRequestId") ?: ""
+ currentNSSI['globalSubscriberId'] = execution.getVariable("globalSubscriberId") ?: ""
+ currentNSSI['serviceType'] = execution.getVariable("serviceType") ?: ""
+ currentNSSI['serviceModelInfo'] = execution.getVariable("serviceModelInfo") ?: ""
+ currentNSSI['proportion'] = (execution.getVariable("proportion") as int)*(currentIndex+1)
+ execution.setVariable("currentNSSI", currentNSSI)
+ String msg = "Now we deal with nssiServiceInstanceId: ${currentNSSI['nssiServiceInstanceId']}, current Index: ${currentIndex}, current proportion:${currentNSSI['proportion']}"
+ LOGGER.info(msg)
+ LOGGER.trace(" *****${PREFIX} Exit getCurrentNSSI *****")
+ }
+
+ /**
+ * parse next nssi
+ * @param execution
+ */
+ void parseNextNSSI(DelegateExecution execution)
+ {
+ LOGGER.trace(" *****${PREFIX} Start parseNextNSSI *****")
+ if(execution.getVariable("WorkflowException") != null){
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "current job failure!")
+ }
+ def currentIndex = execution.getVariable("currentNSSIIndex")
+ List<ServiceInstance> nssiInstanceList = execution.getVariable("nssiInstanceList")
+ def nextIndex = ++currentIndex
+ LOGGER.info("nextIndex: ${nextIndex}")
+ if(nextIndex >= nssiInstanceList.size()){
+ execution.setVariable("isAllNSSIFinished", "true")
+ }else{
+ execution.setVariable("isAllNSSIFinished", "false")
+ execution.setVariable("currentNSSIIndex", nextIndex)
+ }
+ LOGGER.trace(" *****${PREFIX} Exit parseNextNSSI *****")
+ }
+
+
+ /**
+ * query sliceProfile from AAI
+ * save profileId
+ * @param execution
+ */
+ void querySliceProfileFromAAI(DelegateExecution execution)
+ {
+ LOGGER.trace(" *****${PREFIX} Start querySliceProfileFromAAI *****")
+ def currentNSSI = execution.getVariable("currentNSSI")
+ String nssiId = currentNSSI['nssiServiceInstanceId']
+ String errorMsg = "query slice profile failed"
+ AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.SLICE_PROFILE_ALL, nssiId, errorMsg)
+ Optional<SliceProfiles> sliceProfiles =wrapper.asBean(SliceProfiles.class)
+ if(sliceProfiles.isPresent())
+ {
+ String profileId = sliceProfiles.get().getSliceProfile()?.get(0)?.getProfileId()
+ currentNSSI['profileId'] = profileId ?: ""
+ LOGGER.info("nssiId: ${nssiId}, profileId: ${profileId}")
+ }
+ execution.setVariable("currentNSSI", currentNSSI)
+ LOGGER.trace(" *****${PREFIX} Exit querySliceProfileFromAAI *****")
+ }
+
+ /**
+ * query AAI
+ * @param execution
+ * @param aaiObjectType
+ * @param instanceId
+ * @return AAIResultWrapper
+ */
+ private AAIResultWrapper queryAAI(DelegateExecution execution, AAIObjectType aaiObjectType, String instanceId, String errorMsg)
+ {
+ LOGGER.trace(" *****${PREFIX} Start queryAAI *****")
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ String serviceType = execution.getVariable("serviceType")
+
+ AAIResourcesClient resourceClient = new AAIResourcesClient()
+ AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(aaiObjectType, globalSubscriberId, serviceType, instanceId)
+ if (!resourceClient.exists(resourceUri)) {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMsg)
+ }
+ AAIResultWrapper wrapper = resourceClient.get(resourceUri, NotFoundException.class)
+ LOGGER.trace(" *****${PREFIX} Exit queryAAI *****")
+ return wrapper
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteCommunicationService.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteCommunicationService.bpmn
new file mode 100644
index 0000000000..58a69621d3
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteCommunicationService.bpmn
@@ -0,0 +1,523 @@
+<?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: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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1nvjixd" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.4.1">
+ <bpmn:process id="DeleteCommunicationService" name="DeleteCommunicationService" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1" name="start">
+ <bpmn:outgoing>SequenceFlow_1kjqnil</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1kjqnil" sourceRef="StartEvent_1" targetRef="Task_1mqm4nb" />
+ <bpmn:sequenceFlow id="SequenceFlow_0ogievs" sourceRef="Task_1mqm4nb" targetRef="Task_0q2v7qe" />
+ <bpmn:sequenceFlow id="SequenceFlow_192yyii" sourceRef="Task_0q2v7qe" targetRef="Task_0zaekmn" />
+ <bpmn:serviceTask id="Task_0zaekmn" name="Init Service Operation Status">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${dbAdapterEndpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="payload">${updateOperationStatus}</camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="CSMF_dbResponseCode">${statusCode}</camunda:outputParameter>
+ <camunda:outputParameter name="CSMF_dbResponse">${response}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_192yyii</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0xvoume</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:scriptTask id="Task_0q2v7qe" name="Init Service Operation Status" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0ogievs</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_192yyii</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcs= new DeleteCommunicationService()
+dcs.preInitUpdateOperationStatus(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="Task_1mqm4nb" name="PreProcessRequest" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1kjqnil</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0ogievs</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcs= new DeleteCommunicationService()
+dcs.preProcessRequest(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="ScriptTask_1k5stey" name="Send Sync Ack Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0xvoume</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_017qgen</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcs = new DeleteCommunicationService()
+dcs.sendSyncResponse(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0xvoume" sourceRef="Task_0zaekmn" targetRef="ScriptTask_1k5stey" />
+ <bpmn:sequenceFlow id="SequenceFlow_017qgen" sourceRef="ScriptTask_1k5stey" targetRef="Task_0ux5uk1" />
+ <bpmn:serviceTask id="Task_1kizznk" name="Update Service Operation Status">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${dbAdapterEndpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="payload">${updateOperationStatus}</camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="CSMF_dbResponseCode">${statusCode}</camunda:outputParameter>
+ <camunda:outputParameter name="CSMF_dbResponse">${response}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0jrbkau</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ssiyug</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:serviceTask id="Task_0xwjycr" name="update operation status completed">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${dbAdapterEndpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/json</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="payload">${updateOperationStatus}</camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="CSMF_dbResponseCode">${statusCode}</camunda:outputParameter>
+ <camunda:outputParameter name="CSMF_dbResponse">${response}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_00g94pg</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_16ewagx</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1amyd7h</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_10g2pnj</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:endEvent id="EndEvent_0ixagvk" name="end">
+ <bpmn:incoming>SequenceFlow_10g2pnj</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_10g2pnj" sourceRef="Task_0xwjycr" targetRef="EndEvent_0ixagvk" />
+ <bpmn:scriptTask id="Task_0ux5uk1" name="Query CommunicationSerive From AAI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_017qgen</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1j0e2po</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcs = new DeleteCommunicationService()
+dcs.queryCommunicationSeriveFromAAI(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_0ce724z" name="Go to Query delete progress">
+ <bpmn:incoming>SequenceFlow_0bmtfxq</bpmn:incoming>
+ <bpmn:linkEventDefinition name="QueryDeleteProgress" />
+ </bpmn:intermediateThrowEvent>
+ <bpmn:intermediateCatchEvent id="IntermediateThrowEvent_11i33ob" name="QueryDeleteProgress">
+ <bpmn:outgoing>SequenceFlow_1tcgzv0</bpmn:outgoing>
+ <bpmn:linkEventDefinition name="QueryDeleteProgress" />
+ </bpmn:intermediateCatchEvent>
+ <bpmn:scriptTask id="Task_0qg5gn6" name="send request to NSMF WF" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_12xn3kz</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0bmtfxq</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcs = new DeleteCommunicationService()
+dcs.sendRequest2NSMFWF(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0bmtfxq" sourceRef="Task_0qg5gn6" targetRef="IntermediateThrowEvent_0ce724z" />
+ <bpmn:scriptTask id="Task_0qvxmnh" name="Delete CS Profile From AAI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0s7s7zk</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0arvpzv</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcs = new DeleteCommunicationService()
+dcs.delCSProfileFromAAI(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0arvpzv" sourceRef="Task_0qvxmnh" targetRef="Task_0b5j6rg" />
+ <bpmn:scriptTask id="Task_0b5j6rg" name="Delete CS From AAI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0arvpzv</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_00g94pg</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcs = new DeleteCommunicationService()
+dcs.delCSFromAAI(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:subProcess id="SubProcess_0p6namq" name="Exception Handling Sub-Process" triggeredByEvent="true">
+ <bpmn:startEvent id="StartEvent_1843894">
+ <bpmn:outgoing>SequenceFlow_1u5ko4h</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1u5ko4h" sourceRef="StartEvent_1843894" targetRef="Task_1spbb2x" />
+ <bpmn:scriptTask id="Task_1spbb2x" name="Send Error Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1u5ko4h</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_05yfw7t</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcs = new DeleteCommunicationService()
+dcs.sendSyncError(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_05yfw7t" sourceRef="Task_1spbb2x" targetRef="Task_0yqtfvh" />
+ <bpmn:scriptTask id="Task_0yqtfvh" name="Pre update Failed Operation Status" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_05yfw7t</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0c0btia</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcs = new DeleteCommunicationService()
+dcs.preFailedOperationStatus(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0c0btia" sourceRef="Task_0yqtfvh" targetRef="Task_1s3l3fc" />
+ <bpmn:serviceTask id="Task_1s3l3fc" name="Update Service Operation Status">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${dbAdapterEndpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="payload">${updateOperationStatus}</camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="CSMF_dbResponseCode">${statusCode}</camunda:outputParameter>
+ <camunda:outputParameter name="CSMF_dbResponse">${response}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0c0btia</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1w55zo7</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:endEvent id="EndEvent_1fsful5">
+ <bpmn:incoming>SequenceFlow_1w55zo7</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1w55zo7" sourceRef="Task_1s3l3fc" targetRef="EndEvent_1fsful5" />
+ </bpmn:subProcess>
+ <bpmn:sequenceFlow id="SequenceFlow_1tcgzv0" sourceRef="IntermediateThrowEvent_11i33ob" targetRef="ExclusiveGateway_16tdrty" />
+ <bpmn:subProcess id="SubProcess_1l7gd5k" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn:startEvent id="StartEvent_0zc2hnn">
+ <bpmn:outgoing>SequenceFlow_0mifi3x</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0mifi3x" sourceRef="StartEvent_0zc2hnn" targetRef="Task_01va9ms" />
+ <bpmn:endEvent id="EndEvent_052gdjz">
+ <bpmn:incoming>SequenceFlow_073yxs4</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_073yxs4" sourceRef="Task_01va9ms" targetRef="EndEvent_052gdjz" />
+ <bpmn:scriptTask id="Task_01va9ms" name="Handle Unexpected Error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0mifi3x</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_073yxs4</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ </bpmn:subProcess>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1lyw619" name="Is NSMF timeout?" default="SequenceFlow_0s7s7zk">
+ <bpmn:incoming>SequenceFlow_0xipbpr</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1sah9so</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0s7s7zk</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0bqfbxf</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0s7s7zk" sourceRef="ExclusiveGateway_1lyw619" targetRef="Task_0qvxmnh" />
+ <bpmn:sequenceFlow id="SequenceFlow_00g94pg" sourceRef="Task_0b5j6rg" targetRef="Task_0xwjycr" />
+ <bpmn:sequenceFlow id="SequenceFlow_0bqfbxf" name="yes" sourceRef="ExclusiveGateway_1lyw619" targetRef="Task_1ovewjr">
+ <bpmn:documentation>#{(execution.getVariable("isTimeOut") == "YES")}</bpmn:documentation>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isTimeOut") == "YES")}</bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_16tdrty" name="is NSMF Async Succeed?" default="SequenceFlow_0jrbkau">
+ <bpmn:incoming>SequenceFlow_1tcgzv0</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0jrbkau</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_16ewagx</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0jrbkau" sourceRef="ExclusiveGateway_16tdrty" targetRef="Task_1kizznk" />
+ <bpmn:sequenceFlow id="SequenceFlow_16ewagx" name="no" sourceRef="ExclusiveGateway_16tdrty" targetRef="Task_0xwjycr">
+ <bpmn:documentation>#{(execution.getVariable("isNSMFWFRspSucceed" ) == "no")}</bpmn:documentation>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isNSMFWFRspSucceed" ) == "no")}</bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:exclusiveGateway id="ExclusiveGateway_0icj4go" name="Is E2E Slice Service Instance Id Exist?" default="SequenceFlow_12xn3kz">
+ <bpmn:incoming>SequenceFlow_1j0e2po</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_12xn3kz</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0xipbpr</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_1j0e2po" sourceRef="Task_0ux5uk1" targetRef="ExclusiveGateway_0icj4go" />
+ <bpmn:sequenceFlow id="SequenceFlow_12xn3kz" sourceRef="ExclusiveGateway_0icj4go" targetRef="Task_0qg5gn6" />
+ <bpmn:sequenceFlow id="SequenceFlow_0xipbpr" name="no" sourceRef="ExclusiveGateway_0icj4go" targetRef="ExclusiveGateway_1lyw619">
+ <bpmn:documentation>#{(execution.getVariable("e2eSliceServiceInstanceId") == null)}</bpmn:documentation>
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("e2eSliceServiceInstanceId") == null)}</bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:callActivity id="Task_1ff6flk" name="CallCheckServiceProcessStatus" calledElement="CheckServiceProcessStatus">
+ <bpmn:extensionElements>
+ <camunda:in source="e2eSliceServiceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="e2eOperationId" target="operationId" />
+ <camunda:in source="successConditions" target="successConditions" />
+ <camunda:in source="errorConditions" target="errorConditions" />
+ <camunda:in source="processServiceType" target="processServiceType" />
+ <camunda:in source="timeOut" target="timeOut" />
+ <camunda:out source="operationStatus" target="result" />
+ <camunda:out source="operationContent" target="reason" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:out source="isTimeOut" target="isTimeOut" />
+ <camunda:in source="subOperationType" target="operationType" />
+ <camunda:in source="initProgress" target="initProgress" />
+ <camunda:in source="endProgress" target="endProgress" />
+ <camunda:in source="serviceInstanceId" target="parentServiceInstanceId" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="operationId" target="parentOperationId" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0thr8dc</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1sah9so</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:scriptTask id="Task_1ovewjr" name="Prepare update operation status error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0bqfbxf</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1amyd7h</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcs = new DeleteCommunicationService()
+dcs.prepareFailureStatus(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1amyd7h" sourceRef="Task_1ovewjr" targetRef="Task_0xwjycr" />
+ <bpmn:sequenceFlow id="SequenceFlow_1sah9so" sourceRef="Task_1ff6flk" targetRef="ExclusiveGateway_1lyw619" />
+ <bpmn:sequenceFlow id="SequenceFlow_1ssiyug" sourceRef="Task_1kizznk" targetRef="Task_0y1n9ls" />
+ <bpmn:sequenceFlow id="SequenceFlow_0thr8dc" sourceRef="Task_0y1n9ls" targetRef="Task_1ff6flk" />
+ <bpmn:scriptTask id="Task_0y1n9ls" name="Prepare Call CheckServiceProcessStatus" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1ssiyug</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0thr8dc</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcs = new DeleteCommunicationService()
+dcs.prepareCallCheckProcessStatus(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteCommunicationService">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="152" y="102" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="159" y="145" width="23" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1kjqnil_di" bpmnElement="SequenceFlow_1kjqnil">
+ <di:waypoint x="188" y="120" />
+ <di:waypoint x="240" y="120" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ogievs_di" bpmnElement="SequenceFlow_0ogievs">
+ <di:waypoint x="340" y="120" />
+ <di:waypoint x="390" y="120" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_192yyii_di" bpmnElement="SequenceFlow_192yyii">
+ <di:waypoint x="490" y="120" />
+ <di:waypoint x="560" y="120" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_104igd7_di" bpmnElement="Task_0zaekmn">
+ <dc:Bounds x="560" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0tqibrd_di" bpmnElement="Task_0q2v7qe">
+ <dc:Bounds x="390" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_18pflck_di" bpmnElement="Task_1mqm4nb">
+ <dc:Bounds x="240" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1k5stey_di" bpmnElement="ScriptTask_1k5stey">
+ <dc:Bounds x="740" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xvoume_di" bpmnElement="SequenceFlow_0xvoume">
+ <di:waypoint x="660" y="120" />
+ <di:waypoint x="740" y="120" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_017qgen_di" bpmnElement="SequenceFlow_017qgen">
+ <di:waypoint x="840" y="120" />
+ <di:waypoint x="910" y="120" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_17pxrcl_di" bpmnElement="Task_1kizznk">
+ <dc:Bounds x="330" y="310" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0ucwm85_di" bpmnElement="Task_0xwjycr">
+ <dc:Bounds x="1250" y="310" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0ixagvk_di" bpmnElement="EndEvent_0ixagvk">
+ <dc:Bounds x="1432" y="332" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1441" y="375" width="19" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_10g2pnj_di" bpmnElement="SequenceFlow_10g2pnj">
+ <di:waypoint x="1350" y="350" />
+ <di:waypoint x="1432" y="350" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_05zxl7j_di" bpmnElement="Task_0ux5uk1">
+ <dc:Bounds x="910" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1go0jt1_di" bpmnElement="IntermediateThrowEvent_0ce724z">
+ <dc:Bounds x="1432" y="102" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1417" y="145" width="76" height="27" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_09w3u1d_di" bpmnElement="IntermediateThrowEvent_11i33ob">
+ <dc:Bounds x="152" y="332" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="127" y="375" width="86" height="27" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0me3crz_di" bpmnElement="Task_0qg5gn6">
+ <dc:Bounds x="1220" y="80" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bmtfxq_di" bpmnElement="SequenceFlow_0bmtfxq">
+ <di:waypoint x="1320" y="120" />
+ <di:waypoint x="1432" y="120" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_14svlaf_di" bpmnElement="Task_0qvxmnh">
+ <dc:Bounds x="900" y="310" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0arvpzv_di" bpmnElement="SequenceFlow_0arvpzv">
+ <di:waypoint x="1000" y="350" />
+ <di:waypoint x="1060" y="350" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0q6s59r_di" bpmnElement="Task_0b5j6rg">
+ <dc:Bounds x="1060" y="310" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="SubProcess_04znyto_di" bpmnElement="SubProcess_0p6namq" isExpanded="true">
+ <dc:Bounds x="480" y="650" width="730" height="210" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1qti4dg_di" bpmnElement="StartEvent_1843894">
+ <dc:Bounds x="520" y="742" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1u5ko4h_di" bpmnElement="SequenceFlow_1u5ko4h">
+ <di:waypoint x="556" y="760" />
+ <di:waypoint x="610" y="760" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0xdbw5d_di" bpmnElement="Task_1spbb2x">
+ <dc:Bounds x="610" y="720" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_05yfw7t_di" bpmnElement="SequenceFlow_05yfw7t">
+ <di:waypoint x="710" y="760" />
+ <di:waypoint x="770" y="760" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0hmczex_di" bpmnElement="Task_0yqtfvh">
+ <dc:Bounds x="770" y="720" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0c0btia_di" bpmnElement="SequenceFlow_0c0btia">
+ <di:waypoint x="870" y="760" />
+ <di:waypoint x="930" y="760" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ServiceTask_0ra7dbt_di" bpmnElement="Task_1s3l3fc">
+ <dc:Bounds x="930" y="720" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1fsful5_di" bpmnElement="EndEvent_1fsful5">
+ <dc:Bounds x="1092" y="742" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1w55zo7_di" bpmnElement="SequenceFlow_1w55zo7">
+ <di:waypoint x="1030" y="760" />
+ <di:waypoint x="1092" y="760" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1tcgzv0_di" bpmnElement="SequenceFlow_1tcgzv0">
+ <di:waypoint x="188" y="350" />
+ <di:waypoint x="235" y="350" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_0dwywjh_di" bpmnElement="SubProcess_1l7gd5k" isExpanded="true">
+ <dc:Bounds x="660" y="950" width="350" height="200" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_18u3hph_di" bpmnElement="StartEvent_0zc2hnn">
+ <dc:Bounds x="700" y="1032" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0mifi3x_di" bpmnElement="SequenceFlow_0mifi3x">
+ <di:waypoint x="736" y="1050" />
+ <di:waypoint x="790" y="1050" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_052gdjz_di" bpmnElement="EndEvent_052gdjz">
+ <dc:Bounds x="952" y="1032" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_073yxs4_di" bpmnElement="SequenceFlow_073yxs4">
+ <di:waypoint x="890" y="1050" />
+ <di:waypoint x="952" y="1050" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0lzly9f_di" bpmnElement="Task_01va9ms">
+ <dc:Bounds x="790" y="1010" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1lyw619_di" bpmnElement="ExclusiveGateway_1lyw619" isMarkerVisible="true">
+ <dc:Bounds x="785" y="325" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="786.5" y="384.5" width="47" height="27" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0s7s7zk_di" bpmnElement="SequenceFlow_0s7s7zk">
+ <di:waypoint x="835" y="350" />
+ <di:waypoint x="900" y="350" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_00g94pg_di" bpmnElement="SequenceFlow_00g94pg">
+ <di:waypoint x="1160" y="350" />
+ <di:waypoint x="1250" y="350" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0bqfbxf_di" bpmnElement="SequenceFlow_0bqfbxf">
+ <di:waypoint x="810" y="325" />
+ <di:waypoint x="810" y="250" />
+ <di:waypoint x="900" y="250" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="846" y="232" width="17" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_16tdrty_di" bpmnElement="ExclusiveGateway_16tdrty" isMarkerVisible="true">
+ <dc:Bounds x="235" y="325" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="226" y="295" width="77" height="27" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0jrbkau_di" bpmnElement="SequenceFlow_0jrbkau">
+ <di:waypoint x="285" y="350" />
+ <di:waypoint x="330" y="350" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_16ewagx_di" bpmnElement="SequenceFlow_16ewagx">
+ <di:waypoint x="260" y="375" />
+ <di:waypoint x="260" y="500" />
+ <di:waypoint x="1300" y="500" />
+ <di:waypoint x="1300" y="390" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="774" y="482" width="13" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_0icj4go_di" bpmnElement="ExclusiveGateway_0icj4go" isMarkerVisible="true">
+ <dc:Bounds x="1085" y="95" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1069" y="50" width="82" height="40" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1j0e2po_di" bpmnElement="SequenceFlow_1j0e2po">
+ <di:waypoint x="1010" y="120" />
+ <di:waypoint x="1085" y="120" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_12xn3kz_di" bpmnElement="SequenceFlow_12xn3kz">
+ <di:waypoint x="1135" y="120" />
+ <di:waypoint x="1220" y="120" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xipbpr_di" bpmnElement="SequenceFlow_0xipbpr">
+ <di:waypoint x="1110" y="145" />
+ <di:waypoint x="1110" y="190" />
+ <di:waypoint x="810" y="190" />
+ <di:waypoint x="810" y="325" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="946" y="172" width="13" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1knnc2k_di" bpmnElement="Task_1ff6flk">
+ <dc:Bounds x="630" y="310" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1r84j75_di" bpmnElement="Task_1ovewjr">
+ <dc:Bounds x="900" y="210" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1amyd7h_di" bpmnElement="SequenceFlow_1amyd7h">
+ <di:waypoint x="1000" y="250" />
+ <di:waypoint x="1300" y="250" />
+ <di:waypoint x="1300" y="310" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1sah9so_di" bpmnElement="SequenceFlow_1sah9so">
+ <di:waypoint x="730" y="350" />
+ <di:waypoint x="785" y="350" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ssiyug_di" bpmnElement="SequenceFlow_1ssiyug">
+ <di:waypoint x="430" y="350" />
+ <di:waypoint x="480" y="350" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0thr8dc_di" bpmnElement="SequenceFlow_0thr8dc">
+ <di:waypoint x="580" y="350" />
+ <di:waypoint x="630" y="350" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0r8ad9j_di" bpmnElement="Task_0y1n9ls">
+ <dc:Bounds x="480" y="310" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSliceService.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSliceService.bpmn
new file mode 100644
index 0000000000..6d9df5240d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSliceService.bpmn
@@ -0,0 +1,332 @@
+<?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: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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_0prw6yo" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.4.1">
+ <bpmn:process id="DeleteSliceService" name="DeleteSliceService" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1" name="start">
+ <bpmn:outgoing>SequenceFlow_1ti9sxe</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0xmiev9" sourceRef="Task_1f3k0gq" targetRef="Task_0gsr9fu" />
+ <bpmn:sequenceFlow id="SequenceFlow_1ti9sxe" sourceRef="StartEvent_1" targetRef="Task_1f3k0gq" />
+ <bpmn:scriptTask id="Task_1f3k0gq" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1ti9sxe</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0xmiev9</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dss= new DeleteSliceService()
+dss.preProcessRequest(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:serviceTask id="Task_0gsr9fu" name="Init Service Operation Status">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${dbAdapterEndpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="payload">${updateOperationStatus}</camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="NSMF_dbResponseCode">${statusCode}</camunda:outputParameter>
+ <camunda:outputParameter name="NSMF_dbResponse">${response}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0xmiev9</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0uehx9h</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0uehx9h" sourceRef="Task_0gsr9fu" targetRef="Task_0walqr6" />
+ <bpmn:scriptTask id="Task_0walqr6" name="Send Async Ack Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0uehx9h</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_16lh6o6</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dss= new DeleteSliceService()
+dss.sendAsyncResponse(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_16lh6o6" sourceRef="Task_0walqr6" targetRef="Task_04n2tl9" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1mcgr3m" name="success?">
+ <bpmn:incoming>SequenceFlow_0nl4kfh</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0wel7ie</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0eqx2y2</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:sequenceFlow id="SequenceFlow_0nl4kfh" sourceRef="Task_04n2tl9" targetRef="ExclusiveGateway_1mcgr3m" />
+ <bpmn:sequenceFlow id="SequenceFlow_0wel7ie" name="yes" sourceRef="ExclusiveGateway_1mcgr3m" targetRef="Task_01siwzc">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{execution.getVariable("WorkflowException") == null}</bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_0eqx2y2" name="no" sourceRef="ExclusiveGateway_1mcgr3m" targetRef="EndEvent_02ix4tc" />
+ <bpmn:endEvent id="EndEvent_02ix4tc">
+ <bpmn:incoming>SequenceFlow_0eqx2y2</bpmn:incoming>
+ <bpmn:errorEventDefinition errorRef="Error_1jz8wj7" />
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_18oizb2" sourceRef="Task_0k1pi3g" targetRef="Task_1vklzip" />
+ <bpmn:scriptTask id="Task_0k1pi3g" name="Delete slice service From AAI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0wel7ie</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_18oizb2</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dss= new DeleteSliceService()
+dss.deleteSliceServiceInstance(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:serviceTask id="Task_1vklzip" name="Update Service Operation Status to Success">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${dbAdapterEndpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ <camunda:entry key="Authorization">${UrnPropertiesReader.getVariable("mso.adapters.requestDb.auth", execution)}</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="payload">${updateOperationStatus}</camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="CVFMI_dbResponseCode">${statusCode}</camunda:outputParameter>
+ <camunda:outputParameter name="CVFMI_dbResponse">${response}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_18oizb2</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1oxmm7d</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:endEvent id="EndEvent_0tyqdpw" name="End">
+ <bpmn:incoming>SequenceFlow_1oxmm7d</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1oxmm7d" sourceRef="Task_1vklzip" targetRef="EndEvent_0tyqdpw" />
+ <bpmn:callActivity id="Task_04n2tl9" name="Do Delete SliceServiceV1" calledElement="DoDeleteSliceServiceV1">
+ <bpmn:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
+ <camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="operationId" target="operationId" />
+ <camunda:in source="operationType" target="operationType" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_16lh6o6</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0nl4kfh</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:scriptTask id="Task_01siwzc" name="Delete Service Profile From AAI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0wel7ie</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_142j1q2</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dss= new DeleteSliceService()
+dss.delServiceProfileFromAAI(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_142j1q2" sourceRef="Task_01siwzc" targetRef="Task_0k1pi3g" />
+ <bpmn:subProcess id="SubProcess_07kf25g" name="Java Exception Handling Sub Process" triggeredByEvent="true">
+ <bpmn:startEvent id="StartEvent_1qskwib">
+ <bpmn:outgoing>SequenceFlow_0x8msq9</bpmn:outgoing>
+ <bpmn:errorEventDefinition id="ErrorEventDefinition_1mmlos4" />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_086jahv">
+ <bpmn:incoming>SequenceFlow_10lwgo7</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0x8msq9" sourceRef="StartEvent_1qskwib" targetRef="ScriptTask_19sjlk2" />
+ <bpmn:scriptTask id="ScriptTask_19sjlk2" name="Send Error Response" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0x8msq9</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ihiv5k</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dss = new DeleteCustomE2EServiceInstance()
+dss.sendSyncError(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_1ihiv5k" sourceRef="ScriptTask_19sjlk2" targetRef="Task_1fxg7am" />
+ <bpmn:sequenceFlow id="SequenceFlow_0zvzs12" sourceRef="Task_1fxg7am" targetRef="ServiceTask_17jq3cx" />
+ <bpmn:scriptTask id="Task_1fxg7am" name="Termination Service Operation Status" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1ihiv5k</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0zvzs12</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dss = new DeleteSliceService()
+dss.prepareEndOperationStatus(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:serviceTask id="ServiceTask_17jq3cx" name="Update Service Operation Status To Terminate">
+ <bpmn:extensionElements>
+ <camunda:connector>
+ <camunda:inputOutput>
+ <camunda:inputParameter name="url">${CVFMI_dbAdapterEndpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="headers">
+ <camunda:map>
+ <camunda:entry key="content-type">application/soap+xml</camunda:entry>
+ <camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
+ </camunda:map>
+ </camunda:inputParameter>
+ <camunda:inputParameter name="payload">${CVFMI_updateServiceOperStatusRequest}</camunda:inputParameter>
+ <camunda:inputParameter name="method">POST</camunda:inputParameter>
+ <camunda:outputParameter name="CVFMI_dbResponseCode">${statusCode}</camunda:outputParameter>
+ <camunda:outputParameter name="CVFMI_dbResponse">${response}</camunda:outputParameter>
+ </camunda:inputOutput>
+ <camunda:connectorId>http-connector</camunda:connectorId>
+ </camunda:connector>
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0zvzs12</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_10lwgo7</bpmn:outgoing>
+ </bpmn:serviceTask>
+ <bpmn:sequenceFlow id="SequenceFlow_10lwgo7" sourceRef="ServiceTask_17jq3cx" targetRef="EndEvent_086jahv" />
+ </bpmn:subProcess>
+ <bpmn:subProcess id="SubProcess_0so7l00" name="Sub-process for UnexpectedErrors" triggeredByEvent="true">
+ <bpmn:startEvent id="StartEvent_1jknl5k">
+ <bpmn:outgoing>SequenceFlow_0rasmiu</bpmn:outgoing>
+ <bpmn:errorEventDefinition />
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0rasmiu" sourceRef="StartEvent_1jknl5k" targetRef="Task_0c422xd" />
+ <bpmn:endEvent id="EndEvent_1vr9nc9">
+ <bpmn:incoming>SequenceFlow_1jipldf</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1jipldf" sourceRef="Task_0c422xd" targetRef="EndEvent_1vr9nc9" />
+ <bpmn:scriptTask id="Task_0c422xd" name="Handle Unexpected Error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0rasmiu</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1jipldf</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil ex = new ExceptionUtil()
+ex.processJavaException(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ </bpmn:subProcess>
+ </bpmn:process>
+ <bpmn:error id="Error_1jz8wj7" name="MSO Workflow Exception" errorCode="MSOWorkflowException" />
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DeleteSliceService">
+ <bpmndi:BPMNEdge id="SequenceFlow_1ti9sxe_di" bpmnElement="SequenceFlow_1ti9sxe">
+ <di:waypoint x="188" y="117" />
+ <di:waypoint x="290" y="117" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0xmiev9_di" bpmnElement="SequenceFlow_0xmiev9">
+ <di:waypoint x="390" y="117" />
+ <di:waypoint x="480" y="117" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="152" y="99" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="159" y="142" width="23" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0aqhg4z_di" bpmnElement="Task_1f3k0gq">
+ <dc:Bounds x="290" y="77" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_1n9ja9t_di" bpmnElement="Task_0gsr9fu">
+ <dc:Bounds x="480" y="77" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0uehx9h_di" bpmnElement="SequenceFlow_0uehx9h">
+ <di:waypoint x="580" y="117" />
+ <di:waypoint x="660" y="117" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_13qpvgg_di" bpmnElement="Task_0walqr6">
+ <dc:Bounds x="660" y="77" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_16lh6o6_di" bpmnElement="SequenceFlow_16lh6o6">
+ <di:waypoint x="760" y="117" />
+ <di:waypoint x="840" y="117" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1mcgr3m_di" bpmnElement="ExclusiveGateway_1mcgr3m" isMarkerVisible="true">
+ <dc:Bounds x="1025" y="92" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1026" y="73" width="47" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0nl4kfh_di" bpmnElement="SequenceFlow_0nl4kfh">
+ <di:waypoint x="940" y="117" />
+ <di:waypoint x="1025" y="117" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0wel7ie_di" bpmnElement="SequenceFlow_0wel7ie">
+ <di:waypoint x="1075" y="117" />
+ <di:waypoint x="1164" y="117" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1100" y="98" width="17" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0eqx2y2_di" bpmnElement="SequenceFlow_0eqx2y2">
+ <di:waypoint x="1050" y="142" />
+ <di:waypoint x="1050" y="202" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1059" y="169" width="13" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_169jlln_di" bpmnElement="EndEvent_02ix4tc">
+ <dc:Bounds x="1032" y="202" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_18oizb2_di" bpmnElement="SequenceFlow_18oizb2">
+ <di:waypoint x="1440" y="117" />
+ <di:waypoint x="1530" y="117" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_10g3cz7_di" bpmnElement="Task_0k1pi3g">
+ <dc:Bounds x="1340" y="77" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_0pct2ne_di" bpmnElement="Task_1vklzip">
+ <dc:Bounds x="1530" y="77" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0tyqdpw_di" bpmnElement="EndEvent_0tyqdpw">
+ <dc:Bounds x="1562" y="202" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1570" y="245" width="20" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1oxmm7d_di" bpmnElement="SequenceFlow_1oxmm7d">
+ <di:waypoint x="1580" y="157" />
+ <di:waypoint x="1580" y="202" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_1igxzig_di" bpmnElement="Task_04n2tl9">
+ <dc:Bounds x="840" y="77" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0qqsp7x_di" bpmnElement="Task_01siwzc">
+ <dc:Bounds x="1164" y="77" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_142j1q2_di" bpmnElement="SequenceFlow_142j1q2">
+ <di:waypoint x="1264" y="117" />
+ <di:waypoint x="1340" y="117" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_07kf25g_di" bpmnElement="SubProcess_07kf25g" isExpanded="true">
+ <dc:Bounds x="340" y="430" width="637" height="162" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_1qskwib_di" bpmnElement="StartEvent_1qskwib">
+ <dc:Bounds x="377" y="497" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_086jahv_di" bpmnElement="EndEvent_086jahv">
+ <dc:Bounds x="902" y="497" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0x8msq9_di" bpmnElement="SequenceFlow_0x8msq9">
+ <di:waypoint x="413" y="515" />
+ <di:waypoint x="456" y="515" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_19sjlk2_di" bpmnElement="ScriptTask_19sjlk2">
+ <dc:Bounds x="456" y="475" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ihiv5k_di" bpmnElement="SequenceFlow_1ihiv5k">
+ <di:waypoint x="556" y="515" />
+ <di:waypoint x="615" y="515" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0zvzs12_di" bpmnElement="SequenceFlow_0zvzs12">
+ <di:waypoint x="715" y="515" />
+ <di:waypoint x="765" y="515" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0bjcnd3_di" bpmnElement="Task_1fxg7am">
+ <dc:Bounds x="615" y="475" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ServiceTask_17jq3cx_di" bpmnElement="ServiceTask_17jq3cx">
+ <dc:Bounds x="765" y="475" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_10lwgo7_di" bpmnElement="SequenceFlow_10lwgo7">
+ <di:waypoint x="865" y="515" />
+ <di:waypoint x="902" y="515" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_1dd77tu_di" bpmnElement="SubProcess_0so7l00" isExpanded="true">
+ <dc:Bounds x="470" y="650" width="350" height="200" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_14mwxm0_di" bpmnElement="StartEvent_1jknl5k">
+ <dc:Bounds x="510" y="732" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0rasmiu_di" bpmnElement="SequenceFlow_0rasmiu">
+ <di:waypoint x="546" y="750" />
+ <di:waypoint x="600" y="750" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="EndEvent_1vr9nc9_di" bpmnElement="EndEvent_1vr9nc9">
+ <dc:Bounds x="762" y="732" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1jipldf_di" bpmnElement="SequenceFlow_1jipldf">
+ <di:waypoint x="700" y="750" />
+ <di:waypoint x="762" y="750" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0vb5d51_di" bpmnElement="Task_0c422xd">
+ <dc:Bounds x="600" y="710" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateCommunicationService.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateCommunicationService.bpmn
new file mode 100644
index 0000000000..1f0e10b1c1
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateCommunicationService.bpmn
@@ -0,0 +1,115 @@
+<?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:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_152rp63" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.4.1">
+ <bpmn:process id="DoCreateCommunicationService" name="DoCreateCommunicationService" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1" name="start">
+ <bpmn:outgoing>SequenceFlow_0r43nhn</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0r43nhn" sourceRef="StartEvent_1" targetRef="Task_1n00ul2" />
+ <bpmn:scriptTask id="Task_1n00ul2" name="Pre Process Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0r43nhn</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1ojuala</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def csi= new DoCreateCommunicationService()
+csi.preProcessRequest(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="Task_13cimkc" name="Create Communication Service Profile" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0mxvw9q</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_15e8qrt</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def csi= new DoCreateCommunicationService()
+csi.createCommunicationServiceProfile(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="Task_02h3nyo" name="Create Communication Service" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1ojuala</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0mxvw9q</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def csi= new DoCreateCommunicationService()
+csi.createCommunicationService(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:endEvent id="EndEvent_0tx74b8" name="end">
+ <bpmn:incoming>SequenceFlow_15e8qrt</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0mxvw9q" sourceRef="Task_02h3nyo" targetRef="Task_13cimkc" />
+ <bpmn:sequenceFlow id="SequenceFlow_15e8qrt" sourceRef="Task_13cimkc" targetRef="EndEvent_0tx74b8" />
+ <bpmn:sequenceFlow id="SequenceFlow_1ojuala" sourceRef="Task_1n00ul2" targetRef="Task_02h3nyo" />
+ <bpmn:subProcess id="SubProcess_0hvqoiu" name="Java Exception Handling Sub Process" triggeredByEvent="true">
+ <bpmn:startEvent id="StartEvent_06faevu">
+ <bpmn:outgoing>SequenceFlow_1jckdn4</bpmn:outgoing>
+ <bpmn:errorEventDefinition id="ErrorEventDefinition_1idslt4" />
+ </bpmn:startEvent>
+ <bpmn:endEvent id="EndEvent_1xkvl7n">
+ <bpmn:incoming>SequenceFlow_0ixyf17</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:scriptTask id="ScriptTask_15u2oe2" name="Process Error" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1jckdn4</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0ixyf17</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.common.scripts.*
+ExceptionUtil exceptionUtil = new ExceptionUtil()
+exceptionUtil.processJavaException(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0ixyf17" sourceRef="ScriptTask_15u2oe2" targetRef="EndEvent_1xkvl7n" />
+ <bpmn:sequenceFlow id="SequenceFlow_1jckdn4" sourceRef="StartEvent_06faevu" targetRef="ScriptTask_15u2oe2" />
+ </bpmn:subProcess>
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateCommunicationService">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="179" y="99" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="186" y="142" width="23" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0r43nhn_di" bpmnElement="SequenceFlow_0r43nhn">
+ <di:waypoint x="215" y="117" />
+ <di:waypoint x="290" y="117" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1ilqwj5_di" bpmnElement="Task_1n00ul2">
+ <dc:Bounds x="290" y="77" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0vpnfpe_di" bpmnElement="Task_13cimkc">
+ <dc:Bounds x="660" y="77" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_03bitgg_di" bpmnElement="Task_02h3nyo">
+ <dc:Bounds x="480" y="77" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0tx74b8_di" bpmnElement="EndEvent_0tx74b8">
+ <dc:Bounds x="912" y="99" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="921" y="142" width="19" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0mxvw9q_di" bpmnElement="SequenceFlow_0mxvw9q">
+ <di:waypoint x="580" y="117" />
+ <di:waypoint x="660" y="117" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_15e8qrt_di" bpmnElement="SequenceFlow_15e8qrt">
+ <di:waypoint x="760" y="117" />
+ <di:waypoint x="912" y="117" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ojuala_di" bpmnElement="SequenceFlow_1ojuala">
+ <di:waypoint x="390" y="117" />
+ <di:waypoint x="480" y="117" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="SubProcess_0hvqoiu_di" bpmnElement="SubProcess_0hvqoiu" isExpanded="true">
+ <dc:Bounds x="290" y="250" width="417" height="161" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="StartEvent_06faevu_di" bpmnElement="StartEvent_06faevu">
+ <dc:Bounds x="327" y="317" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_1xkvl7n_di" bpmnElement="EndEvent_1xkvl7n">
+ <dc:Bounds x="613" y="317" width="36" height="36" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_15u2oe2_di" bpmnElement="ScriptTask_15u2oe2">
+ <dc:Bounds x="438" y="295" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ixyf17_di" bpmnElement="SequenceFlow_0ixyf17">
+ <di:waypoint x="538" y="335" />
+ <di:waypoint x="613" y="335" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1jckdn4_di" bpmnElement="SequenceFlow_1jckdn4">
+ <di:waypoint x="363" y="335" />
+ <di:waypoint x="438" y="335" />
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteSliceService.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteSliceService.bpmn
new file mode 100644
index 0000000000..5f4816e78f
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteSliceService.bpmn
@@ -0,0 +1,205 @@
+<?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:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1p1suc9" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.4.1">
+ <bpmn:process id="DoDeleteSliceServiceV1" name="DoDeleteSliceServiceV1" isExecutable="true">
+ <bpmn:startEvent id="StartEvent_1" name="start">
+ <bpmn:outgoing>SequenceFlow_0ep5het</bpmn:outgoing>
+ </bpmn:startEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_0ep5het" sourceRef="StartEvent_1" targetRef="Task_0etki1p" />
+ <bpmn:sequenceFlow id="SequenceFlow_1qkgvvu" sourceRef="Task_1ujnqtj" targetRef="Task_1fqiyb4" />
+ <bpmn:sequenceFlow id="SequenceFlow_1rgfzzy" sourceRef="Task_1fqiyb4" targetRef="Task_1u755sr" />
+ <bpmn:scriptTask id="Task_1ujnqtj" name="Query Allotted Resource From AAI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_029u1wr</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1qkgvvu</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def ddss= new DoDeleteSliceService()
+ddss.getAllottedResFromAAI(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="Task_1fqiyb4" name="Query NSI From AAI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1qkgvvu</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1rgfzzy</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def ddss= new DoDeleteSliceService()
+ddss.getNSIFromAAI(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="Task_1u755sr" name="Query NSSI List From AAI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1rgfzzy</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_05si1me</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def ddss= new DoDeleteSliceService()
+ddss.getNSSIListFromAAI(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_05si1me" sourceRef="Task_1u755sr" targetRef="Task_1iomfas" />
+ <bpmn:exclusiveGateway id="ExclusiveGateway_1ogbunu" name="Is all NSSI finished?">
+ <bpmn:incoming>SequenceFlow_15z9iio</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1c4fjbv</bpmn:outgoing>
+ <bpmn:outgoing>SequenceFlow_0926ghe</bpmn:outgoing>
+ </bpmn:exclusiveGateway>
+ <bpmn:endEvent id="EndEvent_0jaitqv" name="End">
+ <bpmn:incoming>SequenceFlow_1c4fjbv</bpmn:incoming>
+ </bpmn:endEvent>
+ <bpmn:sequenceFlow id="SequenceFlow_1c4fjbv" name="yes" sourceRef="ExclusiveGateway_1ogbunu" targetRef="EndEvent_0jaitqv">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isAllNSSIFinished" ) == true)}</bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_01o2qpv" sourceRef="Task_1iomfas" targetRef="Task_1qqljvu" />
+ <bpmn:sequenceFlow id="SequenceFlow_0c58sw3" sourceRef="Task_1rc7mcw" targetRef="ScriptTask_159855t" />
+ <bpmn:sequenceFlow id="SequenceFlow_0926ghe" name="no" sourceRef="ExclusiveGateway_1ogbunu" targetRef="Task_1iomfas">
+ <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isAllNSSIFinished" ) == false)}</bpmn:conditionExpression>
+ </bpmn:sequenceFlow>
+ <bpmn:scriptTask id="Task_0etki1p" name="PreProcess Incoming Request" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0ep5het</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0npmman</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def ddss= new DoDeleteSliceService()
+ddss.preProcessRequest(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0npmman" sourceRef="Task_0etki1p" targetRef="Task_13k9usx" />
+ <bpmn:scriptTask id="Task_1iomfas" name="Get Current NSSI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0926ghe</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_05si1me</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_01o2qpv</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def ddss= new DoDeleteSliceService()
+ddss.getCurrentNSSI(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:scriptTask id="ScriptTask_159855t" name="Parse Next NSSI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0c58sw3</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_15z9iio</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def ddss= new DoDeleteSliceService()
+ddss.parseNextNSSI(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_15z9iio" sourceRef="ScriptTask_159855t" targetRef="ExclusiveGateway_1ogbunu" />
+ <bpmn:sequenceFlow id="SequenceFlow_0q83qg3" sourceRef="Task_1qqljvu" targetRef="Task_1rc7mcw" />
+ <bpmn:scriptTask id="Task_1qqljvu" name="Query Slice Profile From AAI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_01o2qpv</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0q83qg3</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def ddss= new DoDeleteSliceService()
+ddss.querySliceProfileFromAAI(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_029u1wr" sourceRef="Task_13k9usx" targetRef="Task_1ujnqtj" />
+ <bpmn:scriptTask id="Task_13k9usx" name="Query E2ESlice Serive From AAI" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_0npmman</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_029u1wr</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def ddss= new DoDeleteSliceService()
+ddss.queryE2ESliceSeriveFromAAI(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:callActivity id="Task_1rc7mcw" name="Do Deallocate NSSI " calledElement="DoDeallocateNSSIV1">
+ <bpmn:extensionElements>
+ <camunda:in source="currentNSSI" target="currentNSSI" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0q83qg3</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0c58sw3</bpmn:outgoing>
+ </bpmn:callActivity>
+ </bpmn:process>
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteSliceServiceV1">
+ <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
+ <dc:Bounds x="152" y="122" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="159" y="165" width="22" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0ep5het_di" bpmnElement="SequenceFlow_0ep5het">
+ <di:waypoint x="188" y="140" />
+ <di:waypoint x="270" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qkgvvu_di" bpmnElement="SequenceFlow_1qkgvvu">
+ <di:waypoint x="700" y="140" />
+ <di:waypoint x="750" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1rgfzzy_di" bpmnElement="SequenceFlow_1rgfzzy">
+ <di:waypoint x="850" y="140" />
+ <di:waypoint x="900" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1bj6tw4_di" bpmnElement="Task_1ujnqtj">
+ <dc:Bounds x="600" y="100" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_0xgmbqj_di" bpmnElement="Task_1fqiyb4">
+ <dc:Bounds x="750" y="100" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_01fp1vt_di" bpmnElement="Task_1u755sr">
+ <dc:Bounds x="900" y="100" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_05si1me_di" bpmnElement="SequenceFlow_05si1me">
+ <di:waypoint x="1000" y="140" />
+ <di:waypoint x="1040" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ExclusiveGateway_1ogbunu_di" bpmnElement="ExclusiveGateway_1ogbunu" isMarkerVisible="true">
+ <dc:Bounds x="1555" y="115" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1560" y="85" width="52" height="27" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="EndEvent_0jaitqv_di" bpmnElement="EndEvent_0jaitqv">
+ <dc:Bounds x="1692" y="122" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1700" y="168" width="20" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1c4fjbv_di" bpmnElement="SequenceFlow_1c4fjbv">
+ <di:waypoint x="1605" y="140" />
+ <di:waypoint x="1692" y="140" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1630" y="118" width="17" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_01o2qpv_di" bpmnElement="SequenceFlow_01o2qpv">
+ <di:waypoint x="1140" y="140" />
+ <di:waypoint x="1170" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0c58sw3_di" bpmnElement="SequenceFlow_0c58sw3">
+ <di:waypoint x="1400" y="140" />
+ <di:waypoint x="1420" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0926ghe_di" bpmnElement="SequenceFlow_0926ghe">
+ <di:waypoint x="1580" y="165" />
+ <di:waypoint x="1580" y="260" />
+ <di:waypoint x="1090" y="260" />
+ <di:waypoint x="1090" y="180" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1329" y="242" width="13" height="14" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0icszw6_di" bpmnElement="Task_0etki1p">
+ <dc:Bounds x="270" y="100" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0npmman_di" bpmnElement="SequenceFlow_0npmman">
+ <di:waypoint x="370" y="140" />
+ <di:waypoint x="430" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1obnwrr_di" bpmnElement="Task_1iomfas">
+ <dc:Bounds x="1040" y="100" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_159855t_di" bpmnElement="ScriptTask_159855t">
+ <dc:Bounds x="1420" y="100" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_15z9iio_di" bpmnElement="SequenceFlow_15z9iio">
+ <di:waypoint x="1520" y="140" />
+ <di:waypoint x="1555" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0q83qg3_di" bpmnElement="SequenceFlow_0q83qg3">
+ <di:waypoint x="1270" y="140" />
+ <di:waypoint x="1300" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0y9ppnc_di" bpmnElement="Task_1qqljvu">
+ <dc:Bounds x="1170" y="100" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_029u1wr_di" bpmnElement="SequenceFlow_029u1wr">
+ <di:waypoint x="530" y="140" />
+ <di:waypoint x="600" y="140" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0f9rjq4_di" bpmnElement="Task_13k9usx">
+ <dc:Bounds x="430" y="100" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_18qkiat_di" bpmnElement="Task_1rc7mcw">
+ <dc:Bounds x="1300" y="100" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+</bpmn:definitions>
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/ServiceProfile.java b/common/src/main/java/org/onap/so/beans/nsmf/ServiceProfile.java
new file mode 100644
index 0000000000..cc6c9bbb82
--- /dev/null
+++ b/common/src/main/java/org/onap/so/beans/nsmf/ServiceProfile.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.beans.nsmf;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({"service-profile"})
+public class ServiceProfile implements Serializable {
+
+ @JsonProperty("service-profile")
+ private Map<String, Object> serviceProfile;
+
+ @JsonProperty("service-profile")
+ public Map<String, Object> getServiceProfile() {
+ return serviceProfile;
+ }
+
+ @JsonProperty("service-profile")
+ public void setServiceProfile(Map<String, Object> serviceProfile) {
+ this.serviceProfile = serviceProfile;
+ }
+}
+
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParams.java b/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParams.java
new file mode 100644
index 0000000000..bf881c0f19
--- /dev/null
+++ b/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParams.java
@@ -0,0 +1,413 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2019 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License")
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.beans.nsmf;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.gson.JsonObject;
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+public class SliceTaskParams implements Serializable {
+
+ private static final long serialVersionUID = -4389946152970978423L;
+
+ private String serviceId;
+
+ private String serviceName;
+
+ private String nstId;
+
+ private String nstName;
+
+ private String tnScriptName;
+
+ private String anScriptName;
+
+ private String cnScriptName;
+
+ private Map<String, Object> serviceProfile;
+
+ private String suggestNsiId;
+
+ private String suggestNsiName;
+
+ private Map<String, Object> sliceProfileTn;
+
+ private Map<String, Object> sliceProfileCn;
+
+ private Map<String, Object> sliceProfileAn;
+
+ private String tnSuggestNssiId;
+
+ private String tnSuggestNssiName;
+
+ private String tnProgress;
+
+ private String tnStatus;
+
+ private String tnStatusDescription;
+
+ private String cnSuggestNssiId;
+
+ private String cnSuggestNssiName;
+
+ private String cnProgress;
+
+ private String cnStatus;
+
+ private String cnStatusDescription;
+
+ private String anSuggestNssiId;
+
+ private String anSuggestNssiName;
+
+ private String anProgress;
+
+ private String anStatus;
+
+ private String anStatusDescription;
+
+ public String getNstId() {
+ return nstId;
+ }
+
+ public void setNstId(String nstId) {
+ this.nstId = nstId;
+ }
+
+ public String getNstName() {
+ return nstName;
+ }
+
+ public void setNstName(String nstName) {
+ this.nstName = nstName;
+ }
+
+ public String getTnScriptName() {
+ return tnScriptName;
+ }
+
+ public void setTnScriptName(String tnScriptName) {
+ this.tnScriptName = tnScriptName;
+ }
+
+ public String getAnScriptName() {
+ return anScriptName;
+ }
+
+ public void setAnScriptName(String anScriptName) {
+ this.anScriptName = anScriptName;
+ }
+
+ public String getCnScriptName() {
+ return cnScriptName;
+ }
+
+ public void setCnScriptName(String cnScriptName) {
+ this.cnScriptName = cnScriptName;
+ }
+
+ public String getServiceId() {
+ return serviceId;
+ }
+
+ public void setServiceId(String serviceId) {
+ this.serviceId = serviceId;
+ }
+
+ public String getServiceName() {
+ return serviceName;
+ }
+
+ public void setServiceName(String serviceName) {
+ this.serviceName = serviceName;
+ }
+
+ public Map<String, Object> getServiceProfile() {
+ return serviceProfile;
+ }
+
+ public void setServiceProfile(Map<String, Object> serviceProfile) {
+ this.serviceProfile = serviceProfile;
+ }
+
+ public String getSuggestNsiId() {
+ return suggestNsiId;
+ }
+
+ public void setSuggestNsiId(String suggestNsiId) {
+ this.suggestNsiId = suggestNsiId;
+ }
+
+ public String getSuggestNsiName() {
+ return suggestNsiName;
+ }
+
+ public void setSuggestNsiName(String suggestNsiName) {
+ this.suggestNsiName = suggestNsiName;
+ }
+
+ public Map<String, Object> getSliceProfileTn() {
+ return sliceProfileTn;
+ }
+
+ public void setSliceProfileTn(Map<String, Object> sliceProfileTn) {
+ this.sliceProfileTn = sliceProfileTn;
+ }
+
+ public Map<String, Object> getSliceProfileCn() {
+ return sliceProfileCn;
+ }
+
+ public void setSliceProfileCn(Map<String, Object> sliceProfileCn) {
+ this.sliceProfileCn = sliceProfileCn;
+ }
+
+ public Map<String, Object> getSliceProfileAn() {
+ return sliceProfileAn;
+ }
+
+ public void setSliceProfileAn(Map<String, Object> sliceProfileAn) {
+ this.sliceProfileAn = sliceProfileAn;
+ }
+
+ public String getTnSuggestNssiId() {
+ return tnSuggestNssiId;
+ }
+
+ public void setTnSuggestNssiId(String tnSuggestNssiId) {
+ this.tnSuggestNssiId = tnSuggestNssiId;
+ }
+
+ public String getTnSuggestNssiName() {
+ return tnSuggestNssiName;
+ }
+
+ public void setTnSuggestNssiName(String tnSuggestNssiName) {
+ this.tnSuggestNssiName = tnSuggestNssiName;
+ }
+
+ public String getTnProgress() {
+ return tnProgress;
+ }
+
+ public void setTnProgress(String tnProgress) {
+ this.tnProgress = tnProgress;
+ }
+
+ public String getTnStatus() {
+ return tnStatus;
+ }
+
+ public void setTnStatus(String tnStatus) {
+ this.tnStatus = tnStatus;
+ }
+
+ public String getTnStatusDescription() {
+ return tnStatusDescription;
+ }
+
+ public void setTnStatusDescription(String tnStatusDescription) {
+ this.tnStatusDescription = tnStatusDescription;
+ }
+
+ public String getCnSuggestNssiId() {
+ return cnSuggestNssiId;
+ }
+
+ public void setCnSuggestNssiId(String cnSuggestNssiId) {
+ this.cnSuggestNssiId = cnSuggestNssiId;
+ }
+
+ public String getCnSuggestNssiName() {
+ return cnSuggestNssiName;
+ }
+
+ public void setCnSuggestNssiName(String cnSuggestNssiName) {
+ this.cnSuggestNssiName = cnSuggestNssiName;
+ }
+
+ public String getCnProgress() {
+ return cnProgress;
+ }
+
+ public void setCnProgress(String cnProgress) {
+ this.cnProgress = cnProgress;
+ }
+
+ public String getCnStatus() {
+ return cnStatus;
+ }
+
+ public void setCnStatus(String cnStatus) {
+ this.cnStatus = cnStatus;
+ }
+
+ public String getCnStatusDescription() {
+ return cnStatusDescription;
+ }
+
+ public void setCnStatusDescription(String cnStatusDescription) {
+ this.cnStatusDescription = cnStatusDescription;
+ }
+
+ public String getAnSuggestNssiId() {
+ return anSuggestNssiId;
+ }
+
+ public void setAnSuggestNssiId(String anSuggestNssiId) {
+ this.anSuggestNssiId = anSuggestNssiId;
+ }
+
+ public String getAnSuggestNssiName() {
+ return anSuggestNssiName;
+ }
+
+ public void setAnSuggestNssiName(String anSuggestNssiName) {
+ this.anSuggestNssiName = anSuggestNssiName;
+ }
+
+ public String getAnProgress() {
+ return anProgress;
+ }
+
+ public void setAnProgress(String anProgress) {
+ this.anProgress = anProgress;
+ }
+
+ public String getAnStatus() {
+ return anStatus;
+ }
+
+ public void setAnStatus(String anStatus) {
+ this.anStatus = anStatus;
+ }
+
+ public String getAnStatusDescription() {
+ return anStatusDescription;
+ }
+
+ public void setAnStatusDescription(String anStatusDescription) {
+ this.anStatusDescription = anStatusDescription;
+ }
+
+ public String convertToJson() {
+ JsonObject jsonObject = new JsonObject();
+ jsonObject.addProperty("ServiceId", serviceId);
+ jsonObject.addProperty("ServiceName", serviceName);
+ jsonObject.addProperty("NSTId", nstId);
+ jsonObject.addProperty("NSTName", nstName);
+ jsonObject.addProperty("TN.ScriptName", tnScriptName);
+ jsonObject.addProperty("AN.ScriptName", anScriptName);
+ jsonObject.addProperty("CN.ScriptName", cnScriptName);
+ for (Map.Entry<String, Object> entry : serviceProfile.entrySet()) {
+ jsonObject.addProperty("ServiceProfile." + entry.getKey(), entry.getValue().toString());
+ }
+ jsonObject.addProperty("suggestNSIId", suggestNsiId);
+ jsonObject.addProperty("suggestNSIName", suggestNsiName);
+ for (Map.Entry<String, Object> entry : sliceProfileTn.entrySet()) {
+ jsonObject.addProperty("SliceProfile.TN." + entry.getKey(), entry.getValue().toString());
+ }
+ for (Map.Entry<String, Object> entry : sliceProfileCn.entrySet()) {
+ jsonObject.addProperty("SliceProfile.CN." + entry.getKey(), entry.getValue().toString());
+ }
+ for (Map.Entry<String, Object> entry : sliceProfileAn.entrySet()) {
+ jsonObject.addProperty("SliceProfile.AN." + entry.getKey(), entry.getValue().toString());
+ }
+ jsonObject.addProperty("TN.SuggestNSSIId", tnSuggestNssiId);
+ jsonObject.addProperty("TN.SuggestNSSIName", tnSuggestNssiName);
+ jsonObject.addProperty("TN.progress", tnProgress);
+ jsonObject.addProperty("TN.status", tnStatus);
+ jsonObject.addProperty("TN.statusDescription", tnStatusDescription);
+ jsonObject.addProperty("CN.SuggestNSSIId", cnSuggestNssiId);
+ jsonObject.addProperty("CN.SuggestNSSIName", cnSuggestNssiName);
+ jsonObject.addProperty("CN.progress", cnProgress);
+ jsonObject.addProperty("CN.status", cnStatus);
+ jsonObject.addProperty("CN.statusDescription", cnStatusDescription);
+ jsonObject.addProperty("AN.SuggestNSSIId", anSuggestNssiId);
+ jsonObject.addProperty("AN.SuggestNSSIName", anSuggestNssiName);
+ jsonObject.addProperty("AN.progress", anProgress);
+ jsonObject.addProperty("AN.status", anStatus);
+ jsonObject.addProperty("AN.statusDescription", anStatusDescription);
+
+ return jsonObject.toString();
+ }
+
+ public void convertFromJson(String jsonString) throws IOException {
+ ObjectMapper mapper = new ObjectMapper();
+ Map<String, String> paramMap = (Map<String, String>) mapper.readValue(jsonString, Map.class);
+ this.setServiceId(paramMap.get("ServiceId"));
+ this.setServiceName(paramMap.get("ServiceName"));
+ this.setNstId(paramMap.get("NSTId"));
+ this.setNstName(paramMap.get("NSTName"));
+ this.setTnScriptName(paramMap.get("TN.ScriptName"));
+ this.setAnScriptName(paramMap.get("AN.ScriptName"));
+ this.setCnScriptName(paramMap.get("CN.ScriptName"));
+ Map<String, Object> serviceProfileMap = new HashMap<>();
+ for (Map.Entry<String, String> entry : paramMap.entrySet()) {
+ if (entry.getKey().startsWith("ServiceProfile.")) {
+ serviceProfileMap.put(entry.getKey().replaceFirst("^ServiceProfile.", ""), entry.getValue());
+ }
+ }
+ this.setServiceProfile(serviceProfileMap);
+ this.setSuggestNsiId(paramMap.get("suggestNSIId"));
+ this.setSuggestNsiName(paramMap.get("suggestNSIName"));
+ Map<String, Object> sliceProfileTnMap = new HashMap<>();
+ for (Map.Entry<String, String> entry : paramMap.entrySet()) {
+ if (entry.getKey().startsWith("SliceProfile.TN.")) {
+ sliceProfileTnMap.put(entry.getKey().replaceFirst("^SliceProfile.TN.", ""), entry.getValue());
+ }
+ }
+ this.setSliceProfileTn(sliceProfileTnMap);
+ Map<String, Object> sliceProfileCnMap = new HashMap<>();
+ for (Map.Entry<String, String> entry : paramMap.entrySet()) {
+ if (entry.getKey().startsWith("SliceProfile.CN.")) {
+ sliceProfileCnMap.put(entry.getKey().replaceFirst("^SliceProfile.CN.", ""), entry.getValue());
+ }
+ }
+ this.setSliceProfileCn(sliceProfileCnMap);
+ Map<String, Object> sliceProfileAnMap = new HashMap<>();
+ for (Map.Entry<String, String> entry : paramMap.entrySet()) {
+ if (entry.getKey().startsWith("SliceProfile.AN.")) {
+ sliceProfileAnMap.put(entry.getKey().replaceFirst("^SliceProfile.AN.", ""), entry.getValue());
+ }
+ }
+ this.setSliceProfileAn(sliceProfileAnMap);
+ this.setTnSuggestNssiId(paramMap.get("TN.SuggestNSSIId"));
+ this.setTnSuggestNssiName(paramMap.get("TN.SuggestNSSIName"));
+ this.setTnProgress(paramMap.get("TN.progress"));
+ this.setTnStatus(paramMap.get("TN.status"));
+ this.setTnStatusDescription(paramMap.get("TN.statusDescription"));
+ this.setCnSuggestNssiId(paramMap.get("CN.SuggestNSSIId"));
+ this.setCnSuggestNssiName(paramMap.get("CN.SuggestNSSIName"));
+ this.setCnProgress(paramMap.get("CN.progress"));
+ this.setCnStatus(paramMap.get("CN.status"));
+ this.setCnStatusDescription(paramMap.get("CN.statusDescription"));
+ this.setAnSuggestNssiId(paramMap.get("AN.SuggestNSSIId"));
+ this.setAnSuggestNssiName(paramMap.get("AN.SuggestNSSIName"));
+ this.setAnProgress(paramMap.get("AN.progress"));
+ this.setAnStatus(paramMap.get("AN.status"));
+ this.setAnStatusDescription(paramMap.get("AN.statusDescription"));
+ }
+}
+
diff --git a/packages/docker/src/main/docker/docker-files/Dockerfile.so-app b/packages/docker/src/main/docker/docker-files/Dockerfile.so-app
index 90f0a6627d..e8f02f12c6 100644
--- a/packages/docker/src/main/docker/docker-files/Dockerfile.so-app
+++ b/packages/docker/src/main/docker/docker-files/Dockerfile.so-app
@@ -14,7 +14,6 @@ COPY configs/logging/logback-spring.xml /app
COPY scripts/start-app.sh /app
COPY scripts/wait-for.sh /app
COPY ca-certificates/onap-ca.crt /app/ca-certificates/onap-ca.crt
-COPY certs/* /app/
RUN chown -R so:so /app && chmod 700 /app/*.sh
diff --git a/packages/docker/src/main/docker/docker-files/certs/org.onap.so.jks b/packages/docker/src/main/docker/docker-files/certs/org.onap.so.jks
deleted file mode 100644
index 1e849afb5e..0000000000
--- a/packages/docker/src/main/docker/docker-files/certs/org.onap.so.jks
+++ /dev/null
Binary files differ
diff --git a/packages/docker/src/main/docker/docker-files/certs/org.onap.so.keyfile b/packages/docker/src/main/docker/docker-files/certs/org.onap.so.keyfile
deleted file mode 100644
index 9000ed29fb..0000000000
--- a/packages/docker/src/main/docker/docker-files/certs/org.onap.so.keyfile
+++ /dev/null
@@ -1,27 +0,0 @@
-xVdhDotWIx2RB3f8RxAFQb9mkHVVdIzv8eiij9cDjg_5ea5HWPS7OzLR5lv4NA0vStrAMfSAaS2e
-j4rzvrlserM9bTRco3JHb-i6ZGYMoTL6kuFJ9JMveSqg-fkwvrm7VcYQJBs1FIE3hRLNqiGJ34ud
-hDRp-cGUvNRLIImksKT2fmUyEawLLuE0Lo5aX46y0ibjIMe7clMxLHIS5-WggvkgIOPkVDcxqLT2
-OteGptqW1cjrm1ydbTkLYN6dd7ZmRsT3ULPYLEtPTlZ2vCh7bFBBvP_tjp2cZf4uSPM6EClYAikn
-dnTqivOfCZn25r0xeXuectoXbq12fws_jaCH05ZK1wJwAF_cQNfpvaiM457rE672YV3Ev4yhXCyM
-1jVL2P9Chl1sSBkZujCftvaj1rlippP9P_eohcLv84mtApEyV49rBFRMtkX9ZVdPyb8shFSoXJxk
-M6DentRzY1g37mVJ1B1YMKPNQj95nOD4gLvjbUZ7dATuroENsG7oUWkfaV6dokfTmh504ZbyeqGh
-xa7yfr3326fMQBhQMpsyqD2o_Obe5wN57p-vb469w65pUmK7iJDa0Fgxaxy8XNNnw6gCurbbsvyU
-nB8UdfhTvL5mJew_tKUvtq_KH9ajnA8giSxuFd9KM6YHJWiFMXIROEQT7hKjTJka1ghERBjcH_pY
-hbKtHdvbrS7T2hGwY_MQEUXYQBirtjaEwAvI960hXQt1K-MC8PNLRYtdLKE2Aq3amMt7ZKtrHSeN
-33I1MjXc3wRUeOi5A6qImge1Q_Wmn1SURAn9KbEv9eoMUbQUkN1z2iyw4x94BZpBk5GjDypKKOyg
-guec0UY3y9wqm5gGW7XvT3v1lZqo5180VgK49iFgA4IhWZ7dnDFQmq6IHTr1pM4kuvJ9dka9saIh
-9xCk_KINPp5_dqJ2Lhak2IeRg_Zm3belm1jvYGCyRRqfoi9WGrDh3LLZeK8MHrrfzLI4Toy_n6DG
-UNXPrXqrZPREfW2lhYLRfrivOBYWPq9JidQXn1UctSmWdNoMH7XuikBpAwmlInNA_5j9J-L-gf9D
-cw2zoby3_wvcm5vxndnocEdhqVVdo7uMmXasQqphuyJP8rgCJf_I1v0Qe5F-JXsj6xDvarOUPOTj
-Z93a64EO0KI0OznolRyBqHpIXffbGh7e1EpAE0LMESKJC3Mjmsgz1ld3s7WfdeDK-IxUEHJLHlhY
-IjBlY6q3OJDrgvPLkwoWPbI48tmRUJX1BCafvDU6W8crl4VQKhL_l5ANAX5oaKwh-0ZJAZ15tna5
-6fjWcWrtQSdNQxj0jXV7uEcBtRtyPyOk2uw4HJDBLQyyOglUUxcQZJFCFp2fCHmNyttmUJQ5U9cu
-yw9lKhsyBJ5TB4psbp64_0EalITeAGrpuH1I1N2m1O5ZY8pmrpPtA1Mb5rQ4IJqiVbZgHTcvSiN5
-Z2SilurhI1vq4_aN_UZJQvEnw9U5WU3ysphsQk8RZKbFH4W9GDtmEGbAkRkTy17KrDIuMpe--XJF
-SQHUd4tzxbiYVYHKdF6Ce1kfQ-DEFXEf7RddwuKbc7tw2pSjy1MVH4HSRoTOQQpewZRTfG-4d3MX
-B99-QgufEk1OBkfemuDhdnPty5qkOLUEG_uQKPpD0QDVf-t4OxZqk_8G_dCJcXbmY4VT3V7pdN_I
-qp2xP98wGcIPuLGlEB8px94jKdUolkqeV_UTmmkTGz-szLzgK_YhnnVJn8VeyNsPTwAFUlqiPTyT
-n_7rCb_6nNKlriadaHu6IuJWehv03ZR9jS0P1Y3YLM286deCLFu93lN3nY4yf-SEguASdHJNCBFJ
-RQViYm8Tfuim5F0KQGafheGcdZxTvBFihnDduQWNBR_bDB9zfD6OtvvkseyyWHt3gHkJm5QeCjWK
-RzRvbjLpUnA31cJeEXmnmhB5qMAvjn8yORKcotn3u4MXdHEk-s8vR_SKykS6IcaYE1xxbowtg-UG
-d1iaky1NFYa2VZ4pGx9lD93GDTDynmOSfzVeVsxhTu_5rAanpDkUYVuxOzajmRh55I8a6dRk \ No newline at end of file
diff --git a/packages/docker/src/main/docker/docker-files/certs/org.onap.so.trust.jks b/packages/docker/src/main/docker/docker-files/certs/org.onap.so.trust.jks
deleted file mode 100644
index 71c6e776a3..0000000000
--- a/packages/docker/src/main/docker/docker-files/certs/org.onap.so.trust.jks
+++ /dev/null
Binary files differ