aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2018-08-07 16:06:09 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2018-08-07 16:09:14 -0400
commit0bb644bd5c11ce03b6dec71d26127fbd3519a9b4 (patch)
tree13c7af86a5ce8568f613e1fe95b02be462ed43a3 /bpmn/MSOCommonBPMN/src/main
parent94450aaa3ceaf24f2de6a949c0ccc447fbc7fe06 (diff)
Refactored references to AaiUtils
to use AAIResourceClient updated bpmn, removed Generic AAI flows, and removed dead useless code Did not modify E2E Delete Service Instance flow as it has changed significantly Issue-ID: SO-813 Change-Id: I1a6bc5353ef89e2ce4359be2654395f7ce060aba Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CustomE2EGetService.groovy440
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericGetService.groovy470
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericPutService.groovy10
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/CustomE2EGetService.bpmn321
-rw-r--r--bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericGetService.bpmn321
5 files changed, 5 insertions, 1557 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CustomE2EGetService.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CustomE2EGetService.groovy
deleted file mode 100644
index 5aef1d6ea5..0000000000
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CustomE2EGetService.groovy
+++ /dev/null
@@ -1,440 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * Copyright (C) 2017 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.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.delegate.DelegateExecution
-import org.onap.so.rest.APIResponse
-import org.springframework.web.util.UriUtils
-import org.onap.so.bpmn.core.UrnPropertiesReader
-import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
-
-
-/**
- * This class supports the GenericGetService Sub Flow.
- * This Generic sub flow can be used by any flow for accomplishing
- * the goal of getting a Service-Instance or Service-Subscription (from AAI).
- * The calling flow must set the GENGS_type variable as "service-instance"
- * or "service-subscription".
- *
- * When using to Get a Service-Instance:
- * If the global-customer-id and service-type are not provided
- * this flow executes a query to get the service- Url using the
- * Service Id or Name (whichever is provided).
- *
- * When using to Get a Service-Subscription:
- * The global-customer-id and service-type must be
- * provided.
- *
- * Upon successful completion of this sub flow the
- * GENGS_SuccessIndicator will be true and the query response payload
- * will be set to GENGS_service. An MSOWorkflowException will
- * be thrown upon unsuccessful completion or if an error occurs
- * at any time during this sub flow. Please map variables
- * to the corresponding variable names below.
- *
- * Note - If this sub flow receives a Not Found (404) response
- * from AAI at any time this will be considered an acceptable
- * successful response however the GENGS_FoundIndicator
- * will be set to false. This variable will allow the calling flow
- * to distinguish between the two Success scenarios,
- * "Success where service- is found" and
- * "Success where service- is NOT found".
- *
- *
- * Variable Mapping Below:
- *
- * In Mapping Variables:
- * For Allotted-Resource:
- * @param - GENGS_allottedResourceId
- * @param - GENGS_type
- * @param (Optional) - GENGS_serviceInstanceId
- * @param (Optional) - GENGS_serviceType
- * @param (Optional) - GENGS_globalCustomerId
- *
- * For Service-Instance:
- * @param - GENGS_serviceInstanceId or @param - GENGS_serviceInstanceName
- * @param - GENGS_type
- * @param (Optional) - GENGS_serviceType
- * @param (Optional) - GENGS_globalCustomerId
- *
- * For Service-Subscription:
- * @param - GENGS_type
- * @param - GENGS_serviceType
- * @param - GENGS_globalCustomerId
- *
- *
- * Out Mapping Variables:
- * @param - GENGS_service
- * @param - GENGS_FoundIndicator
- * @param - WorkflowException
- */
-class CustomE2EGetService extends AbstractServiceTaskProcessor{
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, CustomE2EGetService.class);
-
- String Prefix = "GENGS_"
- ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- /**
- * This method validates the incoming variables and
- * determines the subsequent event based on which
- * variables the calling flow provided.
- *
- * @param - execution
- *
- */
- public void preProcessRequest(DelegateExecution execution) {
- execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED GenericGetService PreProcessRequest Process")
-
- execution.setVariable("GENGS_obtainObjectsUrl", false)
- execution.setVariable("GENGS_obtainServiceInstanceUrlByName", false)
- execution.setVariable("GENGS_SuccessIndicator", false)
- execution.setVariable("GENGS_FoundIndicator", false)
- execution.setVariable("GENGS_resourceLink", null)
- execution.setVariable("GENGS_siResourceLink", null)
-
- try{
- // Get Variables
- String allottedResourceId = execution.getVariable("GENGS_allottedResourceId")
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- String serviceInstanceName = execution.getVariable("GENGS_serviceInstanceName")
- String serviceType = execution.getVariable("GENGS_serviceType")
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- String type = execution.getVariable("GENGS_type")
-
- if(type != null){
- msoLogger.debug("Incoming GENGS_type is: " + type)
- if(type.equalsIgnoreCase("allotted-resource")){
- if(isBlank(allottedResourceId)){
- msoLogger.debug("Incoming allottedResourceId is null. Allotted Resource Id is required to Get an allotted-resource.")
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming allottedResourceId is null. Allotted Resource Id is required to Get an allotted-resource.")
- }else{
- msoLogger.debug("Incoming Allotted Resource Id is: " + allottedResourceId)
- if(isBlank(globalCustomerId) || isBlank(serviceType) || isBlank(serviceInstanceId)){
- execution.setVariable("GENGS_obtainObjectsUrl", true)
- }else{
- msoLogger.debug("Incoming Service Instance Id is: " + serviceInstanceId)
- msoLogger.debug("Incoming Service Type is: " + serviceType)
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
- }
- }
- }else if(type.equalsIgnoreCase("service-instance")){
- if(isBlank(serviceInstanceId) && isBlank(serviceInstanceName)){
- msoLogger.debug("Incoming serviceInstanceId and serviceInstanceName are null. ServiceInstanceId or ServiceInstanceName is required to Get a service-instance.")
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming serviceInstanceId and serviceInstanceName are null. ServiceInstanceId or ServiceInstanceName is required to Get a service-instance.")
- }else{
- msoLogger.debug("Incoming Service Instance Id is: " + serviceInstanceId)
- msoLogger.debug("Incoming Service Instance Name is: " + serviceInstanceName)
- if(isBlank(globalCustomerId) || isBlank(serviceType)){
- execution.setVariable("GENGS_obtainObjectsUrl", true)
- if(isBlank(serviceInstanceId)){
- execution.setVariable("GENGS_obtainServiceInstanceUrlByName", true)
- }
- }else{
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
- msoLogger.debug("Incoming Service Type is: " + serviceType)
- }
- }
- }else if(type.equalsIgnoreCase("service-subscription")){
- if(isBlank(serviceType) || isBlank(globalCustomerId)){
- msoLogger.debug("Incoming ServiceType or GlobalCustomerId is null. These variables are required to Get a service-subscription.")
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming ServiceType or GlobalCustomerId is null. These variables are required to Get a service-subscription.")
- }else{
- msoLogger.debug("Incoming Service Type is: " + serviceType)
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
- }
- }else{
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Type is Invalid. Please Specify Type as service-instance or service-subscription")
- }
- }else{
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Incoming GENGS_type is null. Variable is Required.")
- }
-
- }catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
- throw b
- }catch(Exception e){
- msoLogger.debug("Internal Error encountered within GenericGetService PreProcessRequest method!" + e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in GenericGetService PreProcessRequest")
-
- }
- msoLogger.trace("COMPLETED GenericGetService PreProcessRequest Process ")
- }
-
- /**
- * This method obtains the Url to the provided service instance
- * using the Service Instance Id.
- *
- * @param - execution
- */
- public void obtainServiceInstanceUrlById(DelegateExecution execution){
- execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED GenericGetService ObtainServiceInstanceUrlById Process")
- try {
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getSearchNodesQueryEndpoint(execution)
- String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
-
- String type = execution.getVariable("GENGS_type")
- String path = ""
- if(type.equalsIgnoreCase("service-instance")){
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- msoLogger.debug(" Querying Node for Service-Instance URL by using Service-Instance Id: " + serviceInstanceId)
- path = "${aai_uri}?search-node-type=service-instance&filter=service-instance-id:EQUALS:${serviceInstanceId}"
- msoLogger.debug("Service Instance Node Query Url is: " + path)
- msoLogger.debug("Service Instance Node Query Url is: " + path)
- }else if(type.equalsIgnoreCase("allotted-resource")){
- String allottedResourceId = execution.getVariable("GENGS_allottedResourceId")
- msoLogger.debug(" Querying Node for Service-Instance URL by using Allotted Resource Id: " + allottedResourceId)
- path = "${aai_uri}?search-node-type=allotted-resource&filter=id:EQUALS:${allottedResourceId}"
- msoLogger.debug("Allotted Resource Node Query Url is: " + path)
- msoLogger.debug("Allotted Resource Node Query Url is: " + path)
- }
-
- //String url = "${aai_endpoint}${path}" host name needs to be removed from property
- String url = "${path}"
- execution.setVariable("GENGS_genericQueryPath", url)
-
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, url)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENGS_genericQueryResponseCode", responseCode)
- msoLogger.debug(" GET Service Instance response code is: " + responseCode)
- msoLogger.debug("GenericGetService AAI GET Response Code: " + responseCode)
-
- String aaiResponse = response.getResponseBodyAsString()
- execution.setVariable("GENGS_obtainSIUrlResponseBeforeUnescaping", aaiResponse)
- msoLogger.debug("GenericGetService AAI Response before unescaping: " + aaiResponse)
- execution.setVariable("GENGS_genericQueryResponse", aaiResponse)
- msoLogger.debug("GenericGetService AAI Response: " + aaiResponse)
- msoLogger.debug("GenericGetService AAI Response: " + aaiResponse)
-
- //Process Response
- if(responseCode == 200){
- msoLogger.debug("Generic Query Received a Good Response Code")
- execution.setVariable("GENGS_SuccessIndicator", true)
- if(utils.nodeExists(aaiResponse, "result-data")){
- msoLogger.debug("Generic Query Response Does Contain Data" )
- execution.setVariable("GENGS_FoundIndicator", true)
- String resourceLink = utils.getNodeText(aaiResponse, "resource-link")
- execution.setVariable("GENGS_resourceLink", resourceLink)
- execution.setVariable("GENGS_siResourceLink", resourceLink)
- }else{
- msoLogger.debug("Generic Query Response Does NOT Contains Data" )
- execution.setVariable("WorkflowResponse", " ") //for junits
- }
- }else if(responseCode == 404){
- msoLogger.debug("Generic Query Received a Not Found (404) Response")
- execution.setVariable("GENGS_SuccessIndicator", true)
- execution.setVariable("WorkflowResponse", " ") //for junits
- }else{
- msoLogger.debug("Generic Query Received a BAD REST Response: \n" + aaiResponse)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
- throw b
- }catch(Exception e){
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Error encountered within GenericGetService ObtainServiceInstanceUrlById method!" + e, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "");
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During ObtainServiceInstanceUrlById")
- }
- msoLogger.trace("COMPLETED GenericGetService ObtainServiceInstanceUrlById Process")
- }
-
- /**
- * This method obtains the Url to the provided service instance
- * using the Service Instance Name.
- *
- * @param - execution
- */
- public void obtainServiceInstanceUrlByName(DelegateExecution execution){
- execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED GenericGetService ObtainServiceInstanceUrlByName Process")
- try {
- String serviceInstanceName = execution.getVariable("GENGS_serviceInstanceName")
- msoLogger.debug(" Querying Node for Service-Instance URL by using Service-Instance Name " + serviceInstanceName)
-
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getSearchNodesQueryEndpoint(execution)
- String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
- String path = "${aai_uri}?search-node-type=service-instance&filter=service-instance-name:EQUALS:${serviceInstanceName}"
-
- //String url = "${aai_endpoint}${path}" host name needs to be removed from property
- String url = "${path}"
- execution.setVariable("GENGS_obtainSIUrlPath", url)
-
- msoLogger.debug("GenericGetService AAI Endpoint: " + aai_endpoint)
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, url)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENGS_obtainSIUrlResponseCode", responseCode)
- msoLogger.debug(" GET Service Instance response code is: " + responseCode)
- msoLogger.debug("GenericGetService AAI Response Code: " + responseCode)
-
- String aaiResponse = response.getResponseBodyAsString()
- execution.setVariable("GENGS_obtainSIUrlResponse", aaiResponse)
- msoLogger.debug("GenericGetService AAI Response: " + aaiResponse)
- //Process Response
- if(responseCode == 200){
- msoLogger.debug(" Query for Service Instance Url Received a Good Response Code")
- execution.setVariable("GENGS_SuccessIndicator", true)
- if(utils.nodeExists(aaiResponse, "result-data")){
- msoLogger.debug("Query for Service Instance Url Response Does Contain Data" )
- execution.setVariable("GENGS_FoundIndicator", true)
- String resourceLink = utils.getNodeText(aaiResponse, "resource-link")
- execution.setVariable("GENGS_resourceLink", resourceLink)
- execution.setVariable("GENGS_siResourceLink", resourceLink)
- }else{
- msoLogger.debug("Query for Service Instance Url Response Does NOT Contains Data" )
- execution.setVariable("WorkflowResponse", " ") //for junits
- }
- }else if(responseCode == 404){
- msoLogger.debug(" Query for Service Instance Received a Not Found (404) Response")
- execution.setVariable("GENGS_SuccessIndicator", true)
- execution.setVariable("WorkflowResponse", " ") //for junits
- }else{
- msoLogger.debug("Query for Service Instance Received a BAD REST Response: \n" + aaiResponse)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
- throw b
- }catch(Exception e){
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Error encountered within GenericGetService ObtainServiceInstanceUrlByName method!" + e, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "");
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During ObtainServiceInstanceUrlByName")
- }
- msoLogger.trace("COMPLETED GenericGetService ObtainServiceInstanceUrlByName Process")
- }
-
-
- /**
- * This method executes a GET call to AAI to obtain the
- * service-instance or service-subscription
- *
- * @param - execution
- */
- public void getServiceObject(DelegateExecution execution){
- execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED GenericGetService GetServiceObject Process")
- try {
- String type = execution.getVariable("GENGS_type")
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
- String serviceEndpoint = ""
-
- msoLogger.debug("GenericGetService getServiceObject AAI Endpoint: " + aai_endpoint)
- if(type.equalsIgnoreCase("service-instance")){
- String siResourceLink = execution.getVariable("GENGS_resourceLink")
- if(isBlank(siResourceLink)){
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- msoLogger.debug(" Incoming GENGS_serviceInstanceId is: " + serviceInstanceId)
- String serviceType = execution.getVariable("GENGS_serviceType")
- msoLogger.debug(" Incoming GENGS_serviceType is: " + serviceType)
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
-
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- msoLogger.debug('AAI URI is: ' + aai_uri)
- serviceEndpoint = "${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(serviceInstanceId,"UTF-8")
- }else{
- msoLogger.debug("Incoming Service Instance Url is: " + siResourceLink)
- String[] split = siResourceLink.split("/aai/")
- serviceEndpoint = "/aai/" + split[1]
- }
- }else if(type.equalsIgnoreCase("allotted-resource")){
- String siResourceLink = execution.getVariable("GENGS_resourceLink")
- if(isBlank(siResourceLink)){
- String allottedResourceId = execution.getVariable("GENGS_allottedResourceId")
- msoLogger.debug(" Incoming GENGS_allottedResourceId is: " + allottedResourceId)
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- msoLogger.debug(" Incoming GENGS_serviceInstanceId is: " + serviceInstanceId)
- String serviceType = execution.getVariable("GENGS_serviceType")
- msoLogger.debug(" Incoming GENGS_serviceType is: " + serviceType)
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
-
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- msoLogger.debug('AAI URI is: ' + aai_uri)
- serviceEndpoint = "${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(serviceInstanceId,"UTF-8") + "/allotted-resources/allotted-resource/" + UriUtils.encode(allottedResourceId,"UTF-8")
- }else{
- msoLogger.debug("Incoming Allotted-Resource Url is: " + siResourceLink)
- String[] split = siResourceLink.split("/aai/")
- serviceEndpoint = "/aai/" + split[1]
- }
- }else if(type.equalsIgnoreCase("service-subscription")){
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- String serviceType = execution.getVariable("GENGS_serviceType")
- serviceEndpoint = "${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8")
- }
-
- String serviceUrl = "${aai_endpoint}" + serviceEndpoint
-
- execution.setVariable("GENGS_getServiceUrl", serviceUrl)
- msoLogger.debug("GET Service AAI Path is: \n" + serviceUrl)
-
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, serviceUrl)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENGS_getServiceResponseCode", responseCode)
- msoLogger.debug(" GET Service response code is: " + responseCode)
- msoLogger.debug("GenericGetService AAI Response Code: " + responseCode)
-
- String aaiResponse = response.getResponseBodyAsString()
- execution.setVariable("GENGS_getServiceResponse", aaiResponse)
- msoLogger.debug("GenericGetService AAI Response: " + aaiResponse)
- //Process Response
- if(responseCode == 200 || responseCode == 202){
- msoLogger.debug("GET Service Received a Good Response Code")
- if(utils.nodeExists(aaiResponse, "service-instance") || utils.nodeExists(aaiResponse, "service-subscription")){
- msoLogger.debug("GET Service Response Contains a service-instance" )
- execution.setVariable("GENGS_FoundIndicator", true)
- execution.setVariable("GENGS_service", aaiResponse)
- execution.setVariable("WorkflowResponse", aaiResponse)
-
- }else{
- msoLogger.debug("GET Service Response Does NOT Contain Data" )
- }
- }else if(responseCode == 404){
- msoLogger.debug("GET Service Received a Not Found (404) Response")
- execution.setVariable("WorkflowResponse", " ") //for junits
- }
- else{
- msoLogger.debug(" GET Service Received a Bad Response: \n" + aaiResponse)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
- throw b
- }catch(Exception e){
- msoLogger.debug(" Error encountered within GenericGetService GetServiceObject method!" + e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During GenericGetService")
- }
- msoLogger.trace("COMPLETED GenericGetService GetServiceObject Process")
- }
-
-} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericGetService.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericGetService.groovy
deleted file mode 100644
index 857df16772..0000000000
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericGetService.groovy
+++ /dev/null
@@ -1,470 +0,0 @@
-/*-
- * ============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.onap.so.bpmn.common.scripts
-
-import org.onap.so.bpmn.core.UrnPropertiesReader
-
-import org.apache.commons.lang3.StringEscapeUtils
-import org.camunda.bpm.engine.delegate.BpmnError
-import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.onap.so.rest.APIResponse
-import org.springframework.web.util.UriUtils
-import org.onap.so.logger.MessageEnum
-import org.onap.so.logger.MsoLogger
-
-import static org.apache.commons.lang3.StringUtils.isBlank
-
-
-
-/**
- * This class supports the GenericGetService Sub Flow.
- * This Generic sub flow can be used by any flow for accomplishing
- * the goal of getting a Service-Instance or Service-Subscription (from AAI).
- * The calling flow must set the GENGS_type variable as "service-instance"
- * or "service-subscription".
- *
- * When using to Get a Service-Instance:
- * If the global-customer-id and service-type are not provided
- * this flow executes a query to get the service- Url using the
- * Service Id or Name (whichever is provided).
- *
- * When using to Get a Service-Subscription:
- * The global-customer-id and service-type must be
- * provided.
- *
- * Upon successful completion of this sub flow the
- * GENGS_SuccessIndicator will be true and the query response payload
- * will be set to GENGS_service. An MSOWorkflowException will
- * be thrown upon unsuccessful completion or if an error occurs
- * at any time during this sub flow. Please map variables
- * to the corresponding variable names below.
- *
- * Note - If this sub flow receives a Not Found (404) response
- * from AAI at any time this will be considered an acceptable
- * successful response however the GENGS_FoundIndicator
- * will be set to false. This variable will allow the calling flow
- * to distinguish between the two Success scenarios,
- * "Success where service- is found" and
- * "Success where service- is NOT found".
- *
- *
- * Variable Mapping Below:
- *
- * In Mapping Variables:
- * For Allotted-Resource:
- * @param - GENGS_allottedResourceId
- * @param - GENGS_type
- * @param (Optional) - GENGS_serviceInstanceId
- * @param (Optional) - GENGS_serviceType
- * @param (Optional) - GENGS_globalCustomerId
- *
- * For Service-Instance:
- * @param - GENGS_serviceInstanceId or @param - GENGS_serviceInstanceName
- * @param - GENGS_type
- * @param (Optional) - GENGS_serviceType
- * @param (Optional) - GENGS_globalCustomerId
- *
- * For Service-Subscription:
- * @param - GENGS_type
- * @param - GENGS_serviceType
- * @param - GENGS_globalCustomerId
- *
- *
- * Out Mapping Variables:
- * @param - GENGS_service
- * @param - GENGS_FoundIndicator
- * @param - WorkflowException
- */
-class GenericGetService extends AbstractServiceTaskProcessor{
- private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, GenericGetService.class);
-
-
- String Prefix = "GENGS_"
- ExceptionUtil exceptionUtil = new ExceptionUtil()
-
- /**
- * This method validates the incoming variables and
- * determines the subsequent event based on which
- * variables the calling flow provided.
- *
- * @param - execution
- *
- */
- public void preProcessRequest(DelegateExecution execution) {
- execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED GenericGetService PreProcessRequest Process")
-
- execution.setVariable("GENGS_obtainObjectsUrl", false)
- execution.setVariable("GENGS_obtainServiceInstanceUrlByName", false)
- execution.setVariable("GENGS_SuccessIndicator", false)
- execution.setVariable("GENGS_FoundIndicator", false)
- execution.setVariable("GENGS_resourceLink", null)
- execution.setVariable("GENGS_siResourceLink", null)
-
- try{
- // Get Variables
- String allottedResourceId = execution.getVariable("GENGS_allottedResourceId")
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- String serviceInstanceName = execution.getVariable("GENGS_serviceInstanceName")
- String serviceType = execution.getVariable("GENGS_serviceType")
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- String type = execution.getVariable("GENGS_type")
-
- if(type != null){
- msoLogger.debug("Incoming GENGS_type is: " + type)
- if(type.equalsIgnoreCase("allotted-resource")){
- if(isBlank(allottedResourceId)){
- msoLogger.debug("Incoming allottedResourceId is null. Allotted Resource Id is required to Get an allotted-resource.")
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming allottedResourceId is null. Allotted Resource Id is required to Get an allotted-resource.")
- }else{
- msoLogger.debug("Incoming Allotted Resource Id is: " + allottedResourceId)
- if(isBlank(globalCustomerId) || isBlank(serviceType) || isBlank(serviceInstanceId)){
- execution.setVariable("GENGS_obtainObjectsUrl", true)
- }else{
- msoLogger.debug("Incoming Service Instance Id is: " + serviceInstanceId)
- msoLogger.debug("Incoming Service Type is: " + serviceType)
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
- }
- }
- }else if(type.equalsIgnoreCase("service-instance")){
- if(isBlank(serviceInstanceId) && isBlank(serviceInstanceName)){
- msoLogger.debug("Incoming serviceInstanceId and serviceInstanceName are null. ServiceInstanceId or ServiceInstanceName is required to Get a service-instance.")
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming serviceInstanceId and serviceInstanceName are null. ServiceInstanceId or ServiceInstanceName is required to Get a service-instance.")
- }else{
- msoLogger.debug("Incoming Service Instance Id is: " + serviceInstanceId)
- msoLogger.debug("Incoming Service Instance Name is: " + serviceInstanceName)
- if(isBlank(globalCustomerId) || isBlank(serviceType)){
- execution.setVariable("GENGS_obtainObjectsUrl", true)
- if(isBlank(serviceInstanceId)){
- execution.setVariable("GENGS_obtainServiceInstanceUrlByName", true)
- }
- }else{
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
- msoLogger.debug("Incoming Service Type is: " + serviceType)
- }
- }
- }else if(type.equalsIgnoreCase("service-subscription")){
- if(isBlank(serviceType) || isBlank(globalCustomerId)){
- msoLogger.debug("Incoming ServiceType or GlobalCustomerId is null. These variables are required to Get a service-subscription.")
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming ServiceType or GlobalCustomerId is null. These variables are required to Get a service-subscription.")
- }else{
- msoLogger.debug("Incoming Service Type is: " + serviceType)
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
- }
- }else{
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, "Incoming Type is Invalid. Please Specify Type as service-instance or service-subscription")
- }
- }else{
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Incoming GENGS_type is null. Variable is Required.")
- }
-
- }catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
- throw b
- }catch(Exception e){
- msoLogger.debug("Internal Error encountered within GenericGetService PreProcessRequest method!" + e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured in GenericGetService PreProcessRequest")
-
- }
- msoLogger.trace("COMPLETED GenericGetService PreProcessRequest Process ")
- }
-
- /**
- * This method obtains the Url to the provided service instance
- * using the Service Instance Id.
- *
- * @param - execution
- */
- public void obtainServiceInstanceUrlById(DelegateExecution execution){
- execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED GenericGetService ObtainServiceInstanceUrlById Process")
- try {
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getSearchNodesQueryEndpoint(execution)
- String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
-
- String type = execution.getVariable("GENGS_type")
- String path = ""
- if(type.equalsIgnoreCase("service-instance")){
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- msoLogger.debug(" Querying Node for Service-Instance URL by using Service-Instance Id: " + serviceInstanceId)
- path = "${aai_uri}?search-node-type=service-instance&filter=service-instance-id:EQUALS:${serviceInstanceId}"
- msoLogger.debug("Service Instance Node Query Url is: " + path)
- msoLogger.debug("Service Instance Node Query Url is: " + path)
- }else if(type.equalsIgnoreCase("allotted-resource")){
- String allottedResourceId = execution.getVariable("GENGS_allottedResourceId")
- msoLogger.debug(" Querying Node for Service-Instance URL by using Allotted Resource Id: " + allottedResourceId)
- path = "${aai_uri}?search-node-type=allotted-resource&filter=id:EQUALS:${allottedResourceId}"
- msoLogger.debug("Allotted Resource Node Query Url is: " + path)
- msoLogger.debug("Allotted Resource Node Query Url is: " + path)
- }
-
- //String url = "${aai_endpoint}${path}" host name needs to be removed from property
- String url = "${path}"
- execution.setVariable("GENGS_genericQueryPath", url)
-
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, url)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENGS_genericQueryResponseCode", responseCode)
- msoLogger.debug(" GET Service Instance response code is: " + responseCode)
- msoLogger.debug("GenericGetService AAI GET Response Code: " + responseCode)
-
- String aaiResponse = response.getResponseBodyAsString()
- execution.setVariable("GENGS_obtainSIUrlResponseBeforeUnescaping", aaiResponse)
- msoLogger.debug("GenericGetService AAI Response before unescaping: " + aaiResponse)
- execution.setVariable("GENGS_genericQueryResponse", aaiResponse)
- msoLogger.debug("GenericGetService AAI Response: " + aaiResponse)
- msoLogger.debug("GenericGetService AAI Response: " + aaiResponse)
-
- //Process Response
- if(responseCode == 200){
- msoLogger.debug("Generic Query Received a Good Response Code")
- execution.setVariable("GENGS_SuccessIndicator", true)
- if(utils.nodeExists(aaiResponse, "result-data")){
- msoLogger.debug("Generic Query Response Does Contain Data" )
- execution.setVariable("GENGS_FoundIndicator", true)
- String resourceLink = utils.getNodeText(aaiResponse, "resource-link")
- execution.setVariable("GENGS_resourceLink", resourceLink)
- execution.setVariable("GENGS_siResourceLink", resourceLink)
- }else{
- msoLogger.debug("Generic Query Response Does NOT Contains Data" )
- execution.setVariable("WorkflowResponse", " ") //for junits
- }
- }else if(responseCode == 404){
- msoLogger.debug("Generic Query Received a Not Found (404) Response")
- execution.setVariable("GENGS_SuccessIndicator", true)
- execution.setVariable("WorkflowResponse", " ") //for junits
- }else{
- msoLogger.debug("Generic Query Received a BAD REST Response: \n" + aaiResponse)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
- throw b
- }catch(Exception e){
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Error encountered within GenericGetService ObtainServiceInstanceUrlById method!" + e, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "");
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During ObtainServiceInstanceUrlById")
- }
- msoLogger.trace("COMPLETED GenericGetService ObtainServiceInstanceUrlById Process")
- }
-
- /**
- * This method obtains the Url to the provided service instance
- * using the Service Instance Name.
- *
- * @param - execution
- */
- public void obtainServiceInstanceUrlByName(DelegateExecution execution){
- execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED GenericGetService ObtainServiceInstanceUrlByName Process")
- try {
- String serviceInstanceName = execution.getVariable("GENGS_serviceInstanceName")
- msoLogger.debug(" Querying Node for Service-Instance URL by using Service-Instance Name " + serviceInstanceName)
-
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_uri = aaiUriUtil.getSearchNodesQueryEndpoint(execution)
- String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
- String path = "${aai_uri}?search-node-type=service-instance&filter=service-instance-name:EQUALS:${serviceInstanceName}"
-
- //String url = "${aai_endpoint}${path}" host name needs to be removed from property
- String url = "${path}"
- execution.setVariable("GENGS_obtainSIUrlPath", url)
-
- msoLogger.debug("GenericGetService AAI Endpoint: " + aai_endpoint)
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, url)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENGS_obtainSIUrlResponseCode", responseCode)
- msoLogger.debug(" GET Service Instance response code is: " + responseCode)
- msoLogger.debug("GenericGetService AAI Response Code: " + responseCode)
-
- String aaiResponse = response.getResponseBodyAsString()
- execution.setVariable("GENGS_obtainSIUrlResponse", aaiResponse)
- msoLogger.debug("GenericGetService AAI Response: " + aaiResponse)
- //Process Response
- if(responseCode == 200){
- msoLogger.debug(" Query for Service Instance Url Received a Good Response Code")
- execution.setVariable("GENGS_SuccessIndicator", true)
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- boolean nodeExists = isBlank(globalCustomerId) ? utils.nodeExists(aaiResponse, "result-data") : hasCustomerServiceInstance(aaiResponse, globalCustomerId)
- if(nodeExists){
- msoLogger.debug("Query for Service Instance Url Response Does Contain Data" )
- execution.setVariable("GENGS_FoundIndicator", true)
- String resourceLink = utils.getNodeText(aaiResponse, "resource-link")
- execution.setVariable("GENGS_resourceLink", resourceLink)
- execution.setVariable("GENGS_siResourceLink", resourceLink)
- }else{
- msoLogger.debug("Query for Service Instance Url Response Does NOT Contains Data" )
- execution.setVariable("WorkflowResponse", " ") //for junits
- }
- }else if(responseCode == 404){
- msoLogger.debug(" Query for Service Instance Received a Not Found (404) Response")
- execution.setVariable("GENGS_SuccessIndicator", true)
- execution.setVariable("WorkflowResponse", " ") //for junits
- }else{
- msoLogger.debug("Query for Service Instance Received a BAD REST Response: \n" + aaiResponse)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
- throw b
- }catch(Exception e){
- msoLogger.error(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, " Error encountered within GenericGetService ObtainServiceInstanceUrlByName method!" + e, "BPMN", MsoLogger.getServiceName(), MsoLogger.ErrorCode.UnknownError, "");
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During ObtainServiceInstanceUrlByName")
- }
- msoLogger.trace("COMPLETED GenericGetService ObtainServiceInstanceUrlByName Process")
- }
-
-
- /**
- * This method executes a GET call to AAI to obtain the
- * service-instance or service-subscription
- *
- * @param - execution
- */
- public void getServiceObject(DelegateExecution execution){
- execution.setVariable("prefix",Prefix)
- msoLogger.trace("STARTED GenericGetService GetServiceObject Process")
- try {
- String type = execution.getVariable("GENGS_type")
- AaiUtil aaiUriUtil = new AaiUtil(this)
- String aai_endpoint = UrnPropertiesReader.getVariable("aai.endpoint", execution)
- String serviceEndpoint = ""
-
- msoLogger.debug("GenericGetService getServiceObject AAI Endpoint: " + aai_endpoint)
- if(type.equalsIgnoreCase("service-instance")){
- String siResourceLink = execution.getVariable("GENGS_resourceLink")
- if(isBlank(siResourceLink)){
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- msoLogger.debug(" Incoming GENGS_serviceInstanceId is: " + serviceInstanceId)
- String serviceType = execution.getVariable("GENGS_serviceType")
- msoLogger.debug(" Incoming GENGS_serviceType is: " + serviceType)
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
-
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- msoLogger.debug('AAI URI is: ' + aai_uri)
- serviceEndpoint = "${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(serviceInstanceId,"UTF-8")
- }else{
- msoLogger.debug("Incoming Service Instance Url is: " + siResourceLink)
- String[] split = siResourceLink.split("/aai/")
- serviceEndpoint = "/aai/" + split[1]
- }
- }else if(type.equalsIgnoreCase("allotted-resource")){
- String siResourceLink = execution.getVariable("GENGS_resourceLink")
- if(isBlank(siResourceLink)){
- String allottedResourceId = execution.getVariable("GENGS_allottedResourceId")
- msoLogger.debug(" Incoming GENGS_allottedResourceId is: " + allottedResourceId)
- String serviceInstanceId = execution.getVariable("GENGS_serviceInstanceId")
- msoLogger.debug(" Incoming GENGS_serviceInstanceId is: " + serviceInstanceId)
- String serviceType = execution.getVariable("GENGS_serviceType")
- msoLogger.debug(" Incoming GENGS_serviceType is: " + serviceType)
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- msoLogger.debug("Incoming Global Customer Id is: " + globalCustomerId)
-
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- msoLogger.debug('AAI URI is: ' + aai_uri)
- serviceEndpoint = "${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8") + "/service-instances/service-instance/" + UriUtils.encode(serviceInstanceId,"UTF-8") + "/allotted-resources/allotted-resource/" + UriUtils.encode(allottedResourceId,"UTF-8")
- }else{
- msoLogger.debug("Incoming Allotted-Resource Url is: " + siResourceLink)
- String[] split = siResourceLink.split("/aai/")
- serviceEndpoint = "/aai/" + split[1]
- }
- }else if(type.equalsIgnoreCase("service-subscription")){
- String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
- String globalCustomerId = execution.getVariable("GENGS_globalCustomerId")
- String serviceType = execution.getVariable("GENGS_serviceType")
- serviceEndpoint = "${aai_uri}/" + UriUtils.encode(globalCustomerId,"UTF-8") + "/service-subscriptions/service-subscription/" + UriUtils.encode(serviceType,"UTF-8")
- }
-
- String serviceUrl = "${aai_endpoint}" + serviceEndpoint
-
- execution.setVariable("GENGS_getServiceUrl", serviceUrl)
- msoLogger.debug("GET Service AAI Path is: \n" + serviceUrl)
-
- APIResponse response = aaiUriUtil.executeAAIGetCall(execution, serviceUrl)
- int responseCode = response.getStatusCode()
- execution.setVariable("GENGS_getServiceResponseCode", responseCode)
- msoLogger.debug(" GET Service response code is: " + responseCode)
- msoLogger.debug("GenericGetService AAI Response Code: " + responseCode)
-
- String aaiResponse = response.getResponseBodyAsString()
- execution.setVariable("GENGS_getServiceResponse", aaiResponse)
- msoLogger.debug("GenericGetService AAI Response: " + aaiResponse)
- //Process Response
- if(responseCode == 200 || responseCode == 202){
- msoLogger.debug("GET Service Received a Good Response Code")
- if(utils.nodeExists(aaiResponse, "service-instance") || utils.nodeExists(aaiResponse, "service-subscription")){
- msoLogger.debug("GET Service Response Contains a service-instance" )
- execution.setVariable("GENGS_FoundIndicator", true)
- execution.setVariable("GENGS_service", aaiResponse)
- execution.setVariable("WorkflowResponse", aaiResponse)
-
- }else{
- msoLogger.debug("GET Service Response Does NOT Contain Data" )
- }
- }else if(responseCode == 404){
- msoLogger.debug("GET Service Received a Not Found (404) Response")
- execution.setVariable("WorkflowResponse", " ") //for junits
- }
- else{
- msoLogger.debug(" GET Service Received a Bad Response: \n" + aaiResponse)
- exceptionUtil.MapAAIExceptionToWorkflowExceptionGeneric(execution, aaiResponse, responseCode)
- throw new BpmnError("MSOWorkflowException")
- }
- }catch(BpmnError b){
- msoLogger.debug("Rethrowing MSOWorkflowException")
- throw b
- }catch(Exception e){
- msoLogger.debug(" Error encountered within GenericGetService GetServiceObject method!" + e)
- exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Internal Error - Occured During GenericGetService")
- }
- msoLogger.trace("COMPLETED GenericGetService GetServiceObject Process")
- }
-
- /**
- * An utility method which check whether a service(by name) is already present within a globalCustomerId or not.
- * @param jsonResponse raw response received from AAI by searching ServiceInstance by Name.
- * @param globalCustomerId
- * @return {@code true} if globalCustomerId is found at 6th position within "resource-link", {@code false} in any other cases.
- */
- public boolean hasCustomerServiceInstance(String aaiResponse, final String globalCustomerId) {
- if (isBlank(aaiResponse)) {
- return false
- }
- aaiResponse = utils.removeXmlNamespaces(aaiResponse)
- ArrayList<String> linksArray = utils.getMultNodeObjects(aaiResponse, "resource-link")
- if (linksArray == null || linksArray.size() == 0) {
- return false
- }
- for (String resourceLink : linksArray) {
- int custStart = resourceLink.indexOf("customer/")
- int custEnd = resourceLink.indexOf("/service-subscriptions/")
- String receivedCustomerId = resourceLink.substring(custStart + 9, custEnd)
- if (globalCustomerId.equals(receivedCustomerId)) {
- return true
- }
- }
- return false
- }
-
-} \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericPutService.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericPutService.groovy
index d41134be91..8cc756d412 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericPutService.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/GenericPutService.groovy
@@ -7,9 +7,9 @@
* 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.
@@ -67,7 +67,7 @@ import org.onap.so.logger.MsoLogger
* @param - GENPS_tunnelXconnectId - Conditional Field. Required for tunnel-xconnect.
*
* @param - GENPS_serviceResourceVersion - Conditional Field. Needs to be provided only in case of update for both service-instance and service subscription. The calling flows
- * should check if a service-instance or servic-subscription exists by calling the subflow GenericGetService. if it exists then resourceversion should be
+ * should check if a service-instance or servic-subscription exists by calling the subflow. if it exists then resourceversion should be
* obtained from aai and sent as an input parameter.
*
* Outgoing Variables:
@@ -104,7 +104,7 @@ class GenericPutService extends AbstractServiceTaskProcessor{
String allottedResourceId = execution.getVariable("GENPS_allottedResourceId")
String tunnelXconnectId = execution.getVariable("GENPS_tunnelXconnectId")
String type = execution.getVariable("GENPS_type")
-
+
if(type != null){
msoLogger.debug("Incoming GENPS_type is: " + type)
if(type.equalsIgnoreCase("service-instance")){
@@ -201,7 +201,7 @@ class GenericPutService extends AbstractServiceTaskProcessor{
String serviceType = execution.getVariable("GENPS_serviceType")
msoLogger.debug(" Incoming GENPS_serviceType is: " + serviceType)
-
+
String globalSubscriberId = execution.getVariable("GENPS_globalSubscriberId")
msoLogger.debug("Incoming Global Subscriber Id is: " + globalSubscriberId)
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CustomE2EGetService.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CustomE2EGetService.bpmn
deleted file mode 100644
index 90722a95f3..0000000000
--- a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CustomE2EGetService.bpmn
+++ /dev/null
@@ -1,321 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_D5VzAHElEeaJwpcpVN5gXw" 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="CustomE2EGetService" name="CustomE2EGetService" isExecutable="true">
- <bpmn2:scriptTask id="intialization" name="Initialization" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-CustomE2EGetService getService = new CustomE2EGetService()
-getService.preProcessRequest(execution)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="intialization" targetRef="getUrl" />
- <bpmn2:exclusiveGateway id="getUrl" name="Need Object&#39;s Url?" default="getUrlNo">
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
- <bpmn2:outgoing>getUrlYes</bpmn2:outgoing>
- <bpmn2:outgoing>getUrlNo</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="getUrlYes" name="Yes" sourceRef="getUrl" targetRef="obtain">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_obtainObjectsUrl" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="getUrlNo" name="No" sourceRef="getUrl" targetRef="ExclusiveGateway_2" />
- <bpmn2:subProcess id="bpmnExceptionHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">
- <bpmn2:scriptTask id="processBPMNException" name="Process Error" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-
-ExceptionUtil ex = new ExceptionUtil()
-ex.processSubflowsBPMNException(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="processBPMNException" targetRef="EndEvent_2" />
- <bpmn2:startEvent id="StartEvent_2">
- <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="StartEvent_2" targetRef="processBPMNException" />
- <bpmn2:endEvent id="EndEvent_2">
- <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
- </bpmn2:endEvent>
- </bpmn2:subProcess>
- <bpmn2:scriptTask id="toggleSuccess" name="Toggle Success Indicator" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-CustomE2EGetService getService = new CustomE2EGetService()
-getService.setSuccessIndicator(execution, true)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="toggleSuccess" targetRef="EndEvent_1" />
- <bpmn2:scriptTask id="getServiceInstance" name="GET&#10;Object" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-CustomE2EGetService getService = new CustomE2EGetService()
-getService.getServiceObject(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="getServiceInstance" targetRef="toggleSuccess" />
- <bpmn2:exclusiveGateway id="ExclusiveGateway_2">
- <bpmn2:incoming>getUrlNo</bpmn2:incoming>
- <bpmn2:incoming>foundYes</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ExclusiveGateway_2" targetRef="getServiceInstance" />
- <bpmn2:scriptTask id="obtainServiceUrlById" name="Node Query Using Id&#10;" scriptFormat="groovy">
- <bpmn2:incoming>obtainById</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-CustomE2EGetService getService = new CustomE2EGetService()
-getService.obtainServiceInstanceUrlById(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="obtainServiceUrlById" targetRef="ExclusiveGateway_3" />
- <bpmn2:scriptTask id="obtainServiceUrlByName" name="Node Query Using Name" scriptFormat="groovy">
- <bpmn2:incoming>obtainByName</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-CustomE2EGetService getService = new CustomE2EGetService()
-getService.obtainServiceInstanceUrlByName(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="obtainServiceUrlByName" targetRef="ExclusiveGateway_3" />
- <bpmn2:exclusiveGateway id="obtain" name="Query By?" default="obtainById">
- <bpmn2:incoming>getUrlYes</bpmn2:incoming>
- <bpmn2:outgoing>obtainById</bpmn2:outgoing>
- <bpmn2:outgoing>obtainByName</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="obtainById" name="Id" sourceRef="obtain" targetRef="obtainServiceUrlById" />
- <bpmn2:sequenceFlow id="obtainByName" name="Name" sourceRef="obtain" targetRef="obtainServiceUrlByName">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_obtainServiceInstanceUrlByName" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:exclusiveGateway id="serviceFoundCheck" name="Service Exist?" default="notFound">
- <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
- <bpmn2:outgoing>foundYes</bpmn2:outgoing>
- <bpmn2:outgoing>notFound</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="foundYes" name="Yes" sourceRef="serviceFoundCheck" targetRef="ExclusiveGateway_2">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_FoundIndicator" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="notFound" name="No" sourceRef="serviceFoundCheck" targetRef="EndEvent_3" />
- <bpmn2:endEvent id="EndEvent_3">
- <bpmn2:incoming>notFound</bpmn2:incoming>
- <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_29" />
- </bpmn2:endEvent>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_3">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ExclusiveGateway_3" targetRef="serviceFoundCheck" />
- <bpmn2:endEvent id="EndEvent_1">
- <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
- <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_26" />
- </bpmn2:endEvent>
- <bpmn2:startEvent id="StartEvent_1">
- <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="intialization" />
- </bpmn2:process>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericGetService">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_69" bpmnElement="StartEvent_1">
- <dc:Bounds x="108" y="264" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="126" y="305" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_288" bpmnElement="intialization">
- <dc:Bounds x="228" y="242" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_69" targetElement="_BPMNShape_ScriptTask_288">
- <di:waypoint xsi:type="dc:Point" x="144" y="282" />
- <di:waypoint xsi:type="dc:Point" x="228" y="282" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="177" y="282" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_227" bpmnElement="getUrl" isMarkerVisible="true">
- <dc:Bounds x="372" y="256" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="420" y="282" width="72" height="24" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_288" targetElement="_BPMNShape_ExclusiveGateway_227">
- <di:waypoint xsi:type="dc:Point" x="328" y="282" />
- <di:waypoint xsi:type="dc:Point" x="372" y="281" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="350" y="281" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_289" bpmnElement="obtainServiceUrlById">
- <dc:Bounds x="528" y="197" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_228" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
- <dc:Bounds x="738" y="256" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="763" y="311" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_290" bpmnElement="getServiceInstance">
- <dc:Bounds x="820" y="242" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="getUrlYes" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_ExclusiveGateway_233">
- <di:waypoint xsi:type="dc:Point" x="397" y="256" />
- <di:waypoint xsi:type="dc:Point" x="397" y="170" />
- <di:waypoint xsi:type="dc:Point" x="446" y="170" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="397" y="213" width="29" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_289" targetElement="_BPMNShape_ExclusiveGateway_234">
- <di:waypoint xsi:type="dc:Point" x="628" y="237" />
- <di:waypoint xsi:type="dc:Point" x="671" y="237" />
- <di:waypoint xsi:type="dc:Point" x="671" y="195" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="668" y="221" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ExclusiveGateway_228" targetElement="_BPMNShape_ScriptTask_290">
- <di:waypoint xsi:type="dc:Point" x="788" y="281" />
- <di:waypoint xsi:type="dc:Point" x="820" y="282" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="798" y="281" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="getUrlNo" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_ExclusiveGateway_228">
- <di:waypoint xsi:type="dc:Point" x="397" y="306" />
- <di:waypoint xsi:type="dc:Point" x="397" y="370" />
- <di:waypoint xsi:type="dc:Point" x="763" y="370" />
- <di:waypoint xsi:type="dc:Point" x="763" y="306" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="400" y="324" width="22" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_291" bpmnElement="toggleSuccess">
- <dc:Bounds x="960" y="242" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_290" targetElement="_BPMNShape_ScriptTask_291">
- <di:waypoint xsi:type="dc:Point" x="920" y="282" />
- <di:waypoint xsi:type="dc:Point" x="960" y="282" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="937" y="282" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_223" bpmnElement="EndEvent_1">
- <dc:Bounds x="1133" y="264" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1151" y="305" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_291" targetElement="_BPMNShape_EndEvent_223">
- <di:waypoint xsi:type="dc:Point" x="1060" y="282" />
- <di:waypoint xsi:type="dc:Point" x="1133" y="282" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1100" y="282" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_25" bpmnElement="bpmnExceptionHandlingSubProcess" isExpanded="true">
- <dc:Bounds x="152" y="468" width="325" height="169" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_2">
- <dc:Bounds x="176" y="535" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="194" y="576" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_224" bpmnElement="EndEvent_2">
- <dc:Bounds x="416" y="535" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="434" y="576" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_292" bpmnElement="processBPMNException">
- <dc:Bounds x="265" y="513" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_StartEvent_70" targetElement="_BPMNShape_ScriptTask_292">
- <di:waypoint xsi:type="dc:Point" x="212" y="553" />
- <di:waypoint xsi:type="dc:Point" x="265" y="553" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="233" y="553" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_292" targetElement="_BPMNShape_EndEvent_224">
- <di:waypoint xsi:type="dc:Point" x="365" y="553" />
- <di:waypoint xsi:type="dc:Point" x="416" y="553" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="385" y="553" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_301" bpmnElement="obtainServiceUrlByName">
- <dc:Bounds x="528" y="59" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_233" bpmnElement="obtain" isMarkerVisible="true">
- <dc:Bounds x="446" y="145" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="501" y="164" width="53" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_234" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
- <dc:Bounds x="646" y="145" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="671" y="200" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="obtainById" sourceElement="_BPMNShape_ExclusiveGateway_233" targetElement="_BPMNShape_ScriptTask_289">
- <di:waypoint xsi:type="dc:Point" x="471" y="195" />
- <di:waypoint xsi:type="dc:Point" x="471" y="236" />
- <di:waypoint xsi:type="dc:Point" x="528" y="237" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="476" y="207" width="16" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="obtainByName" sourceElement="_BPMNShape_ExclusiveGateway_233" targetElement="_BPMNShape_ScriptTask_301">
- <di:waypoint xsi:type="dc:Point" x="471" y="145" />
- <di:waypoint xsi:type="dc:Point" x="471" y="99" />
- <di:waypoint xsi:type="dc:Point" x="528" y="99" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="471" y="115" width="40" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_301" targetElement="_BPMNShape_ExclusiveGateway_234">
- <di:waypoint xsi:type="dc:Point" x="628" y="99" />
- <di:waypoint xsi:type="dc:Point" x="671" y="99" />
- <di:waypoint xsi:type="dc:Point" x="671" y="145" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="665" y="99" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_235" bpmnElement="serviceFoundCheck" isMarkerVisible="true">
- <dc:Bounds x="738" y="145" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="735" y="125" width="59" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ExclusiveGateway_234" targetElement="_BPMNShape_ExclusiveGateway_235">
- <di:waypoint xsi:type="dc:Point" x="696" y="170" />
- <di:waypoint xsi:type="dc:Point" x="738" y="170" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="704" y="170" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="foundYes" sourceElement="_BPMNShape_ExclusiveGateway_235" targetElement="_BPMNShape_ExclusiveGateway_228">
- <di:waypoint xsi:type="dc:Point" x="763" y="195" />
- <di:waypoint xsi:type="dc:Point" x="763" y="256" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="762" y="205" width="29" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="notFound" sourceElement="_BPMNShape_ExclusiveGateway_235" targetElement="_BPMNShape_EndEvent_229">
- <di:waypoint xsi:type="dc:Point" x="788" y="170" />
- <di:waypoint xsi:type="dc:Point" x="877" y="171" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="798" y="170" width="22" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_229" bpmnElement="EndEvent_3">
- <dc:Bounds x="877" y="153" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="895" y="194" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
-</bpmn2:definitions>
diff --git a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericGetService.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericGetService.bpmn
deleted file mode 100644
index 2015526874..0000000000
--- a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/GenericGetService.bpmn
+++ /dev/null
@@ -1,321 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_D5VzAHElEeaJwpcpVN5gXw" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.4.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
- <bpmn2:process id="GenericGetService" name="GenericGetService" isExecutable="true">
- <bpmn2:scriptTask id="intialization" name="Initialization" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-GenericGetService getService = new GenericGetService()
-getService.preProcessRequest(execution)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_2" name="" sourceRef="intialization" targetRef="getUrl" />
- <bpmn2:exclusiveGateway id="getUrl" name="Need Object&#39;s Url?" default="getUrlNo">
- <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
- <bpmn2:outgoing>getUrlYes</bpmn2:outgoing>
- <bpmn2:outgoing>getUrlNo</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="getUrlYes" name="Yes" sourceRef="getUrl" targetRef="obtain">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_obtainObjectsUrl" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="getUrlNo" name="No" sourceRef="getUrl" targetRef="ExclusiveGateway_2" />
- <bpmn2:subProcess id="bpmnExceptionHandlingSubProcess" name="Error Handling Sub Process" triggeredByEvent="true">
- <bpmn2:scriptTask id="processBPMNException" name="Process Error" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_7</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_8</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-
-ExceptionUtil ex = new ExceptionUtil()
-ex.processSubflowsBPMNException(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_8" name="" sourceRef="processBPMNException" targetRef="EndEvent_2" />
- <bpmn2:startEvent id="StartEvent_2">
- <bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
- <bpmn2:errorEventDefinition id="ErrorEventDefinition_1" />
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_7" name="" sourceRef="StartEvent_2" targetRef="processBPMNException" />
- <bpmn2:endEvent id="EndEvent_2">
- <bpmn2:incoming>SequenceFlow_8</bpmn2:incoming>
- </bpmn2:endEvent>
- </bpmn2:subProcess>
- <bpmn2:scriptTask id="toggleSuccess" name="Toggle Success Indicator" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-GenericGetService getService = new GenericGetService()
-getService.setSuccessIndicator(execution, true)
-]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_6" name="" sourceRef="toggleSuccess" targetRef="EndEvent_1" />
- <bpmn2:scriptTask id="getServiceInstance" name="GET&#10;Object" scriptFormat="groovy">
- <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-GenericGetService getService = new GenericGetService()
-getService.getServiceObject(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_3" name="" sourceRef="getServiceInstance" targetRef="toggleSuccess" />
- <bpmn2:exclusiveGateway id="ExclusiveGateway_2">
- <bpmn2:incoming>getUrlNo</bpmn2:incoming>
- <bpmn2:incoming>foundYes</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_5" name="" sourceRef="ExclusiveGateway_2" targetRef="getServiceInstance" />
- <bpmn2:scriptTask id="obtainServiceUrlById" name="Node Query Using Id&#10;" scriptFormat="groovy">
- <bpmn2:incoming>obtainById</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-GenericGetService getService = new GenericGetService()
-getService.obtainServiceInstanceUrlById(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_4" name="" sourceRef="obtainServiceUrlById" targetRef="ExclusiveGateway_3" />
- <bpmn2:scriptTask id="obtainServiceUrlByName" name="Node Query Using Name" scriptFormat="groovy">
- <bpmn2:incoming>obtainByName</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_13</bpmn2:outgoing>
- <bpmn2:script><![CDATA[import org.onap.so.bpmn.common.scripts.*
-GenericGetService getService = new GenericGetService()
-getService.obtainServiceInstanceUrlByName(execution)]]></bpmn2:script>
- </bpmn2:scriptTask>
- <bpmn2:sequenceFlow id="SequenceFlow_13" name="" sourceRef="obtainServiceUrlByName" targetRef="ExclusiveGateway_3" />
- <bpmn2:exclusiveGateway id="obtain" name="Query By?" default="obtainById">
- <bpmn2:incoming>getUrlYes</bpmn2:incoming>
- <bpmn2:outgoing>obtainById</bpmn2:outgoing>
- <bpmn2:outgoing>obtainByName</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="obtainById" name="Id" sourceRef="obtain" targetRef="obtainServiceUrlById" />
- <bpmn2:sequenceFlow id="obtainByName" name="Name" sourceRef="obtain" targetRef="obtainServiceUrlByName">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_obtainServiceInstanceUrlByName" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:exclusiveGateway id="serviceFoundCheck" name="Service Exist?" default="notFound">
- <bpmn2:incoming>SequenceFlow_14</bpmn2:incoming>
- <bpmn2:outgoing>foundYes</bpmn2:outgoing>
- <bpmn2:outgoing>notFound</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="foundYes" name="Yes" sourceRef="serviceFoundCheck" targetRef="ExclusiveGateway_2">
- <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[#{execution.getVariable("GENGS_FoundIndicator" ) == true}]]></bpmn2:conditionExpression>
- </bpmn2:sequenceFlow>
- <bpmn2:sequenceFlow id="notFound" name="No" sourceRef="serviceFoundCheck" targetRef="EndEvent_3" />
- <bpmn2:endEvent id="EndEvent_3">
- <bpmn2:incoming>notFound</bpmn2:incoming>
- <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_29" />
- </bpmn2:endEvent>
- <bpmn2:exclusiveGateway id="ExclusiveGateway_3">
- <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
- <bpmn2:incoming>SequenceFlow_13</bpmn2:incoming>
- <bpmn2:outgoing>SequenceFlow_14</bpmn2:outgoing>
- </bpmn2:exclusiveGateway>
- <bpmn2:sequenceFlow id="SequenceFlow_14" name="" sourceRef="ExclusiveGateway_3" targetRef="serviceFoundCheck" />
- <bpmn2:endEvent id="EndEvent_1">
- <bpmn2:incoming>SequenceFlow_6</bpmn2:incoming>
- <bpmn2:terminateEventDefinition id="_TerminateEventDefinition_26" />
- </bpmn2:endEvent>
- <bpmn2:startEvent id="StartEvent_1">
- <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
- </bpmn2:startEvent>
- <bpmn2:sequenceFlow id="SequenceFlow_1" name="" sourceRef="StartEvent_1" targetRef="intialization" />
- </bpmn2:process>
- <bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="GenericGetService">
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_69" bpmnElement="StartEvent_1">
- <dc:Bounds x="108" y="264" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="126" y="305" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_288" bpmnElement="intialization">
- <dc:Bounds x="228" y="242" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="_BPMNShape_StartEvent_69" targetElement="_BPMNShape_ScriptTask_288">
- <di:waypoint xsi:type="dc:Point" x="144" y="282" />
- <di:waypoint xsi:type="dc:Point" x="228" y="282" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="177" y="282" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_227" bpmnElement="getUrl" isMarkerVisible="true">
- <dc:Bounds x="372" y="256" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="420" y="282" width="72" height="24" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="_BPMNShape_ScriptTask_288" targetElement="_BPMNShape_ExclusiveGateway_227">
- <di:waypoint xsi:type="dc:Point" x="328" y="282" />
- <di:waypoint xsi:type="dc:Point" x="372" y="281" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="350" y="281" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_289" bpmnElement="obtainServiceUrlById">
- <dc:Bounds x="528" y="197" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_228" bpmnElement="ExclusiveGateway_2" isMarkerVisible="true">
- <dc:Bounds x="738" y="256" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="763" y="311" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_290" bpmnElement="getServiceInstance">
- <dc:Bounds x="820" y="242" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="getUrlYes" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_ExclusiveGateway_233">
- <di:waypoint xsi:type="dc:Point" x="397" y="256" />
- <di:waypoint xsi:type="dc:Point" x="397" y="170" />
- <di:waypoint xsi:type="dc:Point" x="446" y="170" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="397" y="213" width="29" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="_BPMNShape_ScriptTask_289" targetElement="_BPMNShape_ExclusiveGateway_234">
- <di:waypoint xsi:type="dc:Point" x="628" y="237" />
- <di:waypoint xsi:type="dc:Point" x="671" y="237" />
- <di:waypoint xsi:type="dc:Point" x="671" y="195" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="668" y="221" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="_BPMNShape_ExclusiveGateway_228" targetElement="_BPMNShape_ScriptTask_290">
- <di:waypoint xsi:type="dc:Point" x="788" y="281" />
- <di:waypoint xsi:type="dc:Point" x="820" y="282" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="798" y="281" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="getUrlNo" sourceElement="_BPMNShape_ExclusiveGateway_227" targetElement="_BPMNShape_ExclusiveGateway_228">
- <di:waypoint xsi:type="dc:Point" x="397" y="306" />
- <di:waypoint xsi:type="dc:Point" x="397" y="370" />
- <di:waypoint xsi:type="dc:Point" x="763" y="370" />
- <di:waypoint xsi:type="dc:Point" x="763" y="306" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="400" y="324" width="22" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_291" bpmnElement="toggleSuccess">
- <dc:Bounds x="960" y="242" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_7" bpmnElement="SequenceFlow_3" sourceElement="_BPMNShape_ScriptTask_290" targetElement="_BPMNShape_ScriptTask_291">
- <di:waypoint xsi:type="dc:Point" x="920" y="282" />
- <di:waypoint xsi:type="dc:Point" x="960" y="282" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="937" y="282" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_223" bpmnElement="EndEvent_1">
- <dc:Bounds x="1133" y="264" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1151" y="305" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="SequenceFlow_6" sourceElement="_BPMNShape_ScriptTask_291" targetElement="_BPMNShape_EndEvent_223">
- <di:waypoint xsi:type="dc:Point" x="1060" y="282" />
- <di:waypoint xsi:type="dc:Point" x="1133" y="282" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="1100" y="282" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_SubProcess_25" bpmnElement="bpmnExceptionHandlingSubProcess" isExpanded="true">
- <dc:Bounds x="152" y="468" width="325" height="169" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_StartEvent_70" bpmnElement="StartEvent_2">
- <dc:Bounds x="176" y="535" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="194" y="576" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_224" bpmnElement="EndEvent_2">
- <dc:Bounds x="416" y="535" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="434" y="576" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_292" bpmnElement="processBPMNException">
- <dc:Bounds x="265" y="513" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_7" sourceElement="_BPMNShape_StartEvent_70" targetElement="_BPMNShape_ScriptTask_292">
- <di:waypoint xsi:type="dc:Point" x="212" y="553" />
- <di:waypoint xsi:type="dc:Point" x="265" y="553" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="233" y="553" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_10" bpmnElement="SequenceFlow_8" sourceElement="_BPMNShape_ScriptTask_292" targetElement="_BPMNShape_EndEvent_224">
- <di:waypoint xsi:type="dc:Point" x="365" y="553" />
- <di:waypoint xsi:type="dc:Point" x="416" y="553" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="385" y="553" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ScriptTask_301" bpmnElement="obtainServiceUrlByName">
- <dc:Bounds x="528" y="59" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_233" bpmnElement="obtain" isMarkerVisible="true">
- <dc:Bounds x="446" y="145" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="501" y="164" width="53" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_234" bpmnElement="ExclusiveGateway_3" isMarkerVisible="true">
- <dc:Bounds x="646" y="145" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="671" y="200" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_13" bpmnElement="obtainById" sourceElement="_BPMNShape_ExclusiveGateway_233" targetElement="_BPMNShape_ScriptTask_289">
- <di:waypoint xsi:type="dc:Point" x="471" y="195" />
- <di:waypoint xsi:type="dc:Point" x="471" y="236" />
- <di:waypoint xsi:type="dc:Point" x="528" y="237" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="476" y="207" width="16" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_14" bpmnElement="obtainByName" sourceElement="_BPMNShape_ExclusiveGateway_233" targetElement="_BPMNShape_ScriptTask_301">
- <di:waypoint xsi:type="dc:Point" x="471" y="145" />
- <di:waypoint xsi:type="dc:Point" x="471" y="99" />
- <di:waypoint xsi:type="dc:Point" x="528" y="99" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="471" y="115" width="40" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_15" bpmnElement="SequenceFlow_13" sourceElement="_BPMNShape_ScriptTask_301" targetElement="_BPMNShape_ExclusiveGateway_234">
- <di:waypoint xsi:type="dc:Point" x="628" y="99" />
- <di:waypoint xsi:type="dc:Point" x="671" y="99" />
- <di:waypoint xsi:type="dc:Point" x="671" y="145" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="665" y="99" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_235" bpmnElement="serviceFoundCheck" isMarkerVisible="true">
- <dc:Bounds x="738" y="145" width="50" height="50" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="735" y="125" width="59" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_16" bpmnElement="SequenceFlow_14" sourceElement="_BPMNShape_ExclusiveGateway_234" targetElement="_BPMNShape_ExclusiveGateway_235">
- <di:waypoint xsi:type="dc:Point" x="696" y="170" />
- <di:waypoint xsi:type="dc:Point" x="738" y="170" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="704" y="170" width="6" height="6" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_17" bpmnElement="foundYes" sourceElement="_BPMNShape_ExclusiveGateway_235" targetElement="_BPMNShape_ExclusiveGateway_228">
- <di:waypoint xsi:type="dc:Point" x="763" y="195" />
- <di:waypoint xsi:type="dc:Point" x="763" y="256" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="762" y="205" width="29" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_18" bpmnElement="notFound" sourceElement="_BPMNShape_ExclusiveGateway_235" targetElement="_BPMNShape_EndEvent_229">
- <di:waypoint xsi:type="dc:Point" x="788" y="170" />
- <di:waypoint xsi:type="dc:Point" x="877" y="171" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="798" y="170" width="22" height="22" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="_BPMNShape_EndEvent_229" bpmnElement="EndEvent_3">
- <dc:Bounds x="877" y="153" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="895" y="194" width="0" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- </bpmndi:BPMNPlane>
- </bpmndi:BPMNDiagram>
-</bpmn2:definitions> \ No newline at end of file