From: Rob Daugherty Date: Fri, 20 Oct 2017 01:42:19 +0000 (-0400) Subject: Flows fail to update status in requests DB X-Git-Tag: v1.1.0~126^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=9f48bf3ea3f15bd2c2b6a7bf10f1a3f34dd5b406;p=so.git Flows fail to update status in requests DB The fallout and completion handlers are not updating the request status in the mso_requests database. The cause is a missing URN mapping that defines the service endpoint for these updates. Issue: SO-230 Change-Id: I5b4ff6e9ca2cde6605b3ed7cb7b086041111d31c Signed-off-by: Rob Daugherty --- diff --git a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn index 2629ea7437..9bfd4535ea 100644 --- a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn +++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/CompleteMsoProcess.bpmn @@ -50,7 +50,7 @@ completeMsoProcess.setUpdateDBstatustoSuccessPayload(execution)]]> - ${URN_mso_openecomp_adapters_db_endpoint} + ${URN_mso_adapters_openecomp_db_endpoint} diff --git a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/FalloutHandler.bpmn b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/FalloutHandler.bpmn index 4ac34f9210..4f27e0026a 100644 --- a/bpmn/MSOCommonBPMN/src/main/resources/subprocess/FalloutHandler.bpmn +++ b/bpmn/MSOCommonBPMN/src/main/resources/subprocess/FalloutHandler.bpmn @@ -133,7 +133,7 @@ falloutHandler.buildDBWorkflowException(execution, "FH_updateRequestInfraRespons - ${URN_mso_openecomp_adapters_db_endpoint} + ${URN_mso_adapters_openecomp_db_endpoint} POST diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/FalloutHandlerTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/FalloutHandlerTest.java index 7c9247addb..8281687dec 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/FalloutHandlerTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/FalloutHandlerTest.java @@ -40,6 +40,11 @@ import org.openecomp.mso.bpmn.common.workflow.service.WorkflowResponse; */ public class FalloutHandlerTest extends WorkflowTest { private void setupMocks() { + stubFor(post(urlEqualTo("/dbadapters/MsoRequestsDbAdapter")) + .willReturn(aResponse() + .withStatus(200) + .withHeader("Content-Type", "text/xml") + .withBody("Notified"))); stubFor(post(urlEqualTo("/dbadapters/RequestsDbAdapter")) .willReturn(aResponse() .withStatus(200) diff --git a/bpmn/MSOCommonBPMN/src/test/resources/mso.bpmn.urn.properties b/bpmn/MSOCommonBPMN/src/test/resources/mso.bpmn.urn.properties index ba45f545c8..5520d187be 100644 --- a/bpmn/MSOCommonBPMN/src/test/resources/mso.bpmn.urn.properties +++ b/bpmn/MSOCommonBPMN/src/test/resources/mso.bpmn.urn.properties @@ -13,8 +13,8 @@ mso.healthcheck.log.debug=false mso.adapters.completemsoprocess.endpoint=http://localhost:28090/CompleteMsoProcess -mso.adapters.db.endpoint=http://localhost:28090/dbadapters/RequestsDbAdapter -mso.openecomp.adapters.db.endpoint=http://localhost:28090/dbadapters/RequestsDbAdapter +mso.adapters.db.endpoint=http://localhost:28090/dbadapters/MsoRequestsDbAdapter +mso.adapters.openecomp.db.endpoint=http://localhost:28090/dbadapters/RequestsDbAdapter mso.adapters.db.auth=757A94191D685FD2092AC1490730A4FC mso.adapters.network.endpoint=http://localhost:28090/networks/NetworkAdapter diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java index 75858b14ec..204d9e4e5e 100644 --- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java +++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java @@ -54,7 +54,7 @@ public class HealthCheckHandler { private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL); private static final String SITENAME = "mso.sitename"; - private static final String ADAPTER_ENDPOINT = "mso.adapters.db.endpoint"; + private static final String ADAPTER_ENDPOINT = "mso.adapters.openecomp.db.endpoint"; private static final String ADAPTER_NAMESPACE = "mso.adapters.namespace"; private static final String CONFIG = "mso.bpmn.urn.properties"; private static final String CREDENTIAL = "mso.adapters.db.auth"; diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy index 73066b3722..b5295aef62 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy @@ -304,7 +304,7 @@ public class CreateCustomE2EServiceInstance extends AbstractServiceTaskProcessor execution.setVariable("operationId", operationId) execution.setVariable("operationType", operationType) - def dbAdapterEndpoint = execution.getVariable("URN_mso_openecomp_adapters_db_endpoint") + def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint") execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint) utils.log("DEBUG", "DB Adapter Endpoint is: " + dbAdapterEndpoint, isDebugEnabled) @@ -338,4 +338,4 @@ public class CreateCustomE2EServiceInstance extends AbstractServiceTaskProcessor utils.log("DEBUG", "======== COMPLETED prepareInitServiceOperationStatus Process ======== ", isDebugEnabled) } -} \ No newline at end of file +} diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy index 99c37fb142..37ff4944ff 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateVfModuleInfra.groovy @@ -408,7 +408,7 @@ public class CreateVfModuleInfra extends AbstractServiceTaskProcessor { // vfModuleName may be generated by DoCreateVfModule subprocess if it is not specified on the input def vfModuleName = execution.getVariable("CVFMI_vfModuleName") - def dbAdapterEndpoint = execution.getVariable("URN_mso_openecomp_adapters_db_endpoint") + def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint") execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint) utils.log("DEBUG", "DB Adapter Endpoint is: " + dbAdapterEndpoint, isDebugEnabled) diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy index a2be3035a6..a8506fdc94 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy @@ -636,7 +636,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor { } } - def dbAdapterEndpoint = execution.getVariable("URN_mso_openecomp_adapters_db_endpoint") + def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint") execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint) utils.log("DEBUG", "DB Adapter Endpoint is: " + dbAdapterEndpoint, isDebugEnabled) diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy index b7aaef097a..8ab8d61019 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy +++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCustomDeleteE2EServiceInstance.groovy @@ -523,7 +523,7 @@ public class DoDeleteE2EServiceInstance extends AbstractServiceTaskProcessor { } } - def dbAdapterEndpoint = execution.getVariable("URN_mso_openecomp_adapters_db_endpoint") + def dbAdapterEndpoint = execution.getVariable("URN_mso_adapters_openecomp_db_endpoint") execution.setVariable("CVFMI_dbAdapterEndpoint", dbAdapterEndpoint) utils.log("DEBUG", "DB Adapter Endpoint is: " + dbAdapterEndpoint, isDebugEnabled) diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn index 04b47b452a..5f50581513 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn @@ -152,7 +152,7 @@ csi.prepareInitServiceOperationStatus(execution)]]> - ${URN_mso_openecomp_adapters_db_endpoint} + ${URN_mso_adapters_openecomp_db_endpoint} application/soap+xml diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateNetworkInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateNetworkInstance.bpmn index 24a9a6d73c..0316e26d9a 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateNetworkInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateNetworkInstance.bpmn @@ -116,7 +116,7 @@ CreateNetworkInstance.prepareDBRequestError(execution)]]> - ${URN_mso_openecomp_adapters_db_endpoint} + ${URN_mso_adapters_openecomp_db_endpoint} ${CRENI_createDBRequest} diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleInfra.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleInfra.bpmn index 72c275380f..84ab4177e2 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleInfra.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleInfra.bpmn @@ -70,7 +70,7 @@ createVfModule.prepareUpdateInfraRequest(execution)]]> - ${URN_mso_openecomp_adapters_db_endpoint} + ${URN_mso_adapters_openecomp_db_endpoint} application/soap+xml diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleVolumeInfraV1.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleVolumeInfraV1.bpmn index ec4afa4ea4..111b6c7032 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleVolumeInfraV1.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateVfModuleVolumeInfraV1.bpmn @@ -200,7 +200,7 @@ createVfModuleVolumeInfraV1.executeMethod('postProcessResponse', execution, isDe - ${URN_mso_openecomp_adapters_db_endpoint} + ${URN_mso_adapters_openecomp_db_endpoint} ${CVMVINFRAV1_createDBRequest} diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteNetworkInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteNetworkInstance.bpmn index 079599d7ca..3b5c629182 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteNetworkInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteNetworkInstance.bpmn @@ -116,7 +116,7 @@ DeleteNetworkInstance.prepareDBRequestError(execution)]]> - ${URN_mso_openecomp_adapters_db_endpoint} + ${URN_mso_adapters_openecomp_db_endpoint} ${DELNI_deleteDBRequest} diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleInfra.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleInfra.bpmn index a687d5df87..e19ea1bd86 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleInfra.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleInfra.bpmn @@ -79,7 +79,7 @@ dvfm.completionHandlerPrep(execution, 'DELVfModI_CompletionHandlerRequest') - ${URN_mso_openecomp_adapters_db_endpoint} + ${URN_mso_adapters_openecomp_db_endpoint} POST diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleVolumeInfraV1.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleVolumeInfraV1.bpmn index 21f74a2a29..c7092ffb30 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleVolumeInfraV1.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVfModuleVolumeInfraV1.bpmn @@ -198,7 +198,7 @@ execution.setVariable("DELVfModVol_TransactionSuccessIndicator", true)]]> - ${URN_mso_openecomp_adapters_db_endpoint} + ${URN_mso_adapters_openecomp_db_endpoint} ${DELVfModVol_updateInfraRequest} diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstance.bpmn index 7e54b805e1..a9d81d05bc 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateNetworkInstance.bpmn @@ -116,7 +116,7 @@ UpdateNetworkInstance.prepareDBRequestError(execution)]]> - ${URN_mso_openecomp_adapters_db_endpoint} + ${URN_mso_adapters_openecomp_db_endpoint} ${UPDNI_createDBRequest} diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateVfModuleVolumeInfraV1.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateVfModuleVolumeInfraV1.bpmn index 15b5bc7fcf..7e5f41ba26 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateVfModuleVolumeInfraV1.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/UpdateVfModuleVolumeInfraV1.bpmn @@ -21,7 +21,7 @@ - ${URN_mso_openecomp_adapters_db_endpoint} + ${URN_mso_adapters_openecomp_db_endpoint} ${UPDVfModVol_updateInfraRequest} diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn index 109cf69b92..7b422b6665 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn @@ -188,7 +188,7 @@ ddsi.preInitResourcesOperStatus(execution)]]> - ${URN_mso_openecomp_adapters_db_endpoint} + ${URN_mso_adapters_openecomp_db_endpoint} application/soap+xml diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn index 91f5404c9b..581ab3a47d 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn +++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCustomDeleteE2EServiceInstance.bpmn @@ -166,7 +166,7 @@ ddsi.preInitResourcesOperStatus(execution)]]> - ${URN_mso_openecomp_adapters_db_endpoint} + ${URN_mso_adapters_openecomp_db_endpoint} application/soap+xml diff --git a/bpmn/MSOInfrastructureBPMN/src/test/resources/mso.bpmn.urn.properties b/bpmn/MSOInfrastructureBPMN/src/test/resources/mso.bpmn.urn.properties index 8a557c433a..aad79b00f0 100644 --- a/bpmn/MSOInfrastructureBPMN/src/test/resources/mso.bpmn.urn.properties +++ b/bpmn/MSOInfrastructureBPMN/src/test/resources/mso.bpmn.urn.properties @@ -14,7 +14,7 @@ mso.healthcheck.log.debug=false mso.adapters.completemsoprocess.endpoint=http://localhost:28090/CompleteMsoProcess mso.workflow.message.endpoint=http://localhost:8080/mso/WorkflowMessage mso.adapters.db.endpoint=http://localhost:28090/dbadapters/MsoRequestsDbAdapter -mso.openecomp.adapters.db.endpoint=http://localhost:28090/dbadapters/RequestsDbAdapter +mso.adapters.openecomp.db.endpoint=http://localhost:28090/dbadapters/RequestsDbAdapter mso.adapters.db.auth=757A94191D685FD2092AC1490730A4FC mso.adapters.network.endpoint=http://localhost:28090/networks/NetworkAdapter diff --git a/packages/arquillian-unit-tests/src/test/resources/docker/mso/mso-docker.json b/packages/arquillian-unit-tests/src/test/resources/docker/mso/mso-docker.json index 3d24819c2f..c6fc555418 100644 --- a/packages/arquillian-unit-tests/src/test/resources/docker/mso/mso-docker.json +++ b/packages/arquillian-unit-tests/src/test/resources/docker/mso/mso-docker.json @@ -173,7 +173,8 @@ "aaiEndpoint": "http://mso:8080/aai-emul", "adaptersCompletemsoprocessEndpoint": "http://mso:8080/CompleteMsoProcess", "adaptersNamespace": "http://org.openecomp.mso", - "adaptersDbEndpoint": "http://mso:8080/dbadapters/RequestsDbAdapter", + "adaptersDbEndpoint": "http://mso:8080/dbadapters/MsoRequestsDbAdapter", + "adaptersOpenecompDbEndpoint": "http://mso:8080/dbadapters/RequestsDbAdapter", "adaptersSdncEndpoint": "http://mso:8080/adapters/SDNCAdapter", "adaptersTenantEndpoint": "http://mso:8080/tenants/TenantAdapter", "adaptersDbAuth": "6B0E6863FB8EE010AB6F191B3C0489437601E81DC7C86305CB92DB98AFC53D74", diff --git a/readme.md b/readme.md index 3f9b4518cc..449743493c 100644 --- a/readme.md +++ b/readme.md @@ -116,7 +116,7 @@ Change the environment file located here : **/shared/mso-docker.json** then run Here are the main parameters you could change: - mso_config_path: define the path where the configuration files for APIH, JRA and Camunda will be deployed. This parameter should not be changed. -- In the section mso-bpmn-urn-config, adaptersDbEndpoint: This configuration must point to the APIH hostname. It should have this form: http://mso:8080/dbadapters/RequestsDbAdapter Do not change it if you are not sure. +- In the section mso-bpmn-urn-config, adaptersOpenecompDbEndpoint: This configuration must point to the APIH hostname. It should have this form: http://mso:8080/dbadapters/RequestsDbAdapter Do not change it if you are not sure. - In the section mso-bpmn-urn-config, aaiEndpoint: This parameter should point to the A&AI component. It should be something like: https://c1.vm1.aai.simpledemo.opap.org:8443 - In the section mso-bpmn-urn-config, aaiAuth: This parameter is the encrypted value of login:password to access the A&AI server. The key used to encrypt is defined in the parameter msoKey. - In the section asdc-connection, asdcAddresss: Change the values with the value provided by the ASDC team. Possible value: https://c2.vm1.sdc.simpledemo.onap.org:8443 The password field may be changed as well.