From 0753a8356806f40f77a7f1444b655efba1a654c9 Mon Sep 17 00:00:00 2001 From: Elaine_Han Date: Fri, 3 Aug 2018 20:04:55 +0800 Subject: Add SPPaterner resource procss Change-Id: Idaa55084f5ecb0dd3636c232cebc14fa70000001 Issue-ID: SO-683 Signed-off-by: Yulian Han --- .../scripts/Create3rdONAPE2EServiceInstance.groovy | 591 ++++++++++++++++ .../scripts/DoCreateResources.groovy | 1 + .../scripts/DoDeleteResources.groovy | 317 --------- .../process/Create3rdONAPE2EServiceInstance.bpmn | 740 +++++++++++++++++++++ .../CreateCustom3rdONAPServiceInstance.bpmn | 389 ----------- .../process/Delete3rdONAPE2EServiceInstance.bpmn | 613 +++++++++++++++++ .../DeleteCustom3rdONAPServiceInstance.bpmn | 381 ----------- .../resources/subprocess/DoDeleteResources.bpmn | 486 -------------- 8 files changed, 1945 insertions(+), 1573 deletions(-) create mode 100644 bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy delete mode 100644 bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResources.groovy create mode 100644 bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Create3rdONAPE2EServiceInstance.bpmn delete mode 100644 bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateCustom3rdONAPServiceInstance.bpmn create mode 100644 bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Delete3rdONAPE2EServiceInstance.bpmn delete mode 100644 bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteCustom3rdONAPServiceInstance.bpmn delete mode 100644 bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteResources.bpmn (limited to 'bpmn/so-bpmn-infrastructure-flows/src/main') diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy new file mode 100644 index 0000000000..a2f4e35df1 --- /dev/null +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/Create3rdONAPE2EServiceInstance.groovy @@ -0,0 +1,591 @@ +/*- + * ============LICENSE_START======================================================= + * OPENECOMP - 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.onap.so.bpmn.infrastructure.scripts; + +import org.json.JSONObject +import org.json.XML; + +import static org.apache.commons.lang3.StringUtils.*; +import groovy.xml.XmlUtil +import groovy.json.* +import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor +import org.onap.so.bpmn.common.scripts.ExceptionUtil +import org.onap.so.bpmn.common.scripts.ExternalAPIUtil +import org.onap.so.bpmn.common.scripts.AaiUtil +import org.onap.so.bpmn.common.scripts.MsoUtils +import org.onap.so.bpmn.common.recipe.ResourceInput; +import org.onap.so.bpmn.common.resource.ResourceRequestBuilder +import org.onap.so.bpmn.core.WorkflowException +import org.onap.so.bpmn.core.json.JsonUtils +import org.onap.so.bpmn.infrastructure.workflow.serviceTask.client.builder.AbstractBuilder +import org.onap.so.rest.APIResponse +import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils +import org.onap.so.bpmn.infrastructure.workflow.service.ServicePluginFactory +import java.util.UUID; + +import org.camunda.bpm.engine.runtime.Execution +import org.camunda.bpm.engine.delegate.BpmnError +import org.camunda.bpm.engine.delegate.DelegateExecution +import org.apache.commons.lang3.* +import org.apache.commons.codec.binary.Base64; +import org.springframework.web.util.UriUtils +import org.onap.so.rest.RESTClient +import org.onap.so.rest.RESTConfig + +/** + * This groovy class supports the Create3rdONAPE2EServiceInstance.bpmn process. + * flow for Create E2EServiceInstance in 3rdONAP + */ +public class Create3rdONAPE2EServiceInstance extends AbstractServiceTaskProcessor { + + String Prefix="CRE3rdONAPESI_" + + ExceptionUtil exceptionUtil = new ExceptionUtil() + + JsonUtils jsonUtil = new JsonUtils() + + public void checkSPPartnerInfo (DelegateExecution execution) { + def isDebugEnabled = execution.getVariable("isDebugLogEnabled") + utils.log("INFO"," ***** Started checkSPPartnerInfo *****", isDebugEnabled) + try { + //get bpmn inputs from resource request. + String requestId = execution.getVariable("mso-request-id") + String requestAction = execution.getVariable("requestAction") + utils.log("INFO","The requestAction is: " + requestAction, isDebugEnabled) + String recipeParamsFromRequest = execution.getVariable("recipeParams") + utils.log("INFO","The recipeParams is: " + recipeParamsFromRequest, isDebugEnabled) + String resourceInput = execution.getVariable("resourceInput") + utils.log("INFO","The resourceInput is: " + resourceInput, isDebugEnabled) + //Get ResourceInput Object + ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(resourceInput, ResourceInput.class) + String resourceInputPrameters = resourceInputObj.getResourceParameters() + String inputParametersJson = jsonUtil.getJsonValue(resourceInputPrameters, "requestInputs") + JSONObject inputParameters = new JSONObject(customizeResourceParam(inputParametersJson)) + + // set local resourceInput + execution.setVariable(Prefix + "resourceInput", resourceInputObj) + + boolean is3rdONAPExist = false + + if(inputParameters.has("id")) + { + String sppartnerId = inputParameters.get("id") + } + if(inputParameters.has("url")) + { + String sppartnerUrl = inputParameters.get("url") + if(!isBlank(sppartnerUrl)) { + execution.setVariable(Prefix + "sppartnerUrl", sppartnerUrl) + is3rdONAPExist = true + } + else { + is3rdONAPExist = false + String msg = "sppartner Url is blank." + utils.log("DEBUG", msg, isDebugEnabled) + } + } + if(inputParameters.has("providingServiceInvarianteUuid")) + { + String sppartnerInvarianteUUID = inputParameters.get("providingServiceInvarianteUuid") + execution.setVariable(Prefix + "sppartnerInvarianteUUID", sppartnerInvarianteUUID) + is3rdONAPExist = true + } + else { + is3rdONAPExist = false + String msg = "sppartner providingServiceInvarianteUuid is blank." + utils.log("DEBUG", msg, isDebugEnabled) + } + if(inputParameters.has("providingServiceUuid")) + { + String sppartnerUUID = inputParameters.get("providingServiceUuid") + execution.setVariable(Prefix + "sppartnerUUID", sppartnerUUID) + is3rdONAPExist = true + } + else { + is3rdONAPExist = false + String msg = "sppartner providingServiceUuid is blank." + utils.log("DEBUG", msg, isDebugEnabled) + } + + if(inputParameters.has("handoverMode")) + { + String handoverMode = inputParameters.get("handoverMode") + execution.setVariable(Prefix + "handoverMode", handoverMode) + is3rdONAPExist = true + } + else { + is3rdONAPExist = false + String msg = "sppartner handoverMode is blank." + utils.log("DEBUG", msg, isDebugEnabled) + } + + execution.setVariable("Is3rdONAPExist", is3rdONAPExist) + execution.setVariable(Prefix + "serviceInstanceId", resourceInputObj.getServiceInstanceId()) + execution.setVariable("mso-request-id", requestId) + execution.setVariable("mso-service-instance-id", resourceInputObj.getServiceInstanceId()) + + } catch (BpmnError e) { + throw e; + } catch (Exception ex){ + String msg = "Exception in checkSPPartnerInfo " + ex.getMessage() + utils.log("DEBUG", msg, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) + } + } + + public void checkLocallCall (DelegateExecution execution) { + def isDebugEnabled = execution.getVariable("isDebugLogEnabled") + utils.log("INFO"," ***** Started checkLocallCall *****", isDebugEnabled) + try { + + //Get ResourceInput Object + ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput") + + //uuiRequest + String incomingRequest = resourceInputObj.getRequestsInputs() + String serviceParameters = jsonUtil.getJsonValue(incomingRequest, "service.parameters") + JSONObject inputParameters = new JSONObject(customizeResourceParam(serviceParameters)) + execution.setVariable(Prefix + "serviceParameters", inputParameters) + + // CallSource is added only when ONAP SO calling 3rdONAP SO(Remote call) + boolean isLocalCall = true + if(inputParameters.has("CallSource")) + { + String callSource = inputParameters.get("CallSource") + if("3rdONAP".equalsIgnoreCase(callSource)) { + isLocalCall = false + } + execution.setVariable(Prefix + "CallSource", callSource) + utils.log("DEBUG", "callSource is: " + callSource , isDebugEnabled) + isLocalCall = true + } + + execution.setVariable("IsLocalCall", isLocalCall) + + } catch (BpmnError e) { + throw e; + } catch (Exception ex){ + String msg = "Exception in checkLocallCall " + ex.getMessage() + utils.log("DEBUG", msg, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) + } + } + + public void preProcessRequest(DelegateExecution execution){ + def isDebugEnabled = execution.getVariable("isDebugLogEnabled") + utils.log("INFO"," ***** Started preProcessRequest *****", isDebugEnabled) + try { + ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput") + String msg = "" + + String globalSubscriberId = resourceInputObj.getGlobalSubscriberId() + if (isBlank(globalSubscriberId)) { + msg = "Input globalSubscriberId is null" + utils.log("INFO", msg, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg) + } + //set local variable + execution.setVariable("globalSubscriberId", globalSubscriberId); + utils.log("INFO", "globalSubscriberId:" + globalSubscriberId, isDebugEnabled) + + String serviceType = resourceInputObj.getServiceType() + if (isBlank(serviceType)) { + msg = "Input serviceType is null" + utils.log("INFO", msg, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg) + } + execution.setVariable("serviceType", serviceType) + utils.log("INFO", "serviceType:" + serviceType, isDebugEnabled) + + String resourceName = resourceInputObj.getResourceInstanceName(); + if (isBlank(resourceName)) { + msg = "Input resourceName is null" + utils.log("INFO", msg, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg) + } + execution.setVariable("resourceName", resourceName) + utils.log("INFO", "resourceName:" + resourceName, isDebugEnabled) + + int beginIndex = resourceName.indexOf("_") + 1 + String serviceInstanceName = resourceName.substring(beginIndex) + execution.setVariable("serviceInstanceName", serviceInstanceName) + + String serviceInstanceId = resourceInputObj.getServiceInstanceId(); + if (isBlank(serviceInstanceId)) { + msg = "Input serviceInstanceId is null" + utils.log("INFO", msg, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg) + } + execution.setVariable("serviceInstanceId", serviceInstanceId) + utils.log("INFO", "serviceInstanceId:" + serviceInstanceId, isDebugEnabled) + + } catch (BpmnError e) { + throw e; + } catch (Exception ex){ + String msg = "Exception in preProcessRequest " + ex.getMessage() + utils.log("DEBUG", msg, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) + } + } + + public void prepareUpdateProgress(DelegateExecution execution) { + def isDebugEnabled = execution.getVariable("isDebugLogEnabled") + utils.log("INFO"," ***** Started prepareUpdateProgress *****", isDebugEnabled) + ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput") + String operType = resourceInputObj.getOperationType() + String resourceCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid() + String ServiceInstanceId = resourceInputObj.getServiceInstanceId() + String modelName = resourceInputObj.getResourceModelInfo().getModelName() + String operationId = resourceInputObj.getOperationId() + String progress = execution.getVariable("progress") + String status = execution.getVariable("status") + String statusDescription = execution.getVariable("statusDescription") + + String body = """ + + + + + ${operType} + ${operationId} + ${progress} + ${resourceCustomizationUuid} + ${ServiceInstanceId} + ${status} + ${statusDescription} + + + """; + + setProgressUpdateVariables(execution, body) + utils.log("INFO"," ***** End prepareUpdateProgress *****", isDebugEnabled) + } + + public void allocateCrossONAPResource(DelegateExecution execution) { + def isDebugEnabled = execution.getVariable("isDebugLogEnabled") + utils.log("INFO"," ***** Started allocateCrossONAPResource *****", isDebugEnabled) + + //get TP links from AAI for SOTN handoverMode only + String handoverMode = execution.getVariable(Prefix + "handoverMode") + if("SOTN".equalsIgnoreCase(handoverMode)) { + //to do get tp link in AAI + + + // Put TP Link info into serviceParameters + String accessProviderId = "" + String accessClientId = "" + String accessTopologyId = "" + String accessNodeId = "" + String accessLtpId = "" + JSONObject inputParameters = execution.getVariable(Prefix + "serviceParameters") + inputParameters.put("access-provider-id", accessProviderId) + inputParameters.put("access-client-id", accessClientId) + inputParameters.put("access-topology-id", accessTopologyId) + inputParameters.put("access-node-id", accessNodeId) + inputParameters.put("access-ltp-id", accessLtpId) + execution.setVariable(Prefix + "serviceParameters", inputParameters) + } + + utils.log("INFO", "Exited " + allocateCrossONAPResource, isDebugEnabled) + } + + public void prepare3rdONAPRequest(DelegateExecution execution) { + def isDebugEnabled = execution.getVariable("isDebugLogEnabled") + utils.log("INFO"," ***** Started prepare3rdONAPRequest *****", isDebugEnabled) + + String sppartnerUrl = execution.getVariable(Prefix + "sppartnerUrl") + String extAPIPath = sppartnerUrl + 'serviceOrder' + execution.setVariable("ExternalAPIURL", extAPIPath) + + // ExternalAPI message format + String externalId = execution.getVariable("resourceName") + String category = "Network Service" + String description = "Service Order from SPPartner" + String requestedStartDate = utils.generateCurrentTimeInUtc() + String requestedCompletionDate = utils.generateCurrentTimeInUtc() + String priority = "1" // 0-4 0:highest + String subscriberId = execution.getVariable("globalSubscriberId") + String customerRole = "" + String subscriberName = "" + String referredType = execution.getVariable("serviceType") + String orderItemId = "1" + String action = "add" //for create + String serviceState = "active" + String serviceName = execution.getVariable("serviceInstanceName") + String serviceId = execution.getVariable("serviceInstanceId") + + Map valueMap = new HashMap<>() + valueMap.put("externalId", '"' + externalId + '"') + valueMap.put("category", '"' + category + '"') + valueMap.put("description", '"' + description + '"') + valueMap.put("requestedStartDate", '"' + requestedStartDate + '"') + valueMap.put("requestedCompletionDate", '"' + requestedCompletionDate + '"') + valueMap.put("priority", '"'+ priority + '"') + valueMap.put("subscriberId", '"' + subscriberId + '"') + valueMap.put("customerRole", '"' + customerRole + '"') + valueMap.put("subscriberName", '"' + subscriberName + '"') + valueMap.put("referredType", '"' + referredType + '"') + valueMap.put("orderItemId", '"' + orderItemId + '"') + valueMap.put("action", '"' + action + '"') + valueMap.put("serviceState", '"' + serviceState + '"') + valueMap.put("serviceName", '"' + serviceName + '"') + valueMap.put("serviceId", '"' + serviceId + '"') + + ExternalAPIUtil externalAPIUtil = new ExternalAPIUtil(this) + + // insert CallSource='3rdONAP' to uuiRequest + Map callSourceMap = new HashMap<>() + callSourceMap.put("inputName", "CallSource") + callSourceMap.put("inputValue", "3rdONAP") + String _requestInputs_ = externalAPIUtil.setTemplate(ExternalAPIUtil.RequestInputsTemplate, callSourceMap) + + // Transfer all uuiRequest incomeParameters to ExternalAPI format + JSONObject inputParameters = execution.getVariable(Prefix + "serviceParameters") + for(String key : inputParameters.keySet()) { + String inputName = key; + String inputValue = inputParameters.opt(key); + Map requestInputsMap = new HashMap<>() + requestInputsMap.put("inputName", '"' + inputName+ '"') + requestInputsMap.put("inputValue", '"' + inputValue + '"') + _requestInputs_ += ",\n" + externalAPIUtil.setTemplate(ExternalAPIUtil.RequestInputsTemplate, requestInputsMap) + } + valueMap.put("_requestInputs_", _requestInputs_) + + String payload = externalAPIUtil.setTemplate(ExternalAPIUtil.PostServiceOrderRequestsTemplate, valueMap) + execution.setVariable(Prefix + "payload", payload) + utils.log("INFO", "Exited " + prepare3rdONAPRequest, isDebugEnabled) + } + + public void doCreateE2ESIin3rdONAP(DelegateExecution execution) { + def isDebugEnabled = execution.getVariable("isDebugLogEnabled") + utils.log("INFO"," ***** Started doCreateE2ESIin3rdONAP *****", isDebugEnabled) + + String extAPIPath = execution.getVariable("ExternalAPIURL") + String payload = execution.getVariable(Prefix + "payload") + + ExternalAPIUtil externalAPIUtil = new ExternalAPIUtil(this) + + APIResponse response = externalAPIUtil.executeExternalAPIPostCall(execution, extAPIPath, payload) + + int responseCode = response.getStatusCode() + execution.setVariable(Prefix + "postServiceOrderResponseCode", responseCode) + utils.log("DEBUG", "Post ServiceOrder response code is: " + responseCode, isDebugEnabled) + + String extApiResponse = response.getResponseBodyAsString() + JSONObject responseObj = new JSONObject(extApiResponse) + execution.setVariable(Prefix + "postServiceOrderResponse", extApiResponse) + //Process Response + if(responseCode == 200 || responseCode == 201 || responseCode == 202 ) + //200 OK 201 CREATED 202 ACCEPTED + { + utils.log("DEBUG", "Post ServiceOrder Received a Good Response", isDebugEnabled) + String serviceOrderId = responseObj.get("ServiceOrderId") + execution.setVariable(Prefix + "SuccessIndicator", true) + execution.setVariable("serviceOrderId", serviceOrderId) + } + else{ + utils.log("DEBUG", "Post ServiceOrder Received a Bad Response Code. Response Code is: " + responseCode, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Post ServiceOrder Received a bad response from 3rdONAP External API") + } + + utils.log("INFO", "Exited " + doCreateE2ESIin3rdONAP, isDebugEnabled) + } + + + public void getE2ESIProgressin3rdONAP(DelegateExecution execution) { + def isDebugEnabled = execution.getVariable("isDebugLogEnabled") + utils.log("INFO"," ***** Started getE2ESIProgressin3rdONAP *****", isDebugEnabled) + + String extAPIPath = execution.getVariable("ExternalAPIURL") + extAPIPath += "/" + execution.getVariable("ServiceOrderId") + + ExternalAPIUtil externalAPIUtil = new ExternalAPIUtil(this) + + APIResponse response = externalAPIUtil.executeExternalAPIGetCall(execution, extAPIPath) + + int responseCode = response.getStatusCode() + execution.setVariable(Prefix + "getServiceOrderResponseCode", responseCode) + utils.log("DEBUG", "Get ServiceOrder response code is: " + responseCode, isDebugEnabled) + + String extApiResponse = response.getResponseBodyAsString() + JSONObject responseObj = new JSONObject(extApiResponse) + execution.setVariable(Prefix + "getServiceOrderResponse", extApiResponse) + + //Process Response //200 OK 201 CREATED 202 ACCEPTED + if(responseCode == 200 || responseCode == 201 || responseCode == 202 ) + { + utils.log("DEBUG", "Get ServiceOrder Received a Good Response", isDebugEnabled) + String serviceOrderState = responseObj.get("State") + execution.setVariable(Prefix + "SuccessIndicator", true) + execution.setVariable("serviceOrderState", serviceOrderState) + + // Get serviceOrder State and process progress + if("ACKNOWLEDGED".equalsIgnoreCase(serviceOrderState)) { + execution.setVariable("progress", 15) + execution.setVariable("status", "processing") + } + if("INPROGRESS".equalsIgnoreCase(serviceOrderState)) { + execution.setVariable("progress", 40) + execution.setVariable("status", "processing") + } + if("COMPLETED".equalsIgnoreCase(serviceOrderState)) { + execution.setVariable("progress", 100) + execution.setVariable("status", "finished") + } + if("FAILED".equalsIgnoreCase(serviceOrderState)) { + execution.setVariable("progress", 100) + execution.setVariable("status", "error") + } + else { + execution.setVariable("progress", 100) + execution.setVariable("status", "error") + execution.setVariable("statusDescription", "Create Service Order Status is unknown") + } + execution.setVariable("statusDescription", "Create Service Order Status is " + serviceOrderState) + } + else{ + utils.log("DEBUG", "Get ServiceOrder Received a Bad Response Code. Response Code is: " + responseCode, isDebugEnabled) + execution.setVariable("progress", 100) + execution.setVariable("status", "error") + execution.setVariable("statusDescription", "Get ServiceOrder Received a bad response") + exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Get ServiceOrder Received a bad response from 3rdONAP External API") + } + + utils.log("INFO", "Exited " + getE2ESIProgressin3rdONAP, isDebugEnabled) + } + + /** + * delay 5 sec + */ + public void timeDelay(DelegateExecution execution) { + def isDebugEnabled= execution.getVariable("isDebugLogEnabled") + try { + Thread.sleep(5000); + } catch(InterruptedException e) { + utils.log("ERROR", "Time Delay exception" + e , isDebugEnabled) + } + } + + public void saveSPPartnerInAAI(DelegateExecution execution) { + def isDebugEnabled = execution.getVariable("isDebugLogEnabled") + utils.log("INFO"," ***** Started postCreateE2ESIin3rdONAP *****", isDebugEnabled) + + String sppartnerId = UUID.randomUUID().toString() + String sppartnerUrl = execution.getVariable(Prefix + "sppartnerUrl") + String serviceInstanceId = execution.getVariable("serviceInstanceId") + + AaiUtil aaiUriUtil = new AaiUtil(this) + String aai_uri = aaiUriUtil.getBusinessSPPartnerUri(execution) + String namespace = aaiUriUtil.getNamespaceFromUri(aai_uri) + + String payload = + """ + ${sppartnerId} + ${sppartnerUrl} + + ${serviceInstanceId} + + """.trim() + utils.logAudit(payload) + + String aai_endpoint = execution.getVariable("URN_aai_endpoint") + String serviceAaiPath = "${aai_endpoint}${aai_uri}/" + UriUtils.encode(sppartnerId,"UTF-8") + + APIResponse response = aaiUriUtil.executeAAIPutCall(execution, serviceAaiPath, payload) + int responseCode = response.getStatusCode() + execution.setVariable(Prefix + "putSppartnerResponseCode", responseCode) + utils.log("DEBUG", " Put sppartner response code is: " + responseCode, isDebugEnabled) + + String aaiResponse = response.getResponseBodyAsString() + aaiResponse = StringEscapeUtils.unescapeXml(aaiResponse) + execution.setVariable(Prefix + "putSppartnerResponse", aaiResponse) + + //Process Response + if(responseCode == 200 || responseCode == 201 || responseCode == 202 ) + //200 OK 201 CREATED 202 ACCEPTED + { + utils.log("DEBUG", "PUT sppartner Received a Good Response", isDebugEnabled) + execution.setVariable(Prefix + "SuccessIndicator", true) + } + else + { + utils.log("DEBUG", "Put sppartner Received a Bad Response Code. Response Code is: " + responseCode, isDebugEnabled) + exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode) + throw new BpmnError("MSOWorkflowException") + } + + utils.log("INFO", "Exited " + saveSPPartnerInAAI, isDebugEnabled) + } + + private void setProgressUpdateVariables(DelegateExecution execution, String body) { + def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint") + execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint) + execution.setVariable("CVFMI_updateResOperStatusRequest", body) + } + + public void postProcess(DelegateExecution execution){ + def isDebugEnabled = execution.getVariable("isDebugLogEnabled") + utils.log("INFO"," ***** Started postProcess *****", isDebugEnabled) + String responseCode = execution.getVariable(Prefix + "putSppartnerResponseCode") + String responseObj = execution.getVariable(Prefix + "putSppartnerResponse") + + utils.log("INFO","response from AAI for put sppartner, response code :" + responseCode + " response object :" + responseObj, isDebugEnabled) + utils.log("INFO"," ***** Exit postProcess *****", isDebugEnabled) + } + + public void sendSyncResponse (DelegateExecution execution) { + def isDebugEnabled=execution.getVariable("isDebugLogEnabled") + utils.log("DEBUG", " *** sendSyncResponse *** ", isDebugEnabled) + + try { + String operationStatus = "finished" + // RESTResponse for main flow + String resourceOperationResp = """{"operationStatus":"${operationStatus}"}""".trim() + utils.log("DEBUG", " sendSyncResponse to APIH:" + "\n" + resourceOperationResp, isDebugEnabled) + sendWorkflowResponse(execution, 202, resourceOperationResp) + execution.setVariable("sentSyncResponse", true) + + } catch (Exception ex) { + String msg = "Exceptuion in sendSyncResponse:" + ex.getMessage() + utils.log("DEBUG", msg, isDebugEnabled) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) + } + utils.log("DEBUG"," ***** Exit sendSyncResopnse *****", isDebugEnabled) + } + + String customizeResourceParam(String inputParametersJson) { + List> paramList = new ArrayList(); + JSONObject jsonObject = new JSONObject(inputParametersJson); + Iterator iterator = jsonObject.keys(); + while (iterator.hasNext()) { + String key = iterator.next(); + HashMap hashMap = new HashMap(); + hashMap.put("name", key); + hashMap.put("value", jsonObject.get(key)) + paramList.add(hashMap) + } + Map>> paramMap = new HashMap(); + paramMap.put("param", paramList); + + return new JSONObject(paramMap).toString(); + } +} diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy index f7c5c1b83d..9da8a90ca7 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy @@ -233,6 +233,7 @@ public class DoCreateResources extends AbstractServiceTaskProcessor{ String serviceParameters = jsonUtil.getJsonValue(incomingRequest, "service.parameters") String resourceParameters = ResourceRequestBuilder.buildResourceRequestParameters(execution, serviceModelUuid, resourceCustomizationUuid, serviceParameters) resourceInput.setResourceParameters(resourceParameters) + resourceInput.setRequestsInputs(incomingRequest) execution.setVariable("resourceInput", resourceInput) msoLogger.trace("COMPLETED prepareResourceRecipeRequest Process ") } diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResources.groovy b/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResources.groovy deleted file mode 100644 index f6dd0cad16..0000000000 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteResources.groovy +++ /dev/null @@ -1,317 +0,0 @@ -/*- - * ============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.onap.so.bpmn.infrastructure.scripts - -import org.json.JSONArray; - -import static org.apache.commons.lang3.StringUtils.*; -import groovy.xml.XmlUtil -import groovy.json.* - -import org.onap.so.bpmn.core.domain.ModelInfo -import org.onap.so.bpmn.core.domain.Resource -import org.onap.so.bpmn.core.domain.ServiceInstance -import org.onap.so.bpmn.core.json.JsonUtils -import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor -import org.onap.so.bpmn.common.scripts.ExceptionUtil -import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils -import org.onap.so.bpmn.core.WorkflowException -import org.onap.so.rest.APIResponse; -import org.onap.so.rest.RESTClient -import org.onap.so.rest.RESTConfig - -import java.util.List; -import java.util.UUID; -import javax.xml.parsers.DocumentBuilder -import javax.xml.parsers.DocumentBuilderFactory - -import org.camunda.bpm.engine.delegate.BpmnError -import org.camunda.bpm.engine.delegate.DelegateExecution -import org.camunda.bpm.engine.runtime.Execution -import org.json.JSONObject; -import org.apache.commons.lang3.* -import org.apache.commons.codec.binary.Base64; -import org.springframework.web.util.UriUtils; -import org.w3c.dom.Document -import org.w3c.dom.Element -import org.w3c.dom.Node -import org.w3c.dom.NodeList -import org.xml.sax.InputSource - -import com.fasterxml.jackson.jaxrs.json.annotation.JSONP.Def; -import org.onap.so.logger.MessageEnum -import org.onap.so.logger.MsoLogger - -/** - * This groovy class supports the DoDeleteResources.bpmn process. - * - * Inputs: - * @param - msoRequestId - * @param - globalSubscriberId - O - * @param - subscriptionServiceType - O - * @param - serviceInstanceId - * @param - serviceInstanceName - O - * @param - serviceInputParams (should contain aic_zone for serviceTypes TRANSPORT,ATM) - * @param - sdncVersion - * @param - failNotFound - TODO - * @param - serviceInputParams - TODO - * - * @param - delResourceList - * @param - serviceRelationShip - * - * Outputs: - * @param - WorkflowException - * - * Rollback - Deferred - */ -public class DoDeleteResources extends AbstractServiceTaskProcessor { - private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, DoDeleteResources.class); - - String Prefix="DDELR_" - ExceptionUtil exceptionUtil = new ExceptionUtil() - JsonUtils jsonUtil = new JsonUtils() - - public void preProcessRequest (DelegateExecution execution) { - msoLogger.trace("preProcessRequest ") - String msg = "" - - List realNSRessources = new ArrayList() - - // related ns from AAI - String serviceRelationShip = execution.getVariable("serviceRelationShip") - def jsonSlurper = new JsonSlurper() - def jsonOutput = new JsonOutput() - List nsSequence = new ArrayList() - List relationShipList = jsonSlurper.parseText(serviceRelationShip) - if (relationShipList != null) { - relationShipList.each { - String resourceType = it.resourceType - nsSequence.add(resourceType) - } - } - - execution.setVariable("currentNSIndex", 0) - execution.setVariable("nsSequence", nsSequence) - execution.setVariable("realNSRessources", realNSRessources) - msoLogger.info("nsSequence: " + nsSequence) - - msoLogger.trace("Exit preProcessRequest ") - } - - public void getCurrentNS(execution){ - msoLogger.trace("Start getCurrentNS Process ") - - def currentIndex = execution.getVariable("currentNSIndex") - List nsSequence = execution.getVariable("nsSequence") - String nsResourceType = nsSequence.get(currentIndex) - - // GET AAI by Name, not ID, for process convenient - execution.setVariable("GENGS_type", "service-instance") - execution.setVariable("GENGS_serviceInstanceId", "") - execution.setVariable("GENGS_serviceInstanceName", nsResourceType) - - msoLogger.trace("COMPLETED getCurrentNS Process ") - } - - public void postProcessAAIGET(DelegateExecution execution) { - msoLogger.trace("postProcessAAIGET2 ") - String msg = "" - - try { - String nsResourceName = execution.getVariable("GENGS_serviceInstanceName") - boolean succInAAI = execution.getVariable("GENGS_SuccessIndicator") - if(!succInAAI){ - msoLogger.info("Error getting Service-instance from AAI in postProcessAAIGET", + nsResourceName) - WorkflowException workflowException = execution.getVariable("WorkflowException") - msoLogger.debug("workflowException: " + workflowException) - if(workflowException != null){ - exceptionUtil.buildAndThrowWorkflowException(execution, workflowException.getErrorCode(), workflowException.getErrorMessage()) - } - else - { - msg = "Failure in postProcessAAIGET GENGS_SuccessIndicator:" + succInAAI - msoLogger.info(msg) - exceptionUtil.buildAndThrowWorkflowException(execution, 2500, msg) - } - } - else - { - boolean foundInAAI = execution.getVariable("GENGS_FoundIndicator") - if(foundInAAI){ - String aaiService = execution.getVariable("GENGS_service") - if (!isBlank(aaiService)) { - String svcId = utils.getNodeText(aaiService, "service-instance-id") - //String mn = utils.getNodeText(aaiService, "model-name") - String mIuuid = utils.getNodeText(aaiService, "model-invariant-id") - String muuid = utils.getNodeText(aaiService, "model-version-id") - String mCuuid = utils.getNodeText(aaiService, "model-customization-uuid") - ServiceInstance rc = new ServiceInstance() - ModelInfo modelInfo = new ModelInfo() - //modelInfo.setModelName(mn) - modelInfo.setModelUuid(muuid) - modelInfo.setModelInvariantUuid(mIuuid) - modelInfo.getModelCustomizationUuid(mCuuid) - rc.setModelInfo(modelInfo) - rc.setInstanceId(svcId) - rc.setInstanceName(nsResourceName) - - List realNSRessources = execution.getVariable("realNSRessources") - realNSRessources.add(rc) - execution.setVariable("realNSRessources", realNSRessources) - - msoLogger.info("Found Service-instance in AAI.serviceInstanceName:" + execution.getVariable("serviceInstanceName")) - } - } - } - } catch (BpmnError e) { - throw e; - } catch (Exception ex) { - msg = "Exception in DoDeleteResources.postProcessAAIGET " + ex.getMessage() - msoLogger.info(msg) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) - } - msoLogger.trace("Exit postProcessAAIGET ") - } - - public void parseNextNS(execution){ - msoLogger.trace("Start parseNextNS Process ") - def currentIndex = execution.getVariable("currentNSIndex") - def nextIndex = currentIndex + 1 - execution.setVariable("currentNSIndex", nextIndex) - List nsSequence = execution.getVariable("nsSequence") - if(nextIndex >= nsSequence.size()){ - execution.setVariable("allNsFinished", "true") - }else{ - execution.setVariable("allNsFinished", "false") - } - msoLogger.trace("COMPLETED parseNextNS Process ") - } - - - public void sequenceResource(execution){ - msoLogger.trace("STARTED sequenceResource Process ") - List nsResources = new ArrayList() - List wanResources = new ArrayList() - List resourceSequence = new ArrayList() - - // get delete resource list and order list - List delResourceList = execution.getVariable("delResourceList") - // existing resource list - List existResourceList = execution.getVariable("realNSRessources") - - for(ServiceInstance rc_e : existResourceList){ - - String muuid = rc_e.getModelInfo().getModelUuid() - String mIuuid = rc_e.getModelInfo().getModelInvariantUuid() - String mCuuid = rc_e.getModelInfo().getModelCustomizationUuid() - rcType = rc_e.getInstanceName() - - for(Resource rc_d : delResourceList){ - - if(rc_d.getModelInfo().getModelUuid() == muuid - && rc_d.getModelInfo().getModelInvariantUuid() == mIuuid - && rc_d.getModelInfo().getModelCustomizationUuid() == mCuuid) { - - if(StringUtils.containsIgnoreCase(rcType, "overlay") - || StringUtils.containsIgnoreCase(rcType, "underlay")){ - wanResources.add(rcType) - }else{ - nsResources.add(rcType) - } - - } - } - - } - - resourceSequence.addAll(wanResources) - resourceSequence.addAll(nsResources) - String isContainsWanResource = wanResources.isEmpty() ? "false" : "true" - execution.setVariable("isContainsWanResource", isContainsWanResource) - execution.setVariable("currentResourceIndex", 0) - execution.setVariable("resourceSequence", resourceSequence) - msoLogger.info("resourceSequence: " + resourceSequence) - execution.setVariable("wanResources", wanResources) - msoLogger.trace("END sequenceResource Process ") - } - - public void getCurrentResource(execution){ - msoLogger.trace("Start getCurrentResoure Process ") - def currentIndex = execution.getVariable("currentResourceIndex") - List resourceSequence = execution.getVariable("resourceSequence") - List wanResources = execution.getVariable("wanResources") - String resourceName = resourceSequence.get(currentIndex) - execution.setVariable("resourceType",resourceName) - if(wanResources.contains(resourceName)){ - execution.setVariable("controllerInfo", "SDN-C") - }else{ - execution.setVariable("controllerInfo", "VF-C") - } - msoLogger.trace("COMPLETED getCurrentResoure Process ") - } - - /** - * prepare delete parameters - */ - public void preResourceDelete(execution, resourceName){ - - msoLogger.trace("STARTED preResourceDelete Process ") - - List existResourceList = execution.getVariable("realNSRessources") - - for(ServiceInstance rc_e : existResourceList){ - - if(StringUtils.containsIgnoreCase(rc_e.getInstanceName(), resourceName)) { - - String resourceInstanceUUID = rc_e.getInstanceId() - String resourceTemplateUUID = rc_e.getModelInfo().getModelUuid() - execution.setVariable("resourceInstanceId", resourceInstanceUUID) - execution.setVariable("resourceTemplateId", resourceTemplateUUID) - execution.setVariable("resourceType", resourceName) - msoLogger.info("Delete Resource Info resourceTemplate Id :" + resourceTemplateUUID + " resourceInstanceId: " + resourceInstanceUUID + " resourceType: " + resourceName) - } - } - - msoLogger.trace("END preResourceDelete Process ") - } - - public void parseNextResource(execution){ - msoLogger.trace("Start parseNextResource Process ") - def currentIndex = execution.getVariable("currentResourceIndex") - def nextIndex = currentIndex + 1 - execution.setVariable("currentResourceIndex", nextIndex) - List resourceSequence = execution.getVariable("resourceSequence") - if(nextIndex >= resourceSequence.size()){ - execution.setVariable("allResourceFinished", "true") - }else{ - execution.setVariable("allResourceFinished", "false") - } - msoLogger.trace("COMPLETED parseNextResource Process ") - } - - /** - * post config request. - */ - public void postConfigRequest(execution){ - //to do - } - -} - \ No newline at end of file diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Create3rdONAPE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Create3rdONAPE2EServiceInstance.bpmn new file mode 100644 index 0000000000..51e12d21ca --- /dev/null +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Create3rdONAPE2EServiceInstance.bpmn @@ -0,0 +1,740 @@ + + + + + SequenceFlow_190fewc + + + SequenceFlow_0mmu3kz + SequenceFlow_15mvx68 + + + + SequenceFlow_0a8k9xi + + + SequenceFlow_0y2g8mr + SequenceFlow_0znwu8z + + + + SequenceFlow_1ttrqml + SequenceFlow_0brxjic + + + + SequenceFlow_0brxjic + SequenceFlow_0ezt5f0 + + + + + + + ${CVFMI_dbAdapterEndpoint} + + + application/soap+xml + Basic QlBFTENsaWVudDpwYXNzd29yZDEk + + + ${CVFMI_updateResOperStatusRequest} + POST + ${statusCode} + ${response} + + http-connector + + + SequenceFlow_0ezt5f0 + SequenceFlow_1suwdgi + + + SequenceFlow_0znwu8z + SequenceFlow_04hwfll + + + + SequenceFlow_15mvx68 + SequenceFlow_0wp73cw + + + + + + + ${CVFMI_dbAdapterEndpoint} + + + application/soap+xml + Basic QlBFTENsaWVudDpwYXNzd29yZDEk + + + ${CVFMI_updateResOperStatusRequest} + POST + ${statusCode} + ${response} + + http-connector + + + SequenceFlow_0fkfn70 + SequenceFlow_1luhljs + + + SequenceFlow_1suwdgi + SequenceFlow_0mmu3kz + + + + + + + + SequenceFlow_190fewc + SequenceFlow_1f71u71 + + + + SequenceFlow_1f71u71 + SequenceFlow_0h1rnsw + SequenceFlow_1msw3xo + + + + + + + SequenceFlow_1ttrqml + + + + + + SequenceFlow_0o376do + + + + SequenceFlow_13s0mg5 + SequenceFlow_0kkou66 + SequenceFlow_0fkfn70 + + + + + SequenceFlow_1msw3xo + SequenceFlow_1kcu53z + + + + + SequenceFlow_1kcu53z + SequenceFlow_0o376do + SequenceFlow_1y8xkzy + + + + + + + SequenceFlow_1y8xkzy + SequenceFlow_0h1rnsw + + + + SequenceFlow_131f1jj + + + SequenceFlow_1wq9f5k + SequenceFlow_18gb81f + + + + SequenceFlow_0wnyy50 + SequenceFlow_0z9axn6 + + + + SequenceFlow_0z9axn6 + SequenceFlow_04l4to1 + + + + + + + ${CVFMI_dbAdapterEndpoint} + + + application/soap+xml + Basic QlBFTENsaWVudDpwYXNzd29yZDEk + + + ${CVFMI_updateResOperStatusRequest} + POST + ${statusCode} + ${response} + + http-connector + + + SequenceFlow_18gb81f + SequenceFlow_1swgag2 + SequenceFlow_0dkbe3r + + + SequenceFlow_0dkbe3r + SequenceFlow_1wn6y9u + + + + SequenceFlow_0wnyy50 + + + + SequenceFlow_1wn6y9u + SequenceFlow_131f1jj + + + + + + + + + + SequenceFlow_04l4to1 + SequenceFlow_1wq9f5k + SequenceFlow_1swgag2 + + + + + + + + SequenceFlow_1udji9x + SequenceFlow_0kkou66 + + + + SequenceFlow_0wp73cw + SequenceFlow_13s0mg5 + SequenceFlow_12seu6n + + + SequenceFlow_1luhljs + SequenceFlow_1udji9x + SequenceFlow_0y2g8mr + + + SequenceFlow_04hwfll + SequenceFlow_0a8k9xi + + + + + + + + + + + + + + + + + SequenceFlow_1mei7hu + + + + + + + + SequenceFlow_12seu6n + SequenceFlow_0i9iiuo + + + + + + + ${CVFMI_dbAdapterEndpoint} + + + application/soap+xml + Basic QlBFTENsaWVudDpwYXNzd29yZDEk + + + ${CVFMI_updateResOperStatusRequest} + POST + ${statusCode} + ${response} + + http-connector + + + SequenceFlow_0i9iiuo + SequenceFlow_1mei7hu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateCustom3rdONAPServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateCustom3rdONAPServiceInstance.bpmn deleted file mode 100644 index a8bd33ca69..0000000000 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateCustom3rdONAPServiceInstance.bpmn +++ /dev/null @@ -1,389 +0,0 @@ - - - - - SequenceFlow_0s2spoq - - - - SequenceFlow_1dsbjjb - SequenceFlow_1yay321 - import org.onap.so.bpmn.common.scripts.* ExceptionUtil ex = new ExceptionUtil() ex.processJavaException(execution) - - - SequenceFlow_1dsbjjb - - - - SequenceFlow_1yay321 - - - - - - - - - - - - - - - - - - - - - - - - - - - - SequenceFlow_19eilro - SequenceFlow_0klbpxx - - - SequenceFlow_0yayvrf - - - SequenceFlow_0s2spoq - SequenceFlow_0z4faf9 - import org.onap.so.bpmn.infrastructure.scripts.* -def csi= new CreateCustomE2EServiceInstance() -csi.preProcessRequest(execution) - - - SequenceFlow_14zu6wr - SequenceFlow_0je30si - import org.onap.so.bpmn.infrastructure.scripts.* -def csi = new CreateCustomE2EServiceInstance() -csi.prepareCompletionRequest(execution) - - - - - - - - - - - SequenceFlow_0je30si - SequenceFlow_0yayvrf - - - - SequenceFlow_0e1r62n - - - - SequenceFlow_1ysapam - - - SequenceFlow_0n9pexp - SequenceFlow_01umodj - import org.onap.so.bpmn.infrastructure.scripts.* -def csi = new CreateCustomE2EServiceInstance() -csi.prepareFalloutRequest(execution) - - - - - - - - - - - SequenceFlow_01umodj - SequenceFlow_1ysapam - - - SequenceFlow_0e1r62n - SequenceFlow_0n9pexp - import org.onap.so.bpmn.infrastructure.scripts.* -def csi = new CreateCustomE2EServiceInstance() -csi.sendSyncError(execution) - - - - - - - - SequenceFlow_081z8l2 - SequenceFlow_19eilro - import org.onap.so.bpmn.infrastructure.scripts.* -def csi = new CreateCustomE2EServiceInstance() -csi.sendSyncResponse(execution) - - - SequenceFlow_0klbpxx - SequenceFlow_14zu6wr - SequenceFlow_1fueo69 - - - SequenceFlow_1fueo69 - - - - - - - - - #{execution.getVariable("WorkflowException") == null} - - - - #{execution.getVariable("WorkflowException") != null} - - - - SequenceFlow_0z4faf9 - SequenceFlow_1euqjsp - import org.onap.so.bpmn.infrastructure.scripts.* -def csi= new CreateCustomE2EServiceInstance() -csi.prepareInitServiceOperationStatus(execution) - - - - - - ${CVFMI_dbAdapterEndpoint} - - - application/soap+xml - Basic QlBFTENsaWVudDpwYXNzd29yZDEk - - - ${CVFMI_updateServiceOperStatusRequest} - POST - ${statusCode} - ${response} - - http-connector - - - SequenceFlow_1euqjsp - SequenceFlow_081z8l2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Delete3rdONAPE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Delete3rdONAPE2EServiceInstance.bpmn new file mode 100644 index 0000000000..770df07bfd --- /dev/null +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Delete3rdONAPE2EServiceInstance.bpmn @@ -0,0 +1,613 @@ + + + + + SequenceFlow_0ecyqjf + + + SequenceFlow_1sql6c3 + SequenceFlow_1soxbjk + + + + SequenceFlow_170nvzi + + + SequenceFlow_1tlym3z + SequenceFlow_0z0u7x1 + + + + SequenceFlow_114wjuf + SequenceFlow_1sql6c3 + + + + SequenceFlow_1soxbjk + SequenceFlow_000q9m3 + + + + + + + ${CVFMI_dbAdapterEndpoint} + + + application/soap+xml + Basic QlBFTENsaWVudDpwYXNzd29yZDEk + + + ${CVFMI_updateResOperStatusRequest} + POST + ${statusCode} + ${response} + + http-connector + + + SequenceFlow_000q9m3 + SequenceFlow_1lhdwv6 + + + SequenceFlow_0z0u7x1 + SequenceFlow_1bo3fu4 + + + + SequenceFlow_0t0jlzs + SequenceFlow_06fak6j + + + + + + + ${CVFMI_dbAdapterEndpoint} + + + application/soap+xml + Basic QlBFTENsaWVudDpwYXNzd29yZDEk + + + ${CVFMI_updateResOperStatusRequest} + POST + ${statusCode} + ${response} + + http-connector + + + SequenceFlow_0lpbqkc + SequenceFlow_1tlym3z + + + SequenceFlow_1lhdwv6 + SequenceFlow_0t0jlzs + + + + SequenceFlow_0ecyqjf + SequenceFlow_1jgurvk + + + + SequenceFlow_1jgurvk + SequenceFlow_0u3tca8 + SequenceFlow_11pvz8i + + + SequenceFlow_114wjuf + + + + SequenceFlow_06avdut + + + + SequenceFlow_06fak6j + SequenceFlow_0cuvrsr + + + + SequenceFlow_0cuvrsr + SequenceFlow_0lpbqkc + + + + SequenceFlow_1bo3fu4 + SequenceFlow_170nvzi + + + + SequenceFlow_11pvz8i + SequenceFlow_1lqmzex + + + + SequenceFlow_1lqmzex + SequenceFlow_06avdut + SequenceFlow_1pwflny + + + SequenceFlow_0u3tca8 + SequenceFlow_1pwflny + + + + SequenceFlow_0vhbw8y + + + SequenceFlow_03mc2qq + SequenceFlow_03ngo7h + + + + SequenceFlow_1x1sk3t + SequenceFlow_02l74nc + + + + SequenceFlow_02l74nc + SequenceFlow_0ff0jf2 + + + + + + + ${CVFMI_dbAdapterEndpoint} + + + application/soap+xml + Basic QlBFTENsaWVudDpwYXNzd29yZDEk + + + ${CVFMI_updateResOperStatusRequest} + POST + ${statusCode} + ${response} + + http-connector + + + SequenceFlow_03ngo7h + SequenceFlow_177yb27 + SequenceFlow_1784pcx + + + SequenceFlow_1784pcx + SequenceFlow_1xhcwoo + + + + SequenceFlow_1x1sk3t + + + + SequenceFlow_1xhcwoo + SequenceFlow_0vhbw8y + + + + SequenceFlow_0ff0jf2 + SequenceFlow_03mc2qq + SequenceFlow_177yb27 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteCustom3rdONAPServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteCustom3rdONAPServiceInstance.bpmn deleted file mode 100644 index 9ca0b06645..0000000000 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteCustom3rdONAPServiceInstance.bpmn +++ /dev/null @@ -1,381 +0,0 @@ - - - - - SequenceFlow_1wxumid - - - - SequenceFlow_0guajy5 - SequenceFlow_0dbt753 - import org.onap.so.bpmn.common.scripts.* -ExceptionUtil ex = new ExceptionUtil() -ex.processJavaException(execution) - - - SequenceFlow_0guajy5 - - - - SequenceFlow_0dbt753 - - - - - - - - - - - - - - - - - - - - - - SequenceFlow_0zf2qyk - SequenceFlow_07hrbs0 - - - SequenceFlow_1ab5l2q - - - SequenceFlow_1wxumid - SequenceFlow_0yowshs - import org.onap.so.bpmn.infrastructure.scripts.* -def csi= new DeleteCustomE2EServiceInstance() -csi.preProcessRequest(execution) - - - SequenceFlow_04urx2e - SequenceFlow_1ii935p - import org.onap.so.bpmn.infrastructure.scripts.* -def csi = new DeleteCustomE2EServiceInstance() -csi.prepareCompletionRequest(execution) - - - - - - - - - - - SequenceFlow_1ii935p - SequenceFlow_1ab5l2q - - - - SequenceFlow_0for83z - - - - SequenceFlow_0hrazlh - - - SequenceFlow_1s1cbgf - SequenceFlow_1py6yqz - import org.onap.so.bpmn.infrastructure.scripts.* -def csi = new DeleteCustomE2EServiceInstance() -csi.prepareFalloutRequest(execution) - - - - - - - - - - - SequenceFlow_1py6yqz - SequenceFlow_0hrazlh - - - SequenceFlow_0for83z - SequenceFlow_1s1cbgf - import org.onap.so.bpmn.infrastructure.scripts.* -def csi = new DeleteCustomE2EServiceInstance() -csi.sendSyncError(execution) - - - - - - - - SequenceFlow_1dkcu9o - SequenceFlow_0zf2qyk - import org.onap.so.bpmn.infrastructure.scripts.* -def csi = new DeleteCustomE2EServiceInstance() -csi.sendSyncResponse(execution) - - - SequenceFlow_07hrbs0 - SequenceFlow_04urx2e - SequenceFlow_1t6ekab - - - SequenceFlow_1t6ekab - - - - - - - - - #{execution.getVariable("WorkflowException") == null} - - - - - - SequenceFlow_0yowshs - SequenceFlow_0c4t26p - import org.onap.so.bpmn.infrastructure.scripts.* -def csi= new DeleteCustomE2EServiceInstance() -csi.prepareInitServiceOperationStatus(execution) - - - - - - ${CVFMI_dbAdapterEndpoint} - - - application/soap+xml - Basic QlBFTENsaWVudDpwYXNzd29yZDEk - - - ${CVFMI_updateServiceOperStatusRequest} - POST - ${statusCode} - ${response} - - http-connector - - - SequenceFlow_0c4t26p - SequenceFlow_1dkcu9o - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteResources.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteResources.bpmn deleted file mode 100644 index 7fbfe46cdb..0000000000 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteResources.bpmn +++ /dev/null @@ -1,486 +0,0 @@ - - - - - SequenceFlow_0vz7cd9 - - - SequenceFlow_1r5306k - - - - SequenceFlow_1921mo3 - - - - SequenceFlow_18vlzfo - - - SequenceFlow_1921mo3 - SequenceFlow_18vlzfo - - - - - - - - SequenceFlow_1ubor5z - SequenceFlow_1dza4q4 - - - - - - SequenceFlow_1x3lehs - SequenceFlow_1wnkgpx - - - - - - - - - - - - - - SequenceFlow_1wnkgpx - SequenceFlow_0phwem2 - - - SequenceFlow_1dza4q4 - SequenceFlow_1lxqjmp - - - SequenceFlow_1icwpye - SequenceFlow_1yujjwx - - - SequenceFlow_0xqdf1z - SequenceFlow_03c0zlq - - - - SequenceFlow_1htjmkv - SequenceFlow_1ubor5z - SequenceFlow_1x3lehs - - - SequenceFlow_03c0zlq - SequenceFlow_0s1lswk - SequenceFlow_1htjmkv - - - - - - - - - - SequenceFlow_1lxqjmp - SequenceFlow_0phwem2 - SequenceFlow_0l5r96s - - - - - - SequenceFlow_0l5r96s - SequenceFlow_0talboa - SequenceFlow_0s1lswk - - - - SequenceFlow_0talboa - SequenceFlow_1icwpye - SequenceFlow_12avhgx - - - - - - - - - - - SequenceFlow_1yujjwx - SequenceFlow_12avhgx - SequenceFlow_1r5306k - - - - - SequenceFlow_042d7oc - SequenceFlow_1t2hfv0 - SequenceFlow_1t8hf8m - - - - - - - - - - - - - - - SequenceFlow_1t8hf8m - SequenceFlow_0p5gr4z - - - SequenceFlow_0p5gr4z - SequenceFlow_131imj8 - - - - - - - - - - - - SequenceFlow_1n85wxv - SequenceFlow_0xqdf1z - SequenceFlow_042d7oc - - - - - - - SequenceFlow_0vz7cd9 - SequenceFlow_1t2hfv0 - - - - - SequenceFlow_131imj8 - SequenceFlow_1n85wxv - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit 1.2.3-korg