From d5968f56b382c50dfafc3b6feeccf5b81d176b9d Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Fri, 5 Feb 2021 20:34:11 -0500 Subject: update camunda and spring to latest versions Updated camunda to 7.14 and updated spring boot camunda to 3.4 Started to clean up duplicate maven dependencies Issue-ID: SO-3521 Signed-off-by: Benjamin, Max (mb388a) Change-Id: Ic65b04772b91dd989e41d6b6b93872978bc4e4e2 --- adapters/etsi-sol003-adapter/pom.xml | 2 +- adapters/mso-adapter-utils/pom.xml | 2 +- .../so/openstack/utils/MsoMulticloudUtils.java | 2 +- .../onap/so/openstack/utils/MsoHeatUtilsTest.java | 1 + .../utils/MsoHeatUtilsWithUpdateTest.java | 3 - .../so/openstack/utils/MsoMulticloudUtilsTest.java | 6 +- adapters/mso-catalog-db-adapter/pom.xml | 2 +- .../java/db/migration/R__CloudConfigMigration.java | 33 +- adapters/mso-openstack-adapters/pom.xml | 42 +-- adapters/mso-requests-db-adapter/pom.xml | 18 +- .../requestsdb/ArchiveInfraRequestsScheduler.java | 4 +- adapters/mso-sdnc-adapter/pom.xml | 35 +- .../src/test/resources/application-test.properties | 13 + adapters/mso-vfc-adapter/pom.xml | 4 + adapters/so-appc-orchestrator/pom.xml | 23 +- .../so/asdc/installer/VfResourceStructure.java | 4 +- .../onap/so/asdc/util/ASDCNotificationLogging.java | 3 +- .../so/asdc/util/ASDCNotificationLoggingTest.java | 2 +- bpmn/MSOCommonBPMN/pom.xml | 3 +- bpmn/mso-infrastructure-bpmn/pom.xml | 54 +-- bpmn/pom.xml | 4 +- bpmn/so-bpmn-building-blocks/pom.xml | 18 +- bpmn/so-bpmn-infrastructure-common/pom.xml | 5 +- bpmn/so-bpmn-infrastructure-flows/pom.xml | 58 +-- bpmn/so-bpmn-tasks/pom.xml | 10 +- bpmn/so-bpmn-tasks/src/test/resources/schema.sql | 390 ++++++++++++++------- common/pom.xml | 22 +- mso-api-handlers/mso-api-handler-common/pom.xml | 7 +- mso-api-handlers/mso-api-handler-infra/pom.xml | 106 +----- .../onap/so/apihandlerinfra/ServiceInstances.java | 1 + .../onap/so/apihandlerinfra/ManualTasksTest.java | 4 +- .../so/apihandlerinfra/ServiceInstancesTest.java | 12 +- .../mso-requests-db-repositories/pom.xml | 3 - .../org/onap/so/db/request/SiteStatusTest.java | 2 +- mso-catalog-db/pom.xml | 2 +- .../so/rest/catalog/beans/HeatEnvironment.java | 160 --------- pom.xml | 22 +- .../so-etsi-nfvo-ns-lcm-bpmn-flows/pom.xml | 5 + .../ns/lcm/bpmn/flows/tasks/InstantiateNsTask.java | 2 +- .../src/test/resources/application.yaml | 7 +- .../db/migration/V1_1__create_nfvo_tables.sql | 19 +- .../lcm/database/DatabaseServiceProviderTest.java | 3 +- .../src/test/resources/application.yaml | 7 +- .../src/test/resources/application.yaml | 7 +- so-optimization-clients/pom.xml | 8 +- 45 files changed, 465 insertions(+), 675 deletions(-) delete mode 100644 mso-catalog-db/src/main/java/org/onap/so/rest/catalog/beans/HeatEnvironment.java diff --git a/adapters/etsi-sol003-adapter/pom.xml b/adapters/etsi-sol003-adapter/pom.xml index ceaaab42d0..25bb903bbd 100644 --- a/adapters/etsi-sol003-adapter/pom.xml +++ b/adapters/etsi-sol003-adapter/pom.xml @@ -19,7 +19,7 @@ 2.7.2 1.3.5 1.0.1 - 1.5.21 + 1.6.2 3.14.0 2.7.5 1.13.0 diff --git a/adapters/mso-adapter-utils/pom.xml b/adapters/mso-adapter-utils/pom.xml index 6c9c23a59b..510871bb47 100644 --- a/adapters/mso-adapter-utils/pom.xml +++ b/adapters/mso-adapter-utils/pom.xml @@ -84,7 +84,7 @@ ch.vorburger.mariaDB4j mariaDB4j - 2.2.3 + 2.3.0 test diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java index 1df5fe36ab..be42ff10bb 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoMulticloudUtils.java @@ -212,7 +212,7 @@ public class MsoMulticloudUtils extends MsoHeatUtils implements VduPlugin { if (response.hasEntity()) { multicloudResponseBody = getCreateBody((java.io.InputStream) response.getEntity()); } - if (response.getStatus() == Response.Status.CREATED.getStatusCode() && response.hasEntity()) { + if (response.getStatus() == Response.Status.CREATED.getStatusCode() && multicloudResponseBody != null) { String canonicalName = stackName + "/"; if (multicloudResponseBody != null) { canonicalName = canonicalName + multicloudResponseBody.getWorkloadId(); diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java index f20f6f1448..5ee4987e38 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsTest.java @@ -439,6 +439,7 @@ public class MsoHeatUtilsTest extends MsoHeatUtils { String requestId = getRequestId(); doReturn(heatClient).when(heatUtils).getHeatClient(cloudSiteId, tenantId); + doNothing().when(heatUtils).saveStackRequest(eq(createStackParam), isNull(), eq("stackName")); doReturn(stackResource).when(heatClient).getStacks(); doReturn(mockCreateStack).when(stackResource).create(createStackParam); diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java index acd42dd8da..c6111a16cb 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoHeatUtilsWithUpdateTest.java @@ -95,7 +95,6 @@ public class MsoHeatUtilsWithUpdateTest extends TestDataSetup { StackInfo expectedStackInfo = new StackInfo("stackName", HeatStatus.UPDATED, "stackStatusReason", null); expectedStackInfo.setCanonicalName("stackName/id"); - doReturn(Optional.of(cloudSite)).when(cloudConfig).getCloudSite(isA(String.class)); doReturn(heatClient).when(heatUtils).getHeatClient(isA(String.class), isA(String.class)); doReturn(null).when(heatUtils).executeAndRecordOpenstackRequest(isA(OpenStackRequest.class)); doReturn("0").when(environment).getProperty(isA(String.class), isA(String.class)); @@ -120,7 +119,6 @@ public class MsoHeatUtilsWithUpdateTest extends TestDataSetup { StackInfo expectedStackInfo = new StackInfo("stackName", HeatStatus.UPDATED, "stackStatusReason", null); expectedStackInfo.setCanonicalName("stackName/id"); - doReturn(Optional.of(cloudSite)).when(cloudConfig).getCloudSite(isA(String.class)); doReturn(heatClient).when(heatUtils).getHeatClient(isA(String.class), isA(String.class)); doReturn(null).when(heatUtils).executeAndRecordOpenstackRequest(isA(OpenStackRequest.class)); @@ -147,7 +145,6 @@ public class MsoHeatUtilsWithUpdateTest extends TestDataSetup { StackInfo expectedStackInfo = new StackInfo("stackName", HeatStatus.UPDATED, "stackStatusReason", null); expectedStackInfo.setCanonicalName("stackName/id"); - doReturn(Optional.of(cloudSite)).when(cloudConfig).getCloudSite(isA(String.class)); doReturn(heatClient).when(heatUtils).getHeatClient(isA(String.class), isA(String.class)); doReturn(null).when(heatUtils).executeAndRecordOpenstackRequest(isA(OpenStackRequest.class)); doReturn("0").when(environment).getProperty(isA(String.class), isA(String.class)); diff --git a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java index 44a9bc3e10..7adfe091d3 100644 --- a/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java +++ b/adapters/mso-adapter-utils/src/test/java/org/onap/so/openstack/utils/MsoMulticloudUtilsTest.java @@ -181,12 +181,12 @@ public class MsoMulticloudUtilsTest extends BaseTest { @Test public void createStackEmptyResponseEntity() throws MsoException { - wireMockServer.stubFor(post(urlPathEqualTo(MULTICLOUD_CREATE_PATH)).willReturn( - aResponse().withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_CREATED))); + wireMockServer.stubFor(post(urlPathEqualTo(MULTICLOUD_CREATE_PATH)).willReturn(aResponse() + .withHeader("Content-Type", "application/json").withStatus(HttpStatus.SC_CREATED).withBody("{}"))); StackInfo result = multicloudUtils.createStack("MTN14", "CloudOwner", "TEST-tenant", "TEST-stack", new VduModelInfo(), "TEST-heat", new HashMap<>(), false, 200, "TEST-env", new HashMap<>(), new HashMap<>(), false, false); assertNotNull(result); - assertEquals("TEST-stack/", result.getName()); + assertEquals("TEST-stack", result.getName()); } } diff --git a/adapters/mso-catalog-db-adapter/pom.xml b/adapters/mso-catalog-db-adapter/pom.xml index 9b51e35c57..05d85c20a9 100644 --- a/adapters/mso-catalog-db-adapter/pom.xml +++ b/adapters/mso-catalog-db-adapter/pom.xml @@ -185,7 +185,7 @@ ch.vorburger.mariaDB4j mariaDB4j - 2.2.3 + 2.3.0 test diff --git a/adapters/mso-catalog-db-adapter/src/main/java/db/migration/R__CloudConfigMigration.java b/adapters/mso-catalog-db-adapter/src/main/java/db/migration/R__CloudConfigMigration.java index 691ae60afd..86cfa6ee0c 100644 --- a/adapters/mso-catalog-db-adapter/src/main/java/db/migration/R__CloudConfigMigration.java +++ b/adapters/mso-catalog-db-adapter/src/main/java/db/migration/R__CloudConfigMigration.java @@ -22,19 +22,6 @@ package db.migration; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; -import org.flywaydb.core.api.MigrationVersion; -import org.flywaydb.core.api.migration.MigrationChecksumProvider; -import org.flywaydb.core.api.migration.MigrationInfoProvider; -import org.flywaydb.core.api.migration.jdbc.JdbcMigration; -import org.onap.so.db.catalog.beans.CloudIdentity; -import org.onap.so.db.catalog.beans.CloudSite; -import org.onap.so.db.catalog.beans.CloudifyManager; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; @@ -45,13 +32,24 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.Collection; +import org.flywaydb.core.api.MigrationVersion; +import org.flywaydb.core.api.migration.BaseJavaMigration; +import org.onap.so.db.catalog.beans.CloudIdentity; +import org.onap.so.db.catalog.beans.CloudSite; +import org.onap.so.db.catalog.beans.CloudifyManager; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; /** * Performs migration using JDBC Connection from the cloud config provided in the environment * (application-{profile}.yaml) and persist data (when not already present) to the catalod database. */ @JsonIgnoreProperties(ignoreUnknown = true) -public class R__CloudConfigMigration implements JdbcMigration, MigrationInfoProvider, MigrationChecksumProvider { +public class R__CloudConfigMigration extends BaseJavaMigration { public static final String FLYWAY = "FLYWAY"; private static final Logger logger = LoggerFactory.getLogger(R__CloudConfigMigration.class); @@ -63,7 +61,6 @@ public class R__CloudConfigMigration implements JdbcMigration, MigrationInfoProv return false; } - @Override public void migrate(Connection connection) throws Exception { logger.debug("Starting migration for CloudConfig"); @@ -238,5 +235,11 @@ public class R__CloudConfigMigration implements JdbcMigration, MigrationInfoProv public Integer getChecksum() { return Math.toIntExact(System.currentTimeMillis() / 1000); } + + @Override + public void migrate(org.flywaydb.core.api.migration.Context context) throws Exception { + migrate(context.getConnection()); + + } } diff --git a/adapters/mso-openstack-adapters/pom.xml b/adapters/mso-openstack-adapters/pom.xml index 7d5e8cc6fd..ab3f358740 100644 --- a/adapters/mso-openstack-adapters/pom.xml +++ b/adapters/mso-openstack-adapters/pom.xml @@ -15,7 +15,6 @@ ${project.artifactId}-${project.version} - org.springframework.boot @@ -26,9 +25,7 @@ - - repackage - + repackage @@ -87,8 +84,6 @@ - - - - org.springframework.boot - spring-boot-starter-actuator - - - org.springframework.boot - spring-boot-starter-web - org.springframework.boot spring-boot-starter-data-jpa @@ -177,14 +162,6 @@ janino 2.5.15 - - - - - org.pacesys - openstack4j-core - 3.2.0 - org.pacesys.openstack4j.connectors openstack4j-jersey2 @@ -210,7 +187,6 @@ commons-collections 3.2.2 - com.typesafe config @@ -221,14 +197,11 @@ jsr305 1.3.9 - commons-validator commons-validator 1.4.1 - - org.onap.so.adapters mso-adapter-utils @@ -248,15 +221,10 @@ org.mariadb.jdbc mariadb-java-client - - org.onap.so - common - ${project.version} - ch.vorburger.mariaDB4j mariaDB4j - 2.2.3 + 2.3.0 test @@ -278,12 +246,16 @@ org.camunda.bpm camunda-external-task-client - 1.1.1 + 1.4.0 com.github.seancfoley ipaddress 2.0.0 + + org.springframework.boot + spring-boot-starter-validation + diff --git a/adapters/mso-requests-db-adapter/pom.xml b/adapters/mso-requests-db-adapter/pom.xml index 66b9a6b993..701b5e605a 100644 --- a/adapters/mso-requests-db-adapter/pom.xml +++ b/adapters/mso-requests-db-adapter/pom.xml @@ -16,11 +16,7 @@ org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-jdbc + spring-boot-starter-validation org.apache.cxf @@ -67,7 +63,7 @@ ch.vorburger.mariaDB4j mariaDB4j - 2.2.3 + 2.3.0 test @@ -88,18 +84,10 @@ net.javacrumbs.shedlock shedlock-provider-jdbc-template - - io.micrometer - micrometer-core - io.micrometer micrometer-registry-prometheus - - org.springframework.boot - spring-boot-starter-data-rest - org.onap.so cxf-logging @@ -136,7 +124,6 @@ cxf-rt-frontend-simple 3.3.3 - com.sun.xml.ws jaxws-ri @@ -184,7 +171,6 @@ org.springframework.boot spring-boot-maven-plugin - ${springboot.version} org.onap.so.adapters.requestsdb.application.MSORequestDBApplication diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java index 4fe49e38dd..89c26232bd 100644 --- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java +++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java @@ -78,7 +78,9 @@ public class ArchiveInfraRequestsScheduler { + "-" + calendar.get(Calendar.YEAR)); List requestsByEndTime = new ArrayList<>(); - PageRequest pageRequest = new PageRequest(0, 100); + + PageRequest pageRequest = PageRequest.of(0, 100); // Could use sorting here + do { requestsByEndTime = infraActiveRepo.findByEndTimeLessThan(archivingDate, pageRequest); logger.debug("{} requests to be archived based on End Time", requestsByEndTime.size()); diff --git a/adapters/mso-sdnc-adapter/pom.xml b/adapters/mso-sdnc-adapter/pom.xml index 590121966e..843f42b1e6 100644 --- a/adapters/mso-sdnc-adapter/pom.xml +++ b/adapters/mso-sdnc-adapter/pom.xml @@ -131,32 +131,7 @@ - - - com.sun.activation - javax.activation - 1.2.0 - - - javax.xml.bind - jaxb-api - 2.3.0 - - - com.sun.xml.bind - jaxb-core - 2.3.0 - - - com.sun.xml.bind - jaxb-impl - 2.3.0 - - - org.springframework.boot - spring-boot-starter-web - io.swagger swagger-jersey2-jaxrs @@ -164,12 +139,12 @@ org.springframework.boot - spring-boot-starter-actuator + spring-boot-starter-test + test org.springframework.boot - spring-boot-starter-test - test + spring-boot-starter-validation org.onap.so.adapters @@ -204,10 +179,6 @@ 1.0.4 test - - io.micrometer - micrometer-core - io.micrometer micrometer-registry-prometheus diff --git a/adapters/mso-sdnc-adapter/src/test/resources/application-test.properties b/adapters/mso-sdnc-adapter/src/test/resources/application-test.properties index e4f6903e23..0c77e30fe6 100644 --- a/adapters/mso-sdnc-adapter/src/test/resources/application-test.properties +++ b/adapters/mso-sdnc-adapter/src/test/resources/application-test.properties @@ -88,6 +88,19 @@ org.onap.so.adapters.sdnc..security-zone-topology-operation.deactivate=POST|2700 server.port=8080 server.tomcat.max-threads=50 ssl-enable: false +spring.datasource.driver-class-name=org.mariadb.jdbc.Driver +spring.datasource.url=jdbc:mariadb://localhost:3307/camundabpmn +spring.datasource.username=root +spring.datasource.password=password +spring.datasource.initialization-mode=always +spring.jpa.generate-ddl=false +spring.jpa.hibernate.ddl-auto=none +spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy +spring.jpa.hibernate.enable-lazy-load-no-trans=true +spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect +mariaDB4j.dataDir= +mariaDB4j.port=3307 +mariaDB4j.databaseName=camundabpmn spring.security.usercredentials[0].username=test spring.security.usercredentials[0].password=$2a$12$Zi3AuYcZoZO/gBQyUtST2.F5N6HqcTtaNci2Et.ufsQhski56srIu spring.security.usercredentials[0].role=SDNC-Client diff --git a/adapters/mso-vfc-adapter/pom.xml b/adapters/mso-vfc-adapter/pom.xml index eae6745866..d181e1006b 100644 --- a/adapters/mso-vfc-adapter/pom.xml +++ b/adapters/mso-vfc-adapter/pom.xml @@ -109,5 +109,9 @@ spring-boot-configuration-processor true + + org.springframework.boot + spring-boot-starter-validation + diff --git a/adapters/so-appc-orchestrator/pom.xml b/adapters/so-appc-orchestrator/pom.xml index 68814fc075..dbb31a6a73 100644 --- a/adapters/so-appc-orchestrator/pom.xml +++ b/adapters/so-appc-orchestrator/pom.xml @@ -141,40 +141,19 @@ ${project.artifactId}-${project.version} - - org.springframework.boot - spring-boot-starter-actuator - - - org.springframework.boot - spring-boot-starter-web - org.springframework.boot spring-boot-starter-test test - - io.micrometer - micrometer-core - - - io.micrometer - micrometer-registry-prometheus - com.google.guava guava - - org.onap.so - common - ${project.version} - org.camunda.bpm camunda-external-task-client - 1.1.1 + 1.4.0 org.onap.so diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/VfResourceStructure.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/VfResourceStructure.java index 6497a99e5e..8fe01caa46 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/VfResourceStructure.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/VfResourceStructure.java @@ -68,7 +68,7 @@ public class VfResourceStructure extends ResourceStructure { /** * The list of VfModulesMetadata defined for this resource. */ - private List vfModulesMetadataList; + private List vfModulesMetadataList; private VnfResource catalogVnfResource; @@ -203,7 +203,7 @@ public class VfResourceStructure extends ResourceStructure { this.catalogService = catalogService; } - public List decodeVfModuleArtifact(byte[] arg0) { + public List decodeVfModuleArtifact(byte[] arg0) { try { return new ObjectMapper().readValue(arg0, new TypeReference>() {}); diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java b/asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java index 6908fe4eda..fa17e727a5 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/util/ASDCNotificationLogging.java @@ -35,6 +35,7 @@ import org.onap.sdc.tosca.parser.impl.SdcPropertyNames; import org.onap.sdc.toscaparser.api.elements.Metadata; import org.onap.so.asdc.installer.IVfModuleData; import org.onap.so.asdc.installer.ToscaResourceStructure; +import org.onap.so.asdc.installer.VfModuleMetaData; import org.onap.so.asdc.installer.heat.ToscaResourceInstaller; public class ASDCNotificationLogging { @@ -850,7 +851,7 @@ public class ASDCNotificationLogging { return buffer.toString(); } - public static String dumpVfModuleMetaDataList(List moduleMetaDataList) { + public static String dumpVfModuleMetaDataList(List moduleMetaDataList) { if (moduleMetaDataList == null) { return null; } diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/util/ASDCNotificationLoggingTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/util/ASDCNotificationLoggingTest.java index 6fd853915e..3ac32d616f 100644 --- a/asdc-controller/src/test/java/org/onap/so/asdc/util/ASDCNotificationLoggingTest.java +++ b/asdc-controller/src/test/java/org/onap/so/asdc/util/ASDCNotificationLoggingTest.java @@ -115,7 +115,7 @@ public class ASDCNotificationLoggingTest { @Test public void dumpVfModuleMetaDataListTest() { INotificationData asdcNotification = iNotificationDataObject(); - List list = new ArrayList<>(); + List list = new ArrayList<>(); list.add(new VfModuleMetaData()); String result = null; try { diff --git a/bpmn/MSOCommonBPMN/pom.xml b/bpmn/MSOCommonBPMN/pom.xml index c1c5bf0170..9ce0755f49 100644 --- a/bpmn/MSOCommonBPMN/pom.xml +++ b/bpmn/MSOCommonBPMN/pom.xml @@ -182,7 +182,6 @@ commons-beanutils commons-beanutils - 1.9.4 org.springframework.boot @@ -340,7 +339,7 @@ ch.vorburger.mariaDB4j mariaDB4j - 2.2.3 + 2.3.0 test diff --git a/bpmn/mso-infrastructure-bpmn/pom.xml b/bpmn/mso-infrastructure-bpmn/pom.xml index 4f7ceca9b9..7e1ecfc90d 100644 --- a/bpmn/mso-infrastructure-bpmn/pom.xml +++ b/bpmn/mso-infrastructure-bpmn/pom.xml @@ -201,13 +201,19 @@ pom import + + org.camunda.bpm + camunda-bom + ${camunda.version} + import + pom + org.camunda.bpm.springboot camunda-bpm-spring-boot-starter-rest - ${camunda.springboot.version} org.camunda.bpmn @@ -222,7 +228,6 @@ org.camunda.bpm.springboot camunda-bpm-spring-boot-starter-webapp - ${camunda.springboot.version} org.camunda.bpmn @@ -230,10 +235,6 @@ - - org.springframework.boot - spring-boot-starter-web - org.springframework.boot spring-boot-starter-data-jpa @@ -245,20 +246,6 @@ true - - org.springframework.boot - spring-boot-starter-jdbc - - - org.springframework.boot - spring-boot-starter-test - test - - - org.onap.so - so-bpmn-infrastructure-common - ${project.version} - org.onap.so MSOCommonBPMN @@ -294,22 +281,13 @@ ch.vorburger.mariaDB4j mariaDB4j - 2.2.3 + 2.3.0 test - - io.micrometer - micrometer-core - io.micrometer micrometer-registry-prometheus - - org.onap.so - so-bpmn-tasks - ${project.version} - org.onap.so cxf-logging @@ -318,7 +296,6 @@ org.camunda.bpm.extension.mockito camunda-bpm-mockito - 3.2.1 test @@ -333,10 +310,6 @@ 1.7.0 test - - org.onap.aaf.authz - aaf-cadi-client - org.onap.aaf.authz aaf-cadi-aaf @@ -352,14 +325,9 @@ - org.onap.aaf.authz - aaf-auth-client - runtime - - - org.onap.aaf.authz - aaf-misc-env - runtime + org.camunda.bpm.springboot + camunda-bpm-spring-boot-starter-test + test org.onap.aaf.authz diff --git a/bpmn/pom.xml b/bpmn/pom.xml index 4193ba1287..6be7eef3dc 100644 --- a/bpmn/pom.xml +++ b/bpmn/pom.xml @@ -15,7 +15,7 @@ pom - 7.10.0 + 7.14.0 1.2 camunda-webapp-jboss-standalone 1.4.196 @@ -71,7 +71,6 @@ - org.apache.httpcomponents @@ -92,5 +91,4 @@ ${project.version} - diff --git a/bpmn/so-bpmn-building-blocks/pom.xml b/bpmn/so-bpmn-building-blocks/pom.xml index 5c4cd6d2fa..76e53fea61 100644 --- a/bpmn/so-bpmn-building-blocks/pom.xml +++ b/bpmn/so-bpmn-building-blocks/pom.xml @@ -79,28 +79,35 @@ + + + + org.camunda.bpm + camunda-bom + ${camunda.version} + import + pom + + + org.camunda.bpm camunda-engine - ${camunda.version} org.camunda.bpm.springboot camunda-bpm-spring-boot-starter - ${camunda.springboot.version} test org.camunda.bpm.springboot camunda-bpm-spring-boot-starter-webapp - ${camunda.springboot.version} test org.camunda.bpm.extension.mockito camunda-bpm-mockito - 3.2.1 test @@ -148,9 +155,8 @@ ch.vorburger.mariaDB4j mariaDB4j - 2.2.3 + 2.3.0 test - diff --git a/bpmn/so-bpmn-infrastructure-common/pom.xml b/bpmn/so-bpmn-infrastructure-common/pom.xml index ebc0264c7e..e6dfc20db5 100644 --- a/bpmn/so-bpmn-infrastructure-common/pom.xml +++ b/bpmn/so-bpmn-infrastructure-common/pom.xml @@ -131,13 +131,11 @@ org.camunda.bpm.springboot camunda-bpm-spring-boot-starter - ${camunda.springboot.version} test org.camunda.bpm.springboot camunda-bpm-spring-boot-starter-webapp - ${camunda.springboot.version} test @@ -256,7 +254,7 @@ ch.vorburger.mariaDB4j mariaDB4j - 2.2.3 + 2.3.0 test @@ -269,7 +267,6 @@ org.camunda.bpm.springboot camunda-bpm-spring-boot-starter-test - ${camunda.springboot.version} test diff --git a/bpmn/so-bpmn-infrastructure-flows/pom.xml b/bpmn/so-bpmn-infrastructure-flows/pom.xml index a8f35986e7..63fef73645 100644 --- a/bpmn/so-bpmn-infrastructure-flows/pom.xml +++ b/bpmn/so-bpmn-infrastructure-flows/pom.xml @@ -14,7 +14,6 @@ 2.0-alpha2 1.7.0 1.17.1 - 3.2.1 @@ -54,15 +53,9 @@ - - org.apache.maven.plugins - - - maven-antrun-plugin - - - [1.3,) - + org.apache.maven.plugins + maven-antrun-plugin + [1.3,) run @@ -145,7 +138,6 @@ ${project.artifactId}-${project.version} - @@ -157,24 +149,20 @@ - org.camunda.bpm.springboot camunda-bpm-spring-boot-starter - ${camunda.springboot.version} test org.camunda.bpm.springboot camunda-bpm-spring-boot-starter-webapp - ${camunda.springboot.version} test org.camunda.bpm.extension.mockito camunda-bpm-mockito - ${camunda.mockito.version} test @@ -213,21 +201,13 @@ org.mockito mockito-core 1.10.19 + test com.fasterxml.uuid java-uuid-generator - - org.apache.commons - commons-lang3 - - - org.onap.so - MSOCoreBPMN - ${project.version} - org.onap.so MSOCoreBPMN @@ -253,11 +233,6 @@ ${project.version} test - - javax.ws.rs - javax.ws.rs-api - ${jax.ws.rs} - org.camunda.spin camunda-spin-core @@ -277,7 +252,6 @@ org.camunda.bpm camunda-engine-plugin-spin - org.camunda.bpm camunda-engine-plugin-connect @@ -295,36 +269,15 @@ ${assertj.core.version} test - - javax.annotation - javax.annotation-api - 1.3 - org.springframework.boot spring-boot-configuration-processor true - - ch.qos.logback - logback-classic - - - ch.qos.logback - logback-core - - - org.slf4j - slf4j-api - - - org.mariadb.jdbc - mariadb-java-client - ch.vorburger.mariaDB4j mariaDB4j - 2.2.3 + 2.3.0 test @@ -333,6 +286,5 @@ ${grpc.version} test - diff --git a/bpmn/so-bpmn-tasks/pom.xml b/bpmn/so-bpmn-tasks/pom.xml index f7eb2c09c7..032bd1ebe3 100644 --- a/bpmn/so-bpmn-tasks/pom.xml +++ b/bpmn/so-bpmn-tasks/pom.xml @@ -162,13 +162,19 @@ pom import + + org.camunda.bpm + camunda-bom + ${camunda.version} + import + pom + org.camunda.bpm.springboot camunda-bpm-spring-boot-starter - ${camunda.springboot.version} test @@ -204,7 +210,7 @@ ch.vorburger.mariaDB4j mariaDB4j - 2.2.3 + 2.3.0 test diff --git a/bpmn/so-bpmn-tasks/src/test/resources/schema.sql b/bpmn/so-bpmn-tasks/src/test/resources/schema.sql index 5ae6a2d972..3a143f2619 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/schema.sql +++ b/bpmn/so-bpmn-tasks/src/test/resources/schema.sql @@ -9,6 +9,29 @@ create table ACT_GE_PROPERTY ( primary key (NAME_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; +insert into ACT_GE_PROPERTY +values ('schema.version', 'fox', 1); + +insert into ACT_GE_PROPERTY +values ('schema.history', 'create(fox)', 1); + +insert into ACT_GE_PROPERTY +values ('next.dbid', '1', 1); + +insert into ACT_GE_PROPERTY +values ('deployment.lock', '0', 1); + +insert into ACT_GE_PROPERTY +values ('history.cleanup.job.lock', '0', 1); + +insert into ACT_GE_PROPERTY +values ('startup.lock', '0', 1); + +insert into ACT_GE_PROPERTY +values ('telemetry.lock', '0', 1); + +insert into ACT_GE_PROPERTY +values ('installationId.lock', '0', 1); create table ACT_GE_BYTEARRAY ( ID_ varchar(64), @@ -18,13 +41,27 @@ create table ACT_GE_BYTEARRAY ( BYTES_ LONGBLOB, GENERATED_ TINYINT, TENANT_ID_ varchar(64), + TYPE_ integer, + CREATE_TIME_ datetime(3), + ROOT_PROC_INST_ID_ varchar(64), + REMOVAL_TIME_ datetime(3), + primary key (ID_) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; + +create table ACT_GE_SCHEMA_LOG ( + ID_ varchar(64), + TIMESTAMP_ datetime(3), + VERSION_ varchar(255), primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; +insert into ACT_GE_SCHEMA_LOG +values ('0', CURRENT_TIMESTAMP, '7.14.0'); + create table ACT_RE_DEPLOYMENT ( ID_ varchar(64), NAME_ varchar(255), - DEPLOY_TIME_ timestamp(3), + DEPLOY_TIME_ datetime(3), SOURCE_ varchar(255), TENANT_ID_ varchar(64), primary key (ID_) @@ -33,6 +70,7 @@ create table ACT_RE_DEPLOYMENT ( create table ACT_RU_EXECUTION ( ID_ varchar(64), REV_ integer, + ROOT_PROC_INST_ID_ varchar(64), PROC_INST_ID_ varchar(64), BUSINESS_KEY_ varchar(255), PARENT_ID_ varchar(64), @@ -57,7 +95,7 @@ create table ACT_RU_JOB ( ID_ varchar(64) NOT NULL, REV_ integer, TYPE_ varchar(255) NOT NULL, - LOCK_EXP_TIME_ timestamp(3) NULL, + LOCK_EXP_TIME_ datetime(3) NULL, LOCK_OWNER_ varchar(255), EXCLUSIVE_ boolean, EXECUTION_ID_ varchar(64), @@ -67,8 +105,10 @@ create table ACT_RU_JOB ( RETRIES_ integer, EXCEPTION_STACK_ID_ varchar(64), EXCEPTION_MSG_ varchar(4000), - DUEDATE_ timestamp(3) NULL, + FAILED_ACT_ID_ varchar(255), + DUEDATE_ datetime(3) NULL, REPEAT_ varchar(255), + REPEAT_OFFSET_ bigint DEFAULT 0, HANDLER_TYPE_ varchar(255), HANDLER_CFG_ varchar(4000), DEPLOYMENT_ID_ varchar(64), @@ -77,6 +117,7 @@ create table ACT_RU_JOB ( PRIORITY_ bigint NOT NULL DEFAULT 0, SEQUENCE_COUNTER_ bigint, TENANT_ID_ varchar(64), + CREATE_TIME_ datetime(3), primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -91,6 +132,7 @@ create table ACT_RU_JOBDEF ( SUSPENSION_STATE_ integer, JOB_PRIORITY_ bigint, TENANT_ID_ varchar(64), + DEPLOYMENT_ID_ varchar(64), primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -109,6 +151,7 @@ create table ACT_RE_PROCDEF ( TENANT_ID_ varchar(64), VERSION_TAG_ varchar(64), HISTORY_TTL_ integer, + STARTABLE_ boolean NOT NULL default TRUE, primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -129,7 +172,7 @@ create table ACT_RU_TASK ( ASSIGNEE_ varchar(255), DELEGATION_ varchar(64), PRIORITY_ integer, - CREATE_TIME_ timestamp(3), + CREATE_TIME_ datetime(3), DUE_DATE_ datetime(3), FOLLOW_UP_DATE_ datetime(3), SUSPENSION_STATE_ integer, @@ -156,14 +199,16 @@ create table ACT_RU_VARIABLE ( NAME_ varchar(255) not null, EXECUTION_ID_ varchar(64), PROC_INST_ID_ varchar(64), + PROC_DEF_ID_ varchar(64), CASE_EXECUTION_ID_ varchar(64), CASE_INST_ID_ varchar(64), TASK_ID_ varchar(64), + BATCH_ID_ varchar(64), BYTEARRAY_ID_ varchar(64), DOUBLE_ double, LONG_ bigint, - TEXT_ LONGBLOB, - TEXT2_ LONGBLOB, + TEXT_ varchar(4000), + TEXT2_ varchar(4000), VAR_SCOPE_ varchar(64) not null, SEQUENCE_COUNTER_ bigint, IS_CONCURRENT_LOCAL_ TINYINT, @@ -180,7 +225,7 @@ create table ACT_RU_EVENT_SUBSCR ( PROC_INST_ID_ varchar(64), ACTIVITY_ID_ varchar(255), CONFIGURATION_ varchar(255), - CREATED_ timestamp(3) not null, + CREATED_ datetime(3) not null, TENANT_ID_ varchar(64), primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -188,11 +233,12 @@ create table ACT_RU_EVENT_SUBSCR ( create table ACT_RU_INCIDENT ( ID_ varchar(64) not null, REV_ integer not null, - INCIDENT_TIMESTAMP_ timestamp(3) not null, + INCIDENT_TIMESTAMP_ datetime(3) not null, INCIDENT_MSG_ varchar(4000), INCIDENT_TYPE_ varchar(255) not null, EXECUTION_ID_ varchar(64), ACTIVITY_ID_ varchar(255), + FAILED_ACTIVITY_ID_ varchar(255), PROC_INST_ID_ varchar(64), PROC_DEF_ID_ varchar(64), CAUSE_INCIDENT_ID_ varchar(64), @@ -212,6 +258,8 @@ create table ACT_RU_AUTHORIZATION ( RESOURCE_TYPE_ integer not null, RESOURCE_ID_ varchar(255), PERMS_ integer, + REMOVAL_TIME_ datetime(3), + ROOT_PROC_INST_ID_ varchar(64), primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -231,7 +279,7 @@ create table ACT_RU_METER_LOG ( NAME_ varchar(64) not null, REPORTER_ varchar(255), VALUE_ bigint, - TIMESTAMP_ timestamp(3), + TIMESTAMP_ datetime(3), MILLISECONDS_ bigint DEFAULT 0, primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -244,7 +292,7 @@ create table ACT_RU_EXT_TASK ( RETRIES_ integer, ERROR_MSG_ varchar(4000), ERROR_DETAILS_ID_ varchar(64), - LOCK_EXP_TIME_ timestamp(3) NULL, + LOCK_EXP_TIME_ datetime(3) NULL, SUSPENSION_STATE_ integer, EXECUTION_ID_ varchar(64), PROC_INST_ID_ varchar(64), @@ -271,20 +319,26 @@ create table ACT_RU_BATCH ( SUSPENSION_STATE_ integer, CONFIGURATION_ varchar(255), TENANT_ID_ varchar(64), + CREATE_USER_ID_ varchar(255), primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; +create index ACT_IDX_EXEC_ROOT_PI on ACT_RU_EXECUTION(ROOT_PROC_INST_ID_); create index ACT_IDX_EXEC_BUSKEY on ACT_RU_EXECUTION(BUSINESS_KEY_); create index ACT_IDX_EXEC_TENANT_ID on ACT_RU_EXECUTION(TENANT_ID_); create index ACT_IDX_TASK_CREATE on ACT_RU_TASK(CREATE_TIME_); create index ACT_IDX_TASK_ASSIGNEE on ACT_RU_TASK(ASSIGNEE_); +create index ACT_IDX_TASK_OWNER on ACT_RU_TASK(OWNER_); create index ACT_IDX_TASK_TENANT_ID on ACT_RU_TASK(TENANT_ID_); create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_); create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_); create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_); create index ACT_IDX_EVENT_SUBSCR_TENANT_ID on ACT_RU_EVENT_SUBSCR(TENANT_ID_); + create index ACT_IDX_VARIABLE_TASK_ID on ACT_RU_VARIABLE(TASK_ID_); create index ACT_IDX_VARIABLE_TENANT_ID on ACT_RU_VARIABLE(TENANT_ID_); +create index ACT_IDX_VARIABLE_TASK_NAME_TYPE on ACT_RU_VARIABLE(TASK_ID_, NAME_, TYPE_); + create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK(PROC_DEF_ID_); create index ACT_IDX_INC_CONFIGURATION on ACT_RU_INCIDENT(CONFIGURATION_); create index ACT_IDX_INC_TENANT_ID on ACT_RU_INCIDENT(TENANT_ID_); @@ -458,6 +512,12 @@ alter table ACT_RU_BATCH foreign key (BATCH_JOB_DEF_ID_) references ACT_RU_JOBDEF (ID_); +create index ACT_IDX_BATCH_ID ON ACT_RU_VARIABLE(BATCH_ID_); +alter table ACT_RU_VARIABLE + add constraint ACT_FK_VAR_BATCH + foreign key (BATCH_ID_) + references ACT_RU_BATCH (ID_); + -- indexes for deadlock problems - https://app.camunda.com/jira/browse/CAM-2567 -- create index ACT_IDX_INC_CAUSEINCID on ACT_RU_INCIDENT(CAUSE_INCIDENT_ID_); create index ACT_IDX_INC_EXID on ACT_RU_INCIDENT(EXECUTION_ID_); @@ -470,6 +530,8 @@ create index ACT_IDX_AUTH_RESOURCE_ID on ACT_RU_AUTHORIZATION(RESOURCE_ID_); create index ACT_IDX_EXT_TASK_EXEC on ACT_RU_EXT_TASK(EXECUTION_ID_); -- indexes to improve deployment +create index ACT_IDX_BYTEARRAY_ROOT_PI on ACT_GE_BYTEARRAY(ROOT_PROC_INST_ID_); +create index ACT_IDX_BYTEARRAY_RM_TIME on ACT_GE_BYTEARRAY(REMOVAL_TIME_); create index ACT_IDX_BYTEARRAY_NAME on ACT_GE_BYTEARRAY(NAME_); create index ACT_IDX_DEPLOYMENT_NAME on ACT_RE_DEPLOYMENT(NAME_); create index ACT_IDX_DEPLOYMENT_TENANT_ID on ACT_RE_DEPLOYMENT(TENANT_ID_); @@ -479,6 +541,27 @@ create index ACT_IDX_EVENT_SUBSCR_EVT_NAME ON ACT_RU_EVENT_SUBSCR(EVENT_NAME_); create index ACT_IDX_PROCDEF_DEPLOYMENT_ID ON ACT_RE_PROCDEF(DEPLOYMENT_ID_); create index ACT_IDX_PROCDEF_TENANT_ID ON ACT_RE_PROCDEF(TENANT_ID_); create index ACT_IDX_PROCDEF_VER_TAG ON ACT_RE_PROCDEF(VERSION_TAG_); + +-- indices for history cleanup: https://jira.camunda.com/browse/CAM-11616 +create index ACT_IDX_AUTH_ROOT_PI on ACT_RU_AUTHORIZATION(ROOT_PROC_INST_ID_); +create index ACT_IDX_AUTH_RM_TIME on ACT_RU_AUTHORIZATION(REMOVAL_TIME_); +-- +-- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH +-- under one or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information regarding copyright +-- ownership. Camunda licenses this file to you under the Apache License, +-- Version 2.0; 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. +-- + -- create case definition table -- create table ACT_RE_CASE_DEF ( ID_ varchar(64) not null, @@ -535,6 +618,9 @@ create table ACT_RU_CASE_SENTRY_PART ( -- create index on business key -- create index ACT_IDX_CASE_EXEC_BUSKEY on ACT_RU_CASE_EXECUTION(BUSINESS_KEY_); +-- https://app.camunda.com/jira/browse/CAM-9165 +create index ACT_IDX_CASE_EXE_CASE_INST on ACT_RU_CASE_EXECUTION(CASE_INST_ID_); + -- create foreign key constraints on ACT_RU_CASE_EXECUTION -- alter table ACT_RU_CASE_EXECUTION add constraint ACT_FK_CASE_EXE_CASE_INST @@ -586,6 +672,23 @@ alter table ACT_RU_CASE_SENTRY_PART create index ACT_IDX_CASE_DEF_TENANT_ID on ACT_RE_CASE_DEF(TENANT_ID_); create index ACT_IDX_CASE_EXEC_TENANT_ID on ACT_RU_CASE_EXECUTION(TENANT_ID_); +-- +-- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH +-- under one or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information regarding copyright +-- ownership. Camunda licenses this file to you under the Apache License, +-- Version 2.0; 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. +-- + -- create decision definition table -- create table ACT_RE_DECISION_DEF ( ID_ varchar(64) not null, @@ -628,6 +731,23 @@ alter table ACT_RE_DECISION_DEF create index ACT_IDX_DEC_DEF_TENANT_ID on ACT_RE_DECISION_DEF(TENANT_ID_); create index ACT_IDX_DEC_DEF_REQ_ID on ACT_RE_DECISION_DEF(DEC_REQ_ID_); create index ACT_IDX_DEC_REQ_DEF_TENANT_ID on ACT_RE_DECISION_REQ_DEF(TENANT_ID_); +-- +-- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH +-- under one or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information regarding copyright +-- ownership. Camunda licenses this file to you under the Apache License, +-- Version 2.0; 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. +-- + create table ACT_HI_PROCINST ( ID_ varchar(64) not null, PROC_INST_ID_ varchar(64) not null, @@ -636,11 +756,13 @@ create table ACT_HI_PROCINST ( PROC_DEF_ID_ varchar(64) not null, START_TIME_ datetime(3) not null, END_TIME_ datetime(3), + REMOVAL_TIME_ datetime(3), DURATION_ bigint, START_USER_ID_ varchar(255), START_ACT_ID_ varchar(255), END_ACT_ID_ varchar(255), SUPER_PROCESS_INSTANCE_ID_ varchar(64), + ROOT_PROC_INST_ID_ varchar(64), SUPER_CASE_INSTANCE_ID_ varchar(64), CASE_INST_ID_ varchar(64), DELETE_REASON_ varchar(4000), @@ -655,6 +777,7 @@ create table ACT_HI_ACTINST ( PARENT_ACT_INST_ID_ varchar(64), PROC_DEF_KEY_ varchar(255), PROC_DEF_ID_ varchar(64) not null, + ROOT_PROC_INST_ID_ varchar(64), PROC_INST_ID_ varchar(64) not null, EXECUTION_ID_ varchar(64) not null, ACT_ID_ varchar(255) not null, @@ -663,13 +786,14 @@ create table ACT_HI_ACTINST ( CALL_CASE_INST_ID_ varchar(64), ACT_NAME_ varchar(255), ACT_TYPE_ varchar(255) not null, - ASSIGNEE_ varchar(64), + ASSIGNEE_ varchar(255), START_TIME_ datetime(3) not null, END_TIME_ datetime(3), DURATION_ bigint, ACT_INST_STATE_ integer, SEQUENCE_COUNTER_ bigint, TENANT_ID_ varchar(64), + REMOVAL_TIME_ datetime(3), primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -678,6 +802,7 @@ create table ACT_HI_TASKINST ( TASK_DEF_KEY_ varchar(255), PROC_DEF_KEY_ varchar(255), PROC_DEF_ID_ varchar(64), + ROOT_PROC_INST_ID_ varchar(64), PROC_INST_ID_ varchar(64), EXECUTION_ID_ varchar(64), CASE_DEF_KEY_ varchar(255), @@ -698,6 +823,7 @@ create table ACT_HI_TASKINST ( DUE_DATE_ datetime(3), FOLLOW_UP_DATE_ datetime(3), TENANT_ID_ varchar(64), + REMOVAL_TIME_ datetime(3), primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -705,6 +831,7 @@ create table ACT_HI_VARINST ( ID_ varchar(64) not null, PROC_DEF_KEY_ varchar(255), PROC_DEF_ID_ varchar(64), + ROOT_PROC_INST_ID_ varchar(64), PROC_INST_ID_ varchar(64), EXECUTION_ID_ varchar(64), ACT_INST_ID_ varchar(64), @@ -715,14 +842,16 @@ create table ACT_HI_VARINST ( TASK_ID_ varchar(64), NAME_ varchar(255) not null, VAR_TYPE_ varchar(100), + CREATE_TIME_ datetime(3), REV_ integer, BYTEARRAY_ID_ varchar(64), DOUBLE_ double, LONG_ bigint, - TEXT_ LONGBLOB, - TEXT2_ LONGBLOB, + TEXT_ varchar(4000), + TEXT2_ varchar(4000), TENANT_ID_ varchar(64), STATE_ varchar(20), + REMOVAL_TIME_ datetime(3), primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -731,6 +860,7 @@ create table ACT_HI_DETAIL ( TYPE_ varchar(255) not null, PROC_DEF_KEY_ varchar(255), PROC_DEF_ID_ varchar(64), + ROOT_PROC_INST_ID_ varchar(64), PROC_INST_ID_ varchar(64), EXECUTION_ID_ varchar(64), CASE_DEF_KEY_ varchar(255), @@ -747,11 +877,13 @@ create table ACT_HI_DETAIL ( BYTEARRAY_ID_ varchar(64), DOUBLE_ double, LONG_ bigint, - TEXT_ LONGBLOB, - TEXT2_ LONGBLOB, + TEXT_ varchar(4000), + TEXT2_ varchar(4000), SEQUENCE_COUNTER_ bigint, TENANT_ID_ varchar(64), OPERATION_ID_ varchar(64), + REMOVAL_TIME_ datetime(3), + INITIAL_ boolean, primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -762,11 +894,13 @@ create table ACT_HI_IDENTITYLINK ( USER_ID_ varchar(255), GROUP_ID_ varchar(255), TASK_ID_ varchar(64), + ROOT_PROC_INST_ID_ varchar(64), PROC_DEF_ID_ varchar(64), OPERATION_TYPE_ varchar(64), ASSIGNER_ID_ varchar(64), PROC_DEF_KEY_ varchar(255), TENANT_ID_ varchar(64), + REMOVAL_TIME_ datetime(3), primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -776,11 +910,13 @@ create table ACT_HI_COMMENT ( TIME_ datetime(3) not null, USER_ID_ varchar(255), TASK_ID_ varchar(64), + ROOT_PROC_INST_ID_ varchar(64), PROC_INST_ID_ varchar(64), ACTION_ varchar(255), MESSAGE_ varchar(4000), FULL_MSG_ LONGBLOB, TENANT_ID_ varchar(64), + REMOVAL_TIME_ datetime(3), primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -792,10 +928,13 @@ create table ACT_HI_ATTACHMENT ( DESCRIPTION_ varchar(4000), TYPE_ varchar(255), TASK_ID_ varchar(64), + ROOT_PROC_INST_ID_ varchar(64), PROC_INST_ID_ varchar(64), URL_ varchar(4000), CONTENT_ID_ varchar(64), TENANT_ID_ varchar(64), + CREATE_TIME_ datetime(3), + REMOVAL_TIME_ datetime(3), primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -804,6 +943,7 @@ create table ACT_HI_OP_LOG ( DEPLOYMENT_ID_ varchar(64), PROC_DEF_ID_ varchar(64), PROC_DEF_KEY_ varchar(255), + ROOT_PROC_INST_ID_ varchar(64), PROC_INST_ID_ varchar(64), EXECUTION_ID_ varchar(64), CASE_DEF_ID_ varchar(64), @@ -822,6 +962,10 @@ create table ACT_HI_OP_LOG ( ORG_VALUE_ varchar(4000), NEW_VALUE_ varchar(4000), TENANT_ID_ varchar(64), + REMOVAL_TIME_ datetime(3), + CATEGORY_ varchar(64), + EXTERNAL_TASK_ID_ varchar(64), + ANNOTATION_ varchar(4000), primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -829,6 +973,7 @@ create table ACT_HI_INCIDENT ( ID_ varchar(64) not null, PROC_DEF_KEY_ varchar(255), PROC_DEF_ID_ varchar(64), + ROOT_PROC_INST_ID_ varchar(64), PROC_INST_ID_ varchar(64), EXECUTION_ID_ varchar(64), CREATE_TIME_ timestamp(3) not null, @@ -836,20 +981,23 @@ create table ACT_HI_INCIDENT ( INCIDENT_MSG_ varchar(4000), INCIDENT_TYPE_ varchar(255) not null, ACTIVITY_ID_ varchar(255), + FAILED_ACTIVITY_ID_ varchar(255), CAUSE_INCIDENT_ID_ varchar(64), ROOT_CAUSE_INCIDENT_ID_ varchar(64), CONFIGURATION_ varchar(255), + HISTORY_CONFIGURATION_ varchar(255), INCIDENT_STATE_ integer, TENANT_ID_ varchar(64), JOB_DEF_ID_ varchar(64), + REMOVAL_TIME_ datetime(3), primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; create table ACT_HI_JOB_LOG ( ID_ varchar(64) not null, - TIMESTAMP_ timestamp(3) not null, + TIMESTAMP_ datetime(3) not null, JOB_ID_ varchar(64) not null, - JOB_DUEDATE_ timestamp(3) NULL, + JOB_DUEDATE_ datetime(3) NULL, JOB_RETRIES_ integer, JOB_PRIORITY_ bigint NOT NULL DEFAULT 0, JOB_EXCEPTION_MSG_ varchar(4000), @@ -859,6 +1007,8 @@ create table ACT_HI_JOB_LOG ( JOB_DEF_TYPE_ varchar(255), JOB_DEF_CONFIGURATION_ varchar(255), ACT_ID_ varchar(255), + FAILED_ACT_ID_ varchar(255), + ROOT_PROC_INST_ID_ varchar(64), EXECUTION_ID_ varchar(64), PROCESS_INSTANCE_ID_ varchar(64), PROCESS_DEF_ID_ varchar(64), @@ -866,6 +1016,8 @@ create table ACT_HI_JOB_LOG ( DEPLOYMENT_ID_ varchar(64), SEQUENCE_COUNTER_ bigint, TENANT_ID_ varchar(64), + HOSTNAME_ varchar(255), + REMOVAL_TIME_ datetime(3), primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -879,8 +1031,10 @@ create table ACT_HI_BATCH ( MONITOR_JOB_DEF_ID_ varchar(64), BATCH_JOB_DEF_ID_ varchar(64), TENANT_ID_ varchar(64), + CREATE_USER_ID_ varchar(255), START_TIME_ datetime(3) not null, END_TIME_ datetime(3), + REMOVAL_TIME_ datetime(3), primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -897,11 +1051,13 @@ create table ACT_HI_EXT_TASK_LOG ( ACT_ID_ varchar(255), ACT_INST_ID_ varchar(64), EXECUTION_ID_ varchar(64), + ROOT_PROC_INST_ID_ varchar(64), PROC_INST_ID_ varchar(64), PROC_DEF_ID_ varchar(64), PROC_DEF_KEY_ varchar(255), TENANT_ID_ varchar(64), STATE_ integer, + REMOVAL_TIME_ datetime(3), primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -909,20 +1065,32 @@ create index ACT_IDX_HI_PRO_INST_END on ACT_HI_PROCINST(END_TIME_); create index ACT_IDX_HI_PRO_I_BUSKEY on ACT_HI_PROCINST(BUSINESS_KEY_); create index ACT_IDX_HI_PRO_INST_TENANT_ID on ACT_HI_PROCINST(TENANT_ID_); create index ACT_IDX_HI_PRO_INST_PROC_DEF_KEY on ACT_HI_PROCINST(PROC_DEF_KEY_); +create index ACT_IDX_HI_PRO_INST_PROC_TIME on ACT_HI_PROCINST(START_TIME_, END_TIME_); +create index ACT_IDX_HI_PI_PDEFID_END_TIME on ACT_HI_PROCINST(PROC_DEF_ID_, END_TIME_); +create index ACT_IDX_HI_PRO_INST_ROOT_PI on ACT_HI_PROCINST(ROOT_PROC_INST_ID_); +create index ACT_IDX_HI_PRO_INST_RM_TIME on ACT_HI_PROCINST(REMOVAL_TIME_); -create index ACT_IDX_HI_ACT_INST_START on ACT_HI_ACTINST(START_TIME_); +create index ACT_IDX_HI_ACTINST_ROOT_PI on ACT_HI_ACTINST(ROOT_PROC_INST_ID_); +create index ACT_IDX_HI_ACT_INST_START_END on ACT_HI_ACTINST(START_TIME_, END_TIME_); create index ACT_IDX_HI_ACT_INST_END on ACT_HI_ACTINST(END_TIME_); create index ACT_IDX_HI_ACT_INST_PROCINST on ACT_HI_ACTINST(PROC_INST_ID_, ACT_ID_); create index ACT_IDX_HI_ACT_INST_COMP on ACT_HI_ACTINST(EXECUTION_ID_, ACT_ID_, END_TIME_, ID_); -create index ACT_IDX_HI_ACT_INST_STATS on ACT_HI_ACTINST(PROC_DEF_ID_, ACT_ID_, END_TIME_, ACT_INST_STATE_); +create index ACT_IDX_HI_ACT_INST_STATS on ACT_HI_ACTINST(PROC_DEF_ID_, PROC_INST_ID_, ACT_ID_, END_TIME_, ACT_INST_STATE_); create index ACT_IDX_HI_ACT_INST_TENANT_ID on ACT_HI_ACTINST(TENANT_ID_); create index ACT_IDX_HI_ACT_INST_PROC_DEF_KEY on ACT_HI_ACTINST(PROC_DEF_KEY_); +create index ACT_IDX_HI_AI_PDEFID_END_TIME on ACT_HI_ACTINST(PROC_DEF_ID_, END_TIME_); +create index ACT_IDX_HI_ACT_INST_RM_TIME on ACT_HI_ACTINST(REMOVAL_TIME_); +create index ACT_IDX_HI_TASKINST_ROOT_PI on ACT_HI_TASKINST(ROOT_PROC_INST_ID_); create index ACT_IDX_HI_TASK_INST_TENANT_ID on ACT_HI_TASKINST(TENANT_ID_); create index ACT_IDX_HI_TASK_INST_PROC_DEF_KEY on ACT_HI_TASKINST(PROC_DEF_KEY_); create index ACT_IDX_HI_TASKINST_PROCINST on ACT_HI_TASKINST(PROC_INST_ID_); create index ACT_IDX_HI_TASKINSTID_PROCINST on ACT_HI_TASKINST(ID_,PROC_INST_ID_); +create index ACT_IDX_HI_TASK_INST_RM_TIME on ACT_HI_TASKINST(REMOVAL_TIME_); +create index ACT_IDX_HI_TASK_INST_START on ACT_HI_TASKINST(START_TIME_); +create index ACT_IDX_HI_TASK_INST_END on ACT_HI_TASKINST(END_TIME_); +create index ACT_IDX_HI_DETAIL_ROOT_PI on ACT_HI_DETAIL(ROOT_PROC_INST_ID_); create index ACT_IDX_HI_DETAIL_PROC_INST on ACT_HI_DETAIL(PROC_INST_ID_); create index ACT_IDX_HI_DETAIL_ACT_INST on ACT_HI_DETAIL(ACT_INST_ID_); create index ACT_IDX_HI_DETAIL_CASE_INST on ACT_HI_DETAIL(CASE_INST_ID_); @@ -933,46 +1101,94 @@ create index ACT_IDX_HI_DETAIL_TASK_ID on ACT_HI_DETAIL(TASK_ID_); create index ACT_IDX_HI_DETAIL_TENANT_ID on ACT_HI_DETAIL(TENANT_ID_); create index ACT_IDX_HI_DETAIL_PROC_DEF_KEY on ACT_HI_DETAIL(PROC_DEF_KEY_); create index ACT_IDX_HI_DETAIL_BYTEAR on ACT_HI_DETAIL(BYTEARRAY_ID_); +create index ACT_IDX_HI_DETAIL_RM_TIME on ACT_HI_DETAIL(REMOVAL_TIME_); +create index ACT_IDX_HI_DETAIL_TASK_BYTEAR on ACT_HI_DETAIL(BYTEARRAY_ID_, TASK_ID_); +create index ACT_IDX_HI_DETAIL_VAR_INST_ID on ACT_HI_DETAIL(VAR_INST_ID_); +create index ACT_IDX_HI_IDENT_LNK_ROOT_PI on ACT_HI_IDENTITYLINK(ROOT_PROC_INST_ID_); create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_); create index ACT_IDX_HI_IDENT_LNK_GROUP on ACT_HI_IDENTITYLINK(GROUP_ID_); create index ACT_IDX_HI_IDENT_LNK_TENANT_ID on ACT_HI_IDENTITYLINK(TENANT_ID_); create index ACT_IDX_HI_IDENT_LNK_PROC_DEF_KEY on ACT_HI_IDENTITYLINK(PROC_DEF_KEY_); create index ACT_IDX_HI_IDENT_LINK_TASK on ACT_HI_IDENTITYLINK(TASK_ID_); +create index ACT_IDX_HI_IDENT_LINK_RM_TIME on ACT_HI_IDENTITYLINK(REMOVAL_TIME_); +create index ACT_IDX_HI_IDENT_LNK_TIMESTAMP on ACT_HI_IDENTITYLINK(TIMESTAMP_); +create index ACT_IDX_HI_VARINST_ROOT_PI on ACT_HI_VARINST(ROOT_PROC_INST_ID_); create index ACT_IDX_HI_PROCVAR_PROC_INST on ACT_HI_VARINST(PROC_INST_ID_); create index ACT_IDX_HI_PROCVAR_NAME_TYPE on ACT_HI_VARINST(NAME_, VAR_TYPE_); create index ACT_IDX_HI_CASEVAR_CASE_INST on ACT_HI_VARINST(CASE_INST_ID_); create index ACT_IDX_HI_VAR_INST_TENANT_ID on ACT_HI_VARINST(TENANT_ID_); create index ACT_IDX_HI_VAR_INST_PROC_DEF_KEY on ACT_HI_VARINST(PROC_DEF_KEY_); create index ACT_IDX_HI_VARINST_BYTEAR on ACT_HI_VARINST(BYTEARRAY_ID_); +create index ACT_IDX_HI_VARINST_RM_TIME on ACT_HI_VARINST(REMOVAL_TIME_); +create index ACT_IDX_HI_VAR_PI_NAME_TYPE on ACT_HI_VARINST(PROC_INST_ID_, NAME_, VAR_TYPE_); create index ACT_IDX_HI_INCIDENT_TENANT_ID on ACT_HI_INCIDENT(TENANT_ID_); create index ACT_IDX_HI_INCIDENT_PROC_DEF_KEY on ACT_HI_INCIDENT(PROC_DEF_KEY_); +create index ACT_IDX_HI_INCIDENT_ROOT_PI on ACT_HI_INCIDENT(ROOT_PROC_INST_ID_); create index ACT_IDX_HI_INCIDENT_PROCINST on ACT_HI_INCIDENT(PROC_INST_ID_); +create index ACT_IDX_HI_INCIDENT_RM_TIME on ACT_HI_INCIDENT(REMOVAL_TIME_); +create index ACT_IDX_HI_INCIDENT_CREATE_TIME on ACT_HI_INCIDENT(CREATE_TIME_); +create index ACT_IDX_HI_INCIDENT_END_TIME on ACT_HI_INCIDENT(END_TIME_); +create index ACT_IDX_HI_JOB_LOG_ROOT_PI on ACT_HI_JOB_LOG(ROOT_PROC_INST_ID_); create index ACT_IDX_HI_JOB_LOG_PROCINST on ACT_HI_JOB_LOG(PROCESS_INSTANCE_ID_); create index ACT_IDX_HI_JOB_LOG_PROCDEF on ACT_HI_JOB_LOG(PROCESS_DEF_ID_); create index ACT_IDX_HI_JOB_LOG_TENANT_ID on ACT_HI_JOB_LOG(TENANT_ID_); create index ACT_IDX_HI_JOB_LOG_JOB_DEF_ID on ACT_HI_JOB_LOG(JOB_DEF_ID_); create index ACT_IDX_HI_JOB_LOG_PROC_DEF_KEY on ACT_HI_JOB_LOG(PROCESS_DEF_KEY_); create index ACT_IDX_HI_JOB_LOG_EX_STACK on ACT_HI_JOB_LOG(JOB_EXCEPTION_STACK_ID_); +create index ACT_IDX_HI_JOB_LOG_RM_TIME on ACT_HI_JOB_LOG(REMOVAL_TIME_); +create index ACT_IDX_HI_JOB_LOG_JOB_CONF on ACT_HI_JOB_LOG(JOB_DEF_CONFIGURATION_); + +create index ACT_HI_BAT_RM_TIME on ACT_HI_BATCH(REMOVAL_TIME_); +create index ACT_HI_EXT_TASK_LOG_ROOT_PI on ACT_HI_EXT_TASK_LOG(ROOT_PROC_INST_ID_); create index ACT_HI_EXT_TASK_LOG_PROCINST on ACT_HI_EXT_TASK_LOG(PROC_INST_ID_); create index ACT_HI_EXT_TASK_LOG_PROCDEF on ACT_HI_EXT_TASK_LOG(PROC_DEF_ID_); create index ACT_HI_EXT_TASK_LOG_PROC_DEF_KEY on ACT_HI_EXT_TASK_LOG(PROC_DEF_KEY_); create index ACT_HI_EXT_TASK_LOG_TENANT_ID on ACT_HI_EXT_TASK_LOG(TENANT_ID_); create index ACT_IDX_HI_EXTTASKLOG_ERRORDET on ACT_HI_EXT_TASK_LOG(ERROR_DETAILS_ID_); +create index ACT_HI_EXT_TASK_LOG_RM_TIME on ACT_HI_EXT_TASK_LOG(REMOVAL_TIME_); +create index ACT_IDX_HI_OP_LOG_ROOT_PI on ACT_HI_OP_LOG(ROOT_PROC_INST_ID_); create index ACT_IDX_HI_OP_LOG_PROCINST on ACT_HI_OP_LOG(PROC_INST_ID_); create index ACT_IDX_HI_OP_LOG_PROCDEF on ACT_HI_OP_LOG(PROC_DEF_ID_); +create index ACT_IDX_HI_OP_LOG_TASK on ACT_HI_OP_LOG(TASK_ID_); +create index ACT_IDX_HI_OP_LOG_RM_TIME on ACT_HI_OP_LOG(REMOVAL_TIME_); +create index ACT_IDX_HI_OP_LOG_TIMESTAMP on ACT_HI_OP_LOG(TIMESTAMP_); +create index ACT_IDX_HI_OP_LOG_USER_ID on ACT_HI_OP_LOG(USER_ID_); +create index ACT_IDX_HI_OP_LOG_OP_TYPE on ACT_HI_OP_LOG(OPERATION_TYPE_); +create index ACT_IDX_HI_OP_LOG_ENTITY_TYPE on ACT_HI_OP_LOG(ENTITY_TYPE_); create index ACT_IDX_HI_COMMENT_TASK on ACT_HI_COMMENT(TASK_ID_); +create index ACT_IDX_HI_COMMENT_ROOT_PI on ACT_HI_COMMENT(ROOT_PROC_INST_ID_); create index ACT_IDX_HI_COMMENT_PROCINST on ACT_HI_COMMENT(PROC_INST_ID_); +create index ACT_IDX_HI_COMMENT_RM_TIME on ACT_HI_COMMENT(REMOVAL_TIME_); create index ACT_IDX_HI_ATTACHMENT_CONTENT on ACT_HI_ATTACHMENT(CONTENT_ID_); +create index ACT_IDX_HI_ATTACHMENT_ROOT_PI on ACT_HI_ATTACHMENT(ROOT_PROC_INST_ID_); create index ACT_IDX_HI_ATTACHMENT_PROCINST on ACT_HI_ATTACHMENT(PROC_INST_ID_); create index ACT_IDX_HI_ATTACHMENT_TASK on ACT_HI_ATTACHMENT(TASK_ID_); +create index ACT_IDX_HI_ATTACHMENT_RM_TIME on ACT_HI_ATTACHMENT(REMOVAL_TIME_); +-- +-- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH +-- under one or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information regarding copyright +-- ownership. Camunda licenses this file to you under the Apache License, +-- Version 2.0; 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. +-- + create table ACT_HI_CASEINST ( ID_ varchar(64) not null, CASE_INST_ID_ varchar(64) not null, @@ -1018,6 +1234,23 @@ create index ACT_IDX_HI_CAS_A_I_END on ACT_HI_CASEACTINST(END_TIME_); create index ACT_IDX_HI_CAS_A_I_COMP on ACT_HI_CASEACTINST(CASE_ACT_ID_, END_TIME_, ID_); create index ACT_IDX_HI_CAS_A_I_CASEINST on ACT_HI_CASEACTINST(CASE_INST_ID_, CASE_ACT_ID_); create index ACT_IDX_HI_CAS_A_I_TENANT_ID on ACT_HI_CASEACTINST(TENANT_ID_); +-- +-- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH +-- under one or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information regarding copyright +-- ownership. Camunda licenses this file to you under the Apache License, +-- Version 2.0; 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. +-- + -- create history decision instance table -- create table ACT_HI_DECINST ( ID_ varchar(64) NOT NULL, @@ -1033,9 +1266,11 @@ create table ACT_HI_DECINST ( ACT_INST_ID_ varchar(64), ACT_ID_ varchar(255), EVAL_TIME_ datetime(3) not null, + REMOVAL_TIME_ datetime(3), COLLECT_VALUE_ double, USER_ID_ varchar(255), ROOT_DEC_INST_ID_ varchar(64), + ROOT_PROC_INST_ID_ varchar(64), DEC_REQ_ID_ varchar(64), DEC_REQ_KEY_ varchar(255), TENANT_ID_ varchar(64), @@ -1052,9 +1287,12 @@ create table ACT_HI_DEC_IN ( BYTEARRAY_ID_ varchar(64), DOUBLE_ double, LONG_ bigint, - TEXT_ LONGBLOB, - TEXT2_ LONGBLOB, + TEXT_ varchar(4000), + TEXT2_ varchar(4000), TENANT_ID_ varchar(64), + CREATE_TIME_ datetime(3), + ROOT_PROC_INST_ID_ varchar(64), + REMOVAL_TIME_ datetime(3), primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -1071,9 +1309,12 @@ create table ACT_HI_DEC_OUT ( BYTEARRAY_ID_ varchar(64), DOUBLE_ double, LONG_ bigint, - TEXT_ LONGBLOB, - TEXT2_ LONGBLOB, + TEXT_ varchar(4000), + TEXT2_ varchar(4000), TENANT_ID_ varchar(64), + CREATE_TIME_ datetime(3), + ROOT_PROC_INST_ID_ varchar(64), + REMOVAL_TIME_ datetime(3), primary key (ID_) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; @@ -1089,107 +1330,16 @@ create index ACT_IDX_HI_DEC_INST_TENANT_ID on ACT_HI_DECINST(TENANT_ID_); create index ACT_IDX_HI_DEC_INST_ROOT_ID on ACT_HI_DECINST(ROOT_DEC_INST_ID_); create index ACT_IDX_HI_DEC_INST_REQ_ID on ACT_HI_DECINST(DEC_REQ_ID_); create index ACT_IDX_HI_DEC_INST_REQ_KEY on ACT_HI_DECINST(DEC_REQ_KEY_); +create index ACT_IDX_HI_DEC_INST_ROOT_PI on ACT_HI_DECINST(ROOT_PROC_INST_ID_); +create index ACT_IDX_HI_DEC_INST_RM_TIME on ACT_HI_DECINST(REMOVAL_TIME_); create index ACT_IDX_HI_DEC_IN_INST on ACT_HI_DEC_IN(DEC_INST_ID_); create index ACT_IDX_HI_DEC_IN_CLAUSE on ACT_HI_DEC_IN(DEC_INST_ID_, CLAUSE_ID_); +create index ACT_IDX_HI_DEC_IN_ROOT_PI on ACT_HI_DEC_IN(ROOT_PROC_INST_ID_); +create index ACT_IDX_HI_DEC_IN_RM_TIME on ACT_HI_DEC_IN(REMOVAL_TIME_); create index ACT_IDX_HI_DEC_OUT_INST on ACT_HI_DEC_OUT(DEC_INST_ID_); create index ACT_IDX_HI_DEC_OUT_RULE on ACT_HI_DEC_OUT(RULE_ORDER_, CLAUSE_ID_); - --- mariadb_identity_7.8.0-ee - -create table ACT_ID_GROUP ( - ID_ varchar(64), - REV_ integer, - NAME_ varchar(255), - TYPE_ varchar(255), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_ID_MEMBERSHIP ( - USER_ID_ varchar(64), - GROUP_ID_ varchar(64), - primary key (USER_ID_, GROUP_ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_ID_USER ( - ID_ varchar(64), - REV_ integer, - FIRST_ varchar(255), - LAST_ varchar(255), - EMAIL_ varchar(255), - PWD_ varchar(255), - SALT_ varchar(255), - PICTURE_ID_ varchar(64), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_ID_INFO ( - ID_ varchar(64), - REV_ integer, - USER_ID_ varchar(64), - TYPE_ varchar(64), - KEY_ varchar(255), - VALUE_ varchar(255), - PASSWORD_ LONGBLOB, - PARENT_ID_ varchar(255), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_ID_TENANT ( - ID_ varchar(64), - REV_ integer, - NAME_ varchar(255), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -create table ACT_ID_TENANT_MEMBER ( - ID_ varchar(64) not null, - TENANT_ID_ varchar(64) not null, - USER_ID_ varchar(64), - GROUP_ID_ varchar(64), - primary key (ID_) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin; - -alter table ACT_ID_MEMBERSHIP - add constraint ACT_FK_MEMB_GROUP - foreign key (GROUP_ID_) - references ACT_ID_GROUP (ID_); - -alter table ACT_ID_MEMBERSHIP - add constraint ACT_FK_MEMB_USER - foreign key (USER_ID_) - references ACT_ID_USER (ID_); - -alter table ACT_ID_TENANT_MEMBER - add constraint ACT_UNIQ_TENANT_MEMB_USER - unique (TENANT_ID_, USER_ID_); - -alter table ACT_ID_TENANT_MEMBER - add constraint ACT_UNIQ_TENANT_MEMB_GROUP - unique (TENANT_ID_, GROUP_ID_); - -alter table ACT_ID_TENANT_MEMBER - add constraint ACT_FK_TENANT_MEMB - foreign key (TENANT_ID_) - references ACT_ID_TENANT (ID_); - -alter table ACT_ID_TENANT_MEMBER - add constraint ACT_FK_TENANT_MEMB_USER - foreign key (USER_ID_) - references ACT_ID_USER (ID_); - -alter table ACT_ID_TENANT_MEMBER - add constraint ACT_FK_TENANT_MEMB_GROUP - foreign key (GROUP_ID_) - references ACT_ID_GROUP (ID_); - -ALTER TABLE ACT_GE_BYTEARRAY - ADD TYPE_ integer; - -ALTER TABLE ACT_GE_BYTEARRAY - ADD CREATE_TIME_ datetime(3); - -ALTER TABLE ACT_RE_PROCDEF - ADD STARTABLE_ BOOLEAN NOT NULL DEFAULT TRUE; \ No newline at end of file +create index ACT_IDX_HI_DEC_OUT_ROOT_PI on ACT_HI_DEC_OUT(ROOT_PROC_INST_ID_); +create index ACT_IDX_HI_DEC_OUT_RM_TIME on ACT_HI_DEC_OUT(REMOVAL_TIME_); diff --git a/common/pom.xml b/common/pom.xml index 08f797d7e5..5594329763 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -8,7 +8,7 @@ 1.7.1-SNAPSHOT common - MSO Common classes + common MSO Common classes:- Logger @@ -225,7 +225,7 @@ org.camunda.bpm camunda-external-task-client - 1.1.1 + 1.4.0 org.onap.appc.client @@ -393,5 +393,23 @@ + + + + maven-surefire-plugin + 2.20 + + + DEBUG + + 2 + suites + false + 1 + ${surefireArgLine} + + + + diff --git a/mso-api-handlers/mso-api-handler-common/pom.xml b/mso-api-handlers/mso-api-handler-common/pom.xml index 4e92775d02..01e148eedb 100644 --- a/mso-api-handlers/mso-api-handler-common/pom.xml +++ b/mso-api-handlers/mso-api-handler-common/pom.xml @@ -1,16 +1,12 @@ 4.0.0 - org.onap.so mso-api-handlers 1.7.1-SNAPSHOT - - mso-api-handler-common - mso-api-handler-common ONAP SO API Handler Common Libraries @@ -78,8 +74,7 @@ javax.servlet - servlet-api - 2.5 + javax.servlet-api org.json diff --git a/mso-api-handlers/mso-api-handler-infra/pom.xml b/mso-api-handlers/mso-api-handler-infra/pom.xml index b902564900..5b926adf5b 100644 --- a/mso-api-handlers/mso-api-handler-infra/pom.xml +++ b/mso-api-handlers/mso-api-handler-infra/pom.xml @@ -1,20 +1,16 @@ 4.0.0 - org.onap.so mso-api-handlers 1.7.1-SNAPSHOT - - mso-api-handler-infra - mso-api-handler-infra ONAP SO API Handler Infra - 7.10.0 + 7.14.0 1.2 UTF-8 UTF-8 @@ -56,32 +52,15 @@ javassist 3.25.0-GA - - org.springframework.boot - spring-boot-starter-web - - - io.swagger.core.v3 - swagger-annotations - ${swagger.version} - io.swagger.core.v3 swagger-jaxrs2 - 2.0.6 + 2.0.8 com.h2database h2 - - org.mariadb.jdbc - mariadb-java-client - - - org.springframework.boot - spring-boot-starter-actuator - org.springframework.boot spring-boot-starter-jersey @@ -96,58 +75,18 @@ - - org.springframework.retry - spring-retry - org.springframework.boot spring-boot-starter-webflux - - commons-lang - commons-lang - 2.6 - - - javax.activation - activation - 1.1.1 - - - javax.transaction - jta - 1.1 - - - org.json4s - json4s-jackson_2.12 - ${json4s-jackson-version} - - - org.json4s - json4s-core_2.12 - ${json4s-core-version} - javax.xml.ws jaxws-api - - javax.servlet - javax.servlet-api - javax.interceptor javax.interceptor-api - - - - org.onap.so - mso-requests-db - ${project.version} - org.onap.so mso-requests-db-repositories @@ -158,7 +97,6 @@ mso-catalog-db ${project.version} - pl.pragmatists JUnitParams @@ -181,11 +119,6 @@ - - com.github.java-json-tools - json-schema-core - 1.2.8 - com.github.java-json-tools json-schema-validator @@ -196,10 +129,6 @@ spring-boot-starter-test test - - com.h2database - h2 - org.springframework.boot spring-boot-configuration-processor @@ -208,14 +137,9 @@ ch.vorburger.mariaDB4j mariaDB4j - 2.2.3 + 2.3.0 test - - com.googlecode.junit-toolbox - junit-toolbox - 2.4 - org.onap.so mso-api-handler-common @@ -227,18 +151,10 @@ 1.2.4.RELEASE test - - io.micrometer - micrometer-core - io.micrometer micrometer-registry-prometheus - - org.onap.aaf.authz - aaf-cadi-client - org.onap.aaf.authz aaf-cadi-aaf @@ -268,23 +184,7 @@ aaf-misc-rosetta runtime - - javax.xml.bind - jaxb-api - 2.3.0 - - - com.sun.xml.bind - jaxb-core - 2.3.0 - - - com.sun.xml.bind - jaxb-impl - 2.3.0 - - ${project.artifactId}-${project.version} diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java index 7924ca304a..9a4d0a45df 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ServiceInstances.java @@ -26,6 +26,7 @@ package org.onap.so.apihandlerinfra; import java.io.IOException; import java.util.HashMap; import java.util.Optional; +import java.util.stream.Collectors; import javax.transaction.Transactional; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ManualTasksTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ManualTasksTest.java index f4ff19f53d..fb923faf78 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ManualTasksTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ManualTasksTest.java @@ -104,8 +104,8 @@ public class ManualTasksTest extends BaseTest { RequestError expectedResponse = new RequestError(); ServiceException se = new ServiceException(); se.setMessageId("SVC0002"); - se.setText("Mapping of request to JSON object failed: Unrecognized token \'test\': " - + "was expecting \'null\', \'true\', \'false\' or NaN\n at [Source: (String)\"test\"; line: 1, column: 9]"); + se.setText( + "Mapping of request to JSON object failed: Unrecognized token \u0027test\u0027: was expecting (JSON String, Number, Array, Object or token \u0027null\u0027, \u0027true\u0027 or \u0027false\u0027)\n at [Source: (String)\"test\"; line: 1, column: 5]"); expectedResponse.setServiceException(se); HttpHeaders headers = new HttpHeaders(); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java index d43bbb6ea0..b358f26cb2 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java @@ -2453,7 +2453,7 @@ public class ServiceInstancesTest extends BaseTest { assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value()); RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class); assertEquals( - "Unable to check for duplicate instance due to error contacting requestDb: org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 Server Error", + "Unable to check for duplicate instance due to error contacting requestDb: org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 Server Error: [no body]", realResponse.getServiceException().getText()); } @@ -2498,7 +2498,7 @@ public class ServiceInstancesTest extends BaseTest { assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value()); RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class); assertEquals( - "Unable to get process-instance history from Camunda for requestId: f0a35706-efc4-4e27-80ea-a995d7a2a40f due to error: org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 Server Error", + "Unable to get process-instance history from Camunda for requestId: f0a35706-efc4-4e27-80ea-a995d7a2a40f due to error: org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 Server Error: [no body]", realResponse.getServiceException().getText()); } @@ -2515,7 +2515,7 @@ public class ServiceInstancesTest extends BaseTest { assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value()); RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class); assertEquals( - "Unable to check for duplicate instance due to error contacting requestDb: org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 Server Error", + "Unable to check for duplicate instance due to error contacting requestDb: org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 Server Error: [no body]", realResponse.getServiceException().getText()); } @@ -2547,7 +2547,7 @@ public class ServiceInstancesTest extends BaseTest { assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value()); RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class); assertEquals( - "Unable to save instance to db due to error contacting requestDb: org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 Server Error", + "Unable to save instance to db due to error contacting requestDb: org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 Server Error: [no body]", realResponse.getServiceException().getText()); } @@ -2567,7 +2567,7 @@ public class ServiceInstancesTest extends BaseTest { assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value()); RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class); assertEquals( - "Unable to save instance to db due to error contacting requestDb: org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 Server Error", + "Unable to save instance to db due to error contacting requestDb: org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 Server Error: [no body]", realResponse.getServiceException().getText()); } @@ -2584,7 +2584,7 @@ public class ServiceInstancesTest extends BaseTest { assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatusCode().value()); RequestError realResponse = mapper.readValue(response.getBody(), RequestError.class); assertEquals( - "Unable to save instance to db due to error contacting requestDb: org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 Server Error", + "Unable to save instance to db due to error contacting requestDb: org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 Server Error: [no body]", realResponse.getServiceException().getText()); } diff --git a/mso-api-handlers/mso-requests-db-repositories/pom.xml b/mso-api-handlers/mso-requests-db-repositories/pom.xml index 8f623ad9e5..160ce9a7f8 100644 --- a/mso-api-handlers/mso-requests-db-repositories/pom.xml +++ b/mso-api-handlers/mso-requests-db-repositories/pom.xml @@ -1,15 +1,12 @@ 4.0.0 - org.onap.so mso-api-handlers 1.7.1-SNAPSHOT - mso-requests-db-repositories - mso-requests-db-repositories SO Request Database JPA Respositories diff --git a/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/SiteStatusTest.java b/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/SiteStatusTest.java index 93218a2057..f5d08e942d 100644 --- a/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/SiteStatusTest.java +++ b/mso-api-handlers/mso-requests-db-repositories/src/test/java/org/onap/so/db/request/SiteStatusTest.java @@ -60,7 +60,7 @@ public class SiteStatusTest { @Test public void sortByCreated() { - final PageRequest page1 = new PageRequest(0, 20, Direction.DESC, "created"); + final PageRequest page1 = PageRequest.of(0, 20, Direction.DESC, "created"); SiteStatus example = new SiteStatus(); example.setStatus(true); diff --git a/mso-catalog-db/pom.xml b/mso-catalog-db/pom.xml index ff88b81461..43f2910390 100644 --- a/mso-catalog-db/pom.xml +++ b/mso-catalog-db/pom.xml @@ -64,7 +64,7 @@ ch.vorburger.mariaDB4j mariaDB4j - 2.2.3 + 2.3.0 test diff --git a/mso-catalog-db/src/main/java/org/onap/so/rest/catalog/beans/HeatEnvironment.java b/mso-catalog-db/src/main/java/org/onap/so/rest/catalog/beans/HeatEnvironment.java deleted file mode 100644 index 97f67a5438..0000000000 --- a/mso-catalog-db/src/main/java/org/onap/so/rest/catalog/beans/HeatEnvironment.java +++ /dev/null @@ -1,160 +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.rest.catalog.beans; - -import java.io.Serializable; -import java.text.DateFormat; -import java.util.Date; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Lob; -import javax.persistence.PrePersist; -import javax.persistence.Table; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import com.openpojo.business.annotation.BusinessKey; - -@Entity -@Table(name = "heat_environment") -public class HeatEnvironment implements Serializable { - - private static final long serialVersionUID = 768026109321305392L; - - @BusinessKey - @Id - @Column(name = "ARTIFACT_UUID") - private String artifactUuid; - - @Column(name = "NAME") - private String name = null; - - @Column(name = "DESCRIPTION") - private String description = null; - - @Lob - @Column(name = "BODY", columnDefinition = "LONGTEXT") - private String environment = null; - - @Column(name = "ARTIFACT_CHECKSUM") - private String artifactChecksum; - - @Column(name = "CREATION_TIMESTAMP", updatable = false) - @Temporal(TemporalType.TIMESTAMP) - private Date created; - - @BusinessKey - @Column(name = "VERSION") - private String version; - - @PrePersist - protected void onCreate() { - this.created = new Date(); - } - - @Override - public boolean equals(final Object other) { - if (!(other instanceof HeatEnvironment)) { - return false; - } - HeatEnvironment castOther = (HeatEnvironment) other; - return new EqualsBuilder().append(artifactUuid, castOther.artifactUuid).append(version, castOther.version) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder().append(artifactUuid).append(version).toHashCode(); - } - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public String getArtifactUuid() { - return this.artifactUuid; - } - - public void setArtifactUuid(String artifactUuid) { - this.artifactUuid = artifactUuid; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return this.description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getEnvironment() { - return this.environment; - } - - public void setEnvironment(String environment) { - this.environment = environment; - } - - public String getArtifactChecksum() { - return artifactChecksum; - } - - public void setArtifactChecksum(String artifactChecksum) { - this.artifactChecksum = artifactChecksum; - } - - public Date getCreated() { - return created; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("Artifact UUID=" + this.artifactUuid); - sb.append(", name="); - sb.append(name); - sb.append(", version="); - sb.append(version); - sb.append(", description="); - sb.append(this.description == null ? "null" : this.description); - sb.append(", body="); - sb.append(this.environment == null ? "null" : this.environment); - if (this.created != null) { - sb.append(",creationTimestamp="); - sb.append(DateFormat.getInstance().format(this.created)); - } - return sb.toString(); - } -} diff --git a/pom.xml b/pom.xml index 2cd4de3856..03145679aa 100644 --- a/pom.xml +++ b/pom.xml @@ -67,16 +67,16 @@ content/repositories/snapshots/ content/repositories/public/ content/sites/site/org/onap/so/${project.version}/ - 3.3.3 + 3.4.1 2.1 - 2.1.5.RELEASE + 2.3.7.RELEASE 2.1.21 - 3.2.0 + 7.14.0 false true 0.33.0 1.7.2 - 0.8.0 + 0.9.0 2.1.15 @@ -936,6 +936,18 @@ com.vaadin.external.google android-json + + org.junit.jupiter + junit-jupiter + + + org.junit.vintage + junit-vintage-engine + + + org.mockito + mockito-junit-jupiter + @@ -951,7 +963,7 @@ org.flywaydb flyway-core - 5.2.4 + 6.5.7 org.json diff --git a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/pom.xml b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/pom.xml index 3178b28502..6d47e06784 100644 --- a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/pom.xml +++ b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/pom.xml @@ -108,5 +108,10 @@ ${equalsverifier-version} test + + org.springframework.boot + spring-boot-starter-test + test + \ No newline at end of file diff --git a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/bpmn/flows/tasks/InstantiateNsTask.java b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/bpmn/flows/tasks/InstantiateNsTask.java index a6d35e301e..aeb2d11934 100644 --- a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/bpmn/flows/tasks/InstantiateNsTask.java +++ b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/bpmn/flows/tasks/InstantiateNsTask.java @@ -31,7 +31,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Optional; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.camunda.bpm.engine.delegate.DelegateExecution; import org.onap.so.adapters.etsisol003adapter.lcm.v1.model.Tenant; import org.onap.so.adapters.etsisol003adapter.pkgm.extclients.etsicatalog.model.NsdInfo; diff --git a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/test/resources/application.yaml b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/test/resources/application.yaml index 101e17a791..5a8e250157 100644 --- a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/test/resources/application.yaml +++ b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/test/resources/application.yaml @@ -22,14 +22,19 @@ spring: pool-name: ns-lcm-bpmn-pool registerMbeans: true nfvo: - jdbcUrl: jdbc:h2:mem:nfvo;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;INIT=CREATE SCHEMA IF NOT EXISTS nfvo; + jdbcUrl: jdbc:h2:mem:nfvo;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;INIT=CREATE SCHEMA IF NOT EXISTS nfvo;MODE=MYSQL;DATABASE_TO_LOWER=TRUE;CASE_INSENSITIVE_IDENTIFIERS=TRUE driver-class-name: org.h2.Driver pool-name: ns-lcm-bpmn-pool registerMbeans: true + test: + database: + replace: NONE jpa: generate-ddl: true + dialect: org.hibernate.dialect.MySQL5Dialect hibernate: ddl-auto: create + database-platform: org.hibernate.dialect.MariaDBDialect hibernate: dialect: org.hibernate.dialect.H2Dialect hbm2ddl: diff --git a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-database-service/src/main/resources/db/migration/V1_1__create_nfvo_tables.sql b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-database-service/src/main/resources/db/migration/V1_1__create_nfvo_tables.sql index 85a732b83e..7f50c791f6 100644 --- a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-database-service/src/main/resources/db/migration/V1_1__create_nfvo_tables.sql +++ b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-database-service/src/main/resources/db/migration/V1_1__create_nfvo_tables.sql @@ -1,7 +1,7 @@ use nfvo; CREATE TABLE IF NOT EXISTS `JOB` ( - `JOB_ID` varchar(255) NOT NULL, + `JOB_ID` varchar(255) PRIMARY KEY NOT NULL, `JOB_TYPE` varchar(255) NOT NULL, `JOB_ACTION` varchar(255) NOT NULL, `RESOURCE_ID` varchar(255) NOT NULL, @@ -10,26 +10,24 @@ CREATE TABLE IF NOT EXISTS `JOB` ( `START_TIME` DATETIME DEFAULT NULL, `END_TIME` DATETIME DEFAULT NULL, `PROGRESS` int(11) DEFAULT NULL, - `PROCESS_INSTANCE_ID` varchar(255) DEFAULT NULL, - PRIMARY KEY (`JOB_ID`) + `PROCESS_INSTANCE_ID` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `JOB_STATUS` ( - `ID` INT NOT NULL AUTO_INCREMENT, + `ID` INT NOT NULL PRIMARY KEY AUTO_INCREMENT, `UPDATED_TIME` DATETIME NOT NULL, `DESCRIPTION` longtext DEFAULT NULL, `STATUS` varchar(255) NOT NULL, `JOB_ID` varchar(255) NOT NULL, - PRIMARY KEY (`ID`), FOREIGN KEY (JOB_ID) REFERENCES JOB(JOB_ID) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `NS_INST` ( - `NS_INST_ID` varchar(255) NOT NULL, + `NS_INST_ID` varchar(255) PRIMARY KEY NOT NULL, `NAME` varchar(255) NOT NULL, `NS_PACKAGE_ID` varchar(255) DEFAULT NULL, `NSD_ID` varchar(255) NOT NULL, @@ -38,12 +36,11 @@ CREATE TABLE IF NOT EXISTS `NS_INST` ( `STATUS` varchar(255) NOT NULL, `STATUS_UPDATED_TIME` DATETIME NOT NULL, `GLOBAL_CUSTOMER_ID` varchar(255) DEFAULT NULL, - `SERVICE_TYPE` varchar(255) DEFAULT NULL, - PRIMARY KEY (`NS_INST_ID`) + `SERVICE_TYPE` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `NF_INST` ( - `NF_INST_ID` varchar(255) NOT NULL, + `NF_INST_ID` varchar(255) PRIMARY KEY NOT NULL, `NAME` varchar(255) DEFAULT NULL, `VNFD_ID` varchar(255) DEFAULT NULL, `PACKAGE_ID` varchar(255) DEFAULT NULL, @@ -51,14 +48,13 @@ CREATE TABLE IF NOT EXISTS `NF_INST` ( `STATUS` varchar(255) NOT NULL, `CREATE_TIME` DATETIME DEFAULT NULL, `LAST_UPDATE_TIME` DATETIME DEFAULT NULL, - PRIMARY KEY (`NF_INST_ID`), FOREIGN KEY (NS_INST_ID) REFERENCES NS_INST(NS_INST_ID) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `NS_LCM_OP_OCCS` ( - `ID` varchar(255) NOT NULL, + `ID` varchar(255) PRIMARY KEY NOT NULL, `OPERATION_STATE` varchar(255) NOT NULL, `STATE_ENTERED_TIME` DATETIME DEFAULT NULL, `START_TIME` DATETIME DEFAULT NULL, @@ -68,7 +64,6 @@ CREATE TABLE IF NOT EXISTS `NS_LCM_OP_OCCS` ( `OPERATION_PARAMS` longtext NOT NULL, `IS_CANCEL_PENDING` varchar(255) NOT NULL, `CANCEL_MODE` varchar(255) DEFAULT NULL, - PRIMARY KEY (`ID`), FOREIGN KEY (NS_INST_ID) REFERENCES NS_INST(NS_INST_ID) ON UPDATE CASCADE ON DELETE CASCADE diff --git a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-database-service/src/test/java/org/onap/so/etsi/nfvo/ns/lcm/database/DatabaseServiceProviderTest.java b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-database-service/src/test/java/org/onap/so/etsi/nfvo/ns/lcm/database/DatabaseServiceProviderTest.java index fcf7f9c373..b9858a8dd5 100644 --- a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-database-service/src/test/java/org/onap/so/etsi/nfvo/ns/lcm/database/DatabaseServiceProviderTest.java +++ b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-database-service/src/test/java/org/onap/so/etsi/nfvo/ns/lcm/database/DatabaseServiceProviderTest.java @@ -23,6 +23,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.time.LocalDateTime; +import java.time.temporal.ChronoUnit; import java.util.List; import java.util.Optional; import java.util.UUID; @@ -55,7 +56,7 @@ public class DatabaseServiceProviderTest { private static final String RANDOM_ID = UUID.randomUUID().toString(); private static final String DUMMY_NAME = "NAME"; - private static final LocalDateTime CURRENT_DATE_TIME = LocalDateTime.now(); + private static final LocalDateTime CURRENT_DATE_TIME = LocalDateTime.now().truncatedTo(ChronoUnit.MILLIS); @Autowired private DatabaseServiceProvider databaseServiceProvider; diff --git a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-database-service/src/test/resources/application.yaml b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-database-service/src/test/resources/application.yaml index adc36aca1d..478a5b5ac7 100644 --- a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-database-service/src/test/resources/application.yaml +++ b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-database-service/src/test/resources/application.yaml @@ -17,14 +17,19 @@ spring: datasource: hikari: nfvo: - jdbcUrl: jdbc:h2:mem:nfvo;DB_CLOSE_DELAY=-1;INIT=CREATE SCHEMA IF NOT EXISTS nfvo; + jdbcUrl: jdbc:h2:mem:nfvo;DB_CLOSE_DELAY=-1;INIT=CREATE SCHEMA IF NOT EXISTS nfvo;MODE=MYSQL;DATABASE_TO_LOWER=TRUE;CASE_INSENSITIVE_IDENTIFIERS=TRUE driver-class-name: org.h2.Driver pool-name: ns-lcm-bpmn-pool registerMbeans: true + test: + database: + replace: NONE jpa: generate-ddl: true + dialect: org.hibernate.dialect.MySQL5Dialect hibernate: ddl-auto: create + database-platform: org.hibernate.dialect.MariaDBDialect hibernate: dialect: org.hibernate.dialect.H2Dialect hbm2ddl: diff --git a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-service/src/test/resources/application.yaml b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-service/src/test/resources/application.yaml index 6f2b4d26c5..608cde2471 100644 --- a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-service/src/test/resources/application.yaml +++ b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-service/src/test/resources/application.yaml @@ -24,14 +24,19 @@ spring: pool-name: ns-lcm-bpmn-pool registerMbeans: true nfvo: - jdbcUrl: jdbc:h2:mem:NFVO;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;INIT=CREATE SCHEMA IF NOT EXISTS NFVO; + jdbcUrl: jdbc:h2:mem:NFVO;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;INIT=CREATE SCHEMA IF NOT EXISTS NFVO;MODE=MYSQL;DATABASE_TO_LOWER=TRUE;CASE_INSENSITIVE_IDENTIFIERS=TRUE driver-class-name: org.h2.Driver pool-name: ns-lcm-nfvo-pool registerMbeans: true + test: + database: + replace: NONE jpa: generate-ddl: true + dialect: org.hibernate.dialect.MySQL5Dialect hibernate: ddl-auto: create + database-platform: org.hibernate.dialect.MariaDBDialect logging: level: org.reflections.Reflections: ERROR diff --git a/so-optimization-clients/pom.xml b/so-optimization-clients/pom.xml index 79b1f7d5a4..b13695fbb6 100644 --- a/so-optimization-clients/pom.xml +++ b/so-optimization-clients/pom.xml @@ -41,13 +41,19 @@ pom import + + org.camunda.bpm + camunda-bom + 7.14.0 + import + pom + org.camunda.bpm.springboot camunda-bpm-spring-boot-starter - ${camunda.springboot.version} test -- cgit 1.2.3-korg