aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java5
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoKeystoneUtils.java5
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoNeutronUtils.java6
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/CatalogDbAdapterRest.java71
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryServiceCsar.java72
-rw-r--r--asdc-controller/src/main/java/org/openecomp/mso/asdc/util/NotificationLogging.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CatalogDbUtils.groovy43
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/DecomposeService.groovy7
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ExceptionUtil.groovy794
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/BpmnParam.java54
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/BpmnRestClient.java219
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceRecipeRequest.java143
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/HomingTest.java5
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/StubResponseDatabase.java8
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java8
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy40
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn621
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaVIDRequest.java2
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java15
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java94
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ArRecipe.java46
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java10
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Recipe.java18
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipe.java10
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfRecipe.java10
-rw-r--r--mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioning.java29
-rw-r--r--mso-catalog-db/src/main/resources/ArRecipe.hbm.xml62
-rw-r--r--mso-catalog-db/src/main/resources/NetworkRecipe.hbm.xml2
-rw-r--r--mso-catalog-db/src/main/resources/VnfComponentsRecipe.hbm.xml2
-rw-r--r--mso-catalog-db/src/main/resources/VnfRecipe.hbm.xml2
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/NetworkRecipeTest.java4
-rw-r--r--mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/VnfRecipeTest.java4
-rw-r--r--pom.xml1
33 files changed, 1623 insertions, 791 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java
index 9fe2d4c786..46cfbf1bb8 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java
@@ -1106,11 +1106,8 @@ public class MsoHeatUtils extends MsoCommonUtils {
}
public boolean isExpired () {
- if (expires == null) {
- return true;
- }
+ return expires == null || System.currentTimeMillis() > expires.getTimeInMillis();
- return System.currentTimeMillis() > expires.getTimeInMillis();
}
}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoKeystoneUtils.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoKeystoneUtils.java
index be36d67e0b..714684aba6 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoKeystoneUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoKeystoneUtils.java
@@ -567,11 +567,8 @@ public class MsoKeystoneUtils extends MsoTenantUtils {
}
public boolean isExpired () {
- if (expires == null) {
- return true;
- }
+ return expires == null || System.currentTimeMillis() > expires.getTimeInMillis();
- return System.currentTimeMillis() > expires.getTimeInMillis();
}
}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoNeutronUtils.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoNeutronUtils.java
index 50a594663e..c65a715b66 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoNeutronUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoNeutronUtils.java
@@ -559,11 +559,7 @@ public class MsoNeutronUtils extends MsoCommonUtils
}
public boolean isExpired() {
- if (expires == null) {
- return true;
- }
-
- return System.currentTimeMillis() > expires.getTimeInMillis();
+ return expires == null || System.currentTimeMillis() > expires.getTimeInMillis();
}
}
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/CatalogDbAdapterRest.java b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/CatalogDbAdapterRest.java
index 668f73816d..8cdeaaa9e1 100644
--- a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/CatalogDbAdapterRest.java
+++ b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/CatalogDbAdapterRest.java
@@ -52,34 +52,37 @@ Once the network-level distribution artifacts are defined, similar updates can b
import java.util.ArrayList;
import java.util.List;
+
import javax.ws.rs.GET;
import javax.ws.rs.HEAD;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Response;
import javax.ws.rs.core.GenericEntity;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
-import org.apache.http.HttpStatus;
+import javax.ws.rs.core.Response;
-import org.openecomp.mso.logger.MessageEnum;
-import org.openecomp.mso.logger.MsoLogger;
+import org.apache.http.HttpStatus;
+import org.openecomp.mso.adapters.catalogdb.catalogrest.CatalogQuery;
import org.openecomp.mso.adapters.catalogdb.catalogrest.CatalogQueryException;
import org.openecomp.mso.adapters.catalogdb.catalogrest.CatalogQueryExceptionCategory;
-import org.openecomp.mso.adapters.catalogdb.catalogrest.CatalogQuery;
-import org.openecomp.mso.adapters.catalogdb.catalogrest.QueryServiceVnfs;
-import org.openecomp.mso.adapters.catalogdb.catalogrest.QueryServiceNetworks;
-import org.openecomp.mso.adapters.catalogdb.catalogrest.QueryServiceMacroHolder;
import org.openecomp.mso.adapters.catalogdb.catalogrest.QueryAllottedResourceCustomization;
+import org.openecomp.mso.adapters.catalogdb.catalogrest.QueryServiceCsar;
+import org.openecomp.mso.adapters.catalogdb.catalogrest.QueryServiceMacroHolder;
+import org.openecomp.mso.adapters.catalogdb.catalogrest.QueryServiceNetworks;
+import org.openecomp.mso.adapters.catalogdb.catalogrest.QueryServiceVnfs;
import org.openecomp.mso.adapters.catalogdb.catalogrest.QueryVfModule;
import org.openecomp.mso.db.catalog.CatalogDatabase;
-import org.openecomp.mso.db.catalog.beans.VnfResourceCustomization;
-import org.openecomp.mso.db.catalog.beans.VfModuleCustomization;
+import org.openecomp.mso.db.catalog.beans.AllottedResourceCustomization;
import org.openecomp.mso.db.catalog.beans.NetworkResourceCustomization;
import org.openecomp.mso.db.catalog.beans.ServiceMacroHolder;
-import org.openecomp.mso.db.catalog.beans.AllottedResourceCustomization;
+import org.openecomp.mso.db.catalog.beans.ToscaCsar;
+import org.openecomp.mso.db.catalog.beans.VfModuleCustomization;
+import org.openecomp.mso.db.catalog.beans.VnfResourceCustomization;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
/**
* This class services calls to the REST interface for VF Modules (http://host:port/ecomp/mso/catalog/v1)
@@ -466,4 +469,50 @@ public class CatalogDbAdapterRest {
}
}
+ /**
+ * Get the tosca csar info from catalog
+ * <br>
+ *
+ * @param smUuid service model uuid
+ * @return the tosca csar information of the serivce.
+ * @since ONAP Beijing Release
+ */
+ @GET
+ @Path("serviceToscaCsar")
+ @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
+ public Response ServiceToscaCsar(@QueryParam("serviceModelUuid") String smUuid) {
+ int respStatus = HttpStatus.SC_OK;
+ CatalogDatabase db = CatalogDatabase.getInstance();
+ String entity = "";
+ try{
+ if(smUuid != null && !"".equals(smUuid)){
+ LOGGER.debug ("Query Csar by service model uuid: " + smUuid);
+ ToscaCsar toscaCsar = db.getToscaCsarByServiceModelUUID(smUuid);
+ if(toscaCsar != null){
+ QueryServiceCsar serviceCsar = new QueryServiceCsar(toscaCsar);
+ entity = serviceCsar.JSON2(false, false);
+ }
+ else{
+ respStatus = HttpStatus.SC_NOT_FOUND;
+ }
+ }else{
+ throw(new Exception("Incoming parameter is null or blank"));
+ }
+ LOGGER.debug ("Query Csar exit");
+ return Response
+ .status(respStatus)
+ .entity(entity)
+ .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON)
+ .build();
+ }catch(Exception e){
+ LOGGER.error (MessageEnum.RA_QUERY_VNF_ERR, smUuid, "", "ServiceToscaCsar", MsoLogger.ErrorCode.BusinessProcesssError, "Exception during query csar by service model uuid: ", e);
+ CatalogQueryException excResp = new CatalogQueryException(e.getMessage(), CatalogQueryExceptionCategory.INTERNAL, Boolean.FALSE, null);
+ return Response
+ .status(HttpStatus.SC_INTERNAL_SERVER_ERROR)
+ .entity(new GenericEntity<CatalogQueryException>(excResp) {})
+ .build();
+ }finally {
+ db.close();
+ }
+ }
}
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryServiceCsar.java b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryServiceCsar.java
new file mode 100644
index 0000000000..6b1eb836d9
--- /dev/null
+++ b/adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryServiceCsar.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.openecomp.mso.adapters.catalogdb.catalogrest;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.openecomp.mso.db.catalog.beans.ToscaCsar;
+
+/**
+ * serivce csar query support
+ * <br>
+ * <p>
+ * </p>
+ *
+ * @author
+ * @version ONAP Beijing Release 2018-02-28
+ */
+public class QueryServiceCsar extends CatalogQuery{
+
+ private ToscaCsar toscaCsar;
+
+ public QueryServiceCsar(ToscaCsar toscaCsar){
+ this.toscaCsar = toscaCsar;
+ }
+
+ private final String template =
+ "\t{\n"+
+ "\t\t\"artifactUUID\" : <ARTIFACT_UUID>,\n"+
+ "\t\t\"name\" : <NAME>,\n"+
+ "\t\t\"version\" : <VERSION>,\n"+
+ "\t\t\"artifactChecksum\" : <ARTIFACT_CHECK_SUM>,\n"+
+ "\t\t\"url\" : <URL>,\n"+
+ "\t\t\"description\" : <DESCRIPTION>\n"+
+ "\t}";
+
+ @Override
+ public String toString() {
+
+ return toscaCsar.toString();
+ }
+
+ @Override
+ public String JSON2(boolean isArray, boolean isEmbed) {
+ Map<String, String> valueMap = new HashMap<>();
+ put(valueMap, "ARTIFACT_UUID", null == toscaCsar ? null : toscaCsar.getArtifactUUID());
+ put(valueMap, "NAME", null == toscaCsar ? null : toscaCsar.getName());
+ put(valueMap, "VERSION", null == toscaCsar ? null : toscaCsar.getVersion());
+ put(valueMap, "ARTIFACT_CHECK_SUM", null == toscaCsar ? null : toscaCsar.getArtifactChecksum());
+ put(valueMap, "URL", null == toscaCsar ? null : toscaCsar.getUrl());
+ put(valueMap, "DESCRIPTION", null == toscaCsar ? null : toscaCsar.getDescription());
+ return this.setTemplate(template, valueMap);
+ }
+
+}
diff --git a/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/NotificationLogging.java b/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/NotificationLogging.java
index 126114d2d6..bbf8fe6f8c 100644
--- a/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/NotificationLogging.java
+++ b/asdc-controller/src/main/java/org/openecomp/mso/asdc/util/NotificationLogging.java
@@ -107,7 +107,7 @@ public class NotificationLogging implements InvocationHandler {
return buffer.toString();
}
- private static final boolean isGetter(Method method) {
+ private static boolean isGetter(Method method) {
// Must start with a valid (and known) prefix
boolean prefixFound = false;
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CatalogDbUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CatalogDbUtils.groovy
index 50e761eb77..dd6e56acc7 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CatalogDbUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/CatalogDbUtils.groovy
@@ -694,6 +694,49 @@ class CatalogDbUtils {
return vnfsList
}
+ public JSONObject getServiceResourcesByServiceModelUuid(Execution execution, String serviceModelUuid) {
+ JSONObject resources = null
+ String endPoint = "/serviceResources?serviceModelUuid=" + UriUtils.encode(serviceModelUuid, "UTF-8")
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(execution, endPoint)
+
+ if (catalogDbResponse != null) {
+
+ resources = parseServiceResourcesJson(catalogDbResponse, "v1")
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return resources
+ }
+
+ public JSONObject getServiceResourcesByServiceModelUuid(Execution execution, String serviceModelUuid, String catalogUtilsVersion) {
+ JSONObject resources = null
+ String endPoint = "/serviceResources?serviceModelUuid=" + UriUtils.encode(serviceModelUuid, "UTF-8")
+ try {
+ String catalogDbResponse = getResponseFromCatalogDb(execution, endPoint)
+
+ if (catalogDbResponse != null) {
+ if (!catalogUtilsVersion.equals("v1")) {
+ resources = new JSONObject(catalogDbResponse)
+ }
+ else {
+ resources = parseServiceResourcesJson(catalogDbResponse, catalogUtilsVersion)
+ }
+ }
+
+ }
+ catch (Exception e) {
+ utils.log("ERROR", "Exception in Querying Catalog DB: " + e.message)
+ }
+
+ return resources
+ }
+
+
public JSONObject getServiceResourcesByServiceModelInvariantUuid(Execution execution, String serviceModelInvariantUuid) {
JSONObject resources = null
String endPoint = "/serviceResources?serviceModelInvariantUuid=" + UriUtils.encode(serviceModelInvariantUuid, "UTF-8")
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/DecomposeService.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/DecomposeService.groovy
index 2645ea3c02..8d855e9311 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/DecomposeService.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/DecomposeService.groovy
@@ -77,6 +77,7 @@ public class DecomposeService extends AbstractServiceTaskProcessor {
String serviceInstanceId = execution.getVariable("serviceInstanceId")
String serviceModelInfo = execution.getVariable("serviceModelInfo")
execution.setVariable("DDS_serviceModelInvariantId", jsonUtils.getJsonValue(serviceModelInfo, "modelInvariantUuid"))
+ execution.setVariable("DDS_serviceModelUuid", jsonUtils.getJsonValue(serviceModelInfo, "modelUuid"))
execution.setVariable("DDS_modelVersion", jsonUtils.getJsonValue(serviceModelInfo, "modelVersion"))
} catch (BpmnError e) {
throw e;
@@ -97,14 +98,16 @@ public class DecomposeService extends AbstractServiceTaskProcessor {
// check for input
String serviceModelInvariantId = execution.getVariable("DDS_serviceModelInvariantId")
+ String serviceModelUuid = execution.getVariable("DDS_serviceModelUuid")
String modelVersion = execution.getVariable("DDS_modelVersion")
utils.log("DEBUG", "serviceModelInvariantId: " + serviceModelInvariantId, isDebugEnabled)
utils.log("DEBUG", "modelVersion: " + modelVersion, isDebugEnabled)
JSONObject catalogDbResponse = null
-
- if (modelVersion != null && modelVersion.length() > 0)
+ if(serviceModelUuid != null && serviceModelUuid.length() > 0)
+ catalogDbResponse = catalogDbUtils.getServiceResourcesByServiceModelUuid(execution, serviceModelUuid, "v2")
+ else if (modelVersion != null && modelVersion.length() > 0)
catalogDbResponse = catalogDbUtils.getServiceResourcesByServiceModelInvariantUuidAndServiceModelVersion(execution, serviceModelInvariantId, modelVersion, "v2")
else
catalogDbResponse = catalogDbUtils.getServiceResourcesByServiceModelInvariantUuid(execution, serviceModelInvariantId, "v2")
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ExceptionUtil.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ExceptionUtil.groovy
index d97a304e16..121e0c8ccb 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ExceptionUtil.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/ExceptionUtil.groovy
@@ -1,398 +1,396 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.mso.bpmn.common.scripts
-
-import static org.apache.commons.lang3.StringUtils.*
-
-import org.apache.commons.lang3.*
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.runtime.Execution
-import org.openecomp.mso.bpmn.core.WorkflowException
-
-/**
- * @version 1.0
- */
-class ExceptionUtil extends AbstractServiceTaskProcessor {
-
-
- /**
- * This error handling method maps an AAI Exception response to a
- * WorkflowException Object. It then sets the WorkflowException Object
- * on the execution as "WorkflowException".
- *
- * This method formats the exception from AAI into the WorkflowException's
- * errorMessage that CCD expects.
- *
- * @param execution the execution
- * @param response the aai exception
- */
- WorkflowException MapAAIExceptionToWorkflowException(String response, Execution execution)
- {
- def utils=new MsoUtils()
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- def prefix=execution.getVariable("prefix")
- def errorMsg = execution.getVariable(prefix+"ErrorResponse")
- utils.log("DEBUG","=========== Begin MapAAIExceptionToWorkflowException ===========",isDebugEnabled)
- String text = null
- def variables
- String errorCode = '5000'
- WorkflowException wfex
- utils.log("DEBUG","response: " + response, isDebugEnabled)
- try{
- try {
- //String msg = utils.getNodeXml(response, "Fault")
- variables = utils.getMultNodes(response, "variable")
- text = utils.getNodeText1(response, "text")
- } catch (Exception ex) {
- //Ignore the exception - cases include non xml payload
- utils.log("DEBUG","error mapping error, ignoring: " + ex,isDebugEnabled)
- }
-
- if(text != null) {
- if(variables.size()>=4){
- text = text.replaceFirst("%1", variables[0])
- text = text.replaceFirst("%2", variables[1])
- text = text.replaceFirst("%3", variables[2])
- text = text.replaceFirst("%4", variables[3])
- }
- String modifiedErrorMessage = 'Received error from A&amp;AI (' + text +')'
- utils.log("DEBUG", "ModifiedErrorMessage " + modifiedErrorMessage, isDebugEnabled)
- // let $ModifiedErrorMessage := concat( 'Received error from A',$exceptionaai:ampersand,'AI (' ,functx:replace-multi($ErrorMessage,$from,$Variables ),')')
- buildWorkflowException(execution, 5000, modifiedErrorMessage)
-
- wfex = execution.getVariable("WorkflowException")
- utils.log("ERROR","Fault:"+ wfex)
- return wfex
- } else {
- try {
- errorCode = MapErrorCode(errorMsg)
- String mappedErrorMessage = MapErrorMessage(errorMsg, errorCode)
-
- int errorCodeInt = Integer.parseInt(errorCode)
- buildWorkflowException(execution, errorCodeInt, mappedErrorMessage)
-
- utils.log("DEBUG", "mappedErrorMessage " + mappedErrorMessage, isDebugEnabled)
- wfex = execution.getVariable("WorkflowException")
- utils.log("ERROR","Fault:"+ wfex, isDebugEnabled)
- return wfex
- } catch(Exception ex) {
- utils.log("DEBUG","error mapping error, return null: " + ex, isDebugEnabled)
- return null
-
- }
- }
- }catch(Exception e){
- utils.log("DEBUG", "Exception occured during MapAAIExceptionToWorkflowException: " + e, isDebugEnabled)
- buildWorkflowException(execution, 5000, "Error mapping AAI Response to WorkflowException")
- }
- }
-
- /**
- * This error handling method maps an AAI Exception response to a
- * WorkflowException Object. It then sets the WorkflowException Object
- * on the execution as "WorkflowException".
- *
- * This method takes the exact exception inside the <Fault> tags from AAI Response
- * and puts it into the WorkflowException's errorMessage.
- *
- * @param execution the execution
- * @param response the aai exception
- */
- WorkflowException MapAAIExceptionToWorkflowExceptionGeneric(Execution execution, String response, int resCode){
- def utils=new MsoUtils()
- def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG", "Start MapAAIExceptionToWorkflowExceptionGeneric Process", isDebugLogEnabled)
-
- WorkflowException wfex
- try {
- if(utils.nodeExists(response, "Fault")){
- String fault = utils.getNodeXml(response, "Fault")
- fault = utils.removeXmlPreamble(fault)
- fault = fault.replace("<Fault>", "").replace("</Fault>", "")
- fault = fault.replaceAll("\\s+\\s+", "") // Removes extra white spaces
- buildWorkflowException(execution, resCode, fault)
- }else if(utils.nodeExists(response, "RESTFault")){
- String rFault = utils.getNodeXml(response, "RESTFault")
- buildWorkflowException(execution, resCode, rFault)
- }else{
- buildWorkflowException(execution, resCode, "Received a bad response from AAI")
- }
- } catch (Exception ex) {
- utils.log("DEBUG", "Exception Occured during MapAAIExceptionToWorkflowExceptionGeneric: " + ex, isDebugLogEnabled)
- buildWorkflowException(execution, resCode, "Internal Error - Occured in MapAAIExceptionToWorkflowExceptionGeneric")
-
- }
- utils.log("DEBUG", "Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugLogEnabled)
- utils.log("DEBUG", "Completed MapAAIExceptionToWorkflowExceptionGeneric Process", isDebugLogEnabled)
- }
-
- /**
- * This method takes a WorkflowException Object and builds
- * WorkflowException Xml. This method should only be used
- * for the purpose of sending a sync error response or for
- * creating a FalloutHandler request.
- *
- *@param - WorkflowException Object
- *
- *@return - String WorkflowException Xml
- *
- *
- */
- String buildErrorResponseXml(WorkflowException wfex) {
- String xml
- if(wfex != null){
- String mes = wfex.getErrorMessage()
- int code = wfex.getErrorCode()
- xml =
- """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>${mes}</aetgt:ErrorMessage>
- <aetgt:ErrorCode>${code}</aetgt:ErrorCode>
- </aetgt:WorkflowException>"""
-
- }else{
- xml =
- """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>Internal Error</aetgt:ErrorMessage>
- <aetgt:ErrorCode>2500</aetgt:ErrorCode>
- </aetgt:WorkflowException>"""
- }
- return xml
- }
-
- /*
- 5000 Received error from A&AI ($A&AI_ERROR) Asynchronous During orchestration of the recipe, A&AI returned an error. The error returned by A&AI is passed through in $A&AI_ERROR.
- 5010 Could not communicate with A&AI Asynchronous During orchestration of the recipe, a connection with A&AI could not be established.
- 5020 No response from A&AI Asynchronous During orchestration of the recipe, communication was established with A&AI, but no response was received within the configured timeout.
- */
- /**
- *
- * Utility Method for MapAAIExceptionToWorkflowException
- *
- *@param - String ErrorMessage
- *
- *@return - String ErrorCode
- *
- */
- private String MapErrorCode(String errorMessage)
- {
- if(errorMessage==null){
- return '5000'
- }
- errorMessage = errorMessage.toLowerCase();
- if(errorMessage.contains('timed out') || errorMessage.contains('timeout'))
- return '5020'
- else if (errorMessage.contains('connection'))
- return '5010'
- else
- return '5000'
- }
-
- /**
- *
- * Utility Method for MapAAIExceptionToWorkflowException
- *
- *@param - String ErrorMessage
- *@param - String ErrorCode
- *
- *@return - String ErrorMessage
- *
- */
- private String MapErrorMessage(String errorMessage, String errorCode)
- {
- if(errorMessage == null){
- errorMessage=""
- }
- if( errorCode.equals('5010')){
- return 'Could not communicate with A&amp;AI'
- }else if (errorCode.equals('5020')){
- return 'No response from A&amp;AI'
- }else{
- errorMessage = errorMessage.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
- return 'Received error from A&amp;AI (' +errorMessage +')'
- }
- }
-
- /**
- *
- * Utility Method for Mapping SDNC
- * Adapter Response Codes
- *
- *@param - String sdncResponseCode
- *
- *@return - String code
- *
- */
- String MapSDNCResponseCodeToErrorCode(String sdncResponseCode)
- {
- if (sdncResponseCode == '500') {
- return '5310'
- } else if ( sdncResponseCode == '408') {
- return '5320'
- } else if ( sdncResponseCode == '60010') {
- return '5350'
- } else {
- return '5300'
- }
- }
-
- /**
- * This error handling method builds a WorkflowException Object. It sets it on
- * the execution as "WorkflowException".
- *
- * @param execution the execution
- * @param errorCode the error code
- * @param errorMessage the error message
- */
- public void buildWorkflowException(Execution execution, int errorCode, String errorMessage) {
- MsoUtils utils = new MsoUtils()
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- String processKey = getProcessKey(execution);
- utils.log("DEBUG", "Building a WorkflowException for " + processKey, isDebugLogEnabled)
-
- WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage);
- execution.setVariable("WorkflowException", exception);
- utils.log("DEBUG", "Outgoing WorkflowException is " + exception, isDebugLogEnabled)
- }
-
- /**
- * This error handling method builds a WorkflowException Object and throws a
- * MSOWorkflowException. It throws a "MSOWorkflowException" BpmnError after
- * setting the WorkflowException Object on the execution as "WorkflowException".
- *
- * @param execution the execution
- * @param errorCode the error code
- * @param errorMessage the error message
- */
- public void buildAndThrowWorkflowException(Execution execution, int errorCode, String errorMessage) {
- def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
- String processKey = getProcessKey(execution);
- utils.log("Building a WorkflowException for Subflow " + processKey, isDebugLogEnabled)
-
- WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage);
- execution.setVariable("WorkflowException", exception);
- utils.log("DEBUG", "Outgoing WorkflowException is " + exception, isDebugLogEnabled)
- utils.log("DEBUG", "Throwing MSOWorkflowException", isDebugLogEnabled)
- throw new BpmnError("MSOWorkflowException")
- }
-
- /**
- * This method is executed after an MSOWorkflowException is caught by a
- * subflow (during subflows "Error Handling Sub Process").
- * It ensures the WorkflowException variable is populated before ending the
- * subflow and also logs the subflows outgoing WorkflowException Variable.
- *
- * @param - execution
- *
- */
- public void processSubflowsBPMNException(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- String processKey = getProcessKey(execution)
- try{
- utils.log("DEBUG", "Started ProcessSubflowsBPMNException Method", isDebugEnabled)
- if(execution.getVariable("WorkflowException") == null){
- buildWorkflowException(execution, 2500, "Internal Error - Occured During " + processKey)
- }
-
- utils.log("DEBUG", processKey + " Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugEnabled)
- }catch(Exception e){
- utils.log("DEBUG", "Caught Exception during ProcessSubflowsBPMNException Method: " + e, isDebugEnabled)
- }
- utils.log("DEBUG", "Completed ProcessSubflowsBPMNException Method", isDebugEnabled)
- }
-
- /**
- * This method is executed after an MSOWorkflowException is caught by a
- * Mainflow. It builds and returns a FalloutHandler Request. It also
- * verifies the WorkflowException variable is populated.
- *
- * @param - execution
- * @param - requestInfo
- *
- * @return - falloutHandlerRequest
- *
- */
- public String processMainflowsBPMNException(Execution execution, String requestInfo){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- String processKey = getProcessKey(execution)
- try{
- utils.log("DEBUG", "Started ProcessMainflowBPMNException Method", isDebugEnabled)
- if(execution.getVariable("WorkflowException") == null || isBlank(requestInfo)){
- buildWorkflowException(execution, 2500, "Internal Error - WorkflowException Object and/or RequestInfo is null! " + processKey)
- }
- requestInfo = utils.removeXmlPreamble(requestInfo)
- WorkflowException wfex = execution.getVariable("WorkflowException")
- String errorMessage = wfex.getErrorMessage()
- int errorCode = wfex.getErrorCode()
-
- String falloutHandlerRequest =
- """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
- xmlns:ns="http://org.openecomp/mso/request/types/v1"
- xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
- ${requestInfo}
- <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
- <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
- <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
- </aetgt:WorkflowException>
- </aetgt:FalloutHandlerRequest>"""
-
- utils.log("DEBUG", processKey + " Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugEnabled)
- utils.log("DEBUG", processKey + " Outgoing FalloutHandler Request is: " + falloutHandlerRequest, isDebugEnabled)
-
- return falloutHandlerRequest
-
- }catch(Exception e){
- utils.log("DEBUG", "Caught Exception during ProcessMainflowBPMNException Method: " + e, isDebugEnabled)
- return null
- }
- utils.log("DEBUG", "Completed ProcessMainflowBPMNException Method", isDebugEnabled)
- }
-
- /**
- *
- * This method is executed after an Java Exception is caught
- * It sets the WorkflowException variable. The method can be used in either mainflow or subflows.
- *
- * @param - execution
- *
- */
- public void processJavaException(Execution execution){
- def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- String processKey = getProcessKey(execution)
- try{
- utils.log("DEBUG", "Caught a Java Exception in " + processKey, isDebugEnabled)
- utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
- buildWorkflowException(execution, 2500, "Catch a Java Lang Exception in " + processKey)
-
- }catch(BpmnError b){
- throw b
- }catch(Exception e){
- utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
- buildWorkflowException(execution, 2500, "Internal Error - During Process Java Exception")
- }
- utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
- }
-
-
- public void preProcessRequest(Execution execution) {
- // TODO Auto-generated method stub
-
- }
-}
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.scripts
+
+import static org.apache.commons.lang3.StringUtils.*
+
+import org.apache.commons.lang3.*
+import org.camunda.bpm.engine.delegate.BpmnError
+import org.camunda.bpm.engine.runtime.Execution
+import org.openecomp.mso.bpmn.core.WorkflowException
+
+/**
+ * @version 1.0
+ */
+class ExceptionUtil extends AbstractServiceTaskProcessor {
+
+
+ /**
+ * This error handling method maps an AAI Exception response to a
+ * WorkflowException Object. It then sets the WorkflowException Object
+ * on the execution as "WorkflowException".
+ *
+ * This method formats the exception from AAI into the WorkflowException's
+ * errorMessage that CCD expects.
+ *
+ * @param execution the execution
+ * @param response the aai exception
+ */
+ WorkflowException MapAAIExceptionToWorkflowException(String response, Execution execution)
+ {
+ def utils=new MsoUtils()
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ def prefix=execution.getVariable("prefix")
+ def errorMsg = execution.getVariable(prefix+"ErrorResponse")
+ utils.log("DEBUG","=========== Begin MapAAIExceptionToWorkflowException ===========",isDebugEnabled)
+ String text = null
+ def variables
+ String errorCode = '5000'
+ WorkflowException wfex
+ utils.log("DEBUG","response: " + response, isDebugEnabled)
+ try{
+ try {
+ //String msg = utils.getNodeXml(response, "Fault")
+ variables = utils.getMultNodes(response, "variable")
+ text = utils.getNodeText1(response, "text")
+ } catch (Exception ex) {
+ //Ignore the exception - cases include non xml payload
+ utils.log("DEBUG","error mapping error, ignoring: " + ex,isDebugEnabled)
+ }
+
+ if(text != null) {
+ if(variables.size()>=4){
+ text = text.replaceFirst("%1", variables[0])
+ text = text.replaceFirst("%2", variables[1])
+ text = text.replaceFirst("%3", variables[2])
+ text = text.replaceFirst("%4", variables[3])
+ }
+ String modifiedErrorMessage = 'Received error from A&amp;AI (' + text +')'
+ utils.log("DEBUG", "ModifiedErrorMessage " + modifiedErrorMessage, isDebugEnabled)
+ // let $ModifiedErrorMessage := concat( 'Received error from A',$exceptionaai:ampersand,'AI (' ,functx:replace-multi($ErrorMessage,$from,$Variables ),')')
+ buildWorkflowException(execution, 5000, modifiedErrorMessage)
+
+ wfex = execution.getVariable("WorkflowException")
+ utils.log("ERROR","Fault:"+ wfex)
+ return wfex
+ } else {
+ try {
+ errorCode = MapErrorCode(errorMsg)
+ String mappedErrorMessage = MapErrorMessage(errorMsg, errorCode)
+
+ int errorCodeInt = Integer.parseInt(errorCode)
+ buildWorkflowException(execution, errorCodeInt, mappedErrorMessage)
+
+ utils.log("DEBUG", "mappedErrorMessage " + mappedErrorMessage, isDebugEnabled)
+ wfex = execution.getVariable("WorkflowException")
+ utils.log("ERROR","Fault:"+ wfex, isDebugEnabled)
+ return wfex
+ } catch(Exception ex) {
+ utils.log("DEBUG","error mapping error, return null: " + ex, isDebugEnabled)
+ return null
+
+ }
+ }
+ }catch(Exception e){
+ utils.log("DEBUG", "Exception occured during MapAAIExceptionToWorkflowException: " + e, isDebugEnabled)
+ buildWorkflowException(execution, 5000, "Error mapping AAI Response to WorkflowException")
+ }
+ }
+
+ /**
+ * This error handling method maps an AAI Exception response to a
+ * WorkflowException Object. It then sets the WorkflowException Object
+ * on the execution as "WorkflowException".
+ *
+ * This method takes the exact exception inside the <Fault> tags from AAI Response
+ * and puts it into the WorkflowException's errorMessage.
+ *
+ * @param execution the execution
+ * @param response the aai exception
+ */
+ WorkflowException MapAAIExceptionToWorkflowExceptionGeneric(Execution execution, String response, int resCode){
+ def utils=new MsoUtils()
+ def isDebugLogEnabled = execution.getVariable("isDebugLogEnabled")
+ utils.log("DEBUG", "Start MapAAIExceptionToWorkflowExceptionGeneric Process", isDebugLogEnabled)
+
+ WorkflowException wfex
+ try {
+ if(utils.nodeExists(response, "Fault")){
+ String fault = utils.getNodeXml(response, "Fault")
+ fault = utils.removeXmlPreamble(fault)
+ fault = fault.replace("<Fault>", "").replace("</Fault>", "")
+ fault = fault.replaceAll("\\s+\\s+", "") // Removes extra white spaces
+ buildWorkflowException(execution, resCode, fault)
+ }else if(utils.nodeExists(response, "RESTFault")){
+ String rFault = utils.getNodeXml(response, "RESTFault")
+ buildWorkflowException(execution, resCode, rFault)
+ }else{
+ buildWorkflowException(execution, resCode, "Received a bad response from AAI")
+ }
+ } catch (Exception ex) {
+ utils.log("DEBUG", "Exception Occured during MapAAIExceptionToWorkflowExceptionGeneric: " + ex, isDebugLogEnabled)
+ buildWorkflowException(execution, resCode, "Internal Error - Occured in MapAAIExceptionToWorkflowExceptionGeneric")
+
+ }
+ utils.log("DEBUG", "Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugLogEnabled)
+ utils.log("DEBUG", "Completed MapAAIExceptionToWorkflowExceptionGeneric Process", isDebugLogEnabled)
+ }
+
+ /**
+ * This method takes a WorkflowException Object and builds
+ * WorkflowException Xml. This method should only be used
+ * for the purpose of sending a sync error response or for
+ * creating a FalloutHandler request.
+ *
+ *@param - WorkflowException Object
+ *
+ *@return - String WorkflowException Xml
+ *
+ *
+ */
+ String buildErrorResponseXml(WorkflowException wfex) {
+ String xml
+ if(wfex != null){
+ String mes = wfex.getErrorMessage()
+ int code = wfex.getErrorCode()
+ xml =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${mes}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>${code}</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+
+ }else{
+ xml =
+ """<aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>Internal Error</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>2500</aetgt:ErrorCode>
+ </aetgt:WorkflowException>"""
+ }
+ return xml
+ }
+
+ /*
+ 5000 Received error from A&AI ($A&AI_ERROR) Asynchronous During orchestration of the recipe, A&AI returned an error. The error returned by A&AI is passed through in $A&AI_ERROR.
+ 5010 Could not communicate with A&AI Asynchronous During orchestration of the recipe, a connection with A&AI could not be established.
+ 5020 No response from A&AI Asynchronous During orchestration of the recipe, communication was established with A&AI, but no response was received within the configured timeout.
+ */
+ /**
+ *
+ * Utility Method for MapAAIExceptionToWorkflowException
+ *
+ *@param - String ErrorMessage
+ *
+ *@return - String ErrorCode
+ *
+ */
+ private String MapErrorCode(String errorMessage)
+ {
+ if(errorMessage==null){
+ return '5000'
+ }
+ errorMessage = errorMessage.toLowerCase();
+ if(errorMessage.contains('timed out') || errorMessage.contains('timeout'))
+ return '5020'
+ else if (errorMessage.contains('connection'))
+ return '5010'
+ else
+ return '5000'
+ }
+
+ /**
+ *
+ * Utility Method for MapAAIExceptionToWorkflowException
+ *
+ *@param - String ErrorMessage
+ *@param - String ErrorCode
+ *
+ *@return - String ErrorMessage
+ *
+ */
+ private String MapErrorMessage(String errorMessage, String errorCode)
+ {
+ if(errorMessage == null){
+ errorMessage=""
+ }
+ if( errorCode.equals('5010')){
+ return 'Could not communicate with A&amp;AI'
+ }else if (errorCode.equals('5020')){
+ return 'No response from A&amp;AI'
+ }else{
+ errorMessage = errorMessage.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+ return 'Received error from A&amp;AI (' +errorMessage +')'
+ }
+ }
+
+ /**
+ *
+ * Utility Method for Mapping SDNC
+ * Adapter Response Codes
+ *
+ *@param - String sdncResponseCode
+ *
+ *@return - String code
+ *
+ */
+ String MapSDNCResponseCodeToErrorCode(String sdncResponseCode)
+ {
+ if (sdncResponseCode == '500') {
+ return '5310'
+ } else if ( sdncResponseCode == '408') {
+ return '5320'
+ } else if ( sdncResponseCode == '60010') {
+ return '5350'
+ } else {
+ return '5300'
+ }
+ }
+
+ /**
+ * This error handling method builds a WorkflowException Object. It sets it on
+ * the execution as "WorkflowException".
+ *
+ * @param execution the execution
+ * @param errorCode the error code
+ * @param errorMessage the error message
+ */
+ public void buildWorkflowException(Execution execution, int errorCode, String errorMessage) {
+ MsoUtils utils = new MsoUtils()
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ String processKey = getProcessKey(execution);
+ utils.log("DEBUG", "Building a WorkflowException for " + processKey, isDebugLogEnabled)
+
+ WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage);
+ execution.setVariable("WorkflowException", exception);
+ utils.log("DEBUG", "Outgoing WorkflowException is " + exception, isDebugLogEnabled)
+ }
+
+ /**
+ * This error handling method builds a WorkflowException Object and throws a
+ * MSOWorkflowException. It throws a "MSOWorkflowException" BpmnError after
+ * setting the WorkflowException Object on the execution as "WorkflowException".
+ *
+ * @param execution the execution
+ * @param errorCode the error code
+ * @param errorMessage the error message
+ */
+ public void buildAndThrowWorkflowException(Execution execution, int errorCode, String errorMessage) {
+ def isDebugLogEnabled = execution.getVariable('isDebugLogEnabled')
+ String processKey = getProcessKey(execution);
+ utils.log("Building a WorkflowException for Subflow " + processKey, isDebugLogEnabled)
+
+ WorkflowException exception = new WorkflowException(processKey, errorCode, errorMessage);
+ execution.setVariable("WorkflowException", exception);
+ utils.log("DEBUG", "Outgoing WorkflowException is " + exception, isDebugLogEnabled)
+ utils.log("DEBUG", "Throwing MSOWorkflowException", isDebugLogEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+
+ /**
+ * This method is executed after an MSOWorkflowException is caught by a
+ * subflow (during subflows "Error Handling Sub Process").
+ * It ensures the WorkflowException variable is populated before ending the
+ * subflow and also logs the subflows outgoing WorkflowException Variable.
+ *
+ * @param - execution
+ *
+ */
+ public void processSubflowsBPMNException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ String processKey = getProcessKey(execution)
+ try{
+ utils.log("DEBUG", "Started ProcessSubflowsBPMNException Method", isDebugEnabled)
+ if(execution.getVariable("WorkflowException") == null){
+ buildWorkflowException(execution, 2500, "Internal Error - Occured During " + processKey)
+ }
+
+ utils.log("DEBUG", processKey + " Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugEnabled)
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during ProcessSubflowsBPMNException Method: " + e, isDebugEnabled)
+ }
+ utils.log("DEBUG", "Completed ProcessSubflowsBPMNException Method", isDebugEnabled)
+ }
+
+ /**
+ * This method is executed after an MSOWorkflowException is caught by a
+ * Mainflow. It builds and returns a FalloutHandler Request. It also
+ * verifies the WorkflowException variable is populated.
+ *
+ * @param - execution
+ * @param - requestInfo
+ *
+ * @return - falloutHandlerRequest
+ *
+ */
+ public String processMainflowsBPMNException(Execution execution, String requestInfo){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ String processKey = getProcessKey(execution)
+ try{
+ utils.log("DEBUG", "Started ProcessMainflowBPMNException Method", isDebugEnabled)
+ if(execution.getVariable("WorkflowException") == null || isBlank(requestInfo)){
+ buildWorkflowException(execution, 2500, "Internal Error - WorkflowException Object and/or RequestInfo is null! " + processKey)
+ }
+ requestInfo = utils.removeXmlPreamble(requestInfo)
+ WorkflowException wfex = execution.getVariable("WorkflowException")
+ String errorMessage = wfex.getErrorMessage()
+ int errorCode = wfex.getErrorCode()
+
+ String falloutHandlerRequest =
+ """<aetgt:FalloutHandlerRequest xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1"
+ xmlns:ns="http://org.openecomp/mso/request/types/v1"
+ xmlns:wfsch="http://org.openecomp/mso/workflow/schema/v1">
+ ${requestInfo}
+ <aetgt:WorkflowException xmlns:aetgt="http://org.openecomp/mso/workflow/schema/v1">
+ <aetgt:ErrorMessage>${errorMessage}</aetgt:ErrorMessage>
+ <aetgt:ErrorCode>${errorCode}</aetgt:ErrorCode>
+ </aetgt:WorkflowException>
+ </aetgt:FalloutHandlerRequest>"""
+
+ utils.log("DEBUG", processKey + " Outgoing WorkflowException is: " + execution.getVariable("WorkflowException"), isDebugEnabled)
+ utils.log("DEBUG", processKey + "Completed ProcessMainflowBPMNException Outgoing FalloutHandler Request is: " + falloutHandlerRequest, isDebugEnabled)
+ return falloutHandlerRequest
+
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during ProcessMainflowBPMNException Method: " + e, isDebugEnabled)
+ return null
+ }
+ }
+
+ /**
+ *
+ * This method is executed after an Java Exception is caught
+ * It sets the WorkflowException variable. The method can be used in either mainflow or subflows.
+ *
+ * @param - execution
+ *
+ */
+ public void processJavaException(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ String processKey = getProcessKey(execution)
+ try{
+ utils.log("DEBUG", "Caught a Java Exception in " + processKey, isDebugEnabled)
+ utils.log("DEBUG", "Started processJavaException Method", isDebugEnabled)
+ buildWorkflowException(execution, 2500, "Catch a Java Lang Exception in " + processKey)
+
+ }catch(BpmnError b){
+ throw b
+ }catch(Exception e){
+ utils.log("DEBUG", "Caught Exception during processJavaException Method: " + e, isDebugEnabled)
+ buildWorkflowException(execution, 2500, "Internal Error - During Process Java Exception")
+ }
+ utils.log("DEBUG", "Completed processJavaException Method", isDebugEnabled)
+ }
+
+
+ public void preProcessRequest(Execution execution) {
+ // TODO Auto-generated method stub
+
+ }
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/BpmnParam.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/BpmnParam.java
new file mode 100644
index 0000000000..f4ebd0615a
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/BpmnParam.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.recipe;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The bpmn workflow input param object
+ */
+public class BpmnParam {
+
+ @JsonProperty("value")
+ private String value;
+ @JsonProperty("type")
+ private String type = "String";
+
+
+ public BpmnParam() {
+ /* Empty constructor */
+ }
+
+ @JsonProperty("value")
+ public String getValue() {
+ return value;
+ }
+
+ @JsonProperty("type")
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public String toString() {
+ return "CamundaInput [value=" + value + ", type=" + type + "]";
+ }
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/BpmnRestClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/BpmnRestClient.java
new file mode 100644
index 0000000000..446de10ee2
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/BpmnRestClient.java
@@ -0,0 +1,219 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.recipe;
+
+import java.io.IOException;
+import java.security.GeneralSecurityException;
+
+import javax.xml.bind.DatatypeConverter;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
+import org.openecomp.mso.properties.MsoJavaProperties;
+import org.openecomp.mso.properties.MsoPropertiesFactory;
+import org.openecomp.mso.utils.CryptoUtils;
+
+/**
+ * Support to call resource recipes from the BPMN workflow.
+ * Such as call resource recipe in service workflow.
+ * <br>
+ * <p>
+ * </p>
+ *
+ * @author
+ * @version ONAP Beijing Release 2018-02-27
+ */
+public class BpmnRestClient {
+
+ public static final String DEFAULT_BPEL_AUTH = "admin:admin";
+
+ public static final String ENCRYPTION_KEY = "aa3871669d893c7fb8abbcda31b88b4f";
+
+ public static final String CONTENT_TYPE_JSON = "application/json";
+
+ public static final String CAMUNDA_AUTH = "camundaAuth";
+
+ private final static String MSO_PROP_APIHANDLER_INFRA = "MSO_PROP_APIHANDLER_INFRA";
+
+ private static MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory();
+
+ private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL);
+
+ private static boolean noProperties = true;
+
+ public synchronized static MsoJavaProperties loadMsoProperties() {
+ MsoJavaProperties msoProperties;
+ try {
+ msoProperties = msoPropertiesFactory.getMsoJavaProperties(MSO_PROP_APIHANDLER_INFRA);
+ } catch(Exception e) {
+ msoLogger.error(MessageEnum.APIH_LOAD_PROPERTIES_FAIL, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.DataError,
+ "Exception when loading MSO Properties", e);
+ return null;
+ }
+
+ if(msoProperties != null && msoProperties.size() > 0) {
+ noProperties = false;
+ msoLogger.info(MessageEnum.APIH_PROPERTY_LOAD_SUC, "", "");
+ return msoProperties;
+ } else {
+ msoLogger.error(MessageEnum.APIH_NO_PROPERTIES, MSO_PROP_APIHANDLER_INFRA, "", "", MsoLogger.ErrorCode.DataError,
+ "No MSO APIH_INFRA Properties found");
+ return null;
+ }
+ }
+
+ public synchronized static final boolean getNoPropertiesState() {
+ return noProperties;
+ }
+
+ /**
+ * post the recipe Uri
+ * <br>
+ *
+ * @param recipeUri The request recipe uri
+ * @param requestId the request id
+ * @param recipeTimeout The recipe time out
+ * @param requestAction The request action
+ * @param serviceInstanceId The service instance id
+ * @param serviceType The service Type
+ * @param requestDetails The request Details, these information is from runtime
+ * @param recipeParamXsd The recipe params, its from recipe design
+ * @return The response of the recipe.
+ * @throws ClientProtocolException
+ * @throws IOException
+ * @since ONAP Beijing Release
+ */
+ public static HttpResponse post(String recipeUri, String requestId, int recipeTimeout, String requestAction, String serviceInstanceId, String serviceType,
+ String requestDetails, String recipeParamXsd) throws ClientProtocolException, IOException {
+
+ HttpClient client = HttpClientBuilder.create().build();
+
+ HttpPost post = new HttpPost(recipeUri);
+ MsoJavaProperties props = loadMsoProperties();
+ RequestConfig requestConfig =
+ RequestConfig.custom().setSocketTimeout(recipeTimeout).setConnectTimeout(recipeTimeout).setConnectionRequestTimeout(recipeTimeout).build();
+ post.setConfig(requestConfig);
+ msoLogger.debug("call the bpmn, url:" + recipeUri);
+ String jsonReq = wrapResourceRequest(requestId, recipeTimeout, requestAction, serviceInstanceId, serviceType, requestDetails, recipeParamXsd);
+
+ StringEntity input = new StringEntity(jsonReq);
+ input.setContentType(CONTENT_TYPE_JSON);
+ String encryptedCredentials;
+ if(props != null) {
+ encryptedCredentials = props.getProperty(CAMUNDA_AUTH, null);
+ if(encryptedCredentials != null) {
+ String userCredentials = getEncryptedPropValue(encryptedCredentials, DEFAULT_BPEL_AUTH, ENCRYPTION_KEY);
+ if(userCredentials != null) {
+ post.addHeader("Authorization", "Basic " + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));
+ }
+ }
+ }
+ post.setEntity(input);
+ return client.execute(post);
+ }
+
+ /**
+ * prepare the resource recipe bpmn request.
+ * <br>
+ *
+ * @param requestId
+ * @param recipeTimeout
+ * @param requestAction
+ * @param serviceInstanceId
+ * @param serviceType
+ * @param requestDetails
+ * @param recipeParams
+ * @return
+ * @since ONAP Beijing Release
+ */
+ private static String wrapResourceRequest(String requestId, int recipeTimeout, String requestAction, String serviceInstanceId, String serviceType,
+ String requestDetails, String recipeParams) {
+ String jsonReq = null;
+ if(requestId == null) {
+ requestId = "";
+ }
+ if(requestAction == null) {
+ requestAction = "";
+ }
+ if(serviceInstanceId == null) {
+ serviceInstanceId = "";
+ }
+
+ if(requestDetails == null) {
+ requestDetails = "";
+ }
+
+ try {
+ ResourceRecipeRequest recipeRequest = new ResourceRecipeRequest();
+ BpmnParam resourceInput = new BpmnParam();
+ BpmnParam host = new BpmnParam();
+ BpmnParam requestIdInput = new BpmnParam();
+ BpmnParam requestActionInput = new BpmnParam();
+ BpmnParam serviceInstanceIdInput = new BpmnParam();
+ BpmnParam serviceTypeInput = new BpmnParam();
+ BpmnParam recipeParamsInput = new BpmnParam();
+ // host.setValue(parseURL());
+ requestIdInput.setValue(requestId);
+ requestActionInput.setValue(requestAction);
+ serviceInstanceIdInput.setValue(serviceInstanceId);
+ recipeParamsInput.setValue(recipeParams);
+ resourceInput.setValue(requestDetails);
+ recipeRequest.setHost(host);
+ recipeRequest.setRequestId(requestIdInput);
+ recipeRequest.setRequestAction(requestActionInput);
+ recipeRequest.setServiceInstanceId(serviceInstanceIdInput);
+ recipeRequest.setServiceType(serviceTypeInput);
+ recipeRequest.setRecipeParams(recipeParamsInput);
+ jsonReq = recipeRequest.toString();
+ msoLogger.debug("request body is " + jsonReq);
+ } catch(Exception e) {
+ msoLogger.error(MessageEnum.APIH_WARP_REQUEST, "Camunda", "wrapVIDRequest", MsoLogger.ErrorCode.BusinessProcesssError, "Error in APIH Warp request",
+ e);
+ }
+ return jsonReq;
+ }
+
+ /**
+ * <br>
+ *
+ * @param prop
+ * @param defaultValue
+ * @param encryptionKey
+ * @return
+ * @since ONAP Beijing Release
+ */
+ protected static String getEncryptedPropValue(String prop, String defaultValue, String encryptionKey) {
+ try {
+ return CryptoUtils.decrypt(prop, encryptionKey);
+ } catch(GeneralSecurityException e) {
+ msoLogger.debug("Security exception", e);
+ }
+ return defaultValue;
+ }
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceRecipeRequest.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceRecipeRequest.java
new file mode 100644
index 0000000000..5bf5a02a38
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/recipe/ResourceRecipeRequest.java
@@ -0,0 +1,143 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.common.recipe;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+
+/**
+ * java object of the resource recipe , it
+ * will be passed to the Camunda process
+ */
+@JsonPropertyOrder({"resourceInput", "host", "requestId", "requestAction", "serviceInstanceId", "serviceType", "recipeParams"})
+@JsonRootName("variables")
+public class ResourceRecipeRequest {
+
+ @JsonProperty("resourceInput")
+ private BpmnParam resourceInput;
+
+ @JsonProperty("host")
+ private BpmnParam host;
+
+ @JsonProperty("requestId")
+ private BpmnParam requestId;
+
+ @JsonProperty("requestAction")
+ private BpmnParam requestAction;
+
+ @JsonProperty("serviceInstanceId")
+ private BpmnParam serviceInstanceId;
+
+ @JsonProperty("serviceType")
+ private BpmnParam serviceType;
+
+ @JsonProperty("recipeParams")
+ private BpmnParam recipeParams;
+
+ @JsonProperty("resourceInput")
+ public BpmnParam getResourceInput() {
+ return resourceInput;
+ }
+
+ @JsonProperty("resourceInput")
+ public void setResourceInput(BpmnParam resourceInput) {
+ this.resourceInput = resourceInput;
+ }
+
+ @JsonProperty("host")
+ public BpmnParam getHost() {
+ return host;
+ }
+
+ @JsonProperty("host")
+ public void setHost(BpmnParam host) {
+ this.host = host;
+ }
+
+ @JsonProperty("requestId")
+ public BpmnParam getRequestId() {
+ return requestId;
+ }
+
+ @JsonProperty("requestId")
+ public void setRequestId(BpmnParam requestId) {
+ this.requestId = requestId;
+ }
+
+ @JsonProperty("requestAction")
+ public BpmnParam getRequestAction() {
+ return requestAction;
+ }
+
+ @JsonProperty("requestAction")
+ public void setRequestAction(BpmnParam requestAction) {
+ this.requestAction = requestAction;
+ }
+
+ @JsonProperty("serviceInstanceId")
+ public BpmnParam getServiceInstanceId() {
+ return serviceInstanceId;
+ }
+
+ @JsonProperty("serviceInstanceId")
+ public void setServiceInstanceId(BpmnParam serviceInstanceId) {
+ this.serviceInstanceId = serviceInstanceId;
+ }
+
+ @JsonProperty("serviceType")
+ public BpmnParam getServiceType() {
+ return serviceType;
+ }
+
+ @JsonProperty("serviceType")
+ public void setServiceType(BpmnParam serviceType) {
+ this.serviceType = serviceType;
+ }
+
+ @JsonProperty("recipeParams")
+ public BpmnParam getRecipeParams() {
+ return recipeParams;
+ }
+
+ @JsonProperty("recipeParams")
+ public void setRecipeParams(BpmnParam recipeParams) {
+ this.recipeParams = recipeParams;
+ }
+
+ @Override
+ public String toString() {
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
+ String jsonStr = "ResourceRecipeRequest";
+ try {
+ jsonStr = mapper.writeValueAsString(this);
+ } catch(JsonProcessingException e) {
+
+ e.printStackTrace();
+ }
+ return jsonStr;
+ }
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/HomingTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/HomingTest.java
index 4296c74392..3210fe8fc7 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/HomingTest.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/HomingTest.java
@@ -23,7 +23,7 @@
*/
package org.openecomp.mso.bpmn.common;
-import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.MockGetServiceResourcesCatalogData;
+import static org.openecomp.mso.bpmn.mock.StubResponseDatabase.MockGetServiceResourcesCatalogDataByModelUuid;
import static org.openecomp.mso.bpmn.mock.StubResponseSNIRO.*;
import static org.junit.Assert.*;
@@ -235,7 +235,8 @@ public class HomingTest extends WorkflowTest {
// Create a Service Decomposition
//System.out.println("At start of testHoming_success_vnfResourceList");
- MockGetServiceResourcesCatalogData("1cc4e2e4-eb6e-404d-a66f-c8733cedcce8", "5.0", "/BuildingBlocks/catalogResp.json");
+ MockGetServiceResourcesCatalogDataByModelUuid("2f7f309d-c842-4644-a2e4-34167be5eeb4", "/BuildingBlocks/catalogResp.json");
+ //MockGetServiceResourcesCatalogData("1cc4e2e4-eb6e-404d-a66f-c8733cedcce8", "5.0", "/BuildingBlocks/catalogResp.json");
String busKey = UUID.randomUUID().toString();
Map<String, Object> vars = new HashMap<>();
setVariablesForServiceDecomposition(vars, "testRequestId123", "ff5256d2-5a33-55df-13ab-12abad84e7ff");
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/StubResponseDatabase.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/StubResponseDatabase.java
index c9f64d9b26..ffa6701a89 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/StubResponseDatabase.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/StubResponseDatabase.java
@@ -98,5 +98,13 @@ public class StubResponseDatabase {
.withBodyFile(responseFile)));
}
+ public static void MockGetServiceResourcesCatalogDataByModelUuid(String serviceModelUuid, String responseFile){
+ stubFor(get(urlEqualTo("/v2/serviceResources?serviceModelUuid=" + serviceModelUuid))
+ .willReturn(aResponse()
+ .withStatus(200)
+ .withHeader("Content-Type", "application/json")
+ .withBodyFile(responseFile)));
+ }
+
}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java
index 64068d2b90..b65034432d 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java
@@ -54,12 +54,8 @@ public class RollbackData implements Serializable {
* @param value the value
*/
public void put(String type, String key, String value) {
- Map<String, Serializable> mapForType = dictionary.get(type);
-
- if (mapForType == null) {
- mapForType = new HashMap<String, Serializable>();
- dictionary.put(type, mapForType);
- }
+ Map<String, Serializable> mapForType = dictionary
+ .computeIfAbsent(type, k -> new HashMap<String, Serializable>());
mapForType.put(key, value);
}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
index ef2388fe44..cfdc0e9bfa 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
@@ -176,7 +176,47 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
}
utils.log("INFO"," ***** Exit preProcessRequest *****", isDebugEnabled)
}
+
+ public void prepareDecomposeService(Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ try {
+ utils.log("DEBUG", " ***** Inside prepareDecomposeService of create generic e2e service ***** ", isDebugEnabled)
+ String modelInvariantUuid = execution.getVariable("modelInvariantUuid")
+ String modelUuid = execution.getVariable("modelUuid")
+ //here modelVersion is not set, we use modelUuid to decompose the service.
+ String serviceModelInfo = """{
+ "modelInvariantUuid":"${modelInvariantUuid}",
+ "modelUuid":"${modelUuid}",
+ "modelVersion":""
+ }"""
+ execution.setVariable("serviceModelInfo", serviceModelInfo)
+ utils.log("DEBUG", " ***** Completed prepareDecomposeService of create generic e2e service ***** ", isDebugEnabled)
+ } catch (Exception ex) {
+ // try error in method block
+ String exceptionMessage = "Bpmn error encountered in create generic e2e service flow. Unexpected Error from method prepareDecomposeService() - " + ex.getMessage()
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void processDecomposition (Execution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+
+ utils.log("DEBUG", " ***** Inside processDecomposition() of create generic e2e service flow ***** ", isDebugEnabled)
+ try {
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ } catch (Exception ex) {
+ String exceptionMessage = "Bpmn error encountered in create generic e2e service flow. processDecomposition() - " + ex.getMessage()
+ utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
+ }
+ }
+
+ public void doServiceHoming(Execution execution) {
+ //Now Homing is not clear. So to be implemented.
+ }
+
public void postProcessAAIGET(Execution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
utils.log("INFO"," ***** postProcessAAIGET ***** ", isDebugEnabled)
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
index 0849c46b20..ddc87c7d55 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
@@ -2,19 +2,17 @@
<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:process id="DoCreateE2EServiceInstanceV3" name="DoCreateE2EServiceInstanceV3" isExecutable="true">
<bpmn2:startEvent id="createSI_startEvent" name="Start Flow">
- <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1qiiycn</bpmn2:outgoing>
</bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="createSI_startEvent" targetRef="preProcessRequest_ScriptTask" />
<bpmn2:scriptTask id="preProcessRequest_ScriptTask" name="PreProcess Incoming Request" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
+ <bpmn2:incoming>SequenceFlow_1qiiycn</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0w9t6tc</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def dcsi = new DoCreateE2EServiceInstance()
dcsi.preProcessRequest(execution)
]]></bpmn2:script>
</bpmn2:scriptTask>
<bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="CustomE2EGetService" targetRef="ScriptTask_0i8cqdy" />
- <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="preProcessRequest_ScriptTask" targetRef="CustomE2EGetService" />
<bpmn2:callActivity id="CustomE2EGetService" name="Call Custom E2E Get Service" calledElement="CustomE2EGetService">
<bpmn2:extensionElements>
<camunda:in source="serviceInstanceName" target="GENGS_serviceInstanceName" />
@@ -25,7 +23,7 @@ dcsi.preProcessRequest(execution)
<camunda:out source="WorkflowException" target="WorkflowException" />
<camunda:in source="serviceType" target="GENGS_serviceType" />
</bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1i7t9hq</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
</bpmn2:callActivity>
<bpmn2:callActivity id="CustomE2EPutService" name="Call Custom E2E Put Service" calledElement="CustomE2EPutService">
@@ -93,49 +91,24 @@ dcsi.postProcessAAIGET(execution)]]></bpmn2:script>
<bpmn2:sequenceFlow id="SequenceFlow_1w01tqs" sourceRef="ScriptTask_0i8cqdy" targetRef="CustomE2EPutService" />
<bpmn2:scriptTask id="ScriptTask_0q37vn9" name="Post Process AAI PUT" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_129ih1g</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_03fabby</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1tkgqu3</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def ddsi = new DoCreateE2EServiceInstance()
ddsi.postProcessAAIPUT(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:scriptTask id="ScriptTask_0wvq4t8" name="Prepare Resource Request for NS" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1q1d7d9</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_15zgrcq</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-def csi = new DoCreateE2EServiceInstance()
-csi.preResourceRequest(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:callActivity id="CallActivity_0uwm4l1" name="Call DoCreateVFCNetworkServiceInstance For NS" calledElement="DoCreateVFCNetworkServiceInstance">
- <bpmn2:extensionElements>
- <camunda:in source="nsServiceName" target="nsServiceName" />
- <camunda:in source="nsServiceDescription" target="nsServiceDescription" />
- <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
- <camunda:in source="serviceType" target="serviceType" />
- <camunda:in source="serviceId" target="serviceId" />
- <camunda:in source="operationId" target="operationId" />
- <camunda:in source="resourceType" target="resourceType" />
- <camunda:in source="resourceUUID" target="resourceUUID" />
- <camunda:in source="resourceParameters" target="resourceParameters" />
- <camunda:in source="operationType" target="operationType" />
- </bpmn2:extensionElements>
- <bpmn2:incoming>SequenceFlow_15zgrcq</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1aya35q</bpmn2:outgoing>
- </bpmn2:callActivity>
<bpmn2:scriptTask id="ScriptTask_1xdjlzm" name="Post Config Service Instance Creation" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_0lt42ul</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_092ghvu</bpmn2:outgoing>
+ <bpmn2:incoming>SequenceFlow_16nxl6h</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0vbznai</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def csi = new DoCreateE2EServiceInstance()
csi.postConfigRequest(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_15zgrcq" sourceRef="ScriptTask_0wvq4t8" targetRef="CallActivity_0uwm4l1" />
- <bpmn2:sequenceFlow id="SequenceFlow_092ghvu" sourceRef="ScriptTask_1xdjlzm" targetRef="EndEvent_0kbbt94" />
<bpmn2:endEvent id="EndEvent_0kbbt94">
- <bpmn2:incoming>SequenceFlow_092ghvu</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_0vbznai</bpmn2:incoming>
</bpmn2:endEvent>
<bpmn2:sequenceFlow id="SequenceFlow_1qctzm0" sourceRef="Task_0uiekmn" targetRef="Task_0raqlqc" />
<bpmn2:scriptTask id="Task_0uiekmn" name="Prepare Resource Oper Status" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_03fabby</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1hbesp9</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1qctzm0</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def ddsi = new DoCreateE2EServiceInstance()
@@ -164,29 +137,11 @@ ddsi.preInitResourcesOperStatus(execution)]]></bpmn2:script>
<bpmn2:outgoing>SequenceFlow_10reo7r</bpmn2:outgoing>
</bpmn2:serviceTask>
<bpmn2:serviceTask id="Task_0io5qby" name="Call Sync SDNC service Create " camunda:class="org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.SdncServiceTopologyOperationTask">
- <bpmn2:incoming>SequenceFlow_1limzcd</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_1vprtt9</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_11f2zuu</bpmn2:outgoing>
</bpmn2:serviceTask>
- <bpmn2:scriptTask id="Task_0pkhzoj" name="Prepare Resource Request For WAN" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_10q9kus</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_17i1ors</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
-def csi = new DoCreateE2EServiceInstance()
-csi.preResourceRequest(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:serviceTask id="Task_0gs55f1" name="Call WAN Create" camunda:class="org.openecomp.mso.bpmn.infrastructure.workflow.serviceTask.SdncNetworkTopologyOperationTask">
- <bpmn2:incoming>SequenceFlow_17i1ors</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_02svciv</bpmn2:outgoing>
- </bpmn2:serviceTask>
- <bpmn2:sequenceFlow id="SequenceFlow_03fabby" sourceRef="ScriptTask_0q37vn9" targetRef="Task_0uiekmn" />
- <bpmn2:sequenceFlow id="SequenceFlow_17i1ors" sourceRef="Task_0pkhzoj" targetRef="Task_0gs55f1" />
<bpmn2:sequenceFlow id="SequenceFlow_10reo7r" sourceRef="Task_0raqlqc" targetRef="ScriptTask_1y0los4" />
- <bpmn2:exclusiveGateway id="ExclusiveGateway_1gzdeq0" name="Check Current Resource">
- <bpmn2:incoming>SequenceFlow_04d3qcu</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_10q9kus</bpmn2:outgoing>
- <bpmn2:outgoing>SequenceFlow_1q1d7d9</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_11f2zuu" sourceRef="Task_0io5qby" targetRef="ScriptTask_0l4nkqr" />
+ <bpmn2:sequenceFlow id="SequenceFlow_11f2zuu" sourceRef="Task_0io5qby" targetRef="IntermediateThrowEvent_0f2w7aj" />
<bpmn2:scriptTask id="ScriptTask_1y0los4" name="Sequence Resource" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_10reo7r</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_13d9g1n</bpmn2:outgoing>
@@ -197,362 +152,526 @@ ddsi.sequenceResoure(execution)]]></bpmn2:script>
<bpmn2:sequenceFlow id="SequenceFlow_13d9g1n" sourceRef="ScriptTask_1y0los4" targetRef="ExclusiveGateway_07rr3wp" />
<bpmn2:exclusiveGateway id="ExclusiveGateway_0n9y4du" name="All ResourceFinished?">
<bpmn2:incoming>SequenceFlow_1jenxlp</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_0lt42ul</bpmn2:outgoing>
<bpmn2:outgoing>SequenceFlow_0q6uy30</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_16nxl6h</bpmn2:outgoing>
</bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_0lt42ul" name="yes" sourceRef="ExclusiveGateway_0n9y4du" targetRef="ScriptTask_1xdjlzm">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("allResourceFinished" ) == "true" )}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="SequenceFlow_0q6uy30" name="no" sourceRef="ExclusiveGateway_0n9y4du" targetRef="ScriptTask_0l4nkqr">
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("allResourceFinished" ) == "false" )}]]></bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
<bpmn2:scriptTask id="ScriptTask_0y4u2ty" name="Parse Next Resource" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1aya35q</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_02svciv</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_13c7bhn</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1jenxlp</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def ddsi = new DoCreateE2EServiceInstance()
ddsi.parseNextResource(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_1aya35q" sourceRef="CallActivity_0uwm4l1" targetRef="ScriptTask_0y4u2ty" />
- <bpmn2:sequenceFlow id="SequenceFlow_02svciv" sourceRef="Task_0gs55f1" targetRef="ScriptTask_0y4u2ty" />
<bpmn2:sequenceFlow id="SequenceFlow_1jenxlp" sourceRef="ScriptTask_0y4u2ty" targetRef="ExclusiveGateway_0n9y4du" />
<bpmn2:scriptTask id="ScriptTask_0l4nkqr" name="Get Current Resource" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_11f2zuu</bpmn2:incoming>
<bpmn2:incoming>SequenceFlow_0q6uy30</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_18wj44x</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_04d3qcu</bpmn2:outgoing>
+ <bpmn2:incoming>SequenceFlow_1qozd66</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0uiygod</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def ddsi = new DoCreateE2EServiceInstance()
ddsi.getCurrentResoure(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_1q1d7d9" name="VF-C" sourceRef="ExclusiveGateway_1gzdeq0" targetRef="ScriptTask_0wvq4t8">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("controllerInfo" ) == "VF-C" )}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_10q9kus" name="SDN-C" sourceRef="ExclusiveGateway_1gzdeq0" targetRef="Task_0pkhzoj">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("controllerInfo" ) == "SDN-C" )}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_04d3qcu" sourceRef="ScriptTask_0l4nkqr" targetRef="ExclusiveGateway_1gzdeq0" />
<bpmn2:exclusiveGateway id="ExclusiveGateway_07rr3wp" name="Is SDN-C Service Needed">
<bpmn2:incoming>SequenceFlow_13d9g1n</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_1limzcd</bpmn2:outgoing>
<bpmn2:outgoing>SequenceFlow_18wj44x</bpmn2:outgoing>
+ <bpmn2:outgoing>SequenceFlow_1vprtt9</bpmn2:outgoing>
</bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_1limzcd" name="yes" sourceRef="ExclusiveGateway_07rr3wp" targetRef="Task_0io5qby">
+ <bpmn2:sequenceFlow id="SequenceFlow_18wj44x" name="no" sourceRef="ExclusiveGateway_07rr3wp" targetRef="IntermediateThrowEvent_0f2w7aj">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("isContainsWanResource" ) == "false" )}]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:scriptTask id="Task_0qlkmvt" name="Prepare resource recipe Request" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0uiygod</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1u9k0dm</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def ddsi = new DoCreateE2EServiceInstance()
+ddsi.prepareResourceRecipeRequest(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:scriptTask id="Task_12ghoph" name="Execute Resource Recipe">
+ <bpmn2:incoming>SequenceFlow_1u9k0dm</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_13c7bhn</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def ddsi = new DoCreateE2EServiceInstance()
+ddsi.executeResourceRecipe(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0bq4fxs" name="Go to Decompose_Service">
+ <bpmn2:incoming>SequenceFlow_0w9t6tc</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="Decompose_Service" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_1mlbhmt" name="GoTo StartService">
+ <bpmn2:incoming>SequenceFlow_1gusrvp</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="StartService" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:scriptTask id="ScriptTask_1o01d7d" name="PostProcess&#10;Decompose&#10;Service&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_0xjwb45</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_027owbf</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcsi= new DoCreateE2EServiceInstance()
+dcsi.processDecomposition(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:callActivity id="CallActivity_0biblpc" name="Call Decompose Service" calledElement="DecomposeService">
+ <bpmn2:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="serviceDecomposition" target="serviceDecomposition" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>SequenceFlow_0qxzgvq</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0xjwb45</bpmn2:outgoing>
+ </bpmn2:callActivity>
+ <bpmn2:scriptTask id="ScriptTask_1cllqk3" name="Prepare&#10;Decompose&#10;Service&#10;" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_166w91p</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_0qxzgvq</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcsi= new DoCreateE2EServiceInstance()
+dcsi.prepareDecomposeService(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_0tv85pg" name="Decompose_Service">
+ <bpmn2:outgoing>SequenceFlow_166w91p</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="Decompose_Service" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_027owbf" sourceRef="ScriptTask_1o01d7d" targetRef="Task_0ush1g4" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0xjwb45" sourceRef="CallActivity_0biblpc" targetRef="ScriptTask_1o01d7d" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0qxzgvq" sourceRef="ScriptTask_1cllqk3" targetRef="CallActivity_0biblpc" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1qiiycn" sourceRef="createSI_startEvent" targetRef="preProcessRequest_ScriptTask" />
+ <bpmn2:sequenceFlow id="SequenceFlow_166w91p" sourceRef="IntermediateCatchEvent_0tv85pg" targetRef="ScriptTask_1cllqk3" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_16okck2" name="GoTo StartPrepareResource">
+ <bpmn2:incoming>SequenceFlow_1tkgqu3</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="StartPrepareResource" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1tkgqu3" sourceRef="ScriptTask_0q37vn9" targetRef="IntermediateThrowEvent_16okck2" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0w9t6tc" sourceRef="preProcessRequest_ScriptTask" targetRef="IntermediateThrowEvent_0bq4fxs" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_0jrb3xu" name="StartService">
+ <bpmn2:outgoing>SequenceFlow_1i7t9hq</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartService" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1i7t9hq" sourceRef="IntermediateCatchEvent_0jrb3xu" targetRef="CustomE2EGetService" />
+ <bpmn2:intermediateThrowEvent id="IntermediateThrowEvent_0f2w7aj" name="GoTo ResourceLoop">
+ <bpmn2:incoming>SequenceFlow_18wj44x</bpmn2:incoming>
+ <bpmn2:incoming>SequenceFlow_11f2zuu</bpmn2:incoming>
+ <bpmn2:linkEventDefinition name="ResourceLoop" />
+ </bpmn2:intermediateThrowEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1vprtt9" name="yes" sourceRef="ExclusiveGateway_07rr3wp" targetRef="Task_0io5qby">
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("isContainsWanResource" ) == "true" )}]]></bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="SequenceFlow_18wj44x" name="no" sourceRef="ExclusiveGateway_07rr3wp" targetRef="ScriptTask_0l4nkqr">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("isContainsWanResource" ) == "false" )}]]></bpmn2:conditionExpression>
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_05dus9b" name="StartPrepareResource">
+ <bpmn2:outgoing>SequenceFlow_1hbesp9</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="StartPrepareResource" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_1hbesp9" sourceRef="IntermediateCatchEvent_05dus9b" targetRef="Task_0uiekmn" />
+ <bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_02bah5m" name="ResourceLoop">
+ <bpmn2:outgoing>SequenceFlow_1qozd66</bpmn2:outgoing>
+ <bpmn2:linkEventDefinition name="ResourceLoop" />
+ </bpmn2:intermediateCatchEvent>
+ <bpmn2:sequenceFlow id="SequenceFlow_16nxl6h" name="yes" sourceRef="ExclusiveGateway_0n9y4du" targetRef="ScriptTask_1xdjlzm">
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{(execution.getVariable("allResourceFinished" ) == "true" )}]]></bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="SequenceFlow_0uiygod" sourceRef="ScriptTask_0l4nkqr" targetRef="Task_0qlkmvt" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1u9k0dm" sourceRef="Task_0qlkmvt" targetRef="Task_12ghoph" />
+ <bpmn2:sequenceFlow id="SequenceFlow_13c7bhn" sourceRef="Task_12ghoph" targetRef="ScriptTask_0y4u2ty" />
+ <bpmn2:sequenceFlow id="SequenceFlow_0vbznai" sourceRef="ScriptTask_1xdjlzm" targetRef="EndEvent_0kbbt94" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1qozd66" sourceRef="IntermediateCatchEvent_02bah5m" targetRef="ScriptTask_0l4nkqr" />
+ <bpmn2:sequenceFlow id="SequenceFlow_1gusrvp" sourceRef="Task_0ush1g4" targetRef="IntermediateThrowEvent_1mlbhmt" />
+ <bpmn2:scriptTask id="Task_0ush1g4" name="Call Homing(To be Done)" scriptFormat="groovy">
+ <bpmn2:incoming>SequenceFlow_027owbf</bpmn2:incoming>
+ <bpmn2:outgoing>SequenceFlow_1gusrvp</bpmn2:outgoing>
+ <bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcsi= new DoCreateE2EServiceInstance()
+dcsi.doServiceHoming(execution)]]></bpmn2:script>
+ </bpmn2:scriptTask>
</bpmn2:process>
<bpmn2:error id="Error_2" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
<bpmn2:error id="Error_1" name="java.lang.Exception" errorCode="java.lang.Exception" />
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateE2EServiceInstanceV3">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_47" bpmnElement="createSI_startEvent">
- <dc:Bounds x="34" y="79" width="36" height="36" />
+ <dc:Bounds x="18" y="-207" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="28" y="120" width="50" height="12" />
+ <dc:Bounds x="12" y="-166" width="50" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_61" bpmnElement="preProcessRequest_ScriptTask">
- <dc:Bounds x="245" y="57" width="100" height="80" />
+ <dc:Bounds x="126" y="-229" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_47" targetElement="_BPMNShape_ScriptTask_61">
- <di:waypoint xsi:type="dc:Point" x="70" y="97" />
- <di:waypoint xsi:type="dc:Point" x="245" y="97" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="112.5" y="82" width="90" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_4">
- <di:waypoint xsi:type="dc:Point" x="626" y="94" />
- <di:waypoint xsi:type="dc:Point" x="971" y="94" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="753.5" y="79" width="90" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_61" targetElement="CallActivity_1md4kyb_di">
- <di:waypoint xsi:type="dc:Point" x="345" y="97" />
- <di:waypoint xsi:type="dc:Point" x="526" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="296" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="387" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="387" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="478" y="94" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="390.5" y="82" width="90" height="0" />
+ <dc:Bounds x="357" y="94" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="CallActivity_1md4kyb_di" bpmnElement="CustomE2EGetService">
- <dc:Bounds x="526" y="57" width="100" height="80" />
+ <dc:Bounds x="196" y="57" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="CallActivity_0khp0qc_di" bpmnElement="CustomE2EPutService">
- <dc:Bounds x="972" y="206" width="100" height="80" />
+ <dc:Bounds x="713" y="54" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_129ih1g_di" bpmnElement="SequenceFlow_129ih1g">
- <di:waypoint xsi:type="dc:Point" x="1023" y="286" />
- <di:waypoint xsi:type="dc:Point" x="1022" y="336" />
+ <di:waypoint xsi:type="dc:Point" x="813" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="941" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="941" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="1068" y="94" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1023" y="296" width="0" height="0" />
+ <dc:Bounds x="911" y="94" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="SubProcess_06d8lk8_di" bpmnElement="SubProcess_06d8lk8" isExpanded="true">
- <dc:Bounds x="-322" y="235" width="783" height="195" />
+ <dc:Bounds x="15" y="865" width="783" height="195" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="StartEvent_0yljq9y_di" bpmnElement="StartEvent_0yljq9y">
- <dc:Bounds x="-226" y="312" width="36" height="36" />
+ <dc:Bounds x="111" y="942" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-253" y="353" width="90" height="0" />
+ <dc:Bounds x="84" y="983" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_117lkk3_di" bpmnElement="EndEvent_117lkk3">
- <dc:Bounds x="407" y="312" width="36" height="36" />
+ <dc:Bounds x="744" y="942" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="380" y="353" width="90" height="0" />
+ <dc:Bounds x="717" y="983" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="CallActivity_1srx6p6_di" bpmnElement="CallActivity_1srx6p6">
- <dc:Bounds x="72" y="290" width="100" height="80" />
+ <dc:Bounds x="409" y="920" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0eumzpf_di" bpmnElement="SequenceFlow_0eumzpf">
- <di:waypoint xsi:type="dc:Point" x="172" y="330" />
- <di:waypoint xsi:type="dc:Point" x="240" y="330" />
+ <di:waypoint xsi:type="dc:Point" x="509" y="960" />
+ <di:waypoint xsi:type="dc:Point" x="577" y="960" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="161" y="315" width="90" height="0" />
+ <dc:Bounds x="498" y="945" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0tgrn11_di" bpmnElement="SequenceFlow_0tgrn11">
- <di:waypoint xsi:type="dc:Point" x="-190" y="330" />
- <di:waypoint xsi:type="dc:Point" x="-91" y="330" />
+ <di:waypoint xsi:type="dc:Point" x="147" y="960" />
+ <di:waypoint xsi:type="dc:Point" x="246" y="960" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-185" y="315" width="90" height="0" />
+ <dc:Bounds x="152" y="945" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_0i8cqdy_di" bpmnElement="ScriptTask_0i8cqdy">
- <dc:Bounds x="971" y="57" width="100" height="80" />
+ <dc:Bounds x="478" y="54" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1w01tqs_di" bpmnElement="SequenceFlow_1w01tqs">
- <di:waypoint xsi:type="dc:Point" x="1021" y="137" />
- <di:waypoint xsi:type="dc:Point" x="1021" y="206" />
+ <di:waypoint xsi:type="dc:Point" x="578" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="646" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="646" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="713" y="94" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="991" y="171.5" width="90" height="0" />
+ <dc:Bounds x="616" y="94" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_0q37vn9_di" bpmnElement="ScriptTask_0q37vn9">
- <dc:Bounds x="972" y="336" width="100" height="80" />
+ <dc:Bounds x="1068" y="54" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_0ocetux_di" bpmnElement="ScriptTask_0ocetux">
- <dc:Bounds x="-91" y="290" width="100" height="80" />
+ <dc:Bounds x="246" y="920" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1lqktwf_di" bpmnElement="SequenceFlow_1lqktwf">
- <di:waypoint xsi:type="dc:Point" x="9" y="330" />
- <di:waypoint xsi:type="dc:Point" x="72" y="330" />
+ <di:waypoint xsi:type="dc:Point" x="346" y="960" />
+ <di:waypoint xsi:type="dc:Point" x="409" y="960" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-4" y="315" width="90" height="0" />
+ <dc:Bounds x="333" y="945" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_1p0vyip_di" bpmnElement="ScriptTask_1p0vyip">
- <dc:Bounds x="240" y="290" width="100" height="80" />
+ <dc:Bounds x="577" y="920" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1xzgv5k_di" bpmnElement="SequenceFlow_1xzgv5k">
- <di:waypoint xsi:type="dc:Point" x="340" y="330" />
- <di:waypoint xsi:type="dc:Point" x="372" y="330" />
- <di:waypoint xsi:type="dc:Point" x="372" y="330" />
- <di:waypoint xsi:type="dc:Point" x="407" y="330" />
+ <di:waypoint xsi:type="dc:Point" x="677" y="960" />
+ <di:waypoint xsi:type="dc:Point" x="709" y="960" />
+ <di:waypoint xsi:type="dc:Point" x="709" y="960" />
+ <di:waypoint xsi:type="dc:Point" x="744" y="960" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="342" y="330" width="90" height="0" />
+ <dc:Bounds x="679" y="960" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0wvq4t8_di" bpmnElement="ScriptTask_0wvq4t8">
- <dc:Bounds x="134" y="674" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="CallActivity_0uwm4l1_di" bpmnElement="CallActivity_0uwm4l1">
- <dc:Bounds x="-23" y="674" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_1xdjlzm_di" bpmnElement="ScriptTask_1xdjlzm">
- <dc:Bounds x="-597" y="782" width="100" height="80" />
+ <dc:Bounds x="1119" y="485" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_15zgrcq_di" bpmnElement="SequenceFlow_15zgrcq">
- <di:waypoint xsi:type="dc:Point" x="134" y="714" />
- <di:waypoint xsi:type="dc:Point" x="77" y="714" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="61" y="693" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_092ghvu_di" bpmnElement="SequenceFlow_092ghvu">
- <di:waypoint xsi:type="dc:Point" x="-597" y="822" />
- <di:waypoint xsi:type="dc:Point" x="-780" y="822" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="-733.5" y="801" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="EndEvent_01p249c_di" bpmnElement="EndEvent_0kbbt94">
- <dc:Bounds x="-816" y="804" width="36" height="36" />
+ <dc:Bounds x="1315" y="507" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-934" y="844" width="90" height="12" />
+ <dc:Bounds x="1197" y="547" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1qctzm0_di" bpmnElement="SequenceFlow_1qctzm0">
- <di:waypoint xsi:type="dc:Point" x="1022" y="668" />
- <di:waypoint xsi:type="dc:Point" x="1022" y="704" />
+ <di:waypoint xsi:type="dc:Point" x="296" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="402" y="300" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1037" y="680" width="0" height="12" />
+ <dc:Bounds x="304" y="279" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_0v81r5h_di" bpmnElement="Task_0uiekmn">
- <dc:Bounds x="972" y="588" width="100" height="80" />
+ <dc:Bounds x="196" y="260" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_14tnuxf_di" bpmnElement="Task_0raqlqc">
- <dc:Bounds x="972" y="704" width="100" height="80" />
+ <dc:Bounds x="402" y="260" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_0qi8cgg_di" bpmnElement="Task_0io5qby">
- <dc:Bounds x="678" y="921" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_0ue4dzp_di" bpmnElement="Task_0pkhzoj">
- <dc:Bounds x="148" y="921" width="100" height="80" />
+ <dc:Bounds x="944" y="353" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ServiceTask_1q727pm_di" bpmnElement="Task_0gs55f1">
- <dc:Bounds x="-23" y="921" width="100" height="80" />
+ <bpmndi:BPMNEdge id="SequenceFlow_10reo7r_di" bpmnElement="SequenceFlow_10reo7r">
+ <di:waypoint xsi:type="dc:Point" x="502" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="583" y="300" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="497.5" y="279" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_11f2zuu_di" bpmnElement="SequenceFlow_11f2zuu">
+ <di:waypoint xsi:type="dc:Point" x="1044" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="1090" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="1090" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="1315" y="300" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1060" y="340.5" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1y0los4_di" bpmnElement="ScriptTask_1y0los4">
+ <dc:Bounds x="583" y="260" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_03fabby_di" bpmnElement="SequenceFlow_03fabby">
- <di:waypoint xsi:type="dc:Point" x="1022" y="416" />
- <di:waypoint xsi:type="dc:Point" x="1022" y="588" />
+ <bpmndi:BPMNEdge id="SequenceFlow_13d9g1n_di" bpmnElement="SequenceFlow_13d9g1n">
+ <di:waypoint xsi:type="dc:Point" x="683" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="753" y="300" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1037" y="496" width="0" height="12" />
+ <dc:Bounds x="673" y="279" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_17i1ors_di" bpmnElement="SequenceFlow_17i1ors">
- <di:waypoint xsi:type="dc:Point" x="148" y="961" />
- <di:waypoint xsi:type="dc:Point" x="77" y="961" />
+ <bpmndi:BPMNShape id="ExclusiveGateway_0n9y4du_di" bpmnElement="ExclusiveGateway_0n9y4du" isMarkerVisible="true">
+ <dc:Bounds x="929" y="500" width="50" height="50" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="912" y="554" width="83" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0q6uy30_di" bpmnElement="SequenceFlow_0q6uy30">
+ <di:waypoint xsi:type="dc:Point" x="954" y="550" />
+ <di:waypoint xsi:type="dc:Point" x="954" y="691" />
+ <di:waypoint xsi:type="dc:Point" x="246" y="691" />
+ <di:waypoint xsi:type="dc:Point" x="246" y="565" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="68" y="940" width="90" height="12" />
+ <dc:Bounds x="594" y="670" width="12" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_10reo7r_di" bpmnElement="SequenceFlow_10reo7r">
- <di:waypoint xsi:type="dc:Point" x="1022" y="784" />
- <di:waypoint xsi:type="dc:Point" x="1022" y="921" />
+ <bpmndi:BPMNShape id="ScriptTask_0y4u2ty_di" bpmnElement="ScriptTask_0y4u2ty">
+ <dc:Bounds x="728" y="485" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1jenxlp_di" bpmnElement="SequenceFlow_1jenxlp">
+ <di:waypoint xsi:type="dc:Point" x="828" y="525" />
+ <di:waypoint xsi:type="dc:Point" x="929" y="525" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="1037" y="846.5" width="0" height="12" />
+ <dc:Bounds x="833.5" y="504" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ExclusiveGateway_1gzdeq0_di" bpmnElement="ExclusiveGateway_1gzdeq0" isMarkerVisible="true">
- <dc:Bounds x="399" y="797" width="50" height="50" />
+ <bpmndi:BPMNShape id="ScriptTask_0l4nkqr_di" bpmnElement="ScriptTask_0l4nkqr">
+ <dc:Bounds x="196" y="485" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ExclusiveGateway_07rr3wp_di" bpmnElement="ExclusiveGateway_07rr3wp" isMarkerVisible="true">
+ <dc:Bounds x="753" y="275" width="50" height="50" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="388" y="851" width="73" height="24" />
+ <dc:Bounds x="736" y="329" width="87" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_11f2zuu_di" bpmnElement="SequenceFlow_11f2zuu">
- <di:waypoint xsi:type="dc:Point" x="678" y="961" />
- <di:waypoint xsi:type="dc:Point" x="633" y="961" />
- <di:waypoint xsi:type="dc:Point" x="633" y="822" />
- <di:waypoint xsi:type="dc:Point" x="607" y="822" />
+ <bpmndi:BPMNEdge id="SequenceFlow_18wj44x_di" bpmnElement="SequenceFlow_18wj44x">
+ <di:waypoint xsi:type="dc:Point" x="803" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="1315" y="300" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="648" y="885.5" width="0" height="12" />
+ <dc:Bounds x="832.3633633633633" y="294" width="12" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_1y0los4_di" bpmnElement="ScriptTask_1y0los4">
- <dc:Bounds x="972" y="921" width="100" height="80" />
+ <bpmndi:BPMNShape id="ScriptTask_0u88n0f_di" bpmnElement="Task_0qlkmvt">
+ <dc:Bounds x="357" y="485" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_13d9g1n_di" bpmnElement="SequenceFlow_13d9g1n">
- <di:waypoint xsi:type="dc:Point" x="972" y="961" />
- <di:waypoint xsi:type="dc:Point" x="879" y="961" />
+ <bpmndi:BPMNShape id="ScriptTask_1y17r20_di" bpmnElement="Task_12ghoph">
+ <dc:Bounds x="551" y="485" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_11saqvj_di" bpmnElement="IntermediateThrowEvent_0bq4fxs">
+ <dc:Bounds x="1315" y="-207" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1290" y="-167" width="88" height="36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_1mlbhmt_di" bpmnElement="IntermediateThrowEvent_1mlbhmt">
+ <dc:Bounds x="1315" y="-57" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1288" y="-16" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1o01d7d_di" bpmnElement="ScriptTask_1o01d7d">
+ <dc:Bounds x="713" y="-79" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="CallActivity_0biblpc_di" bpmnElement="CallActivity_0biblpc">
+ <dc:Bounds x="478" y="-79" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="ScriptTask_1cllqk3_di" bpmnElement="ScriptTask_1cllqk3">
+ <dc:Bounds x="196" y="-79" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0tv85pg_di" bpmnElement="IntermediateCatchEvent_0tv85pg">
+ <dc:Bounds x="26" y="-57" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2" y="-21" width="88" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_027owbf_di" bpmnElement="SequenceFlow_027owbf">
+ <di:waypoint xsi:type="dc:Point" x="813" y="-39" />
+ <di:waypoint xsi:type="dc:Point" x="1057" y="-39" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="925.5" y="940" width="0" height="12" />
+ <dc:Bounds x="890" y="-60" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ExclusiveGateway_0n9y4du_di" bpmnElement="ExclusiveGateway_0n9y4du" isMarkerVisible="true">
- <dc:Bounds x="-356.3260146373919" y="797" width="50" height="50" />
+ <bpmndi:BPMNEdge id="SequenceFlow_0xjwb45_di" bpmnElement="SequenceFlow_0xjwb45">
+ <di:waypoint xsi:type="dc:Point" x="578" y="-39" />
+ <di:waypoint xsi:type="dc:Point" x="713" y="-39" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="645.5" y="-60" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0qxzgvq_di" bpmnElement="SequenceFlow_0qxzgvq">
+ <di:waypoint xsi:type="dc:Point" x="296" y="-39" />
+ <di:waypoint xsi:type="dc:Point" x="478" y="-39" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="387" y="-60" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1qiiycn_di" bpmnElement="SequenceFlow_1qiiycn">
+ <di:waypoint xsi:type="dc:Point" x="54" y="-189" />
+ <di:waypoint xsi:type="dc:Point" x="126" y="-189" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="90" y="-210" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_166w91p_di" bpmnElement="SequenceFlow_166w91p">
+ <di:waypoint xsi:type="dc:Point" x="62" y="-39" />
+ <di:waypoint xsi:type="dc:Point" x="196" y="-39" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="129" y="-60" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_16okck2_di" bpmnElement="IntermediateThrowEvent_16okck2">
+ <dc:Bounds x="1315" y="76" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-373" y="851" width="83" height="36" />
+ <dc:Bounds x="1299" y="117" width="71" height="24" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0lt42ul_di" bpmnElement="SequenceFlow_0lt42ul">
- <di:waypoint xsi:type="dc:Point" x="-356" y="822" />
- <di:waypoint xsi:type="dc:Point" x="-497" y="822" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1tkgqu3_di" bpmnElement="SequenceFlow_1tkgqu3">
+ <di:waypoint xsi:type="dc:Point" x="1168" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="1242" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="1242" y="94" />
+ <di:waypoint xsi:type="dc:Point" x="1315" y="94" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-435" y="801" width="19" height="12" />
+ <dc:Bounds x="1257" y="88" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0q6uy30_di" bpmnElement="SequenceFlow_0q6uy30">
- <di:waypoint xsi:type="dc:Point" x="-331" y="847" />
- <di:waypoint xsi:type="dc:Point" x="-331" y="1096" />
- <di:waypoint xsi:type="dc:Point" x="557" y="1096" />
- <di:waypoint xsi:type="dc:Point" x="557" y="862" />
+ <bpmndi:BPMNEdge id="SequenceFlow_0w9t6tc_di" bpmnElement="SequenceFlow_0w9t6tc">
+ <di:waypoint xsi:type="dc:Point" x="226" y="-189" />
+ <di:waypoint xsi:type="dc:Point" x="771" y="-189" />
+ <di:waypoint xsi:type="dc:Point" x="771" y="-189" />
+ <di:waypoint xsi:type="dc:Point" x="1315" y="-189" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="107.48952590959206" y="1075" width="12" height="12" />
+ <dc:Bounds x="786" y="-195" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0y4u2ty_di" bpmnElement="ScriptTask_0y4u2ty">
- <dc:Bounds x="-230" y="782" width="100" height="80" />
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_0jrb3xu_di" bpmnElement="IntermediateCatchEvent_0jrb3xu">
+ <dc:Bounds x="18" y="79" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="8" y="115" width="60" height="12" />
+ </bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1aya35q_di" bpmnElement="SequenceFlow_1aya35q">
- <di:waypoint xsi:type="dc:Point" x="-23" y="714" />
- <di:waypoint xsi:type="dc:Point" x="-70" y="714" />
- <di:waypoint xsi:type="dc:Point" x="-70" y="822" />
- <di:waypoint xsi:type="dc:Point" x="-130" y="822" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1i7t9hq_di" bpmnElement="SequenceFlow_1i7t9hq">
+ <di:waypoint xsi:type="dc:Point" x="54" y="97" />
+ <di:waypoint xsi:type="dc:Point" x="196" y="97" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-55" y="762" width="0" height="12" />
+ <dc:Bounds x="125" y="76" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_02svciv_di" bpmnElement="SequenceFlow_02svciv">
- <di:waypoint xsi:type="dc:Point" x="-23" y="961" />
- <di:waypoint xsi:type="dc:Point" x="-70" y="961" />
- <di:waypoint xsi:type="dc:Point" x="-70" y="822" />
- <di:waypoint xsi:type="dc:Point" x="-130" y="822" />
+ <bpmndi:BPMNShape id="IntermediateThrowEvent_0f2w7aj_di" bpmnElement="IntermediateThrowEvent_0f2w7aj">
+ <dc:Bounds x="1315" y="282" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1299" y="323" width="73" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1vprtt9_di" bpmnElement="SequenceFlow_1vprtt9">
+ <di:waypoint xsi:type="dc:Point" x="778" y="325" />
+ <di:waypoint xsi:type="dc:Point" x="778" y="393" />
+ <di:waypoint xsi:type="dc:Point" x="944" y="393" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-55" y="885.5" width="0" height="12" />
+ <dc:Bounds x="784" y="353" width="19" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1jenxlp_di" bpmnElement="SequenceFlow_1jenxlp">
- <di:waypoint xsi:type="dc:Point" x="-230" y="822" />
- <di:waypoint xsi:type="dc:Point" x="-306" y="822" />
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_05dus9b_di" bpmnElement="IntermediateCatchEvent_05dus9b">
+ <dc:Bounds x="18" y="282" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="-3" y="318" width="82" height="24" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_1hbesp9_di" bpmnElement="SequenceFlow_1hbesp9">
+ <di:waypoint xsi:type="dc:Point" x="54" y="300" />
+ <di:waypoint xsi:type="dc:Point" x="196" y="300" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="-268" y="801" width="0" height="12" />
+ <dc:Bounds x="125" y="279" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0l4nkqr_di" bpmnElement="ScriptTask_0l4nkqr">
- <dc:Bounds x="507" y="782" width="100" height="80" />
+ <bpmndi:BPMNShape id="IntermediateCatchEvent_02bah5m_di" bpmnElement="IntermediateCatchEvent_02bah5m">
+ <dc:Bounds x="18" y="507" width="36" height="36" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="2" y="543" width="73" height="12" />
+ </bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1q1d7d9_di" bpmnElement="SequenceFlow_1q1d7d9">
- <di:waypoint xsi:type="dc:Point" x="424" y="792" />
- <di:waypoint xsi:type="dc:Point" x="424" y="714" />
- <di:waypoint xsi:type="dc:Point" x="234" y="714" />
+ <bpmndi:BPMNEdge id="SequenceFlow_16nxl6h_di" bpmnElement="SequenceFlow_16nxl6h">
+ <di:waypoint xsi:type="dc:Point" x="979" y="525" />
+ <di:waypoint xsi:type="dc:Point" x="1119" y="525" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="426" y="747" width="27" height="12" />
+ <dc:Bounds x="1040" y="504" width="19" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_10q9kus_di" bpmnElement="SequenceFlow_10q9kus">
- <di:waypoint xsi:type="dc:Point" x="422" y="845" />
- <di:waypoint xsi:type="dc:Point" x="422" y="961" />
- <di:waypoint xsi:type="dc:Point" x="248" y="961" />
+ <bpmndi:BPMNEdge id="SequenceFlow_0uiygod_di" bpmnElement="SequenceFlow_0uiygod">
+ <di:waypoint xsi:type="dc:Point" x="296" y="525" />
+ <di:waypoint xsi:type="dc:Point" x="357" y="525" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="420" y="897" width="35" height="12" />
+ <dc:Bounds x="326.5" y="504" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_04d3qcu_di" bpmnElement="SequenceFlow_04d3qcu">
- <di:waypoint xsi:type="dc:Point" x="507" y="822" />
- <di:waypoint xsi:type="dc:Point" x="449" y="822" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1u9k0dm_di" bpmnElement="SequenceFlow_1u9k0dm">
+ <di:waypoint xsi:type="dc:Point" x="457" y="525" />
+ <di:waypoint xsi:type="dc:Point" x="551" y="525" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="478" y="801" width="0" height="12" />
+ <dc:Bounds x="504" y="504" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ExclusiveGateway_07rr3wp_di" bpmnElement="ExclusiveGateway_07rr3wp" isMarkerVisible="true">
- <dc:Bounds x="829.1706586826348" y="936" width="50" height="50" />
+ <bpmndi:BPMNEdge id="SequenceFlow_13c7bhn_di" bpmnElement="SequenceFlow_13c7bhn">
+ <di:waypoint xsi:type="dc:Point" x="651" y="525" />
+ <di:waypoint xsi:type="dc:Point" x="728" y="525" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="812" y="990" width="87" height="24" />
+ <dc:Bounds x="689.5" y="504" width="0" height="12" />
</bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1limzcd_di" bpmnElement="SequenceFlow_1limzcd">
- <di:waypoint xsi:type="dc:Point" x="829" y="961" />
- <di:waypoint xsi:type="dc:Point" x="778" y="961" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0vbznai_di" bpmnElement="SequenceFlow_0vbznai">
+ <di:waypoint xsi:type="dc:Point" x="1219" y="525" />
+ <di:waypoint xsi:type="dc:Point" x="1315" y="525" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="802" y="955" width="19" height="12" />
+ <dc:Bounds x="1267" y="504" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_18wj44x_di" bpmnElement="SequenceFlow_18wj44x">
- <di:waypoint xsi:type="dc:Point" x="854" y="936" />
- <di:waypoint xsi:type="dc:Point" x="854" y="822" />
- <di:waypoint xsi:type="dc:Point" x="607" y="822" />
+ <bpmndi:BPMNEdge id="SequenceFlow_1qozd66_di" bpmnElement="SequenceFlow_1qozd66">
+ <di:waypoint xsi:type="dc:Point" x="54" y="525" />
+ <di:waypoint xsi:type="dc:Point" x="196" y="525" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="863" y="873" width="12" height="12" />
+ <dc:Bounds x="125" y="504" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1gusrvp_di" bpmnElement="SequenceFlow_1gusrvp">
+ <di:waypoint xsi:type="dc:Point" x="1157" y="-39" />
+ <di:waypoint xsi:type="dc:Point" x="1315" y="-39" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="1236" y="-60" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_0wr11dt_di" bpmnElement="Task_0ush1g4">
+ <dc:Bounds x="1057" y="-79" width="100" height="80" />
+ </bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn2:definitions>
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaVIDRequest.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaVIDRequest.java
index a53ef22743..3ef6d4974c 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaVIDRequest.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaVIDRequest.java
@@ -38,7 +38,7 @@ import org.openecomp.mso.apihandler.common.CommonConstants;
CommonConstants.VOLUME_GROUP_ID_VARIABLE, CommonConstants.NETWORK_ID_VARIABLE,
CommonConstants.SERVICE_TYPE_VARIABLE, CommonConstants.VNF_TYPE_VARIABLE,
CommonConstants.VF_MODULE_TYPE_VARIABLE, CommonConstants.NETWORK_TYPE_VARIABLE,
- CommonConstants.CAMUNDA_SERVICE_INPUT})
+ CommonConstants.CAMUNDA_SERVICE_INPUT, CommonConstants.RECIPE_PARAMS})
@JsonRootName(CommonConstants.CAMUNDA_ROOT_INPUT)
public class CamundaVIDRequest {
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java
index ad76a15b8e..79ac76ff04 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java
@@ -252,15 +252,12 @@ public class MsoRequest {
}
RequestParameters requestParameters = sir.getRequestDetails().getRequestParameters();
- if(this.reqVersion >= 3){
- if(requestParameters!=null){
- this.aLaCarteFlag = sir.getRequestDetails().getRequestParameters().isaLaCarte();
- }else{
- this.aLaCarteFlag = false;
- }
- }else{
- this.aLaCarteFlag = true;
- }
+ if (this.reqVersion >= 3) {
+ this.aLaCarteFlag =
+ requestParameters != null && sir.getRequestDetails().getRequestParameters().isaLaCarte();
+ } else {
+ this.aLaCarteFlag = true;
+ }
if(requestParameters != null && (reqVersion < 3) && requestParameters.getAutoBuildVfModules()){
throw new ValidationException("AutoBuildVfModule", version);
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java
index 534b5a38c9..7cf8c2190c 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/CatalogDatabase.java
@@ -205,7 +205,7 @@ public class CatalogDatabase implements Closeable {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. No template found", "CatalogDB", "getHeatTemplate", null);
return null;
}
- Collections.sort(resultList, new MavenLikeVersioningComparator());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(resultList);
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getHeatTemplate", null);
@@ -366,7 +366,7 @@ public class CatalogDatabase implements Closeable {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. Service not found", "CatalogDB", "getServiceByName", null);
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getServiceByName", null);
@@ -528,7 +528,7 @@ public class CatalogDatabase implements Closeable {
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. Service not found", "CatalogDB", "getServiceByModelName", null);
return null;
}
- Collections.sort(resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(resultList);
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getServiceByModelName", null);
@@ -600,7 +600,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getServiceRecipe", null);
@@ -644,7 +644,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort(resultList, new MavenLikeVersioningComparator());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(resultList);
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getServiceRecipe", null);
@@ -671,7 +671,7 @@ public class CatalogDatabase implements Closeable {
return Collections.EMPTY_LIST;
}
- Collections.sort(resultList, new MavenLikeVersioningComparator());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(resultList);
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getServiceRecipes", null);
@@ -748,7 +748,7 @@ public class CatalogDatabase implements Closeable {
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VNF not found", "CatalogDB", "getVnfResource", null);
return null;
}
- Collections.sort(resultList, new MavenLikeVersioningComparator());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(resultList);
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfResource", null);
@@ -874,7 +874,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort(resultList, new MavenLikeVersioningComparator());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(resultList);
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfResourceCustomizationByModelCustomizationName", null);
@@ -975,7 +975,7 @@ public class CatalogDatabase implements Closeable {
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VF not found", "CatalogDB", "getVfModuleModelName", null);
return null;
}
- Collections.sort(resultList, new MavenLikeVersioningComparator());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(resultList);
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVfModuleModelName", null);
@@ -1073,7 +1073,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort(resultList, new MavenLikeVersioningComparator());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(resultList);
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getNetworkResource", null);
return resultList.get(0);
@@ -1122,7 +1122,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort(resultList, new MavenLikeVersioningComparator());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(resultList);
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfRecipe", null);
@@ -1156,7 +1156,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort(resultList, new MavenLikeVersioningComparator());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(resultList);
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfRecipe", null);
@@ -1189,7 +1189,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort(resultList, new MavenLikeVersioningComparator());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(resultList);
LOGGER.recordMetricEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VNF Recipe Entry found", "CatalogDB", "getVnfRecipeByVfModuleId", null);
@@ -1246,7 +1246,7 @@ public class CatalogDatabase implements Closeable {
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VF not found", "CatalogDB", "getVfModuleType", null);
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVfModuleType", null);
@@ -1373,7 +1373,7 @@ public class CatalogDatabase implements Closeable {
VfModule module = null;
if (modules != null && ! modules.isEmpty()) {
- Collections.sort (modules, new MavenLikeVersioningComparator ());
+ modules.sort(new MavenLikeVersioningComparator());
Collections.reverse (modules);
module = modules.get(0);
}
@@ -1829,7 +1829,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVnfResourceCustomizationByVnfModelCustomizationNameAndModelVersionId", null);
@@ -2186,7 +2186,7 @@ public class CatalogDatabase implements Closeable {
return new ArrayList<>();
}
- Collections.sort (serviceList, new MavenLikeVersioningComparator ());
+ serviceList.sort(new MavenLikeVersioningComparator());
Collections.reverse (serviceList);
Service service = serviceList.get(0);
@@ -2214,7 +2214,7 @@ public class CatalogDatabase implements Closeable {
return new ArrayList<>();
}
- Collections.sort (serviceList, new MavenLikeVersioningComparator ());
+ serviceList.sort(new MavenLikeVersioningComparator());
Collections.reverse (serviceList);
Service service = serviceList.get(0);
@@ -2317,7 +2317,7 @@ public class CatalogDatabase implements Closeable {
return new ArrayList<>();
}
- Collections.sort (serviceList, new MavenLikeVersioningComparator ());
+ serviceList.sort(new MavenLikeVersioningComparator());
Collections.reverse (serviceList);
// Step 2 - Now query to get the related VnfResourceCustomizations
@@ -2351,7 +2351,7 @@ public class CatalogDatabase implements Closeable {
if (resultList.isEmpty()) {
return new ArrayList<>();
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
Service service = resultList.get(0);
//now just call the method that takes the version - the service object will have the highest version
@@ -2372,7 +2372,7 @@ public class CatalogDatabase implements Closeable {
if (resultList.isEmpty()) {
return new ArrayList<>();
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
Service service = resultList.get(0);
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getAllVnfsByServiceModelInvariantUuid", null);
@@ -2412,7 +2412,7 @@ public class CatalogDatabase implements Closeable {
if (resultList.isEmpty()) {
return Collections.EMPTY_LIST;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
Service service = resultList.get(0);
@@ -2484,7 +2484,7 @@ public class CatalogDatabase implements Closeable {
return new ArrayList<>();
}
- Collections.sort (serviceList, new MavenLikeVersioningComparator ());
+ serviceList.sort(new MavenLikeVersioningComparator());
Collections.reverse (serviceList);
Service service = serviceList.get(0);
@@ -2510,7 +2510,7 @@ public class CatalogDatabase implements Closeable {
return new ArrayList<>();
}
- Collections.sort (serviceList, new MavenLikeVersioningComparator ());
+ serviceList.sort(new MavenLikeVersioningComparator());
Collections.reverse (serviceList);
Service service = serviceList.get(0);
@@ -2582,7 +2582,7 @@ public class CatalogDatabase implements Closeable {
return new ServiceMacroHolder();
}
- Collections.sort (serviceList, new MavenLikeVersioningComparator ());
+ serviceList.sort(new MavenLikeVersioningComparator());
Collections.reverse (serviceList);
Service service = serviceList.get(0);
@@ -2612,7 +2612,7 @@ public class CatalogDatabase implements Closeable {
return new ServiceMacroHolder();
}
- Collections.sort (serviceList, new MavenLikeVersioningComparator ());
+ serviceList.sort(new MavenLikeVersioningComparator());
Collections.reverse (serviceList);
Service service = serviceList.get(0);
@@ -2645,7 +2645,7 @@ public class CatalogDatabase implements Closeable {
return new ServiceMacroHolder();
}
- Collections.sort (serviceList, new MavenLikeVersioningComparator ());
+ serviceList.sort(new MavenLikeVersioningComparator());
Collections.reverse (serviceList);
Service service = serviceList.get(0);
@@ -2747,7 +2747,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
VfModule vfMod = resultList.get(0);
@@ -2772,7 +2772,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort (resultList1, new MavenLikeVersioningComparator ());
+ resultList1.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList1);
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VNF recipe found", "CatalogDB", "getVfModuleRecipe", null);
@@ -2839,7 +2839,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
VfModule vfMod = resultList.get(0);
@@ -2864,7 +2864,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort (resultList1, new MavenLikeVersioningComparator ());
+ resultList1.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList1);
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VNF recipe found", "CatalogDB", "getVnfComponentsRecipe", null);
@@ -2894,7 +2894,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
VfModule vfMod = resultList.get(0);
@@ -2919,7 +2919,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort (resultList1, new MavenLikeVersioningComparator ());
+ resultList1.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList1);
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully. VNF recipe found", "CatalogDB", "getVnfComponentsRecipe", null);
@@ -4081,7 +4081,7 @@ public class CatalogDatabase implements Closeable {
newVnfRecipe.setDescription(vfRecipe.getDescription());
newVnfRecipe.setOrchestrationUri(vfRecipe.getOrchestrationUri());
newVnfRecipe.setRecipeTimeout(vfRecipe.getRecipeTimeout());
- newVnfRecipe.setVnfComponentParamXSD(vfRecipe.getVnfComponentParamXSD());
+ newVnfRecipe.setParamXSD(vfRecipe.getParamXSD());
newVnfRecipe.setVfModuleModelUUId(newRecipe.getModelUUID());
newVnfRecipe.setVersion(vfRecipe.getVersion());
newVnfRecipe.setVnfComponentType(vfRecipe.getVnfComponentType());
@@ -4383,7 +4383,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
return resultList.get (0);
@@ -4434,7 +4434,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
return resultList.get (0);
@@ -4473,7 +4473,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
return resultList.get (0);
@@ -4507,7 +4507,7 @@ public class CatalogDatabase implements Closeable {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
return resultList.get (0);
@@ -4564,7 +4564,7 @@ public class CatalogDatabase implements Closeable {
if (resultList.isEmpty ()) {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
return resultList.get (0);
@@ -4607,7 +4607,7 @@ public class CatalogDatabase implements Closeable {
if (resultList.isEmpty ()) {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
return resultList.get (0);
@@ -4636,7 +4636,7 @@ public class CatalogDatabase implements Closeable {
return Collections.EMPTY_LIST;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
LOGGER.recordMetricEvent (startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successfully", "CatalogDB", "getVfModuleRecipes", null);
@@ -4686,7 +4686,7 @@ public class CatalogDatabase implements Closeable {
if (resultList.isEmpty ()) {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
return resultList.get (0);
@@ -4720,7 +4720,7 @@ public class CatalogDatabase implements Closeable {
if (resultList.isEmpty ()) {
return null;
}
- Collections.sort (resultList, new MavenLikeVersioningComparator ());
+ resultList.sort(new MavenLikeVersioningComparator());
Collections.reverse (resultList);
return resultList.get (0);
@@ -4761,7 +4761,7 @@ public class CatalogDatabase implements Closeable {
LOGGER.debug("Catalog database - recipeResultList is null");
return null;
}
- Collections.sort(recipeResultList, new MavenLikeVersioningComparator());
+ recipeResultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(recipeResultList);
LOGGER.debug("Catalog database - recipeResultList contains " + recipeResultList.get(0).toString());
@@ -4833,7 +4833,7 @@ public class CatalogDatabase implements Closeable {
LOGGER.debug("Catalog database - recipeResultList is null");
return null;
}
- Collections.sort(recipeResultList, new MavenLikeVersioningComparator());
+ recipeResultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(recipeResultList);
LOGGER.debug("Catalog database - recipeResultList contains " + recipeResultList.get(0).toString());
@@ -4881,7 +4881,7 @@ public class CatalogDatabase implements Closeable {
LOGGER.debug("Catalog database - modelResultList is null");
return null;
}
- Collections.sort(modelResultList, new MavenLikeVersioningComparator());
+ modelResultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(modelResultList);
LOGGER.debug("Catalog database - modelResultList contains " + modelResultList.get(0).toString());
@@ -4898,7 +4898,7 @@ public class CatalogDatabase implements Closeable {
LOGGER.debug("Catalog database - recipeResultList is null");
return null;
}
- Collections.sort(recipeResultList, new MavenLikeVersioningComparator());
+ recipeResultList.sort(new MavenLikeVersioningComparator());
Collections.reverse(recipeResultList);
LOGGER.debug("Catalog database - recipeResultList contains " + recipeResultList.get(0).toString());
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ArRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ArRecipe.java
new file mode 100644
index 0000000000..b4c1f0594f
--- /dev/null
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/ArRecipe.java
@@ -0,0 +1,46 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.db.catalog.beans;
+
+
+import java.io.Serializable;
+
+public class ArRecipe extends Recipe implements Serializable {
+ private static final long serialVersionUID = 768026109321305392L;
+ private String modelName;
+ public ArRecipe() {}
+
+ public String getModelName() {
+ return modelName;
+ }
+ public void setModelName(String modelName) {
+ this.modelName = modelName;
+ }
+
+ @Override
+ public String toString () {
+ StringBuilder sb = new StringBuilder();
+ sb.append(super.toString());
+ sb.append(",modelName=").append(modelName);
+ sb.append(",arParamXSD=").append(getParamXSD());
+ return sb.toString();
+ }
+}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java
index f25a99ca2d..4e905b62c8 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/NetworkRecipe.java
@@ -26,7 +26,6 @@ import java.io.Serializable;
public class NetworkRecipe extends Recipe implements Serializable {
private static final long serialVersionUID = 768026109321305392L;
private String modelName;
- private String networkParamXSD;
public NetworkRecipe() {}
public String getModelName() {
@@ -36,19 +35,12 @@ public class NetworkRecipe extends Recipe implements Serializable {
this.modelName = modelName;
}
- public String getNetworkParamXSD() {
- return networkParamXSD;
- }
- public void setNetworkParamXSD(String networkParamXSD) {
- this.networkParamXSD = networkParamXSD;
- }
-
@Override
public String toString () {
StringBuilder sb = new StringBuilder();
sb.append(super.toString());
sb.append(",modelName=").append(modelName);
- sb.append(",networkParamXSD=").append(networkParamXSD);
+ sb.append(",networkParamXSD=").append(getParamXSD());
return sb.toString();
}
}
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Recipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Recipe.java
index a425c1e96a..58c24412dc 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Recipe.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/Recipe.java
@@ -37,7 +37,7 @@ public class Recipe extends MavenLikeVersioning implements Serializable {
protected String orchestrationUri;
private int recipeTimeout;
private String serviceType;
-
+ private String paramXSD;
private Timestamp created;
public Recipe () {
@@ -100,7 +100,21 @@ public class Recipe extends MavenLikeVersioning implements Serializable {
this.created = created;
}
- @Override
+ /**
+ * @return Returns the paramXSD.
+ */
+ public String getParamXSD() {
+ return paramXSD;
+ }
+
+ /**
+ * @param paramXSD The paramXSD to set.
+ */
+ public void setParamXSD(String paramXSD) {
+ this.paramXSD = paramXSD;
+ }
+
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("RECIPE: ").append(action);
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipe.java
index 8867170ba7..6eac5a23ea 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipe.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipe.java
@@ -27,7 +27,6 @@ public class VnfComponentsRecipe extends Recipe implements Serializable {
private static final long serialVersionUID = 768026109321305392L;
private String vnfType;
- private String vnfComponentParamXSD;
private String vnfComponentType;
private String vfModuleModelUUId;
@@ -39,13 +38,6 @@ public class VnfComponentsRecipe extends Recipe implements Serializable {
public void setVnfType(String vnfType) {
this.vnfType = vnfType;
}
-
- public String getVnfComponentParamXSD() {
- return vnfComponentParamXSD;
- }
- public void setVnfComponentParamXSD(String vnfComponentParamXSD) {
- this.vnfComponentParamXSD = vnfComponentParamXSD;
- }
public String getVnfComponentType() {
return vnfComponentType;
@@ -66,7 +58,7 @@ public class VnfComponentsRecipe extends Recipe implements Serializable {
public String toString () {
StringBuilder sb = new StringBuilder();
sb.append(super.toString());
- sb.append(",vnfComponentParamXSD=").append(vnfComponentParamXSD);
+ sb.append(",vnfComponentParamXSD=").append(getParamXSD());
sb.append(",serviceType=").append(getServiceType());
sb.append(",vnfComponentType=").append(getVnfComponentType());
sb.append(",vfModuleId=").append(getVfModuleModelUUId());
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfRecipe.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfRecipe.java
index 49865e8e9d..46017c2205 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfRecipe.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfRecipe.java
@@ -27,7 +27,6 @@ public class VnfRecipe extends Recipe implements Serializable {
private static final long serialVersionUID = 768026109321305392L;
private String vnfType;
- private String vnfParamXSD;
private String vfModuleId;
public VnfRecipe() {}
@@ -38,13 +37,6 @@ public class VnfRecipe extends Recipe implements Serializable {
public void setVnfType(String vnfType) {
this.vnfType = vnfType;
}
-
- public String getVnfParamXSD() {
- return vnfParamXSD;
- }
- public void setVnfParamXSD(String vnfParamXSD) {
- this.vnfParamXSD = vnfParamXSD;
- }
public String getVfModuleId() {
return vfModuleId;
@@ -58,7 +50,7 @@ public class VnfRecipe extends Recipe implements Serializable {
public String toString () {
StringBuilder sb = new StringBuilder();
sb.append(super.toString());
- sb.append(",vnfParamXSD=").append(vnfParamXSD);
+ sb.append(",vnfParamXSD=").append(getParamXSD());
sb.append(",serviceType=").append(getServiceType());
sb.append(",vfModuleId=").append(getVfModuleId());
return sb.toString();
diff --git a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioning.java b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioning.java
index 564fd5a019..e42f734a64 100644
--- a/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioning.java
+++ b/mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/utils/MavenLikeVersioning.java
@@ -51,29 +51,32 @@ public class MavenLikeVersioning implements Serializable {
*
*/
public boolean isMoreRecentThan (String versionToCompare) {
- if (versionToCompare == null || versionToCompare.trim().equals("") || this.version == null || this.version.trim().equals("")) {
+ if (versionToCompare == null || versionToCompare.trim().isEmpty() || this.version == null || this.version.trim().isEmpty()) {
return false;
}
- String [] currentVersionArray = this.version.split("\\.");
- String [] specifiedVersionArray = versionToCompare.split("\\.");
+ String[] currentVersionArray = this.version.split("\\.");
+ String[] specifiedVersionArray = versionToCompare.split("\\.");
- int smalestStringLength = Math.min(currentVersionArray.length, specifiedVersionArray.length);
+ int smalestStringLength = Math.min(currentVersionArray.length, specifiedVersionArray.length);
- for (int currentVersionIndex=0;currentVersionIndex < smalestStringLength;++currentVersionIndex) {
+ for (int currentVersionIndex = 0; currentVersionIndex < smalestStringLength; ++currentVersionIndex) {
- if (Integer.parseInt(currentVersionArray[currentVersionIndex]) < Integer.parseInt(specifiedVersionArray[currentVersionIndex])) {
+ if (Integer.parseInt(currentVersionArray[currentVersionIndex]) < Integer
+ .parseInt(specifiedVersionArray[currentVersionIndex])) {
return false;
- } else if (Integer.parseInt(currentVersionArray[currentVersionIndex]) > Integer.parseInt(specifiedVersionArray[currentVersionIndex])) {
+ } else if (Integer.parseInt(currentVersionArray[currentVersionIndex]) > Integer
+ .parseInt(specifiedVersionArray[currentVersionIndex])) {
return true;
}
}
-
- // Even if versionToCompare has more digits, it means versionToCompare is more recent
- if (Integer.parseInt(currentVersionArray[smalestStringLength-1]) == Integer.parseInt(specifiedVersionArray[smalestStringLength-1])) {
- return currentVersionArray.length > specifiedVersionArray.length;
+ try {
+ // Even if versionToCompare has more digits, it means versionToCompare is more recent
+ return Integer.parseInt(currentVersionArray[smalestStringLength - 1]) != Integer
+ .parseInt(specifiedVersionArray[smalestStringLength - 1])
+ || currentVersionArray.length > specifiedVersionArray.length;
+ } catch (NumberFormatException e) {
+ return false;
}
-
- return true;
}
/**
diff --git a/mso-catalog-db/src/main/resources/ArRecipe.hbm.xml b/mso-catalog-db/src/main/resources/ArRecipe.hbm.xml
new file mode 100644
index 0000000000..fedfe31551
--- /dev/null
+++ b/mso-catalog-db/src/main/resources/ArRecipe.hbm.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+ -->
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.openecomp.mso.db.catalog.beans">
+ <class name="ArRecipe" table="AR_RECIPE">
+ <meta attribute="class-description">
+ This class describes a AR recipe
+ </meta>
+
+ <id name="id" type="int" column="id">
+ <generator class="native"/>
+ </id>
+
+ <properties name="uk_ar_recipe" unique="true">
+ <property name="modelName" type="string" >
+ <column name="MODEL_NAME" not-null="true" length="20"/>
+ </property>
+ <property name="action" type="string" >
+ <column name="ACTION" not-null="true" length="20"/>
+ </property>
+ <property name="version" type="string">
+ <column name="VERSION_STR" not-null="true" length="20"/>
+ </property>
+
+ </properties>
+
+ <property name="serviceType" type="string" length="45">
+ <column name="SERVICE_TYPE" not-null="false" length="45"/>
+ </property>
+ <property name="description" column="DESCRIPTION" type="string" length="1200"/>
+ <property name="orchestrationUri" type="string">
+ <column name="ORCHESTRATION_URI" not-null="true" length="256"/>
+ </property>
+ <property name="paramXSD" column="AR_PARAM_XSD" type="string" length="2048"/>
+ <property name="recipeTimeout" column="RECIPE_TIMEOUT" type="int"/>
+ <property name="created" type="timestamp" generated="insert" update="false" insert="false" not-null="true">
+ <column name="CREATION_TIMESTAMP" default="CURRENT_TIMESTAMP"/>
+ </property>
+ </class>
+
+</hibernate-mapping> \ No newline at end of file
diff --git a/mso-catalog-db/src/main/resources/NetworkRecipe.hbm.xml b/mso-catalog-db/src/main/resources/NetworkRecipe.hbm.xml
index 1ed9c7c392..4490dbadd0 100644
--- a/mso-catalog-db/src/main/resources/NetworkRecipe.hbm.xml
+++ b/mso-catalog-db/src/main/resources/NetworkRecipe.hbm.xml
@@ -51,7 +51,7 @@
<property name="orchestrationUri" type="string">
<column name="ORCHESTRATION_URI" not-null="true" length="256"/>
</property>
- <property name="networkParamXSD" column="NETWORK_PARAM_XSD" type="string" length="2048"/>
+ <property name="paramXSD" column="NETWORK_PARAM_XSD" type="string" length="2048"/>
<property name="recipeTimeout" column="RECIPE_TIMEOUT" type="int"/>
<property name="created" type="timestamp" generated="insert" update="false" insert="false" not-null="true">
<column name="CREATION_TIMESTAMP" default="CURRENT_TIMESTAMP"/>
diff --git a/mso-catalog-db/src/main/resources/VnfComponentsRecipe.hbm.xml b/mso-catalog-db/src/main/resources/VnfComponentsRecipe.hbm.xml
index 20b9cab252..d2ca635c9a 100644
--- a/mso-catalog-db/src/main/resources/VnfComponentsRecipe.hbm.xml
+++ b/mso-catalog-db/src/main/resources/VnfComponentsRecipe.hbm.xml
@@ -46,7 +46,7 @@
<property name="orchestrationUri" type="string">
<column name="ORCHESTRATION_URI" not-null="true" length="256"/>
</property>
- <property name="vnfComponentParamXSD" column="VNF_COMPONENT_PARAM_XSD" type="string" length="2048"/>
+ <property name="paramXSD" column="VNF_COMPONENT_PARAM_XSD" type="string" length="2048"/>
<property name="recipeTimeout" column="RECIPE_TIMEOUT" type="int"/>
<property name="created" type="timestamp" generated="insert" update="false" insert="false" not-null="true">
<column name="CREATION_TIMESTAMP" default="CURRENT_TIMESTAMP"/>
diff --git a/mso-catalog-db/src/main/resources/VnfRecipe.hbm.xml b/mso-catalog-db/src/main/resources/VnfRecipe.hbm.xml
index 4dc7f968b4..910cb9bf5c 100644
--- a/mso-catalog-db/src/main/resources/VnfRecipe.hbm.xml
+++ b/mso-catalog-db/src/main/resources/VnfRecipe.hbm.xml
@@ -59,7 +59,7 @@
<column name="ORCHESTRATION_URI" not-null="true" length="256"/>
</property>
- <property name="vnfParamXSD" column="VNF_PARAM_XSD" type="string" length="2048"/>
+ <property name="paramXSD" column="VNF_PARAM_XSD" type="string" length="2048"/>
<property name="recipeTimeout" column="RECIPE_TIMEOUT" type="int"/>
<property name="created" type="timestamp" generated="insert" update="false" insert="false" not-null="true">
<column name="CREATION_TIMESTAMP" default="CURRENT_TIMESTAMP"/>
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/NetworkRecipeTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/NetworkRecipeTest.java
index 97eadb3f1d..c17b50e738 100644
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/NetworkRecipeTest.java
+++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/NetworkRecipeTest.java
@@ -46,8 +46,8 @@ public class NetworkRecipeTest {
assertTrue(networkRecipe.getId() == 1);
networkRecipe.setModelName("modelName");
assertTrue(networkRecipe.getModelName().equalsIgnoreCase("modelName"));
- networkRecipe.setNetworkParamXSD("networkParamXSD");
- assertTrue(networkRecipe.getNetworkParamXSD().equalsIgnoreCase("networkParamXSD"));
+ networkRecipe.setParamXSD("networkParamXSD");
+ assertTrue(networkRecipe.getParamXSD().equalsIgnoreCase("networkParamXSD"));
networkRecipe.setOrchestrationUri("orchestrationUri");
assertTrue(networkRecipe.getOrchestrationUri().equalsIgnoreCase("orchestrationUri"));
networkRecipe.setRecipeTimeout(1);
diff --git a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/VnfRecipeTest.java b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/VnfRecipeTest.java
index 95e45f7b52..3f707871a6 100644
--- a/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/VnfRecipeTest.java
+++ b/mso-catalog-db/src/test/java/org/openecomp/mso/db/catalog/test/VnfRecipeTest.java
@@ -52,8 +52,8 @@ public class VnfRecipeTest {
assertTrue(vnfRecipe.getServiceType().equalsIgnoreCase("serviceType"));
vnfRecipe.setVersion("version");
assertTrue(vnfRecipe.getVersion().equalsIgnoreCase("version"));
- vnfRecipe.setVnfParamXSD("vnfParamXSD");
- assertTrue(vnfRecipe.getVnfParamXSD().equalsIgnoreCase("vnfParamXSD"));
+ vnfRecipe.setParamXSD("vnfParamXSD");
+ assertTrue(vnfRecipe.getParamXSD().equalsIgnoreCase("vnfParamXSD"));
vnfRecipe.setVfModuleId("vfModuleId");
assertTrue(vnfRecipe.getVfModuleId().equalsIgnoreCase("vfModuleId"));
// assertTrue(vnfRecipe.toString() == null);
diff --git a/pom.xml b/pom.xml
index c77b9e5408..a1f9ca7ede 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,7 +1,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
-
<parent>
<groupId>org.onap.oparent</groupId>
<artifactId>oparent</artifactId>