From a6a673acb1f067012885cb5aad221009bd38b35c Mon Sep 17 00:00:00 2001 From: bonita-ci Date: Fri, 28 Jun 2024 12:35:12 +0000 Subject: [PATCH 01/24] chore(release): prepare next version 10.3-SNAPSHOT --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index f8eab8c385..9fb2b9db30 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,5 +2,5 @@ org.gradle.jvmargs=--add-opens java.base/java.util=ALL-UNNAMED --add-opens java. org.gradle.caching=true org.gradle.vfs.watch=true -version=10.2-SNAPSHOT -brandingVersion=2024.3-SNAPSHOT +version=10.3-SNAPSHOT +brandingVersion=2025.1-SNAPSHOT From 920f528d47f01afb54c266ed468682e9bf393e87 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 09:51:00 +0200 Subject: [PATCH 02/24] chore(deps): bump the test group in /community with 3 updates (#3060) Bumps the test group in /community with 3 updates: [org.junit.jupiter:junit-jupiter-api](https://github.com/junit-team/junit5), [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) and [org.junit.vintage:junit-vintage-engine](https://github.com/junit-team/junit5). Updates `org.junit.jupiter:junit-jupiter-api` from 5.10.2 to 5.10.3 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.2...r5.10.3) Updates `org.junit.jupiter:junit-jupiter-engine` from 5.10.2 to 5.10.3 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.2...r5.10.3) Updates `org.junit.vintage:junit-vintage-engine` from 5.10.2 to 5.10.3 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.2...r5.10.3) Updates `org.junit.jupiter:junit-jupiter-engine` from 5.10.2 to 5.10.3 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.2...r5.10.3) Updates `org.junit.vintage:junit-vintage-engine` from 5.10.2 to 5.10.3 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.2...r5.10.3) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-type: direct:production update-type: version-update:semver-patch dependency-group: test - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:production update-type: version-update:semver-patch dependency-group: test - dependency-name: org.junit.vintage:junit-vintage-engine dependency-type: direct:production update-type: version-update:semver-patch dependency-group: test - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:production update-type: version-update:semver-patch dependency-group: test - dependency-name: org.junit.vintage:junit-vintage-engine dependency-type: direct:production update-type: version-update:semver-patch dependency-group: test ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 658278e382..c9cb3771c9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,7 +5,7 @@ springVersion = "5.3.37" springSessionVersion = "2.7.4" springBootVersion = "2.7.18" commonsLangVersion = "3.14.0" -junit5Version = "5.10.2" +junit5Version = "5.10.3" bonitaArtifactsModelVersion = "1.1.1" commonsIOVersion = "2.16.1" commonsFileUploadVersion = "1.5" From 0d351a514f82de7bd42be478f711ff2740c70837 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 15:58:13 +0200 Subject: [PATCH 03/24] chore(deps): bump the production-dependencies group across 1 directory with 24 updates (#3061) Bumps the production-dependencies group with 24 updates in the /community directory: | Package | From | To | | --- | --- | --- | | [org.codehaus.groovy:groovy-bom](https://github.com/apache/groovy) | `3.0.21` | `3.0.22` | | [org.codehaus.groovy:groovy](https://github.com/apache/groovy) | `3.0.21` | `3.0.22` | | [org.codehaus.groovy:groovy-servlet](https://github.com/apache/groovy) | `3.0.21` | `3.0.22` | | [org.codehaus.groovy:groovy-xml](https://github.com/apache/groovy) | `3.0.21` | `3.0.22` | | [org.codehaus.groovy:groovy-json](https://github.com/apache/groovy) | `3.0.21` | `3.0.22` | | [org.codehaus.groovy:groovy-jmx](https://github.com/apache/groovy) | `3.0.21` | `3.0.22` | | [org.codehaus.groovy:groovy-nio](https://github.com/apache/groovy) | `3.0.21` | `3.0.22` | | [org.codehaus.groovy:groovy-groovysh](https://github.com/apache/groovy) | `3.0.21` | `3.0.22` | | [org.codehaus.groovy:groovy-datetime](https://github.com/apache/groovy) | `3.0.21` | `3.0.22` | | [org.codehaus.groovy:groovy-dateutil](https://github.com/apache/groovy) | `3.0.21` | `3.0.22` | | [org.codehaus.groovy:groovy-docgenerator](https://github.com/apache/groovy) | `3.0.21` | `3.0.22` | | [org.codehaus.groovy:groovy-jsr223](https://github.com/apache/groovy) | `3.0.21` | `3.0.22` | | [org.codehaus.groovy:groovy-sql](https://github.com/apache/groovy) | `3.0.21` | `3.0.22` | | [org.codehaus.groovy:groovy-templates](https://github.com/apache/groovy) | `3.0.21` | `3.0.22` | | [org.codehaus.groovy:groovy-yaml](https://github.com/apache/groovy) | `3.0.21` | `3.0.22` | | [com.google.guava:guava](https://github.com/google/guava) | `32.1.2-jre` | `33.2.1-jre` | | org.apache.tomcat:tomcat-dbcp | `9.0.89` | `9.0.90` | | [javax.cache:cache-api](https://github.com/jsr107/jsr107spec) | `1.0.0` | `1.1.1` | | org.glassfish.jaxb:codemodel | `2.3.1` | `2.3.9` | | [com.mysql:mysql-connector-j](https://github.com/mysql/mysql-connector-j) | `8.2.0` | `8.4.0` | | [com.microsoft.sqlserver:mssql-jdbc](https://github.com/Microsoft/mssql-jdbc) | `8.4.1.jre8` | `12.7.0.jre8-preview` | | com.oracle.database.jdbc:ojdbc8 | `19.3.0.0` | `23.4.0.24.05` | | [org.postgresql:postgresql](https://github.com/pgjdbc/pgjdbc) | `42.4.4` | `42.7.3` | | [org.projectlombok:lombok](https://github.com/projectlombok/lombok) | `1.18.32` | `1.18.34` | Updates `org.codehaus.groovy:groovy-bom` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-servlet` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-xml` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-json` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-jmx` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-nio` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-groovysh` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-datetime` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-dateutil` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-docgenerator` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-jsr223` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-sql` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-templates` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-yaml` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-servlet` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-xml` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-json` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-jmx` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-nio` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-groovysh` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-datetime` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-dateutil` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-docgenerator` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-jsr223` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-sql` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-templates` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `org.codehaus.groovy:groovy-yaml` from 3.0.21 to 3.0.22 - [Commits](https://github.com/apache/groovy/commits) Updates `com.google.guava:guava` from 32.1.2-jre to 33.2.1-jre - [Release notes](https://github.com/google/guava/releases) - [Commits](https://github.com/google/guava/commits) Updates `org.apache.tomcat:tomcat-dbcp` from 9.0.89 to 9.0.90 Updates `javax.cache:cache-api` from 1.0.0 to 1.1.1 - [Release notes](https://github.com/jsr107/jsr107spec/releases) - [Commits](https://github.com/jsr107/jsr107spec/compare/v1.0.0...1.1.1) Updates `org.glassfish.jaxb:codemodel` from 2.3.1 to 2.3.9 Updates `com.mysql:mysql-connector-j` from 8.2.0 to 8.4.0 - [Changelog](https://github.com/mysql/mysql-connector-j/blob/release/8.x/CHANGES) - [Commits](https://github.com/mysql/mysql-connector-j/compare/8.2.0...8.4.0) Updates `com.microsoft.sqlserver:mssql-jdbc` from 8.4.1.jre8 to 9.4.1.jre11 - [Release notes](https://github.com/Microsoft/mssql-jdbc/releases) - [Changelog](https://github.com/microsoft/mssql-jdbc/blob/main/CHANGELOG.md) - [Commits](https://github.com/Microsoft/mssql-jdbc/commits) Updates `com.oracle.database.jdbc:ojdbc8` from 19.3.0.0 to 19.23.0.0 Updates `org.postgresql:postgresql` from 42.4.4 to 42.7.3 - [Release notes](https://github.com/pgjdbc/pgjdbc/releases) - [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md) - [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.4.4...REL42.7.3) Updates `org.projectlombok:lombok` from 1.18.32 to 1.18.34 - [Changelog](https://github.com/projectlombok/lombok/blob/master/doc/changelog.markdown) - [Commits](https://github.com/projectlombok/lombok/compare/v1.18.32...v1.18.34) --- updated-dependencies: - dependency-name: org.codehaus.groovy:groovy-bom dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-servlet dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-xml dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-json dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-jmx dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-nio dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-groovysh dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-datetime dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-dateutil dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-docgenerator dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-jsr223 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-sql dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-templates dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-yaml dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-servlet dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-xml dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-json dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-jmx dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-nio dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-groovysh dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-datetime dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-dateutil dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-docgenerator dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-jsr223 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-sql dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-templates dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.codehaus.groovy:groovy-yaml dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: com.google.guava:guava dependency-type: direct:production update-type: version-update:semver-major dependency-group: production-dependencies - dependency-name: org.apache.tomcat:tomcat-dbcp dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: javax.cache:cache-api dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: org.glassfish.jaxb:codemodel dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: com.mysql:mysql-connector-j dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: com.microsoft.sqlserver:mssql-jdbc dependency-type: direct:production update-type: version-update:semver-major dependency-group: production-dependencies - dependency-name: com.oracle.database.jdbc:ojdbc8 dependency-type: direct:production update-type: version-update:semver-major dependency-group: production-dependencies - dependency-name: org.postgresql:postgresql dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: org.projectlombok:lombok dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies ... + chore(dependabot): fix MSSqlServer & Oracle drivers major version --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Emmanuel Duchastenier --- gradle/libs.versions.toml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c9cb3771c9..d99fb540a4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] # The groovy version must be in synch with the bonita-project-parent POM (bonita-project repository): -groovyVersion = "3.0.21" +groovyVersion = "3.0.22" springVersion = "5.3.37" springSessionVersion = "2.7.4" springBootVersion = "2.7.18" @@ -11,7 +11,7 @@ commonsIOVersion = "2.16.1" commonsFileUploadVersion = "1.5" commonsBeanutilsVersion = "1.9.4" commonsCollectionsVersion = "4.4" -tomcatDbcpVersion = "9.0.89" +tomcatDbcpVersion = "9.0.90" commonsCLIVersion = "1.8.0" semver4jVersion = '3.1.0' slf4jVersion = "1.7.36" @@ -34,18 +34,18 @@ jakartaActivationVersion = "1.2.2" quartzVersion = "2.3.2" micrometerVersion = "1.13.1" # DB drivers: -mysqlVersion = "8.2.0" -msSqlServerVersion = "8.4.1.jre8" -oracleVersion = "19.3.0.0" -postgresqlVersion = "42.4.4" +mysqlVersion = "8.4.0" +msSqlServerVersion = "9.4.1.jre11" +oracleVersion = "19.23.0.0" +postgresqlVersion = "42.7.3" narayanaVersion = "5.10.6.Final" logbackVersion = "1.2.13" -jaxbVersion = "2.3.1" +jaxbVersion = "2.3.9" javaxAnnotationsVersion = "1.3.2" hazelcastVersion = "5.4.0" -jcacheVersion = "1.0.0" -guavaVersion = "32.1.2-jre" +jcacheVersion = "1.1.1" +guavaVersion = "33.2.1-jre" antlr4RuntimeVersion = "4.7.2" [libraries] @@ -146,7 +146,7 @@ msSqlServer = { group = "com.microsoft.sqlserver", name = "mssql-jdbc", version. oracle = { group = "com.oracle.database.jdbc", name = "ojdbc8", version.ref = "oracleVersion" } postgresql = { group = "org.postgresql", name = "postgresql", version.ref = "postgresqlVersion" } -lombok = "org.projectlombok:lombok:1.18.32" +lombok = "org.projectlombok:lombok:1.18.34" logback = { group = "ch.qos.logback", name = "logback-classic", version.ref = "logbackVersion" } From c7b7bf2fcf0480846e3e306d1f1abba9b21a9a15 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 16:13:25 +0200 Subject: [PATCH 04/24] chore(deps): bump com.microsoft.sqlserver:mssql-jdbc from 9.4.1.jre11 to 9.5.0.jre11-preview in /community in the production-dependencies group (#3063) Bumps the production-dependencies group in /community with 1 update: [com.microsoft.sqlserver:mssql-jdbc](https://github.com/Microsoft/mssql-jdbc). Updates `com.microsoft.sqlserver:mssql-jdbc` from 9.4.1.jre11 to 9.5.0.jre11-preview - [Release notes](https://github.com/Microsoft/mssql-jdbc/releases) - [Changelog](https://github.com/microsoft/mssql-jdbc/blob/main/CHANGELOG.md) - [Commits](https://github.com/Microsoft/mssql-jdbc/commits) --- updated-dependencies: - dependency-name: com.microsoft.sqlserver:mssql-jdbc dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d99fb540a4..1f4e245aa8 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ quartzVersion = "2.3.2" micrometerVersion = "1.13.1" # DB drivers: mysqlVersion = "8.4.0" -msSqlServerVersion = "9.4.1.jre11" +msSqlServerVersion = "9.5.0.jre11-preview" oracleVersion = "19.23.0.0" postgresqlVersion = "42.7.3" From 7e4ce39c093758e42aab50ff2be648abff377a66 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 14:08:51 +0200 Subject: [PATCH 05/24] chore(l10n) update translations (#3059) Co-authored-by: bonita-ci --- .../src/main/resources/i18n/portal-js_es.po | 4 ++-- .../src/main/resources/i18n/portal-js_fr.po | 4 ++-- .../src/main/resources/i18n/portal-js_ja.po | 4 ++-- .../src/main/resources/i18n/portal-js_pt_BR.po | 4 ++-- .../src/main/resources/i18n/portal_es.po | 8 ++++---- .../src/main/resources/i18n/portal_fr.po | 6 +++--- .../src/main/resources/i18n/portal_ja.po | 6 +++--- .../src/main/resources/i18n/portal_pt_BR.po | 6 +++--- .../src/main/resources/i18n/resources_es.po | 4 ++-- .../src/main/resources/i18n/resources_fr.po | 4 ++-- .../src/main/resources/i18n/resources_ja.po | 4 ++-- .../src/main/resources/i18n/resources_pt_BR.po | 4 ++-- 12 files changed, 29 insertions(+), 29 deletions(-) diff --git a/bpm/bonita-web-server/src/main/resources/i18n/portal-js_es.po b/bpm/bonita-web-server/src/main/resources/i18n/portal-js_es.po index 69eb71b23c..78280f2008 100644 --- a/bpm/bonita-web-server/src/main/resources/i18n/portal-js_es.po +++ b/bpm/bonita-web-server/src/main/resources/i18n/portal-js_es.po @@ -7,8 +7,8 @@ msgstr "" "X-Crowdin-Project: bonita\n" "X-Crowdin-Project-ID: 13316\n" "X-Crowdin-Language: es-ES\n" -"X-Crowdin-File: /master/bonita-web/portal/portal-js.pot\n" -"X-Crowdin-File-ID: 61810\n" +"X-Crowdin-File: /dev/bonita-web/portal/portal-js.pot\n" +"X-Crowdin-File-ID: 60594\n" "Language-Team: Spanish\n" "Language: es_ES\n" "PO-Revision-Date: 2024-01-01 00:00\n" diff --git a/bpm/bonita-web-server/src/main/resources/i18n/portal-js_fr.po b/bpm/bonita-web-server/src/main/resources/i18n/portal-js_fr.po index f2f34430ec..3f9d62b53a 100644 --- a/bpm/bonita-web-server/src/main/resources/i18n/portal-js_fr.po +++ b/bpm/bonita-web-server/src/main/resources/i18n/portal-js_fr.po @@ -7,8 +7,8 @@ msgstr "" "X-Crowdin-Project: bonita\n" "X-Crowdin-Project-ID: 13316\n" "X-Crowdin-Language: fr\n" -"X-Crowdin-File: /master/bonita-web/portal/portal-js.pot\n" -"X-Crowdin-File-ID: 61810\n" +"X-Crowdin-File: /dev/bonita-web/portal/portal-js.pot\n" +"X-Crowdin-File-ID: 60594\n" "Language-Team: French\n" "Language: fr_FR\n" "PO-Revision-Date: 2024-01-01 00:00\n" diff --git a/bpm/bonita-web-server/src/main/resources/i18n/portal-js_ja.po b/bpm/bonita-web-server/src/main/resources/i18n/portal-js_ja.po index 52f3012f11..5ae5a10e44 100644 --- a/bpm/bonita-web-server/src/main/resources/i18n/portal-js_ja.po +++ b/bpm/bonita-web-server/src/main/resources/i18n/portal-js_ja.po @@ -7,8 +7,8 @@ msgstr "" "X-Crowdin-Project: bonita\n" "X-Crowdin-Project-ID: 13316\n" "X-Crowdin-Language: ja\n" -"X-Crowdin-File: /master/bonita-web/portal/portal-js.pot\n" -"X-Crowdin-File-ID: 61810\n" +"X-Crowdin-File: /dev/bonita-web/portal/portal-js.pot\n" +"X-Crowdin-File-ID: 60594\n" "Language-Team: Japanese\n" "Language: ja_JP\n" "PO-Revision-Date: 2024-01-01 00:00\n" diff --git a/bpm/bonita-web-server/src/main/resources/i18n/portal-js_pt_BR.po b/bpm/bonita-web-server/src/main/resources/i18n/portal-js_pt_BR.po index 570c92b715..6752f0499c 100644 --- a/bpm/bonita-web-server/src/main/resources/i18n/portal-js_pt_BR.po +++ b/bpm/bonita-web-server/src/main/resources/i18n/portal-js_pt_BR.po @@ -7,8 +7,8 @@ msgstr "" "X-Crowdin-Project: bonita\n" "X-Crowdin-Project-ID: 13316\n" "X-Crowdin-Language: pt-BR\n" -"X-Crowdin-File: /master/bonita-web/portal/portal-js.pot\n" -"X-Crowdin-File-ID: 61810\n" +"X-Crowdin-File: /dev/bonita-web/portal/portal-js.pot\n" +"X-Crowdin-File-ID: 60594\n" "Language-Team: Portuguese, Brazilian\n" "Language: pt_BR\n" "PO-Revision-Date: 2024-01-01 00:00\n" diff --git a/bpm/bonita-web-server/src/main/resources/i18n/portal_es.po b/bpm/bonita-web-server/src/main/resources/i18n/portal_es.po index ef6bce1d07..84a53e7945 100644 --- a/bpm/bonita-web-server/src/main/resources/i18n/portal_es.po +++ b/bpm/bonita-web-server/src/main/resources/i18n/portal_es.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: bonita\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-01 14:32+0000\n" +"POT-Creation-Date: 2024-04-01 14:34+0000\n" "PO-Revision-Date: 2024-01-01 00:00\n" "Last-Translator: \n" "Language-Team: Spanish\n" @@ -14,8 +14,8 @@ msgstr "" "X-Crowdin-Project: bonita\n" "X-Crowdin-Project-ID: 13316\n" "X-Crowdin-Language: es-ES\n" -"X-Crowdin-File: /master/bonita-web/portal/portal.po\n" -"X-Crowdin-File-ID: 61797\n" +"X-Crowdin-File: /dev/bonita-web/portal/portal.po\n" +"X-Crowdin-File-ID: 60581\n" msgid "%attribute% file format is not allowed. Only %file_formats% files are allowed." msgstr "%attribute% formato de archivo no permitido. Sólo se permiten archivos %file_formats%." @@ -27,7 +27,7 @@ msgid "%attribute% is mandatory" msgstr "%attribute% es obligatorio" msgid "%attribute% is not a valid Color value" -msgstr "%attribute% no es un Color válido" +msgstr "%attribute% no es un Color válido" msgid "%attribute% is not a valid URL" msgstr "%attribute% no es una URL valida" diff --git a/bpm/bonita-web-server/src/main/resources/i18n/portal_fr.po b/bpm/bonita-web-server/src/main/resources/i18n/portal_fr.po index b09048db34..434ab7111c 100644 --- a/bpm/bonita-web-server/src/main/resources/i18n/portal_fr.po +++ b/bpm/bonita-web-server/src/main/resources/i18n/portal_fr.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: bonita\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-01 14:32+0000\n" +"POT-Creation-Date: 2024-04-01 14:34+0000\n" "PO-Revision-Date: 2024-01-01 00:00\n" "Last-Translator: \n" "Language-Team: French\n" @@ -14,8 +14,8 @@ msgstr "" "X-Crowdin-Project: bonita\n" "X-Crowdin-Project-ID: 13316\n" "X-Crowdin-Language: fr\n" -"X-Crowdin-File: /master/bonita-web/portal/portal.po\n" -"X-Crowdin-File-ID: 61797\n" +"X-Crowdin-File: /dev/bonita-web/portal/portal.po\n" +"X-Crowdin-File-ID: 60581\n" msgid "%attribute% file format is not allowed. Only %file_formats% files are allowed." msgstr "le format de fichier %attribute% n'est pas autorisé. Utiliser les fichiers de format %file_formats%." diff --git a/bpm/bonita-web-server/src/main/resources/i18n/portal_ja.po b/bpm/bonita-web-server/src/main/resources/i18n/portal_ja.po index 355be74fb9..849a9dfffe 100644 --- a/bpm/bonita-web-server/src/main/resources/i18n/portal_ja.po +++ b/bpm/bonita-web-server/src/main/resources/i18n/portal_ja.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: bonita\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-01 14:32+0000\n" +"POT-Creation-Date: 2024-04-01 14:34+0000\n" "PO-Revision-Date: 2024-01-01 00:00\n" "Last-Translator: \n" "Language-Team: Japanese\n" @@ -14,8 +14,8 @@ msgstr "" "X-Crowdin-Project: bonita\n" "X-Crowdin-Project-ID: 13316\n" "X-Crowdin-Language: ja\n" -"X-Crowdin-File: /master/bonita-web/portal/portal.po\n" -"X-Crowdin-File-ID: 61797\n" +"X-Crowdin-File: /dev/bonita-web/portal/portal.po\n" +"X-Crowdin-File-ID: 60581\n" msgid "%attribute% file format is not allowed. Only %file_formats% files are allowed." msgstr "%attribute% ファイルの形式は許可されていません。%file_formats%のファイルのみが許可されます。" diff --git a/bpm/bonita-web-server/src/main/resources/i18n/portal_pt_BR.po b/bpm/bonita-web-server/src/main/resources/i18n/portal_pt_BR.po index 84477db031..36e35621d8 100644 --- a/bpm/bonita-web-server/src/main/resources/i18n/portal_pt_BR.po +++ b/bpm/bonita-web-server/src/main/resources/i18n/portal_pt_BR.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: bonita\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-01 14:32+0000\n" +"POT-Creation-Date: 2024-04-01 14:34+0000\n" "PO-Revision-Date: 2024-01-01 00:00\n" "Last-Translator: \n" "Language-Team: Portuguese, Brazilian\n" @@ -14,8 +14,8 @@ msgstr "" "X-Crowdin-Project: bonita\n" "X-Crowdin-Project-ID: 13316\n" "X-Crowdin-Language: pt-BR\n" -"X-Crowdin-File: /master/bonita-web/portal/portal.po\n" -"X-Crowdin-File-ID: 61797\n" +"X-Crowdin-File: /dev/bonita-web/portal/portal.po\n" +"X-Crowdin-File-ID: 60581\n" msgid "%attribute% file format is not allowed. Only %file_formats% files are allowed." msgstr "formato de arquivo %attribute% não é permitido. Apenas arquivos %file_formats% são permitidos." diff --git a/bpm/bonita-web-server/src/main/resources/i18n/resources_es.po b/bpm/bonita-web-server/src/main/resources/i18n/resources_es.po index e14dc691c1..ced556c456 100644 --- a/bpm/bonita-web-server/src/main/resources/i18n/resources_es.po +++ b/bpm/bonita-web-server/src/main/resources/i18n/resources_es.po @@ -7,8 +7,8 @@ msgstr "" "X-Crowdin-Project: bonita\n" "X-Crowdin-Project-ID: 13316\n" "X-Crowdin-Language: es-ES\n" -"X-Crowdin-File: /master/bonita-web/distrib/resources.pot\n" -"X-Crowdin-File-ID: 61816\n" +"X-Crowdin-File: /dev/bonita-web/distrib/resources.pot\n" +"X-Crowdin-File-ID: 61547\n" "Language-Team: Spanish\n" "Language: es_ES\n" "PO-Revision-Date: 2024-01-01 00:00\n" diff --git a/bpm/bonita-web-server/src/main/resources/i18n/resources_fr.po b/bpm/bonita-web-server/src/main/resources/i18n/resources_fr.po index c0646c1ad9..cf52157c45 100644 --- a/bpm/bonita-web-server/src/main/resources/i18n/resources_fr.po +++ b/bpm/bonita-web-server/src/main/resources/i18n/resources_fr.po @@ -7,8 +7,8 @@ msgstr "" "X-Crowdin-Project: bonita\n" "X-Crowdin-Project-ID: 13316\n" "X-Crowdin-Language: fr\n" -"X-Crowdin-File: /master/bonita-web/distrib/resources.pot\n" -"X-Crowdin-File-ID: 61816\n" +"X-Crowdin-File: /dev/bonita-web/distrib/resources.pot\n" +"X-Crowdin-File-ID: 61547\n" "Language-Team: French\n" "Language: fr_FR\n" "PO-Revision-Date: 2024-01-01 00:00\n" diff --git a/bpm/bonita-web-server/src/main/resources/i18n/resources_ja.po b/bpm/bonita-web-server/src/main/resources/i18n/resources_ja.po index ddf78aadb0..31f5200e0d 100644 --- a/bpm/bonita-web-server/src/main/resources/i18n/resources_ja.po +++ b/bpm/bonita-web-server/src/main/resources/i18n/resources_ja.po @@ -7,8 +7,8 @@ msgstr "" "X-Crowdin-Project: bonita\n" "X-Crowdin-Project-ID: 13316\n" "X-Crowdin-Language: ja\n" -"X-Crowdin-File: /master/bonita-web/distrib/resources.pot\n" -"X-Crowdin-File-ID: 61816\n" +"X-Crowdin-File: /dev/bonita-web/distrib/resources.pot\n" +"X-Crowdin-File-ID: 61547\n" "Language-Team: Japanese\n" "Language: ja_JP\n" "PO-Revision-Date: 2024-01-01 00:00\n" diff --git a/bpm/bonita-web-server/src/main/resources/i18n/resources_pt_BR.po b/bpm/bonita-web-server/src/main/resources/i18n/resources_pt_BR.po index e2775e6ab4..939d70942e 100644 --- a/bpm/bonita-web-server/src/main/resources/i18n/resources_pt_BR.po +++ b/bpm/bonita-web-server/src/main/resources/i18n/resources_pt_BR.po @@ -7,8 +7,8 @@ msgstr "" "X-Crowdin-Project: bonita\n" "X-Crowdin-Project-ID: 13316\n" "X-Crowdin-Language: pt-BR\n" -"X-Crowdin-File: /master/bonita-web/distrib/resources.pot\n" -"X-Crowdin-File-ID: 61816\n" +"X-Crowdin-File: /dev/bonita-web/distrib/resources.pot\n" +"X-Crowdin-File-ID: 61547\n" "Language-Team: Portuguese, Brazilian\n" "Language: pt_BR\n" "PO-Revision-Date: 2024-01-01 00:00\n" From e00fa57f870fce1afbb2d7f62db2d8f7aa498864 Mon Sep 17 00:00:00 2001 From: Romain Bioteau Date: Mon, 8 Jul 2024 13:51:02 +0200 Subject: [PATCH 06/24] chore(deps): sqlserver driver now force encryption by default (#3075) --- .../gradle/docker/DockerDatabaseContainerTasksCreator.groovy | 2 +- gradle/libs.versions.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/groovy/org/bonitasoft/engine/gradle/docker/DockerDatabaseContainerTasksCreator.groovy b/buildSrc/src/main/groovy/org/bonitasoft/engine/gradle/docker/DockerDatabaseContainerTasksCreator.groovy index f8c27280b5..948966168d 100644 --- a/buildSrc/src/main/groovy/org/bonitasoft/engine/gradle/docker/DockerDatabaseContainerTasksCreator.groovy +++ b/buildSrc/src/main/groovy/org/bonitasoft/engine/gradle/docker/DockerDatabaseContainerTasksCreator.groovy @@ -53,7 +53,7 @@ class DockerDatabaseContainerTasksCreator { [name : 'sqlserver', image : 'bonitasoft/bonita-sqlserver:2022-CU4', portBinding: 1433, - uriTemplate: 'jdbc:sqlserver://%s:%s;database=%s', + uriTemplate: 'jdbc:sqlserver://%s:%s;database=%s;encrypt=false', ] ] diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1f4e245aa8..9a9d0575fa 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ quartzVersion = "2.3.2" micrometerVersion = "1.13.1" # DB drivers: mysqlVersion = "8.4.0" -msSqlServerVersion = "9.5.0.jre11-preview" +msSqlServerVersion = "12.6.3.jre11" oracleVersion = "19.23.0.0" postgresqlVersion = "42.7.3" From 1666b2bead73a3e3ad4f04b23d4ba2c0eb626d20 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 08:00:40 +0000 Subject: [PATCH 07/24] chore(deps): bump the production-dependencies group across 1 directory with 2 updates (#3078) --- bonita-engine/build.gradle | 9 ++++++++- gradle/libs.versions.toml | 6 +++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/bonita-engine/build.gradle b/bonita-engine/build.gradle index a091b5b582..abc74dca1d 100644 --- a/bonita-engine/build.gradle +++ b/bonita-engine/build.gradle @@ -48,7 +48,14 @@ dependencyManagement { entry 'httpmime' } dependency libs.xstream.get() as String - dependency libs.tomcatDbcp.get() as String + dependencySet(group: 'org.apache.tomcat', version: libs.versions.tomcatVersion.get()) { + entry 'tomcat-dbcp' + entry 'tomcat' + entry 'tomcat-catalina' + } + dependencySet(group: 'org.apache.tomcat.embed', version: libs.versions.tomcatVersion.get()) { + entry 'tomcat-embed-core' + } dependency libs.narayanaJta.get() as String dependency libs.jakartaActivation.get() as String dependency(libs.quartz.get() as String) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9a9d0575fa..eb620e6785 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -11,7 +11,7 @@ commonsIOVersion = "2.16.1" commonsFileUploadVersion = "1.5" commonsBeanutilsVersion = "1.9.4" commonsCollectionsVersion = "4.4" -tomcatDbcpVersion = "9.0.90" +tomcatVersion = "9.0.91" commonsCLIVersion = "1.8.0" semver4jVersion = '3.1.0' slf4jVersion = "1.7.36" @@ -21,7 +21,7 @@ hibernateVersion = "5.4.33" javassistVersion = "3.27.0-GA" # javax.persistence-api is used by hibernate: javaxPersistenceApiVersion = "2.2" -jacksonBomVersion = "2.17.1" +jacksonBomVersion = "2.17.2" jakartaTransactionVersion = "1.3.3" jakartaServletVersion = "4.0.4" # Keep this until all client projects have migrated to jakarta or it will break their builds ! @@ -103,7 +103,7 @@ commonsIO = { group = "commons-io", name = "commons-io", version.ref = "commonsI commonsFileUpload = { group = "commons-fileupload", name = "commons-fileupload", version.ref = "commonsFileUploadVersion" } commonsBeanUtils = { group = "commons-beanutils", name = "commons-beanutils", version.ref = "commonsBeanutilsVersion" } commonsCollections = { group = "org.apache.commons", name = "commons-collections4", version.ref = "commonsCollectionsVersion" } -tomcatDbcp = { group = "org.apache.tomcat", name = "tomcat-dbcp", version.ref = "tomcatDbcpVersion" } +tomcatDbcp = { group = "org.apache.tomcat", name = "tomcat-dbcp", version.ref = "tomcatVersion" } commonsCLI = { group = "commons-cli", name = "commons-cli", version.ref = "commonsCLIVersion" } semver4j = { group = "com.vdurmont", name = "semver4j", version.ref = "semver4jVersion" } slf4jApi = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4jVersion" } From 4d369062b5a7110dfce2935fa76c23d25bdb0717 Mon Sep 17 00:00:00 2001 From: Romain Bioteau Date: Tue, 9 Jul 2024 14:39:24 +0200 Subject: [PATCH 08/24] chore(deps): revert sqlserver drive version --- .../gradle/docker/DockerDatabaseContainerTasksCreator.groovy | 2 +- gradle/libs.versions.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/groovy/org/bonitasoft/engine/gradle/docker/DockerDatabaseContainerTasksCreator.groovy b/buildSrc/src/main/groovy/org/bonitasoft/engine/gradle/docker/DockerDatabaseContainerTasksCreator.groovy index 948966168d..f8c27280b5 100644 --- a/buildSrc/src/main/groovy/org/bonitasoft/engine/gradle/docker/DockerDatabaseContainerTasksCreator.groovy +++ b/buildSrc/src/main/groovy/org/bonitasoft/engine/gradle/docker/DockerDatabaseContainerTasksCreator.groovy @@ -53,7 +53,7 @@ class DockerDatabaseContainerTasksCreator { [name : 'sqlserver', image : 'bonitasoft/bonita-sqlserver:2022-CU4', portBinding: 1433, - uriTemplate: 'jdbc:sqlserver://%s:%s;database=%s;encrypt=false', + uriTemplate: 'jdbc:sqlserver://%s:%s;database=%s', ] ] diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index eb620e6785..75bc5ec86e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ quartzVersion = "2.3.2" micrometerVersion = "1.13.1" # DB drivers: mysqlVersion = "8.4.0" -msSqlServerVersion = "12.6.3.jre11" +msSqlServerVersion = "9.4.1.jre11" oracleVersion = "19.23.0.0" postgresqlVersion = "42.7.3" From b42931c892d6450670f3517765f9306379dc1d90 Mon Sep 17 00:00:00 2001 From: Romain Bioteau Date: Fri, 12 Jul 2024 10:04:39 +0200 Subject: [PATCH 09/24] feat(contract): clean content of archived FileInput contract (#3079) In order to save space in database, we decided to remove the binary content of archived FileInput contract data. (arch_contract_data) These are not accessible through APIs, anyway. Relates to PROD-137 --- .../bpm/process/DeleteProcessInstancesIT.java | 31 ++++++++++++++----- .../engine/test/CommonAPILocalIT.java | 6 ++++ .../bonita-contract-data/build.gradle | 8 +++-- .../data/ContractDataServiceImpl.java | 3 +- .../core/contract/data/SAContractData.java | 20 ++++++++++-- .../data/SAProcessContractDataTest.java | 27 ++++++++++++---- 6 files changed, 75 insertions(+), 20 deletions(-) diff --git a/bonita-integration-tests/bonita-integration-tests-local/src/test/java/org/bonitasoft/engine/bpm/process/DeleteProcessInstancesIT.java b/bonita-integration-tests/bonita-integration-tests-local/src/test/java/org/bonitasoft/engine/bpm/process/DeleteProcessInstancesIT.java index f3784f756f..ed03e448b1 100644 --- a/bonita-integration-tests/bonita-integration-tests-local/src/test/java/org/bonitasoft/engine/bpm/process/DeleteProcessInstancesIT.java +++ b/bonita-integration-tests/bonita-integration-tests-local/src/test/java/org/bonitasoft/engine/bpm/process/DeleteProcessInstancesIT.java @@ -14,21 +14,22 @@ package org.bonitasoft.engine.bpm.process; import static java.util.Arrays.asList; +import static java.util.Map.entry; +import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.SoftAssertions.assertSoftly; +import static org.awaitility.Awaitility.await; import static org.bonitasoft.engine.data.instance.api.DataInstanceContainer.ACTIVITY_INSTANCE; import static org.bonitasoft.engine.data.instance.api.DataInstanceContainer.PROCESS_INSTANCE; import static org.junit.Assert.fail; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.concurrent.Callable; +import java.util.*; import org.bonitasoft.engine.bpm.bar.BarResource; import org.bonitasoft.engine.bpm.bar.BusinessArchiveBuilder; import org.bonitasoft.engine.bpm.bar.actorMapping.Actor; import org.bonitasoft.engine.bpm.bar.actorMapping.ActorMapping; import org.bonitasoft.engine.bpm.connector.ConnectorEvent; +import org.bonitasoft.engine.bpm.contract.FileInputValue; import org.bonitasoft.engine.bpm.contract.Type; import org.bonitasoft.engine.bpm.document.DocumentValue; import org.bonitasoft.engine.bpm.process.impl.ProcessDefinitionBuilder; @@ -64,7 +65,17 @@ public void should_delete_complete_archived_process_instances() throws Exception List userTaskInstances = new ArrayList<>(); for (int i = 0; i < 2; i++) { long id = getProcessAPI().startProcessWithInputs(mainProcess.getId(), - Collections.singletonMap("simpleInput1", "singleInputValue")).getId(); + Map.ofEntries(entry("simpleInput1", "singleInputValue"), + entry("myFile", new FileInputValue("testFile", "testFile".getBytes())))) + .getId(); + var archivedFileInput = await().until(() -> inTx( + () -> getServiceAccessor().getContractDataService().getArchivedProcessDataValue(id, "myFile")), + Objects::nonNull); + assertThat(archivedFileInput) + .as("File input content of archived contract data should be null") + .isInstanceOf(FileInputValue.class) + .extracting("content") + .isNull(); long userTask1 = waitForUserTask(id, "userTask1"); userTaskInstances.add(userTask1); getProcessAPI().assignUserTask(userTask1, user.getId()); @@ -80,7 +91,7 @@ public void should_delete_complete_archived_process_instances() throws Exception getProcessAPI().deleteArchivedProcessInstancesInAllStates(processInstances); - getServiceAccessor().getUserTransactionService().executeInTransaction((Callable) () -> { + inTx(() -> { for (Long userTaskInstance : userTaskInstances) { try { getServiceAccessor().getContractDataService().getArchivedUserTaskDataValue(userTaskInstance, @@ -139,7 +150,9 @@ public void should_delete_process_instance_currently_executing() throws Exceptio ProcessDefinition sub2 = createSubProcessDefinitionWithUserTask(user); long id = getProcessAPI().startProcessWithInputs(mainProcess.getId(), - Collections.singletonMap("simpleInput1", "singleInputValue")).getId(); + Map.ofEntries(entry("simpleInput1", "singleInputValue"), + entry("myFile", new FileInputValue("testFile", "testFile".getBytes())))) + .getId(); waitForUserTask(id, "userTask1"); waitForUserTask("taskOfSubProcess"); waitForUserTask("taskOfSubProcess"); @@ -183,7 +196,9 @@ protected List getAllFlowNodes() throws Exception { protected ProcessDefinition createMainProcessDefinition() throws Exception { ProcessDefinitionBuilder mainProcessBuilder = new ProcessDefinitionBuilder() .createNewInstance("mainProcess", "1.0"); - mainProcessBuilder.addContract().addInput("simpleInput1", Type.TEXT, "a simple input"); + mainProcessBuilder.addContract() + .addInput("simpleInput1", Type.TEXT, "a simple input") + .addFileInput("myFile", "A file input"); mainProcessBuilder.addActor("actor"); mainProcessBuilder.addUserTask("userTask1", "actor").addContract().addInput("simpleInputTask", Type.TEXT, "a simple task input"); diff --git a/bonita-integration-tests/bonita-integration-tests-local/src/test/java/org/bonitasoft/engine/test/CommonAPILocalIT.java b/bonita-integration-tests/bonita-integration-tests-local/src/test/java/org/bonitasoft/engine/test/CommonAPILocalIT.java index 532f2ee044..9713426faa 100644 --- a/bonita-integration-tests/bonita-integration-tests-local/src/test/java/org/bonitasoft/engine/test/CommonAPILocalIT.java +++ b/bonita-integration-tests/bonita-integration-tests-local/src/test/java/org/bonitasoft/engine/test/CommonAPILocalIT.java @@ -13,6 +13,8 @@ **/ package org.bonitasoft.engine.test; +import java.util.concurrent.Callable; + import org.bonitasoft.engine.CommonAPIIT; import org.bonitasoft.engine.exception.BonitaRuntimeException; import org.bonitasoft.engine.service.ServiceAccessor; @@ -44,4 +46,8 @@ protected static void cleanSession() throws Exception { sessionAccessor.deleteSessionId(); } + protected T inTx(Callable callable) throws Exception { + return getServiceAccessor().getUserTransactionService().executeInTransaction(callable); + } + } diff --git a/bpm/bonita-core/bonita-contract-data/build.gradle b/bpm/bonita-core/bonita-contract-data/build.gradle index 9f6f88764d..23c7b74d3a 100644 --- a/bpm/bonita-core/bonita-contract-data/build.gradle +++ b/bpm/bonita-core/bonita-contract-data/build.gradle @@ -6,10 +6,14 @@ dependencies { api project(':services:bonita-log') api project(':services:bonita-archive') api project(':services:bonita-persistence') - testImplementation "junit:junit:${Deps.junit4Version}" + implementation platform(libs.bonitaArtifactsModelBom) + implementation 'org.bonitasoft.engine:bonita-process-definition-model' testImplementation "org.assertj:assertj-core:${Deps.assertjVersion}" testImplementation "org.mockito:mockito-core:${Deps.mockitoVersion}" - + testImplementation libs.junit5api + testImplementation libs.junit4 + testRuntimeOnly(libs.junitJupiterEngine) + testRuntimeOnly(libs.junitVintageEngine) annotationProcessor libs.lombok compileOnly libs.lombok } diff --git a/bpm/bonita-core/bonita-contract-data/src/main/java/org/bonitasoft/engine/core/contract/data/ContractDataServiceImpl.java b/bpm/bonita-core/bonita-contract-data/src/main/java/org/bonitasoft/engine/core/contract/data/ContractDataServiceImpl.java index ebc8dc6faa..45de62692b 100644 --- a/bpm/bonita-core/bonita-contract-data/src/main/java/org/bonitasoft/engine/core/contract/data/ContractDataServiceImpl.java +++ b/bpm/bonita-core/bonita-contract-data/src/main/java/org/bonitasoft/engine/core/contract/data/ContractDataServiceImpl.java @@ -351,7 +351,8 @@ public Serializable getArchivedProcessDataValue(final long processInstanceId, fi final SAProcessContractData contractData = readPersistenceService.selectOne(descriptor); if (contractData == null) { throw new SContractDataNotFoundException( - "No contract data found named: " + dataName + " of process instance: " + processInstanceId); + "No archived contract data found named: " + dataName + " of process instance: " + + processInstanceId); } return contractData.getValue(); } diff --git a/bpm/bonita-core/bonita-contract-data/src/main/java/org/bonitasoft/engine/core/contract/data/SAContractData.java b/bpm/bonita-core/bonita-contract-data/src/main/java/org/bonitasoft/engine/core/contract/data/SAContractData.java index 4b14c2f8be..bca70b1243 100644 --- a/bpm/bonita-core/bonita-contract-data/src/main/java/org/bonitasoft/engine/core/contract/data/SAContractData.java +++ b/bpm/bonita-core/bonita-contract-data/src/main/java/org/bonitasoft/engine/core/contract/data/SAContractData.java @@ -20,6 +20,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; +import org.bonitasoft.engine.bpm.contract.FileInputValue; import org.bonitasoft.engine.persistence.PersistentObject; import org.bonitasoft.engine.persistence.PersistentObjectId; import org.bonitasoft.engine.persistence.SAPersistenceObjectImpl; @@ -46,14 +47,27 @@ public abstract class SAContractData extends SAPersistenceObjectImpl { @Column protected long scopeId; - public SAContractData(long sourceObjectId, String name, Serializable value, long scopeId) { + protected SAContractData(long sourceObjectId, String name, Serializable value, long scopeId) { super(sourceObjectId); this.name = name; this.scopeId = scopeId; - this.value = value; + this.value = clearFileInputContent(value); } - public SAContractData(SContractData contractData) { + /** + * Remove the {@link FileInputValue} content from Archived Contract Data + * + * @param value, The contract input value + * @return The contract input value without file content in case of a {@link FileInputValue} + */ + private static Serializable clearFileInputContent(Serializable value) { + if (value instanceof FileInputValue inputValue) { + inputValue.setContent(null); + } + return value; + } + + protected SAContractData(SContractData contractData) { this(contractData.getId(), contractData.getName(), contractData.getValue(), contractData.getScopeId()); } diff --git a/bpm/bonita-core/bonita-contract-data/src/test/java/org/bonitasoft/engine/core/contract/data/SAProcessContractDataTest.java b/bpm/bonita-core/bonita-contract-data/src/test/java/org/bonitasoft/engine/core/contract/data/SAProcessContractDataTest.java index bea12c43d0..52a1fa05b6 100644 --- a/bpm/bonita-core/bonita-contract-data/src/test/java/org/bonitasoft/engine/core/contract/data/SAProcessContractDataTest.java +++ b/bpm/bonita-core/bonita-contract-data/src/test/java/org/bonitasoft/engine/core/contract/data/SAProcessContractDataTest.java @@ -15,12 +15,27 @@ import static org.assertj.core.api.Assertions.assertThat; -import org.junit.Test; +import org.bonitasoft.engine.bpm.contract.FileInputValue; +import org.junit.jupiter.api.Test; -public class SAProcessContractDataTest { +class SAProcessContractDataTest { @Test - public void creatingSAProcessContractDataShouldCopyNonArchivedValues() throws Exception { + void clearFileInputContent() { + var contractData = new SProcessContractData(); + contractData.setId(1); + contractData.setName("myFile"); + contractData.setValue(new FileInputValue("theFile", "content".getBytes())); + + var archivedContractData = new SAProcessContractData(contractData); + + assertThat(archivedContractData.getValue()).isInstanceOf(FileInputValue.class) + .extracting("content") + .isNull(); + } + + @Test + void creatingSAProcessContractDataShouldCopyNonArchivedValues() { long processInstanceId = 555L; String some_name = "some_name"; long value = 999999L; @@ -31,11 +46,11 @@ public void creatingSAProcessContractDataShouldCopyNonArchivedValues() throws Ex final SAProcessContractData saProcessContractData = new SAProcessContractData(processContractData); - assertThat(saProcessContractData.getTenantId()).isEqualTo(0L); // not set yet by Persistence service - assertThat(saProcessContractData.getId()).isEqualTo(0L); + assertThat(saProcessContractData.getTenantId()).isZero(); // not set yet by Persistence service + assertThat(saProcessContractData.getId()).isZero(); assertThat(saProcessContractData.getName()).isEqualTo(some_name); assertThat(saProcessContractData.getScopeId()).isEqualTo(processInstanceId); - assertThat(saProcessContractData.getArchiveDate()).isEqualTo(0L); + assertThat(saProcessContractData.getArchiveDate()).isZero(); assertThat(saProcessContractData.getSourceObjectId()).isEqualTo(originalProcessDataId); assertThat(saProcessContractData.getValue()).isEqualTo(value); } From 1a6cd72bb511ae1e3c89190653c24d0634b22f39 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 09:15:58 +0200 Subject: [PATCH 10/24] chore(deps): bump the production-dependencies group across 1 directory with 3 updates (#3090) Bumps the production-dependencies group with 3 updates in the /community directory: [io.micrometer:micrometer-core](https://github.com/micrometer-metrics/micrometer), [io.micrometer:micrometer-registry-jmx](https://github.com/micrometer-metrics/micrometer) and [io.micrometer:micrometer-registry-prometheus](https://github.com/micrometer-metrics/micrometer). Updates `io.micrometer:micrometer-core` from 1.13.1 to 1.13.2 - [Release notes](https://github.com/micrometer-metrics/micrometer/releases) - [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.13.1...v1.13.2) Updates `io.micrometer:micrometer-registry-jmx` from 1.13.1 to 1.13.2 - [Release notes](https://github.com/micrometer-metrics/micrometer/releases) - [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.13.1...v1.13.2) Updates `io.micrometer:micrometer-registry-prometheus` from 1.13.1 to 1.13.2 - [Release notes](https://github.com/micrometer-metrics/micrometer/releases) - [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.13.1...v1.13.2) Updates `io.micrometer:micrometer-registry-jmx` from 1.13.1 to 1.13.2 - [Release notes](https://github.com/micrometer-metrics/micrometer/releases) - [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.13.1...v1.13.2) Updates `io.micrometer:micrometer-registry-prometheus` from 1.13.1 to 1.13.2 - [Release notes](https://github.com/micrometer-metrics/micrometer/releases) - [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.13.1...v1.13.2) --- updated-dependencies: - dependency-name: io.micrometer:micrometer-core dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: io.micrometer:micrometer-registry-jmx dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: io.micrometer:micrometer-registry-prometheus dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: io.micrometer:micrometer-registry-jmx dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: io.micrometer:micrometer-registry-prometheus dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 382affb2cf..cbfacde24b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -32,7 +32,7 @@ ehCacheVersion = "2.10.10.12.7" eclipseCompilerVersion = "3.38.0" jakartaActivationVersion = "1.2.2" quartzVersion = "2.3.2" -micrometerVersion = "1.13.1" +micrometerVersion = "1.13.2" # DB drivers: mysqlVersion = "8.4.0" msSqlServerVersion = "9.4.1.jre11" From 133cf7b5e9a2330d408e4d4fc023dc6c3110a1ef Mon Sep 17 00:00:00 2001 From: Romain Bioteau Date: Tue, 30 Jul 2024 14:59:19 +0200 Subject: [PATCH 11/24] feat(contract): delete archived file input values (#3101) --- .../core/contract/data/SAContractData.java | 6 ++++++ .../data/SAProcessContractDataTest.java | 21 +++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/bpm/bonita-core/bonita-contract-data/src/main/java/org/bonitasoft/engine/core/contract/data/SAContractData.java b/bpm/bonita-core/bonita-contract-data/src/main/java/org/bonitasoft/engine/core/contract/data/SAContractData.java index bca70b1243..ac7d084f2a 100644 --- a/bpm/bonita-core/bonita-contract-data/src/main/java/org/bonitasoft/engine/core/contract/data/SAContractData.java +++ b/bpm/bonita-core/bonita-contract-data/src/main/java/org/bonitasoft/engine/core/contract/data/SAContractData.java @@ -14,6 +14,7 @@ package org.bonitasoft.engine.core.contract.data; import java.io.Serializable; +import java.util.Collection; import javax.persistence.*; @@ -63,6 +64,11 @@ protected SAContractData(long sourceObjectId, String name, Serializable value, l private static Serializable clearFileInputContent(Serializable value) { if (value instanceof FileInputValue inputValue) { inputValue.setContent(null); + } else if (value instanceof Collection) { + ((Collection) value).stream() + .filter(FileInputValue.class::isInstance) + .map(FileInputValue.class::cast) + .forEach(v -> v.setContent(null)); } return value; } diff --git a/bpm/bonita-core/bonita-contract-data/src/test/java/org/bonitasoft/engine/core/contract/data/SAProcessContractDataTest.java b/bpm/bonita-core/bonita-contract-data/src/test/java/org/bonitasoft/engine/core/contract/data/SAProcessContractDataTest.java index 52a1fa05b6..ce9d601b2d 100644 --- a/bpm/bonita-core/bonita-contract-data/src/test/java/org/bonitasoft/engine/core/contract/data/SAProcessContractDataTest.java +++ b/bpm/bonita-core/bonita-contract-data/src/test/java/org/bonitasoft/engine/core/contract/data/SAProcessContractDataTest.java @@ -15,6 +15,10 @@ import static org.assertj.core.api.Assertions.assertThat; +import java.io.Serializable; +import java.util.Collection; +import java.util.List; + import org.bonitasoft.engine.bpm.contract.FileInputValue; import org.junit.jupiter.api.Test; @@ -34,6 +38,23 @@ void clearFileInputContent() { .isNull(); } + @Test + void clearMultipleFileInputContent() { + var contractData = new SProcessContractData(); + contractData.setId(1); + contractData.setName("myFile"); + contractData.setValue((Serializable) List.of( + new FileInputValue("theFile", "content".getBytes()), + new FileInputValue("theFile1", "content1".getBytes()))); + + var archivedContractData = new SAProcessContractData(contractData); + + assertThat(archivedContractData.getValue()).isInstanceOf(Collection.class); + assertThat((Collection) archivedContractData.getValue()) + .extracting("content") + .containsNull(); + } + @Test void creatingSAProcessContractDataShouldCopyNonArchivedValues() { long processInstanceId = 555L; From a0cae34ce6095ab649184825a0f2f53696a17a61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 12:47:47 +0000 Subject: [PATCH 12/24] chore(deps): bump the test group in /community with 11 updates (#3107) --- gradle/libs.versions.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index cbfacde24b..fb3a780fe9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,11 +1,11 @@ [versions] # The groovy version must be in synch with the bonita-project-parent POM (bonita-project repository): groovyVersion = "3.0.22" -springVersion = "5.3.37" +springVersion = "5.3.39" springSessionVersion = "2.7.4" springBootVersion = "2.7.18" commonsLangVersion = "3.14.0" -junit5Version = "5.10.3" +junit5Version = "5.11.0" bonitaArtifactsModelVersion = "1.1.1" commonsIOVersion = "2.16.1" commonsFileUploadVersion = "1.5" From 1c8afcaf80740567797a70dcf820e93a45447008 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2024 10:47:01 +0200 Subject: [PATCH 13/24] chore(deps): bump the production-dependencies group across 1 directory with 8 updates (#3114) Bumps the production-dependencies group with 8 updates in the /community directory: | Package | From | To | | --- | --- | --- | | [com.google.guava:guava](https://github.com/google/guava) | `33.2.1-jre` | `33.3.0-jre` | | org.apache.commons:commons-lang3 | `3.14.0` | `3.16.0` | | org.apache.tomcat:tomcat-dbcp | `9.0.91` | `9.0.93` | | commons-cli:commons-cli | `1.8.0` | `1.9.0` | | [io.micrometer:micrometer-core](https://github.com/micrometer-metrics/micrometer) | `1.13.2` | `1.13.3` | | [io.micrometer:micrometer-registry-jmx](https://github.com/micrometer-metrics/micrometer) | `1.13.2` | `1.13.3` | | [io.micrometer:micrometer-registry-prometheus](https://github.com/micrometer-metrics/micrometer) | `1.13.2` | `1.13.3` | | com.oracle.database.jdbc:ojdbc8 | `19.23.0.0` | `19.24.0.0` | Updates `com.google.guava:guava` from 33.2.1-jre to 33.3.0-jre - [Release notes](https://github.com/google/guava/releases) - [Commits](https://github.com/google/guava/commits) Updates `org.apache.commons:commons-lang3` from 3.14.0 to 3.16.0 Updates `org.apache.tomcat:tomcat-dbcp` from 9.0.91 to 9.0.93 Updates `commons-cli:commons-cli` from 1.8.0 to 1.9.0 Updates `io.micrometer:micrometer-core` from 1.13.2 to 1.13.3 - [Release notes](https://github.com/micrometer-metrics/micrometer/releases) - [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.13.2...v1.13.3) Updates `io.micrometer:micrometer-registry-jmx` from 1.13.2 to 1.13.3 - [Release notes](https://github.com/micrometer-metrics/micrometer/releases) - [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.13.2...v1.13.3) Updates `io.micrometer:micrometer-registry-prometheus` from 1.13.2 to 1.13.3 - [Release notes](https://github.com/micrometer-metrics/micrometer/releases) - [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.13.2...v1.13.3) Updates `io.micrometer:micrometer-registry-jmx` from 1.13.2 to 1.13.3 - [Release notes](https://github.com/micrometer-metrics/micrometer/releases) - [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.13.2...v1.13.3) Updates `io.micrometer:micrometer-registry-prometheus` from 1.13.2 to 1.13.3 - [Release notes](https://github.com/micrometer-metrics/micrometer/releases) - [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.13.2...v1.13.3) Updates `com.oracle.database.jdbc:ojdbc8` from 19.23.0.0 to 19.24.0.0 --- updated-dependencies: - dependency-name: com.google.guava:guava dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: org.apache.commons:commons-lang3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: org.apache.tomcat:tomcat-dbcp dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: commons-cli:commons-cli dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: io.micrometer:micrometer-core dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: io.micrometer:micrometer-registry-jmx dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: io.micrometer:micrometer-registry-prometheus dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: io.micrometer:micrometer-registry-jmx dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: io.micrometer:micrometer-registry-prometheus dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: com.oracle.database.jdbc:ojdbc8 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index fb3a780fe9..d711644c74 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -4,15 +4,15 @@ groovyVersion = "3.0.22" springVersion = "5.3.39" springSessionVersion = "2.7.4" springBootVersion = "2.7.18" -commonsLangVersion = "3.14.0" +commonsLangVersion = "3.16.0" junit5Version = "5.11.0" bonitaArtifactsModelVersion = "1.1.1" commonsIOVersion = "2.16.1" commonsFileUploadVersion = "1.5" commonsBeanutilsVersion = "1.9.4" commonsCollectionsVersion = "4.4" -tomcatVersion = "9.0.91" -commonsCLIVersion = "1.8.0" +tomcatVersion = "9.0.93" +commonsCLIVersion = "1.9.0" semver4jVersion = '3.1.0' slf4jVersion = "1.7.36" # Attention, see PassingPropertiesJCacheRegionFactory javadoc if this version changes: @@ -32,11 +32,11 @@ ehCacheVersion = "2.10.10.12.7" eclipseCompilerVersion = "3.38.0" jakartaActivationVersion = "1.2.2" quartzVersion = "2.3.2" -micrometerVersion = "1.13.2" +micrometerVersion = "1.13.3" # DB drivers: mysqlVersion = "8.4.0" msSqlServerVersion = "9.4.1.jre11" -oracleVersion = "19.23.0.0" +oracleVersion = "19.24.0.0" postgresqlVersion = "42.7.3" narayanaVersion = "5.10.6.Final" @@ -45,7 +45,7 @@ jaxbVersion = "2.3.9" javaxAnnotationsVersion = "1.3.2" hazelcastVersion = "5.4.0" # Also update http://www.hazelcast.com/schema/config/hazelcast-config-.xsd if needed jcacheVersion = "1.1.1" -guavaVersion = "33.2.1-jre" +guavaVersion = "33.3.0-jre" antlr4RuntimeVersion = "4.7.2" [libraries] From c0eb4d3738eaffec35cfa0edc5a33f10c0f51b57 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 07:54:30 +0000 Subject: [PATCH 14/24] chore(deps): bump org.postgresql:postgresql (#3119) --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d711644c74..27a7d5a2ec 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -37,7 +37,7 @@ micrometerVersion = "1.13.3" mysqlVersion = "8.4.0" msSqlServerVersion = "9.4.1.jre11" oracleVersion = "19.24.0.0" -postgresqlVersion = "42.7.3" +postgresqlVersion = "42.7.4" narayanaVersion = "5.10.6.Final" logbackVersion = "1.2.13" From ff115f23921a6620e25d95dfae90c32cc03572ae Mon Sep 17 00:00:00 2001 From: "emmanuel.duchastenier@bonitasoft.com" Date: Mon, 26 Aug 2024 11:08:15 +0200 Subject: [PATCH 15/24] chore(sqlserver): simplify sql server statement syntax (#3116) by using ';' as any other RDBMS --- ...nita-platform-private-community.properties | 7 - .../platform/setup/ScriptExecutor.java | 9 - .../resources/sql/sqlserver/cleanTables.sql | 174 +++---- .../sql/sqlserver/createQuartzTables.sql | 180 +++---- .../resources/sql/sqlserver/createTables.sql | 460 ++++++------------ .../sql/sqlserver/dropQuartzTables.sql | 45 +- .../resources/sql/sqlserver/dropTables.sql | 204 +++----- .../resources/sql/sqlserver/initTables.sql | 195 +++----- .../sql/sqlserver/postCreateStructure.sql | 171 +++---- .../sql/sqlserver/preDropStructure.sql | 171 +++---- .../impl/ConfigurationServiceImplIT.java | 13 +- 11 files changed, 534 insertions(+), 1095 deletions(-) diff --git a/bpm/bonita-core/bonita-process-engine/src/main/resources/bonita-platform-private-community.properties b/bpm/bonita-core/bonita-process-engine/src/main/resources/bonita-platform-private-community.properties index a426e314b7..48f713a7b4 100644 --- a/bpm/bonita-core/bonita-process-engine/src/main/resources/bonita-platform-private-community.properties +++ b/bpm/bonita-core/bonita-process-engine/src/main/resources/bonita-platform-private-community.properties @@ -25,10 +25,3 @@ mysql.quartz.connection.jobstoredriver=org.quartz.impl.jdbcjobstore.StdJDBCDeleg oracle.quartz.connection.jobstoredriver=org.quartz.impl.jdbcjobstore.StdJDBCDelegate postgres.quartz.connection.jobstoredriver=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate sqlserver.quartz.connection.jobstoredriver=org.quartz.impl.jdbcjobstore.MSSQLDelegate - -# Sql Delimiters -h2.sql.delimiter=; -mysql.sql.delimiter=; -oracle.sql.delimiter=; -postgres.sql.delimiter=; -sqlserver.sql.delimiter=GO diff --git a/platform/platform-resources/src/main/java/org/bonitasoft/platform/setup/ScriptExecutor.java b/platform/platform-resources/src/main/java/org/bonitasoft/platform/setup/ScriptExecutor.java index 9b9f70f88b..ff94c1f0c0 100644 --- a/platform/platform-resources/src/main/java/org/bonitasoft/platform/setup/ScriptExecutor.java +++ b/platform/platform-resources/src/main/java/org/bonitasoft/platform/setup/ScriptExecutor.java @@ -187,19 +187,10 @@ protected void executeSQLResource(final String sqlFile, boolean shouldContinueOn populate.setContinueOnError(shouldContinueOnError); populate.setIgnoreFailedDrops(true); populate.addScript(sqlResource); - populate.setSeparator(getSeparator()); populate.execute(datasource); log.info("Executed SQL script " + sqlResource.getURL().getFile()); } - private String getSeparator() { - if ("sqlserver".equals(dbVendor)) { - return "GO"; - } else { - return ";"; - } - } - public void initializePlatformStructure() throws PlatformException { try { executeSQLResources(Collections.singletonList("initTables.sql"), FAIL_ON_ERROR); diff --git a/platform/platform-resources/src/main/resources/sql/sqlserver/cleanTables.sql b/platform/platform-resources/src/main/resources/sql/sqlserver/cleanTables.sql index 7eefc126b0..d6aa4cf7ca 100644 --- a/platform/platform-resources/src/main/resources/sql/sqlserver/cleanTables.sql +++ b/platform/platform-resources/src/main/resources/sql/sqlserver/cleanTables.sql @@ -1,119 +1,61 @@ -DELETE FROM arch_contract_data -GO -DELETE FROM contract_data -GO -DELETE FROM actormember -GO -DELETE FROM actor -GO -DELETE FROM processcategorymapping -GO -DELETE FROM category -GO -DELETE FROM arch_process_comment -GO -DELETE FROM process_comment -GO -DELETE FROM process_definition -GO -DELETE FROM arch_document_mapping -GO -DELETE FROM document -GO -DELETE FROM document_mapping -GO -DELETE FROM arch_flownode_instance -GO -DELETE FROM arch_process_instance -GO -DELETE FROM arch_connector_instance -GO -DELETE FROM arch_multi_biz_data -GO -DELETE FROM arch_ref_biz_data_inst -GO -DELETE FROM multi_biz_data -GO -DELETE FROM ref_biz_data_inst -GO -DELETE FROM pending_mapping -GO -DELETE FROM message_instance -GO -DELETE FROM waiting_event -GO -DELETE FROM event_trigger_instance -GO -DELETE FROM connector_instance -GO -DELETE FROM flownode_instance -GO -DELETE FROM process_instance -GO -DELETE FROM processsupervisor -GO -DELETE FROM business_app_menu -GO -DELETE FROM business_app_page -GO -DELETE FROM business_app -GO -DELETE FROM command -GO -DELETE FROM arch_data_instance -GO -DELETE FROM data_instance -GO -DELETE FROM dependencymapping -GO -DELETE FROM dependency -GO -DELETE FROM external_identity_mapping -GO -DELETE FROM user_membership -GO -DELETE FROM custom_usr_inf_val -GO -DELETE FROM custom_usr_inf_def -GO -DELETE FROM user_contactinfo -GO -DELETE FROM user_login -GO -DELETE FROM user_ -GO -DELETE FROM role -GO -DELETE FROM group_ -GO -DELETE FROM queriablelog_p -GO -DELETE FROM queriable_log -GO -DELETE FROM page -GO -DELETE FROM sequence WHERE tenantId <> -1 -GO -DELETE FROM profilemember -GO -DELETE FROM profile -GO -DELETE FROM job_log -GO -DELETE FROM job_param -GO -DELETE FROM job_desc -GO -DELETE FROM tenant -GO -DELETE FROM platformCommand -GO -DELETE FROM form_mapping -GO -DELETE FROM page_mapping -GO -DELETE FROM proc_parameter -GO +DELETE FROM arch_contract_data; +DELETE FROM contract_data; +DELETE FROM actormember; +DELETE FROM actor; +DELETE FROM processcategorymapping; +DELETE FROM category; +DELETE FROM arch_process_comment; +DELETE FROM process_comment; +DELETE FROM process_definition; +DELETE FROM arch_document_mapping; +DELETE FROM document; +DELETE FROM document_mapping; +DELETE FROM arch_flownode_instance; +DELETE FROM arch_process_instance; +DELETE FROM arch_connector_instance; +DELETE FROM arch_multi_biz_data; +DELETE FROM arch_ref_biz_data_inst; +DELETE FROM multi_biz_data; +DELETE FROM ref_biz_data_inst; +DELETE FROM pending_mapping; +DELETE FROM message_instance; +DELETE FROM waiting_event; +DELETE FROM event_trigger_instance; +DELETE FROM connector_instance; +DELETE FROM flownode_instance; +DELETE FROM process_instance; +DELETE FROM processsupervisor; +DELETE FROM business_app_menu; +DELETE FROM business_app_page; +DELETE FROM business_app; +DELETE FROM command; +DELETE FROM arch_data_instance; +DELETE FROM data_instance; +DELETE FROM dependencymapping; +DELETE FROM dependency; +DELETE FROM external_identity_mapping; +DELETE FROM user_membership; +DELETE FROM custom_usr_inf_val; +DELETE FROM custom_usr_inf_def; +DELETE FROM user_contactinfo; +DELETE FROM user_login; +DELETE FROM user_; +DELETE FROM role; +DELETE FROM group_; +DELETE FROM queriablelog_p; +DELETE FROM queriable_log; +DELETE FROM page; +DELETE FROM sequence WHERE tenantId <> -1; +DELETE FROM profilemember; +DELETE FROM profile; +DELETE FROM job_log; +DELETE FROM job_param; +DELETE FROM job_desc; +DELETE FROM tenant; +DELETE FROM platformCommand; +DELETE FROM form_mapping; +DELETE FROM page_mapping; +DELETE FROM proc_parameter; -- do NOT clear directly PLATFORM table, Hibernate needs to update its cache to know the platform has been deleted \ No newline at end of file diff --git a/platform/platform-resources/src/main/resources/sql/sqlserver/createQuartzTables.sql b/platform/platform-resources/src/main/resources/sql/sqlserver/createQuartzTables.sql index da71a0072a..72083305ed 100644 --- a/platform/platform-resources/src/main/resources/sql/sqlserver/createQuartzTables.sql +++ b/platform/platform-resources/src/main/resources/sql/sqlserver/createQuartzTables.sql @@ -25,71 +25,55 @@ --# IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[FK_QRTZ_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISFOREIGNKEY') = 1) -ALTER TABLE [dbo].[QRTZ_TRIGGERS] DROP CONSTRAINT FK_QRTZ_TRIGGERS -GO +ALTER TABLE [dbo].[QRTZ_TRIGGERS] DROP CONSTRAINT FK_QRTZ_TRIGGERS; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[FK_QRTZ_CRON_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISFOREIGNKEY') = 1) -ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] DROP CONSTRAINT FK_QRTZ_CRON_TRIGGERS -GO +ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] DROP CONSTRAINT FK_QRTZ_CRON_TRIGGERS; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[FK_QRTZ_SIMPLE_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISFOREIGNKEY') = 1) -ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] DROP CONSTRAINT FK_QRTZ_SIMPLE_TRIGGERS -GO +ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] DROP CONSTRAINT FK_QRTZ_SIMPLE_TRIGGERS; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[FK_QRTZ_SIMPROP_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISFOREIGNKEY') = 1) -ALTER TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] DROP CONSTRAINT FK_QRTZ_SIMPROP_TRIGGERS -GO +ALTER TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] DROP CONSTRAINT FK_QRTZ_SIMPROP_TRIGGERS; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_CALENDARS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_CALENDARS] -GO +DROP TABLE [dbo].[QRTZ_CALENDARS]; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_CRON_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_CRON_TRIGGERS] -GO +DROP TABLE [dbo].[QRTZ_CRON_TRIGGERS]; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_BLOB_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_BLOB_TRIGGERS] -GO +DROP TABLE [dbo].[QRTZ_BLOB_TRIGGERS]; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_FIRED_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_FIRED_TRIGGERS] -GO +DROP TABLE [dbo].[QRTZ_FIRED_TRIGGERS]; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_PAUSED_TRIGGER_GRPS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS] -GO +DROP TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS]; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_SCHEDULER_STATE]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_SCHEDULER_STATE] -GO +DROP TABLE [dbo].[QRTZ_SCHEDULER_STATE]; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_LOCKS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_LOCKS] -GO +DROP TABLE [dbo].[QRTZ_LOCKS]; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_JOB_DETAILS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_JOB_DETAILS] -GO +DROP TABLE [dbo].[QRTZ_JOB_DETAILS]; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_SIMPLE_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] -GO +DROP TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS]; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_SIMPROP_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] -GO +DROP TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS]; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_TRIGGERS] -GO +DROP TABLE [dbo].[QRTZ_TRIGGERS]; CREATE TABLE [dbo].[QRTZ_CALENDARS] ( [SCHED_NAME] [VARCHAR] (120) NOT NULL , [CALENDAR_NAME] [VARCHAR] (200) NOT NULL , [CALENDAR] [IMAGE] NOT NULL -) ON [PRIMARY] -GO +) ON [PRIMARY]; CREATE TABLE [dbo].[QRTZ_CRON_TRIGGERS] ( [SCHED_NAME] [VARCHAR] (120) NOT NULL , @@ -97,8 +81,7 @@ CREATE TABLE [dbo].[QRTZ_CRON_TRIGGERS] ( [TRIGGER_GROUP] [VARCHAR] (200) NOT NULL , [CRON_EXPRESSION] [VARCHAR] (120) NOT NULL , [TIME_ZONE_ID] [VARCHAR] (80) -) ON [PRIMARY] -GO +) ON [PRIMARY]; CREATE TABLE [dbo].[QRTZ_FIRED_TRIGGERS] ( [SCHED_NAME] [VARCHAR] (120) NOT NULL , @@ -114,28 +97,24 @@ CREATE TABLE [dbo].[QRTZ_FIRED_TRIGGERS] ( [JOB_GROUP] [VARCHAR] (200) NULL , [IS_NONCONCURRENT] [VARCHAR] (1) NULL , [REQUESTS_RECOVERY] [VARCHAR] (1) NULL -) ON [PRIMARY] -GO +) ON [PRIMARY]; CREATE TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS] ( [SCHED_NAME] [VARCHAR] (120) NOT NULL , [TRIGGER_GROUP] [VARCHAR] (200) NOT NULL -) ON [PRIMARY] -GO +) ON [PRIMARY]; CREATE TABLE [dbo].[QRTZ_SCHEDULER_STATE] ( [SCHED_NAME] [VARCHAR] (120) NOT NULL , [INSTANCE_NAME] [VARCHAR] (200) NOT NULL , [LAST_CHECKIN_TIME] [BIGINT] NOT NULL , [CHECKIN_INTERVAL] [BIGINT] NOT NULL -) ON [PRIMARY] -GO +) ON [PRIMARY]; CREATE TABLE [dbo].[QRTZ_LOCKS] ( [SCHED_NAME] [VARCHAR] (120) NOT NULL , [LOCK_NAME] [VARCHAR] (40) NOT NULL -) ON [PRIMARY] -GO +) ON [PRIMARY]; CREATE TABLE [dbo].[QRTZ_JOB_DETAILS] ( [SCHED_NAME] [VARCHAR] (120) NOT NULL , @@ -148,8 +127,7 @@ CREATE TABLE [dbo].[QRTZ_JOB_DETAILS] ( [IS_UPDATE_DATA] [VARCHAR] (1) NOT NULL , [REQUESTS_RECOVERY] [VARCHAR] (1) NOT NULL , [JOB_DATA] [IMAGE] NULL -) ON [PRIMARY] -GO +) ON [PRIMARY]; CREATE TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] ( [SCHED_NAME] [VARCHAR] (120) NOT NULL , @@ -158,8 +136,7 @@ CREATE TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] ( [REPEAT_COUNT] [BIGINT] NOT NULL , [REPEAT_INTERVAL] [BIGINT] NOT NULL , [TIMES_TRIGGERED] [BIGINT] NOT NULL -) ON [PRIMARY] -GO +) ON [PRIMARY]; CREATE TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] ( [SCHED_NAME] [VARCHAR] (120) NOT NULL , @@ -176,16 +153,14 @@ CREATE TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] ( [DEC_PROP_2] [NUMERIC] (13,4) NULL, [BOOL_PROP_1] [VARCHAR] (1) NULL, [BOOL_PROP_2] [VARCHAR] (1) NULL, -) ON [PRIMARY] -GO +) ON [PRIMARY]; CREATE TABLE [dbo].[QRTZ_BLOB_TRIGGERS] ( [SCHED_NAME] [VARCHAR] (120) NOT NULL , [TRIGGER_NAME] [VARCHAR] (200) NOT NULL , [TRIGGER_GROUP] [VARCHAR] (200) NOT NULL , [BLOB_DATA] [IMAGE] NULL -) ON [PRIMARY] -GO +) ON [PRIMARY]; CREATE TABLE [dbo].[QRTZ_TRIGGERS] ( [SCHED_NAME] [VARCHAR] (120) NOT NULL , @@ -204,16 +179,14 @@ CREATE TABLE [dbo].[QRTZ_TRIGGERS] ( [CALENDAR_NAME] [VARCHAR] (200) NULL , [MISFIRE_INSTR] [SMALLINT] NULL , [JOB_DATA] [IMAGE] NULL -) ON [PRIMARY] -GO +) ON [PRIMARY]; ALTER TABLE [dbo].[QRTZ_CALENDARS] WITH NOCHECK ADD CONSTRAINT [PK_QRTZ_CALENDARS] PRIMARY KEY CLUSTERED ( [SCHED_NAME], [CALENDAR_NAME] - ) ON [PRIMARY] -GO + ) ON [PRIMARY]; ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] WITH NOCHECK ADD CONSTRAINT [PK_QRTZ_CRON_TRIGGERS] PRIMARY KEY CLUSTERED @@ -221,40 +194,35 @@ ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] WITH NOCHECK ADD [SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP] - ) ON [PRIMARY] -GO + ) ON [PRIMARY]; ALTER TABLE [dbo].[QRTZ_FIRED_TRIGGERS] WITH NOCHECK ADD CONSTRAINT [PK_QRTZ_FIRED_TRIGGERS] PRIMARY KEY CLUSTERED ( [SCHED_NAME], [ENTRY_ID] - ) ON [PRIMARY] -GO + ) ON [PRIMARY]; ALTER TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS] WITH NOCHECK ADD CONSTRAINT [PK_QRTZ_PAUSED_TRIGGER_GRPS] PRIMARY KEY CLUSTERED ( [SCHED_NAME], [TRIGGER_GROUP] - ) ON [PRIMARY] -GO + ) ON [PRIMARY]; ALTER TABLE [dbo].[QRTZ_SCHEDULER_STATE] WITH NOCHECK ADD CONSTRAINT [PK_QRTZ_SCHEDULER_STATE] PRIMARY KEY CLUSTERED ( [SCHED_NAME], [INSTANCE_NAME] - ) ON [PRIMARY] -GO + ) ON [PRIMARY]; ALTER TABLE [dbo].[QRTZ_LOCKS] WITH NOCHECK ADD CONSTRAINT [PK_QRTZ_LOCKS] PRIMARY KEY CLUSTERED ( [SCHED_NAME], [LOCK_NAME] - ) ON [PRIMARY] -GO + ) ON [PRIMARY]; ALTER TABLE [dbo].[QRTZ_JOB_DETAILS] WITH NOCHECK ADD CONSTRAINT [PK_QRTZ_JOB_DETAILS] PRIMARY KEY CLUSTERED @@ -262,8 +230,7 @@ ALTER TABLE [dbo].[QRTZ_JOB_DETAILS] WITH NOCHECK ADD [SCHED_NAME], [JOB_NAME], [JOB_GROUP] - ) ON [PRIMARY] -GO + ) ON [PRIMARY]; ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] WITH NOCHECK ADD CONSTRAINT [PK_QRTZ_SIMPLE_TRIGGERS] PRIMARY KEY CLUSTERED @@ -271,8 +238,7 @@ ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] WITH NOCHECK ADD [SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP] - ) ON [PRIMARY] -GO + ) ON [PRIMARY]; ALTER TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] WITH NOCHECK ADD CONSTRAINT [PK_QRTZ_SIMPROP_TRIGGERS] PRIMARY KEY CLUSTERED @@ -280,8 +246,7 @@ ALTER TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] WITH NOCHECK ADD [SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP] - ) ON [PRIMARY] -GO + ) ON [PRIMARY]; ALTER TABLE [dbo].[QRTZ_TRIGGERS] WITH NOCHECK ADD CONSTRAINT [PK_QRTZ_TRIGGERS] PRIMARY KEY CLUSTERED @@ -289,8 +254,7 @@ ALTER TABLE [dbo].[QRTZ_TRIGGERS] WITH NOCHECK ADD [SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP] - ) ON [PRIMARY] -GO + ) ON [PRIMARY]; ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] ADD CONSTRAINT [FK_QRTZ_CRON_TRIGGERS] FOREIGN KEY @@ -302,8 +266,7 @@ ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] ADD [SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP] - ) ON DELETE CASCADE -GO + ) ON DELETE CASCADE; ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] ADD CONSTRAINT [FK_QRTZ_SIMPLE_TRIGGERS] FOREIGN KEY @@ -315,8 +278,7 @@ ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] ADD [SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP] - ) ON DELETE CASCADE -GO + ) ON DELETE CASCADE; ALTER TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] ADD CONSTRAINT [FK_QRTZ_SIMPROP_TRIGGERS] FOREIGN KEY @@ -328,8 +290,7 @@ ALTER TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] ADD [SCHED_NAME], [TRIGGER_NAME], [TRIGGER_GROUP] - ) ON DELETE CASCADE -GO + ) ON DELETE CASCADE; ALTER TABLE [dbo].[QRTZ_TRIGGERS] ADD CONSTRAINT [FK_QRTZ_TRIGGERS] FOREIGN KEY @@ -341,69 +302,48 @@ ALTER TABLE [dbo].[QRTZ_TRIGGERS] ADD [SCHED_NAME], [JOB_NAME], [JOB_GROUP] - ) -GO + ); -CREATE INDEX IDX_QRTZ_J_REQ_RECOVERY ON QRTZ_JOB_DETAILS(SCHED_NAME,REQUESTS_RECOVERY) -GO +CREATE INDEX IDX_QRTZ_J_REQ_RECOVERY ON QRTZ_JOB_DETAILS(SCHED_NAME,REQUESTS_RECOVERY); -CREATE INDEX IDX_QRTZ_J_GRP ON QRTZ_JOB_DETAILS(SCHED_NAME,JOB_GROUP) -GO +CREATE INDEX IDX_QRTZ_J_GRP ON QRTZ_JOB_DETAILS(SCHED_NAME,JOB_GROUP); -CREATE INDEX IDX_QRTZ_T_J ON QRTZ_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP) -GO +CREATE INDEX IDX_QRTZ_T_J ON QRTZ_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP); -CREATE INDEX IDX_QRTZ_T_JG ON QRTZ_TRIGGERS(SCHED_NAME,JOB_GROUP) -GO +CREATE INDEX IDX_QRTZ_T_JG ON QRTZ_TRIGGERS(SCHED_NAME,JOB_GROUP); -CREATE INDEX IDX_QRTZ_T_C ON QRTZ_TRIGGERS(SCHED_NAME,CALENDAR_NAME) -GO +CREATE INDEX IDX_QRTZ_T_C ON QRTZ_TRIGGERS(SCHED_NAME,CALENDAR_NAME); -CREATE INDEX IDX_QRTZ_T_G ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP) -GO +CREATE INDEX IDX_QRTZ_T_G ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP); -CREATE INDEX IDX_QRTZ_T_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE) -GO +CREATE INDEX IDX_QRTZ_T_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE); -CREATE INDEX IDX_QRTZ_T_N_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_STATE) -GO +CREATE INDEX IDX_QRTZ_T_N_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_STATE); -CREATE INDEX IDX_QRTZ_T_N_G_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP,TRIGGER_STATE) -GO +CREATE INDEX IDX_QRTZ_T_N_G_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP,TRIGGER_STATE); -CREATE INDEX IDX_QRTZ_T_NEXT_FIRE_TIME ON QRTZ_TRIGGERS(SCHED_NAME,NEXT_FIRE_TIME) -GO +CREATE INDEX IDX_QRTZ_T_NEXT_FIRE_TIME ON QRTZ_TRIGGERS(SCHED_NAME,NEXT_FIRE_TIME); -CREATE INDEX IDX_QRTZ_T_NFT_ST ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE,NEXT_FIRE_TIME) -GO +CREATE INDEX IDX_QRTZ_T_NFT_ST ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE,NEXT_FIRE_TIME); -CREATE INDEX IDX_QRTZ_T_NFT_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME) -GO +CREATE INDEX IDX_QRTZ_T_NFT_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME); -CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_STATE) -GO +CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_STATE); -CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE_GRP ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_GROUP,TRIGGER_STATE) -GO +CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE_GRP ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_GROUP,TRIGGER_STATE); -CREATE INDEX IDX_QRTZ_FT_TRIG_INST_NAME ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME) -GO +CREATE INDEX IDX_QRTZ_FT_TRIG_INST_NAME ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME); -CREATE INDEX IDX_QRTZ_FT_INST_JOB_REQ_RCVRY ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME,REQUESTS_RECOVERY) -GO +CREATE INDEX IDX_QRTZ_FT_INST_JOB_REQ_RCVRY ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME,REQUESTS_RECOVERY); -CREATE INDEX IDX_QRTZ_FT_J_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP) -GO +CREATE INDEX IDX_QRTZ_FT_J_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP); -CREATE INDEX IDX_QRTZ_FT_JG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_GROUP) -GO +CREATE INDEX IDX_QRTZ_FT_JG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_GROUP); -CREATE INDEX IDX_QRTZ_FT_T_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) -GO +CREATE INDEX IDX_QRTZ_FT_T_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP); -CREATE INDEX IDX_QRTZ_FT_TG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_GROUP) -GO \ No newline at end of file +CREATE INDEX IDX_QRTZ_FT_TG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_GROUP); \ No newline at end of file diff --git a/platform/platform-resources/src/main/resources/sql/sqlserver/createTables.sql b/platform/platform-resources/src/main/resources/sql/sqlserver/createTables.sql index c32c0b7635..d66b0dbefc 100644 --- a/platform/platform-resources/src/main/resources/sql/sqlserver/createTables.sql +++ b/platform/platform-resources/src/main/resources/sql/sqlserver/createTables.sql @@ -3,12 +3,9 @@ CREATE TABLE configuration ( content_type NVARCHAR(50) NOT NULL, resource_name NVARCHAR(120) NOT NULL, resource_content VARBINARY(MAX) NOT NULL -) -GO -ALTER TABLE configuration ADD CONSTRAINT pk_configuration PRIMARY KEY (tenant_id, content_type, resource_name) -GO -CREATE INDEX idx_configuration ON configuration (tenant_id, content_type) -GO +); +ALTER TABLE configuration ADD CONSTRAINT pk_configuration PRIMARY KEY (tenant_id, content_type, resource_name); +CREATE INDEX idx_configuration ON configuration (tenant_id, content_type); CREATE TABLE contract_data ( tenantid NUMERIC(19, 0) NOT NULL, @@ -17,14 +14,10 @@ CREATE TABLE contract_data ( scopeId NUMERIC(19, 0) NOT NULL, name NVARCHAR(50) NOT NULL, val NVARCHAR(MAX) -) -GO -ALTER TABLE contract_data ADD CONSTRAINT pk_contract_data PRIMARY KEY (tenantid, id, scopeId) -GO -ALTER TABLE contract_data ADD CONSTRAINT uc_cd_scope_name UNIQUE (kind, scopeId, name, tenantid) -GO -CREATE INDEX idx_cd_scope_name ON contract_data (kind, scopeId, name, tenantid) -GO +); +ALTER TABLE contract_data ADD CONSTRAINT pk_contract_data PRIMARY KEY (tenantid, id, scopeId); +ALTER TABLE contract_data ADD CONSTRAINT uc_cd_scope_name UNIQUE (kind, scopeId, name, tenantid); +CREATE INDEX idx_cd_scope_name ON contract_data (kind, scopeId, name, tenantid); CREATE TABLE arch_contract_data ( tenantid NUMERIC(19, 0) NOT NULL, @@ -35,14 +28,10 @@ CREATE TABLE arch_contract_data ( val NVARCHAR(MAX), archiveDate NUMERIC(19, 0) NOT NULL, sourceObjectId NUMERIC(19, 0) NOT NULL -) -GO -ALTER TABLE arch_contract_data ADD CONSTRAINT pk_arch_contract_data PRIMARY KEY (tenantid, id, scopeId) -GO -ALTER TABLE arch_contract_data ADD CONSTRAINT uc_acd_scope_name UNIQUE (kind, scopeId, name, tenantid) -GO -CREATE INDEX idx_acd_scope_name ON arch_contract_data (kind, scopeId, name, tenantid) -GO +); +ALTER TABLE arch_contract_data ADD CONSTRAINT pk_arch_contract_data PRIMARY KEY (tenantid, id, scopeId); +ALTER TABLE arch_contract_data ADD CONSTRAINT uc_acd_scope_name UNIQUE (kind, scopeId, name, tenantid); +CREATE INDEX idx_acd_scope_name ON arch_contract_data (kind, scopeId, name, tenantid); CREATE TABLE actor ( tenantid NUMERIC(19, 0) NOT NULL, @@ -54,8 +43,7 @@ CREATE TABLE actor ( initiator BIT, UNIQUE (tenantid, id, scopeId, name), PRIMARY KEY (tenantid, id) -) -GO +); CREATE TABLE actormember ( tenantid NUMERIC(19, 0) NOT NULL, @@ -66,8 +54,7 @@ CREATE TABLE actormember ( roleId NUMERIC(19, 0) NOT NULL, UNIQUE (tenantid, actorid, userId, groupId, roleId), PRIMARY KEY (tenantid, id) -) -GO +); CREATE TABLE category ( tenantid NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, @@ -78,8 +65,7 @@ CREATE TABLE category ( lastUpdateDate NUMERIC(19, 0) NOT NULL, UNIQUE (tenantid, name), PRIMARY KEY (tenantid, id) -) -GO +); CREATE TABLE processcategorymapping ( tenantid NUMERIC(19, 0) NOT NULL, @@ -88,11 +74,9 @@ CREATE TABLE processcategorymapping ( processid NUMERIC(19, 0) NOT NULL, UNIQUE (tenantid, categoryid, processid), PRIMARY KEY (tenantid, id) -) -GO +); -ALTER TABLE processcategorymapping ADD CONSTRAINT fk_catmapping_catid FOREIGN KEY (tenantid, categoryid) REFERENCES category(tenantid, id) ON DELETE CASCADE -GO +ALTER TABLE processcategorymapping ADD CONSTRAINT fk_catmapping_catid FOREIGN KEY (tenantid, categoryid) REFERENCES category(tenantid, id) ON DELETE CASCADE; CREATE TABLE arch_process_comment( tenantid NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, @@ -103,13 +87,10 @@ CREATE TABLE arch_process_comment( archiveDate NUMERIC(19, 0) NOT NULL, sourceObjectId NUMERIC(19, 0) NOT NULL, PRIMARY KEY (tenantid, id) -) -GO +); -CREATE INDEX idx1_arch_process_comment on arch_process_comment (sourceobjectid, tenantid) -GO -CREATE INDEX idx2_arch_process_comment on arch_process_comment (processInstanceId, archivedate, tenantid) -GO +CREATE INDEX idx1_arch_process_comment on arch_process_comment (sourceobjectid, tenantid); +CREATE INDEX idx2_arch_process_comment on arch_process_comment (processInstanceId, archivedate, tenantid); CREATE TABLE process_comment ( tenantid NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, @@ -119,10 +100,8 @@ CREATE TABLE process_comment ( postDate NUMERIC(19, 0) NOT NULL, content NVARCHAR(512) NOT NULL, PRIMARY KEY (tenantid, id) -) -GO -CREATE INDEX idx1_process_comment on process_comment (processInstanceId, tenantid) -GO +); +CREATE INDEX idx1_process_comment on process_comment (processInstanceId, tenantid); CREATE TABLE process_definition ( tenantid NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, @@ -143,15 +122,13 @@ CREATE TABLE process_definition ( content_id NUMERIC(19, 0) NOT NULL, PRIMARY KEY (tenantid, id), UNIQUE (tenantid, name, version) -) -GO +); CREATE TABLE process_content ( tenantid NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, content NVARCHAR(MAX) NOT NULL, PRIMARY KEY (tenantid, id) -) -GO +); CREATE TABLE arch_document_mapping ( tenantid NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, @@ -164,10 +141,8 @@ CREATE TABLE arch_document_mapping ( index_ INT NOT NULL, archiveDate NUMERIC(19, 0) NOT NULL, PRIMARY KEY (tenantid, ID) -) -GO -CREATE INDEX idx_a_doc_mp_pr_id ON arch_document_mapping (processinstanceid, tenantid) -GO +); +CREATE INDEX idx_a_doc_mp_pr_id ON arch_document_mapping (processinstanceid, tenantid); CREATE TABLE document ( tenantid NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, @@ -179,8 +154,7 @@ CREATE TABLE document ( url NVARCHAR(1024), content VARBINARY(MAX), PRIMARY KEY (tenantid, id) -) -GO +); CREATE TABLE document_mapping ( tenantid NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, @@ -191,8 +165,7 @@ CREATE TABLE document_mapping ( version NVARCHAR(50) NOT NULL, index_ INT NOT NULL, PRIMARY KEY (tenantid, ID) -) -GO +); CREATE TABLE arch_process_instance ( tenantid NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, @@ -215,14 +188,10 @@ CREATE TABLE arch_process_instance ( stringIndex4 NVARCHAR(255), stringIndex5 NVARCHAR(255), PRIMARY KEY (tenantid, id) -) -GO -CREATE INDEX idx1_arch_process_instance ON arch_process_instance (tenantId, sourceObjectId, rootProcessInstanceId, callerId) -GO -CREATE INDEX idx2_arch_process_instance ON arch_process_instance (tenantId, processDefinitionId, archiveDate) -GO -CREATE INDEX idx3_arch_process_instance ON arch_process_instance (tenantId, sourceObjectId, callerId, stateId) -GO +); +CREATE INDEX idx1_arch_process_instance ON arch_process_instance (tenantId, sourceObjectId, rootProcessInstanceId, callerId); +CREATE INDEX idx2_arch_process_instance ON arch_process_instance (tenantId, processDefinitionId, archiveDate); +CREATE INDEX idx3_arch_process_instance ON arch_process_instance (tenantId, sourceObjectId, callerId, stateId); CREATE TABLE arch_flownode_instance ( tenantid NUMERIC(19, 0) NOT NULL, @@ -272,20 +241,13 @@ CREATE TABLE arch_flownode_instance ( triggeredByEvent BIT, interrupting BIT, PRIMARY KEY (tenantid, id) -) -GO -CREATE INDEX idx_afi_kind_lg2_executedBy ON arch_flownode_instance(logicalGroup2, tenantId, kind, executedBy) -GO -CREATE INDEX idx_afi_kind_lg3 ON arch_flownode_instance(tenantId, kind, logicalGroup3) -GO -CREATE INDEX idx_afi_kind_lg4 ON arch_flownode_instance(tenantId, logicalGroup4) -GO -CREATE INDEX idx_afi_sourceId_tenantid_kind ON arch_flownode_instance (sourceObjectId, tenantid, kind) -GO -CREATE INDEX idx1_arch_flownode_instance ON arch_flownode_instance (tenantId, rootContainerId, parentContainerId) -GO +); +CREATE INDEX idx_afi_kind_lg2_executedBy ON arch_flownode_instance(logicalGroup2, tenantId, kind, executedBy); +CREATE INDEX idx_afi_kind_lg3 ON arch_flownode_instance(tenantId, kind, logicalGroup3); +CREATE INDEX idx_afi_kind_lg4 ON arch_flownode_instance(tenantId, logicalGroup4); +CREATE INDEX idx_afi_sourceId_tenantid_kind ON arch_flownode_instance (sourceObjectId, tenantid, kind); +CREATE INDEX idx1_arch_flownode_instance ON arch_flownode_instance (tenantId, rootContainerId, parentContainerId); CREATE INDEX idx_lg4_lg2 on arch_flownode_instance(tenantid, logicalGroup4, logicalGroup2); -GO CREATE TABLE arch_connector_instance ( tenantid NUMERIC(19, 0) NOT NULL, @@ -300,11 +262,9 @@ CREATE TABLE arch_connector_instance ( sourceObjectId NUMERIC(19, 0), archiveDate NUMERIC(19, 0) NOT NULL, PRIMARY KEY (tenantid, id) -) -GO +); -CREATE INDEX idx1_arch_connector_instance ON arch_connector_instance (tenantId, containerId, containerType) -GO +CREATE INDEX idx1_arch_connector_instance ON arch_connector_instance (tenantId, containerId, containerType); CREATE TABLE process_instance ( id NUMERIC(19, 0) NOT NULL, name NVARCHAR(75) NOT NULL, @@ -328,11 +288,9 @@ CREATE TABLE process_instance ( stringIndex4 NVARCHAR(255), stringIndex5 NVARCHAR(255), PRIMARY KEY (id) -) -GO +); -CREATE INDEX idx1_proc_inst_pdef_state ON process_instance (processdefinitionid, stateid) -GO +CREATE INDEX idx1_proc_inst_pdef_state ON process_instance (processdefinitionid, stateid); CREATE TABLE flownode_instance ( tenantid NUMERIC(19, 0) NOT NULL, @@ -384,18 +342,12 @@ CREATE TABLE flownode_instance ( interrupting BIT, tokenCount INT NOT NULL, PRIMARY KEY (tenantid, id) -) -GO -CREATE INDEX idx_fni_rootcontid ON flownode_instance (rootContainerId) -GO -CREATE INDEX idx_fni_loggroup4 ON flownode_instance (logicalGroup4) -GO -CREATE INDEX idx_fni_loggroup3_terminal ON flownode_instance(logicalgroup3, terminal, tenantid) -GO -CREATE INDEX idx_fn_lg2_state_tenant_del ON flownode_instance (logicalGroup2, stateName, tenantid) -GO -CREATE INDEX idx_fni_activity_instance_id_kind ON flownode_instance(activityInstanceId, kind, tenantid) -GO +); +CREATE INDEX idx_fni_rootcontid ON flownode_instance (rootContainerId); +CREATE INDEX idx_fni_loggroup4 ON flownode_instance (logicalGroup4); +CREATE INDEX idx_fni_loggroup3_terminal ON flownode_instance(logicalgroup3, terminal, tenantid); +CREATE INDEX idx_fn_lg2_state_tenant_del ON flownode_instance (logicalGroup2, stateName, tenantid); +CREATE INDEX idx_fni_activity_instance_id_kind ON flownode_instance(activityInstanceId, kind, tenantid); CREATE TABLE connector_instance ( tenantid NUMERIC(19, 0) NOT NULL, @@ -411,10 +363,8 @@ CREATE TABLE connector_instance ( exceptionMessage NVARCHAR(255), stackTrace NVARCHAR(MAX), PRIMARY KEY (tenantid, id) -) -GO -CREATE INDEX idx_ci_container_activation ON connector_instance (tenantid, containerId, containerType, activationEvent) -GO +); +CREATE INDEX idx_ci_container_activation ON connector_instance (tenantid, containerId, containerType, activationEvent); CREATE TABLE event_trigger_instance ( tenantid NUMERIC(19, 0) NOT NULL, @@ -424,8 +374,7 @@ CREATE TABLE event_trigger_instance ( executionDate NUMERIC(19, 0), jobTriggerName NVARCHAR(255), PRIMARY KEY (tenantid, id) -) -GO +); CREATE TABLE waiting_event ( tenantid NUMERIC(19, 0) NOT NULL, @@ -453,12 +402,9 @@ CREATE TABLE waiting_event ( correlation4 NVARCHAR(128), correlation5 NVARCHAR(128), PRIMARY KEY (tenantid, id) -) -GO -CREATE INDEX idx_waiting_event ON waiting_event (progress, tenantid, kind, locked, active) -GO -CREATE INDEX idx_waiting_event_correl ON waiting_event (correlation1, correlation2, correlation3, correlation4, correlation5) -GO +); +CREATE INDEX idx_waiting_event ON waiting_event (progress, tenantid, kind, locked, active); +CREATE INDEX idx_waiting_event_correl ON waiting_event (correlation1, correlation2, correlation3, correlation4, correlation5); CREATE TABLE message_instance ( tenantid NUMERIC(19, 0) NOT NULL, @@ -477,12 +423,9 @@ CREATE TABLE message_instance ( correlation5 NVARCHAR(128), creationDate NUMERIC(19, 0) NOT NULL, PRIMARY KEY (tenantid, id) -) -GO -CREATE INDEX idx_message_instance ON message_instance (messageName, targetProcess, correlation1, correlation2, correlation3) -GO -CREATE INDEX idx_message_instance_correl ON message_instance (correlation1, correlation2, correlation3, correlation4, correlation5) -GO +); +CREATE INDEX idx_message_instance ON message_instance (messageName, targetProcess, correlation1, correlation2, correlation3); +CREATE INDEX idx_message_instance_correl ON message_instance (correlation1, correlation2, correlation3, correlation4, correlation5); CREATE TABLE pending_mapping ( tenantid NUMERIC(19, 0) NOT NULL, @@ -491,10 +434,8 @@ CREATE TABLE pending_mapping ( actorId NUMERIC(19, 0), userId NUMERIC(19, 0), PRIMARY KEY (tenantid, id) -) -GO -CREATE UNIQUE INDEX idx_UQ_pending_mapping ON pending_mapping (tenantid, activityId, userId, actorId) -GO +); +CREATE UNIQUE INDEX idx_UQ_pending_mapping ON pending_mapping (tenantid, activityId, userId, actorId); CREATE TABLE ref_biz_data_inst ( tenantid NUMERIC(19, 0) NOT NULL, @@ -505,21 +446,14 @@ CREATE TABLE ref_biz_data_inst ( fn_inst_id NUMERIC(19, 0), data_id NUMERIC(19, 0), data_classname NVARCHAR(255) NOT NULL -) -GO +); -CREATE INDEX idx_biz_data_inst1 ON ref_biz_data_inst (tenantid, proc_inst_id) -GO -CREATE INDEX idx_biz_data_inst2 ON ref_biz_data_inst (tenantid, fn_inst_id) -GO -CREATE INDEX idx_biz_data_inst3 ON ref_biz_data_inst (proc_inst_id) -GO -ALTER TABLE ref_biz_data_inst ADD CONSTRAINT pk_ref_biz_data PRIMARY KEY (tenantid, id) -GO -ALTER TABLE ref_biz_data_inst ADD CONSTRAINT fk_ref_biz_data_proc FOREIGN KEY (proc_inst_id) REFERENCES process_instance(id) ON DELETE CASCADE -GO -ALTER TABLE ref_biz_data_inst ADD CONSTRAINT fk_ref_biz_data_fn FOREIGN KEY (tenantid, fn_inst_id) REFERENCES flownode_instance(tenantid, id) ON DELETE CASCADE -GO +CREATE INDEX idx_biz_data_inst1 ON ref_biz_data_inst (tenantid, proc_inst_id); +CREATE INDEX idx_biz_data_inst2 ON ref_biz_data_inst (tenantid, fn_inst_id); +CREATE INDEX idx_biz_data_inst3 ON ref_biz_data_inst (proc_inst_id); +ALTER TABLE ref_biz_data_inst ADD CONSTRAINT pk_ref_biz_data PRIMARY KEY (tenantid, id); +ALTER TABLE ref_biz_data_inst ADD CONSTRAINT fk_ref_biz_data_proc FOREIGN KEY (proc_inst_id) REFERENCES process_instance(id) ON DELETE CASCADE; +ALTER TABLE ref_biz_data_inst ADD CONSTRAINT fk_ref_biz_data_fn FOREIGN KEY (tenantid, fn_inst_id) REFERENCES flownode_instance(tenantid, id) ON DELETE CASCADE; CREATE TABLE multi_biz_data ( tenantid NUMERIC(19, 0) NOT NULL, @@ -527,11 +461,9 @@ CREATE TABLE multi_biz_data ( idx NUMERIC(19, 0) NOT NULL, data_id NUMERIC(19, 0) NOT NULL, PRIMARY KEY (tenantid, id, data_id) -) -GO +); -ALTER TABLE multi_biz_data ADD CONSTRAINT fk_rbdi_mbd FOREIGN KEY (tenantid, id) REFERENCES ref_biz_data_inst(tenantid, id) ON DELETE CASCADE -GO +ALTER TABLE multi_biz_data ADD CONSTRAINT fk_rbdi_mbd FOREIGN KEY (tenantid, id) REFERENCES ref_biz_data_inst(tenantid, id) ON DELETE CASCADE; CREATE TABLE arch_ref_biz_data_inst ( tenantid NUMERIC(19, 0) NOT NULL, @@ -542,26 +474,19 @@ CREATE TABLE arch_ref_biz_data_inst ( orig_fn_inst_id NUMERIC(19, 0), data_id NUMERIC(19, 0), data_classname NVARCHAR(255) NOT NULL -) -GO -CREATE INDEX idx_arch_biz_data_inst1 ON arch_ref_biz_data_inst (tenantid, orig_proc_inst_id) -GO -CREATE INDEX idx_arch_biz_data_inst2 ON arch_ref_biz_data_inst (tenantid, orig_fn_inst_id) -GO -ALTER TABLE arch_ref_biz_data_inst ADD CONSTRAINT pk_arch_ref_biz_data_inst PRIMARY KEY (tenantid, id) -GO +); +CREATE INDEX idx_arch_biz_data_inst1 ON arch_ref_biz_data_inst (tenantid, orig_proc_inst_id); +CREATE INDEX idx_arch_biz_data_inst2 ON arch_ref_biz_data_inst (tenantid, orig_fn_inst_id); +ALTER TABLE arch_ref_biz_data_inst ADD CONSTRAINT pk_arch_ref_biz_data_inst PRIMARY KEY (tenantid, id); CREATE TABLE arch_multi_biz_data ( tenantid NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, idx NUMERIC(19, 0) NOT NULL, data_id NUMERIC(19, 0) NOT NULL -) -GO -ALTER TABLE arch_multi_biz_data ADD CONSTRAINT pk_arch_rbdi_mbd PRIMARY KEY (tenantid, id, data_id) -GO -ALTER TABLE arch_multi_biz_data ADD CONSTRAINT fk_arch_rbdi_mbd FOREIGN KEY (tenantid, id) REFERENCES arch_ref_biz_data_inst(tenantid, id) ON DELETE CASCADE -GO +); +ALTER TABLE arch_multi_biz_data ADD CONSTRAINT pk_arch_rbdi_mbd PRIMARY KEY (tenantid, id, data_id); +ALTER TABLE arch_multi_biz_data ADD CONSTRAINT fk_arch_rbdi_mbd FOREIGN KEY (tenantid, id) REFERENCES arch_ref_biz_data_inst(tenantid, id) ON DELETE CASCADE; CREATE TABLE processsupervisor ( tenantid NUMERIC(19, 0) NOT NULL, @@ -572,8 +497,7 @@ CREATE TABLE processsupervisor ( roleId NUMERIC(19, 0) NOT NULL, UNIQUE (tenantid, processDefId, userId, groupId, roleId), PRIMARY KEY (tenantid, id) -) -GO +); CREATE TABLE business_app ( tenantId NUMERIC(19, 0) NOT NULL, @@ -597,20 +521,14 @@ CREATE TABLE business_app ( editable BIT, internalProfile NVARCHAR(255), isLink BIT DEFAULT 0 -) -GO +); -ALTER TABLE business_app ADD CONSTRAINT pk_business_app PRIMARY KEY (tenantid, id) -GO -ALTER TABLE business_app ADD CONSTRAINT uk_app_token_version UNIQUE (tenantId, token, version) -GO +ALTER TABLE business_app ADD CONSTRAINT pk_business_app PRIMARY KEY (tenantid, id); +ALTER TABLE business_app ADD CONSTRAINT uk_app_token_version UNIQUE (tenantId, token, version); -CREATE INDEX idx_app_token ON business_app (token, tenantid) -GO -CREATE INDEX idx_app_profile ON business_app (profileId, tenantid) -GO -CREATE INDEX idx_app_homepage ON business_app (homePageId, tenantid) -GO +CREATE INDEX idx_app_token ON business_app (token, tenantid); +CREATE INDEX idx_app_profile ON business_app (profileId, tenantid); +CREATE INDEX idx_app_homepage ON business_app (homePageId, tenantid); CREATE TABLE business_app_page ( tenantId NUMERIC(19, 0) NOT NULL, @@ -618,18 +536,13 @@ CREATE TABLE business_app_page ( applicationId NUMERIC(19, 0) NOT NULL, pageId NUMERIC(19, 0) NOT NULL, token NVARCHAR(255) NOT NULL -) -GO +); -ALTER TABLE business_app_page ADD CONSTRAINT pk_business_app_page PRIMARY KEY (tenantid, id) -GO -ALTER TABLE business_app_page ADD CONSTRAINT uk_app_page_appId_token UNIQUE (tenantId, applicationId, token) -GO +ALTER TABLE business_app_page ADD CONSTRAINT pk_business_app_page PRIMARY KEY (tenantid, id); +ALTER TABLE business_app_page ADD CONSTRAINT uk_app_page_appId_token UNIQUE (tenantId, applicationId, token); -CREATE INDEX idx_app_page_token ON business_app_page (applicationId, token, tenantid) -GO -CREATE INDEX idx_app_page_pageId ON business_app_page (pageId, tenantid) -GO +CREATE INDEX idx_app_page_token ON business_app_page (applicationId, token, tenantid); +CREATE INDEX idx_app_page_pageId ON business_app_page (pageId, tenantid); CREATE TABLE business_app_menu ( tenantId NUMERIC(19, 0) NOT NULL, @@ -639,18 +552,13 @@ CREATE TABLE business_app_menu ( applicationPageId NUMERIC(19, 0), parentId NUMERIC(19, 0), index_ NUMERIC(19, 0) -) -GO +); -ALTER TABLE business_app_menu ADD CONSTRAINT pk_business_app_menu PRIMARY KEY (tenantid, id) -GO +ALTER TABLE business_app_menu ADD CONSTRAINT pk_business_app_menu PRIMARY KEY (tenantid, id); -CREATE INDEX idx_app_menu_app ON business_app_menu (applicationId, tenantid) -GO -CREATE INDEX idx_app_menu_page ON business_app_menu (applicationPageId, tenantid) -GO -CREATE INDEX idx_app_menu_parent ON business_app_menu (parentId, tenantid) -GO +CREATE INDEX idx_app_menu_app ON business_app_menu (applicationId, tenantid); +CREATE INDEX idx_app_menu_page ON business_app_menu (applicationPageId, tenantid); +CREATE INDEX idx_app_menu_parent ON business_app_menu (parentId, tenantid); CREATE TABLE command ( tenantid NUMERIC(19, 0) NOT NULL, @@ -661,8 +569,7 @@ CREATE TABLE command ( isSystem BIT, UNIQUE (tenantid, name), PRIMARY KEY (tenantid, id) -) -GO +); CREATE TABLE arch_data_instance ( tenantId NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, @@ -686,13 +593,10 @@ CREATE TABLE arch_data_instance ( archiveDate NUMERIC(19, 0) NOT NULL, sourceObjectId NUMERIC(19, 0) NOT NULL, PRIMARY KEY (tenantid, id) -) -GO +); -CREATE INDEX idx1_arch_data_instance ON arch_data_instance (tenantId, containerId, containerType, archiveDate, name, sourceObjectId) -GO -CREATE INDEX idx2_arch_data_instance ON arch_data_instance (sourceObjectId, containerId, archiveDate, id, tenantId) -GO +CREATE INDEX idx1_arch_data_instance ON arch_data_instance (tenantId, containerId, containerType, archiveDate, name, sourceObjectId); +CREATE INDEX idx2_arch_data_instance ON arch_data_instance (sourceObjectId, containerId, archiveDate, id, tenantId); CREATE TABLE data_instance ( tenantId NUMERIC(19, 0) NOT NULL, @@ -715,10 +619,8 @@ CREATE TABLE data_instance ( clobValue NVARCHAR(MAX), discriminant NVARCHAR(50) NOT NULL, PRIMARY KEY (tenantid, id) -) -GO -CREATE INDEX idx_datai_container ON data_instance (tenantId, containerId, containerType, name) -GO +); +CREATE INDEX idx_datai_container ON data_instance (tenantId, containerId, containerType, name); CREATE TABLE dependency ( tenantid NUMERIC(19, 0) NOT NULL, @@ -729,10 +631,8 @@ CREATE TABLE dependency ( value_ VARBINARY(MAX) NOT NULL, UNIQUE (tenantId, name), PRIMARY KEY (tenantid, id) -) -GO -CREATE INDEX idx_dependency_name ON dependency (name, id) -GO +); +CREATE INDEX idx_dependency_name ON dependency (name, id); CREATE TABLE dependencymapping ( tenantid NUMERIC(19, 0) NOT NULL, @@ -742,12 +642,9 @@ CREATE TABLE dependencymapping ( dependencyid NUMERIC(19, 0) NOT NULL, UNIQUE (tenantid, dependencyid, artifactid, artifacttype), PRIMARY KEY (tenantid, id) -) -GO -CREATE INDEX idx_dependencymapping_depid ON dependencymapping (dependencyid, id) -GO -ALTER TABLE dependencymapping ADD CONSTRAINT fk_depmapping_depid FOREIGN KEY (tenantid, dependencyid) REFERENCES dependency(tenantid, id) ON DELETE CASCADE -GO +); +CREATE INDEX idx_dependencymapping_depid ON dependencymapping (dependencyid, id); +ALTER TABLE dependencymapping ADD CONSTRAINT fk_depmapping_depid FOREIGN KEY (tenantid, dependencyid) REFERENCES dependency(tenantid, id) ON DELETE CASCADE; CREATE TABLE pdependency ( id NUMERIC(19, 0) NOT NULL, name NVARCHAR(50) NOT NULL UNIQUE, @@ -755,10 +652,8 @@ CREATE TABLE pdependency ( filename NVARCHAR(255) NOT NULL, value_ VARBINARY(MAX) NOT NULL, PRIMARY KEY (id) -) -GO -CREATE INDEX idx_pdependency_name ON pdependency (name, id) -GO +); +CREATE INDEX idx_pdependency_name ON pdependency (name, id); CREATE TABLE pdependencymapping ( id NUMERIC(19, 0) NOT NULL, @@ -767,12 +662,9 @@ CREATE TABLE pdependencymapping ( dependencyid NUMERIC(19, 0) NOT NULL, UNIQUE (dependencyid, artifactid, artifacttype), PRIMARY KEY (id) -) -GO -CREATE INDEX idx_pdependencymapping_depid ON pdependencymapping (dependencyid, id) -GO -ALTER TABLE pdependencymapping ADD CONSTRAINT fk_pdepmapping_depid FOREIGN KEY (dependencyid) REFERENCES pdependency(id) ON DELETE CASCADE -GO +); +CREATE INDEX idx_pdependencymapping_depid ON pdependencymapping (dependencyid, id); +ALTER TABLE pdependencymapping ADD CONSTRAINT fk_pdepmapping_depid FOREIGN KEY (dependencyid) REFERENCES pdependency(id) ON DELETE CASCADE; CREATE TABLE external_identity_mapping ( tenantid NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, @@ -783,8 +675,7 @@ CREATE TABLE external_identity_mapping ( roleId NUMERIC(19, 0) NOT NULL, UNIQUE (tenantid, kind, externalId, userId, groupId, roleId), PRIMARY KEY (tenantid, id) -) -GO +); CREATE TABLE group_ ( tenantid NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, @@ -797,10 +688,8 @@ CREATE TABLE group_ ( lastUpdate NUMERIC(19, 0), iconid NUMERIC(19, 0), PRIMARY KEY (tenantid, id) -) -GO +); CREATE INDEX idx_group_name ON group_ (tenantid, parentPath, name); -GO CREATE TABLE role ( tenantid NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, @@ -813,11 +702,9 @@ CREATE TABLE role ( iconid NUMERIC(19, 0), UNIQUE (tenantid, name), PRIMARY KEY (tenantid, id) -) -GO +); -CREATE INDEX idx_role_name ON role (tenantid, name) -GO +CREATE INDEX idx_role_name ON role (tenantid, name); CREATE TABLE user_ ( tenantid NUMERIC(19, 0) NOT NULL, @@ -836,19 +723,16 @@ CREATE TABLE user_ ( iconid NUMERIC(19, 0), UNIQUE (tenantid, userName), PRIMARY KEY (tenantid, id) -) -GO +); -CREATE INDEX idx_user_name ON user_ (tenantid, userName) -GO +CREATE INDEX idx_user_name ON user_ (tenantid, userName); CREATE TABLE user_login ( tenantid NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, lastConnection NUMERIC(19, 0), PRIMARY KEY (tenantid, id) -) -GO +); CREATE TABLE user_contactinfo ( tenantid NUMERIC(19, 0) NOT NULL, @@ -869,12 +753,9 @@ CREATE TABLE user_contactinfo ( personal BIT NOT NULL, UNIQUE (tenantid, userId, personal), PRIMARY KEY (tenantid, id) -) -GO -ALTER TABLE user_contactinfo ADD CONSTRAINT fk_contact_user FOREIGN KEY (tenantid, userId) REFERENCES user_ (tenantid, id) ON DELETE CASCADE -GO -CREATE INDEX idx_user_contactinfo ON user_contactinfo (userId, tenantid, personal) -GO +); +ALTER TABLE user_contactinfo ADD CONSTRAINT fk_contact_user FOREIGN KEY (tenantid, userId) REFERENCES user_ (tenantid, id) ON DELETE CASCADE; +CREATE INDEX idx_user_contactinfo ON user_contactinfo (userId, tenantid, personal); CREATE TABLE custom_usr_inf_def ( @@ -884,11 +765,9 @@ CREATE TABLE custom_usr_inf_def ( description NVARCHAR(MAX), UNIQUE (tenantid, name), PRIMARY KEY (tenantid, id) -) -GO +); -CREATE INDEX idx_custom_usr_inf_def_name ON custom_usr_inf_def (tenantid, name) -GO +CREATE INDEX idx_custom_usr_inf_def_name ON custom_usr_inf_def (tenantid, name); CREATE TABLE custom_usr_inf_val ( id NUMERIC(19, 0) NOT NULL, @@ -898,12 +777,9 @@ CREATE TABLE custom_usr_inf_val ( value NVARCHAR(255), UNIQUE (tenantid, definitionId, userId), PRIMARY KEY (tenantid, id) -) -GO -ALTER TABLE custom_usr_inf_val ADD CONSTRAINT fk_user_id FOREIGN KEY (tenantid, userId) REFERENCES user_ (tenantid, id) ON DELETE CASCADE -GO -ALTER TABLE custom_usr_inf_val ADD CONSTRAINT fk_definition_id FOREIGN KEY (tenantid, definitionId) REFERENCES custom_usr_inf_def (tenantid, id) ON DELETE CASCADE -GO +); +ALTER TABLE custom_usr_inf_val ADD CONSTRAINT fk_user_id FOREIGN KEY (tenantid, userId) REFERENCES user_ (tenantid, id) ON DELETE CASCADE; +ALTER TABLE custom_usr_inf_val ADD CONSTRAINT fk_definition_id FOREIGN KEY (tenantid, definitionId) REFERENCES custom_usr_inf_def (tenantid, id) ON DELETE CASCADE; CREATE TABLE user_membership ( tenantid NUMERIC(19, 0) NOT NULL, @@ -915,8 +791,7 @@ CREATE TABLE user_membership ( assignedDate NUMERIC(19, 0), UNIQUE (tenantid, userId, roleId, groupId), PRIMARY KEY (tenantid, id) -) -GO +); CREATE TABLE queriable_log ( tenantid NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, @@ -942,8 +817,7 @@ CREATE TABLE queriable_log ( numericIndex4 NUMERIC(19, 0), numericIndex5 NUMERIC(19, 0), PRIMARY KEY (tenantid, id) -) -GO +); CREATE TABLE queriablelog_p ( tenantid NUMERIC(19, 0) NOT NULL, @@ -954,13 +828,10 @@ CREATE TABLE queriablelog_p ( blobId NUMERIC(19, 0), valueType NVARCHAR(30), PRIMARY KEY (tenantid, id) -) -GO +); -CREATE INDEX idx_queriablelog ON queriablelog_p (queriableLogId, id) -GO -ALTER TABLE queriablelog_p ADD CONSTRAINT fk_queriableLogId FOREIGN KEY (tenantid, queriableLogId) REFERENCES queriable_log(tenantid, id) -GO +CREATE INDEX idx_queriablelog ON queriablelog_p (queriableLogId, id); +ALTER TABLE queriablelog_p ADD CONSTRAINT fk_queriableLogId FOREIGN KEY (tenantid, queriableLogId) REFERENCES queriable_log(tenantid, id); CREATE TABLE page ( tenantId NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, @@ -979,29 +850,24 @@ CREATE TABLE page ( contentType NVARCHAR(50) NOT NULL, processDefinitionId NUMERIC(19,0) NOT NULL, pageHash NVARCHAR(32) -) -GO +); -ALTER TABLE page ADD CONSTRAINT pk_page PRIMARY KEY (tenantid, id) -GO +ALTER TABLE page ADD CONSTRAINT pk_page PRIMARY KEY (tenantid, id); -ALTER TABLE page ADD CONSTRAINT uk_page UNIQUE (tenantId, name, processDefinitionId) -GO +ALTER TABLE page ADD CONSTRAINT uk_page UNIQUE (tenantId, name, processDefinitionId); CREATE TABLE sequence ( tenantid NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, nextid NUMERIC(19, 0) NOT NULL, PRIMARY KEY (tenantid, id) -) -GO +); CREATE TABLE blob_ ( tenantId NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, blobValue VARBINARY(MAX), PRIMARY KEY (tenantid, id) -) -GO +); CREATE TABLE platform ( id NUMERIC(19, 0) NOT NULL, @@ -1014,8 +880,7 @@ CREATE TABLE platform ( created_by NVARCHAR(50) NOT NULL, information NVARCHAR(MAX), PRIMARY KEY (id) -) -GO +); CREATE TABLE tenant ( id NUMERIC(19, 0) NOT NULL, @@ -1028,15 +893,13 @@ CREATE TABLE tenant ( name NVARCHAR(50) NOT NULL, status NVARCHAR(15) NOT NULL, PRIMARY KEY (id) -) -GO +); CREATE TABLE platformCommand ( id NUMERIC(19, 0) PRIMARY KEY, name NVARCHAR(50) NOT NULL UNIQUE, description NVARCHAR(MAX), IMPLEMENTATION NVARCHAR(100) NOT NULL -) -GO +); CREATE TABLE profile ( tenantId NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, @@ -1049,8 +912,7 @@ CREATE TABLE profile ( lastUpdatedBy NUMERIC(19, 0) NOT NULL, UNIQUE (tenantId, name), PRIMARY KEY (tenantId, id) -) -GO +); CREATE TABLE profilemember ( tenantId NUMERIC(19, 0) NOT NULL, @@ -1061,8 +923,7 @@ CREATE TABLE profilemember ( roleId NUMERIC(19, 0) NOT NULL, UNIQUE (tenantId, profileId, userId, groupId, roleId), PRIMARY KEY (tenantId, id) -) -GO +); CREATE TABLE job_desc ( tenantid NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, @@ -1070,8 +931,7 @@ CREATE TABLE job_desc ( jobname NVARCHAR(100) NOT NULL, description NVARCHAR(50), PRIMARY KEY (tenantid, id) -) -GO +); CREATE TABLE job_param ( tenantid NUMERIC(19, 0) NOT NULL, @@ -1080,10 +940,8 @@ CREATE TABLE job_param ( key_ NVARCHAR(50) NOT NULL, value_ VARBINARY(MAX) NOT NULL, PRIMARY KEY (tenantid, id) -) -GO -CREATE INDEX idx_job_param_tenant_jobid ON job_param (tenantid, jobDescriptorId) -GO +); +CREATE INDEX idx_job_param_tenant_jobid ON job_param (tenantid, jobDescriptorId); CREATE TABLE job_log ( @@ -1095,13 +953,10 @@ CREATE TABLE job_log ( lastMessage NVARCHAR(MAX), UNIQUE (tenantId, jobDescriptorId), PRIMARY KEY (tenantid, id) -) -GO +); -ALTER TABLE job_param ADD CONSTRAINT fk_job_param_jobid FOREIGN KEY (tenantid, jobDescriptorId) REFERENCES job_desc(tenantid, id) ON DELETE CASCADE -GO -ALTER TABLE job_log ADD CONSTRAINT fk_job_log_jobid FOREIGN KEY (tenantid, jobDescriptorId) REFERENCES job_desc(tenantid, id) ON DELETE CASCADE -GO +ALTER TABLE job_param ADD CONSTRAINT fk_job_param_jobid FOREIGN KEY (tenantid, jobDescriptorId) REFERENCES job_desc(tenantid, id) ON DELETE CASCADE; +ALTER TABLE job_log ADD CONSTRAINT fk_job_log_jobid FOREIGN KEY (tenantid, jobDescriptorId) REFERENCES job_desc(tenantid, id) ON DELETE CASCADE; CREATE TABLE form_mapping ( tenantId NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, @@ -1114,8 +969,7 @@ CREATE TABLE form_mapping ( lastUpdatedBy NUMERIC(19, 0), target NVARCHAR(16) NOT NULL, PRIMARY KEY (tenantId, id) -) -GO +); CREATE TABLE page_mapping ( tenantId NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, @@ -1128,10 +982,8 @@ CREATE TABLE page_mapping ( lastUpdatedBy NUMERIC(19, 0) NULL, CONSTRAINT UK_page_mapping UNIQUE (tenantId, key_), PRIMARY KEY (tenantId, id) -) -GO -ALTER TABLE form_mapping ADD CONSTRAINT fk_form_mapping_key FOREIGN KEY (page_mapping_tenant_id, page_mapping_id) REFERENCES page_mapping(tenantId, id) -GO +); +ALTER TABLE form_mapping ADD CONSTRAINT fk_form_mapping_key FOREIGN KEY (page_mapping_tenant_id, page_mapping_id) REFERENCES page_mapping(tenantId, id); CREATE TABLE proc_parameter ( tenantId NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, @@ -1139,8 +991,7 @@ CREATE TABLE proc_parameter ( name NVARCHAR(255) NOT NULL, value NVARCHAR(MAX) NULL, PRIMARY KEY (tenantId, id) -) -GO +); CREATE TABLE bar_resource ( tenantId NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, @@ -1150,10 +1001,8 @@ CREATE TABLE bar_resource ( content VARBINARY(MAX) NOT NULL, UNIQUE (tenantId, process_id, name, type), PRIMARY KEY (tenantId, id) -) -GO -CREATE INDEX idx_bar_resource ON bar_resource (tenantId, process_id, type, name) -GO +); +CREATE INDEX idx_bar_resource ON bar_resource (tenantId, process_id, type, name); CREATE TABLE temporary_content ( id NUMERIC(19, 0) NOT NULL, creationDate NUMERIC(19, 0) NOT NULL, @@ -1164,9 +1013,7 @@ CREATE TABLE temporary_content ( UNIQUE (key_), PRIMARY KEY (id) ); -GO CREATE INDEX idx_temporary_content ON temporary_content (key_); -GO CREATE TABLE tenant_resource ( tenantId NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, @@ -1178,15 +1025,12 @@ CREATE TABLE tenant_resource ( state NVARCHAR(50) NOT NULL, CONSTRAINT UK_tenant_resource UNIQUE (tenantId, name, type), PRIMARY KEY (tenantId, id) -) -GO -CREATE INDEX idx_tenant_resource ON tenant_resource (tenantId, type, name) -GO +); +CREATE INDEX idx_tenant_resource ON tenant_resource (tenantId, type, name); CREATE TABLE icon ( tenantId NUMERIC(19, 0) NOT NULL, id NUMERIC(19, 0) NOT NULL, mimetype NVARCHAR(255) NOT NULL, content VARBINARY(MAX) NOT NULL, CONSTRAINT pk_icon PRIMARY KEY (tenantId, id) -) -GO +); diff --git a/platform/platform-resources/src/main/resources/sql/sqlserver/dropQuartzTables.sql b/platform/platform-resources/src/main/resources/sql/sqlserver/dropQuartzTables.sql index 50d7262cb3..4a4b58a603 100644 --- a/platform/platform-resources/src/main/resources/sql/sqlserver/dropQuartzTables.sql +++ b/platform/platform-resources/src/main/resources/sql/sqlserver/dropQuartzTables.sql @@ -1,59 +1,44 @@ IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[FK_QRTZ_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISFOREIGNKEY') = 1) -ALTER TABLE [dbo].[QRTZ_TRIGGERS] DROP CONSTRAINT FK_QRTZ_TRIGGERS -GO +ALTER TABLE [dbo].[QRTZ_TRIGGERS] DROP CONSTRAINT FK_QRTZ_TRIGGERS; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[FK_QRTZ_CRON_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISFOREIGNKEY') = 1) -ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] DROP CONSTRAINT FK_QRTZ_CRON_TRIGGERS -GO +ALTER TABLE [dbo].[QRTZ_CRON_TRIGGERS] DROP CONSTRAINT FK_QRTZ_CRON_TRIGGERS; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[FK_QRTZ_SIMPLE_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISFOREIGNKEY') = 1) -ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] DROP CONSTRAINT FK_QRTZ_SIMPLE_TRIGGERS -GO +ALTER TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] DROP CONSTRAINT FK_QRTZ_SIMPLE_TRIGGERS; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[FK_QRTZ_SIMPROP_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISFOREIGNKEY') = 1) -ALTER TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] DROP CONSTRAINT FK_QRTZ_SIMPROP_TRIGGERS -GO +ALTER TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] DROP CONSTRAINT FK_QRTZ_SIMPROP_TRIGGERS; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_CALENDARS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_CALENDARS] -GO +DROP TABLE [dbo].[QRTZ_CALENDARS]; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_CRON_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_CRON_TRIGGERS] -GO +DROP TABLE [dbo].[QRTZ_CRON_TRIGGERS]; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_BLOB_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_BLOB_TRIGGERS] -GO +DROP TABLE [dbo].[QRTZ_BLOB_TRIGGERS]; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_FIRED_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_FIRED_TRIGGERS] -GO +DROP TABLE [dbo].[QRTZ_FIRED_TRIGGERS]; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_PAUSED_TRIGGER_GRPS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS] -GO +DROP TABLE [dbo].[QRTZ_PAUSED_TRIGGER_GRPS]; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_SCHEDULER_STATE]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_SCHEDULER_STATE] -GO +DROP TABLE [dbo].[QRTZ_SCHEDULER_STATE]; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_LOCKS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_LOCKS] -GO +DROP TABLE [dbo].[QRTZ_LOCKS]; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_JOB_DETAILS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_JOB_DETAILS] -GO +DROP TABLE [dbo].[QRTZ_JOB_DETAILS]; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_SIMPLE_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] -GO +DROP TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS]; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_SIMPROP_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS] -GO +DROP TABLE [dbo].[QRTZ_SIMPROP_TRIGGERS]; IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) -DROP TABLE [dbo].[QRTZ_TRIGGERS] -GO +DROP TABLE [dbo].[QRTZ_TRIGGERS]; diff --git a/platform/platform-resources/src/main/resources/sql/sqlserver/dropTables.sql b/platform/platform-resources/src/main/resources/sql/sqlserver/dropTables.sql index 27b19a8bbe..b5c9288d05 100644 --- a/platform/platform-resources/src/main/resources/sql/sqlserver/dropTables.sql +++ b/platform/platform-resources/src/main/resources/sql/sqlserver/dropTables.sql @@ -1,136 +1,68 @@ -DROP TABLE configuration -GO -DROP TABLE arch_contract_data -GO -DROP TABLE contract_data -GO -DROP TABLE actormember -GO -DROP TABLE actor -GO -DROP TABLE processcategorymapping -GO -DROP TABLE category -GO -DROP TABLE arch_process_comment -GO -DROP TABLE process_comment -GO -DROP TABLE process_definition -GO -DROP TABLE arch_document_mapping -GO -DROP TABLE document_mapping -GO -DROP TABLE document -GO -DROP TABLE arch_flownode_instance -GO -DROP TABLE arch_process_instance -GO -DROP TABLE arch_connector_instance -GO -DROP TABLE arch_multi_biz_data -GO -DROP TABLE arch_ref_biz_data_inst -GO -DROP TABLE multi_biz_data -GO -DROP TABLE ref_biz_data_inst -GO -DROP TABLE pending_mapping -GO -DROP TABLE connector_instance -GO -DROP TABLE flownode_instance -GO -DROP TABLE process_instance -GO -DROP TABLE event_trigger_instance -GO -DROP TABLE waiting_event -GO -DROP TABLE message_instance -GO -DROP TABLE processsupervisor -GO -DROP TABLE business_app_menu -GO -DROP TABLE business_app_page -GO -DROP TABLE business_app -GO -DROP TABLE command -GO -DROP TABLE arch_data_instance -GO -DROP TABLE data_instance -GO -DROP TABLE dependencymapping -GO -DROP TABLE dependency -GO -DROP TABLE pdependencymapping -GO -DROP TABLE pdependency -GO -DROP TABLE external_identity_mapping -GO -DROP TABLE user_membership -GO -DROP TABLE custom_usr_inf_val -GO -DROP TABLE custom_usr_inf_def -GO -DROP TABLE user_contactinfo -GO -DROP TABLE user_login -GO -DROP TABLE user_ -GO -DROP TABLE role -GO -DROP TABLE group_ -GO -DROP TABLE queriablelog_p -GO -DROP TABLE queriable_log -GO -DROP TABLE page -GO -DROP TABLE blob_ -GO -DROP TABLE profilemember -GO -DROP TABLE profile -GO -DROP TABLE job_log -GO -DROP TABLE job_param -GO -DROP TABLE job_desc -GO -DROP TABLE sequence -GO -DROP TABLE tenant -GO -DROP TABLE platform -GO -DROP TABLE platformCommand -GO -DROP TABLE form_mapping -GO -DROP TABLE page_mapping -GO -DROP TABLE process_content -GO -DROP TABLE proc_parameter -GO -DROP TABLE bar_resource -GO -DROP TABLE temporary_content -GO -DROP TABLE tenant_resource -GO -DROP TABLE icon -GO \ No newline at end of file +DROP TABLE configuration; +DROP TABLE arch_contract_data; +DROP TABLE contract_data; +DROP TABLE actormember; +DROP TABLE actor; +DROP TABLE processcategorymapping; +DROP TABLE category; +DROP TABLE arch_process_comment; +DROP TABLE process_comment; +DROP TABLE process_definition; +DROP TABLE arch_document_mapping; +DROP TABLE document_mapping; +DROP TABLE document; +DROP TABLE arch_flownode_instance; +DROP TABLE arch_process_instance; +DROP TABLE arch_connector_instance; +DROP TABLE arch_multi_biz_data; +DROP TABLE arch_ref_biz_data_inst; +DROP TABLE multi_biz_data; +DROP TABLE ref_biz_data_inst; +DROP TABLE pending_mapping; +DROP TABLE connector_instance; +DROP TABLE flownode_instance; +DROP TABLE process_instance; +DROP TABLE event_trigger_instance; +DROP TABLE waiting_event; +DROP TABLE message_instance; +DROP TABLE processsupervisor; +DROP TABLE business_app_menu; +DROP TABLE business_app_page; +DROP TABLE business_app; +DROP TABLE command; +DROP TABLE arch_data_instance; +DROP TABLE data_instance; +DROP TABLE dependencymapping; +DROP TABLE dependency; +DROP TABLE pdependencymapping; +DROP TABLE pdependency; +DROP TABLE external_identity_mapping; +DROP TABLE user_membership; +DROP TABLE custom_usr_inf_val; +DROP TABLE custom_usr_inf_def; +DROP TABLE user_contactinfo; +DROP TABLE user_login; +DROP TABLE user_; +DROP TABLE role; +DROP TABLE group_; +DROP TABLE queriablelog_p; +DROP TABLE queriable_log; +DROP TABLE page; +DROP TABLE blob_; +DROP TABLE profilemember; +DROP TABLE profile; +DROP TABLE job_log; +DROP TABLE job_param; +DROP TABLE job_desc; +DROP TABLE sequence; +DROP TABLE tenant; +DROP TABLE platform; +DROP TABLE platformCommand; +DROP TABLE form_mapping; +DROP TABLE page_mapping; +DROP TABLE process_content; +DROP TABLE proc_parameter; +DROP TABLE bar_resource; +DROP TABLE temporary_content; +DROP TABLE tenant_resource; +DROP TABLE icon; \ No newline at end of file diff --git a/platform/platform-resources/src/main/resources/sql/sqlserver/initTables.sql b/platform/platform-resources/src/main/resources/sql/sqlserver/initTables.sql index 531cc76337..bfeebfde4a 100644 --- a/platform/platform-resources/src/main/resources/sql/sqlserver/initTables.sql +++ b/platform/platform-resources/src/main/resources/sql/sqlserver/initTables.sql @@ -1,131 +1,66 @@ -INSERT INTO sequence VALUES (-1, 1, 1) -GO -INSERT INTO sequence VALUES (-1, 2, 1) -GO -INSERT INTO sequence VALUES (-1, 3, 1) -GO -INSERT INTO sequence VALUES (-1, 4, 1) -GO -INSERT INTO sequence VALUES (-1, 5, 1) -GO -INSERT INTO sequence VALUES(1, 10, 1) - GO -INSERT INTO sequence VALUES(1, 11, 1) - GO -INSERT INTO sequence VALUES(1, 20, 1) - GO -INSERT INTO sequence VALUES(1, 21, 1) - GO -INSERT INTO sequence VALUES(1, 22, 1) - GO -INSERT INTO sequence VALUES(1, 23, 1) - GO -INSERT INTO sequence VALUES(1, 24, 1) - GO -INSERT INTO sequence VALUES(1, 25, 1) - GO -INSERT INTO sequence VALUES(1, 26, 1) - GO -INSERT INTO sequence VALUES(1, 27, 1) - GO -INSERT INTO sequence VALUES(1, 30, 1) - GO -INSERT INTO sequence VALUES(1, 31, 1) - GO -INSERT INTO sequence VALUES(1, 70, 1) - GO -INSERT INTO sequence VALUES(1, 71, 1) - GO -INSERT INTO sequence VALUES(1, 72, 1) - GO -INSERT INTO sequence VALUES(1, 90, 1) - GO -INSERT INTO sequence VALUES(1, 9990, 1) - GO -INSERT INTO sequence VALUES(1, 9992, 1) - GO -INSERT INTO sequence VALUES(1, 10000, 1) - GO -INSERT INTO sequence VALUES(1, 10001, 1) - GO -INSERT INTO sequence VALUES(1, 10010, 1) - GO -INSERT INTO sequence VALUES(1, 10011, 1) - GO -INSERT INTO sequence VALUES(1, 10012, 1) - GO -INSERT INTO sequence VALUES(1, 10014, 1) - GO -INSERT INTO sequence VALUES(1, 10015, 1) - GO -INSERT INTO sequence VALUES(1, 10016, 1) - GO -INSERT INTO sequence VALUES(1, 10017, 1) - GO -INSERT INTO sequence VALUES(1, 10018, 1) - GO -INSERT INTO sequence VALUES(1, 10020, 1) - GO -INSERT INTO sequence VALUES(1, 10021, 1) - GO -INSERT INTO sequence VALUES(1, 10030, 1) - GO -INSERT INTO sequence VALUES(1, 10031, 1) - GO -INSERT INTO sequence VALUES(1, 10040, 1) - GO -INSERT INTO sequence VALUES(1, 20051, 1) - GO -INSERT INTO sequence VALUES(1, 10050, 1) - GO -INSERT INTO sequence VALUES(1, 10060, 1) - GO -INSERT INTO sequence VALUES(1, 10070, 1) - GO -INSERT INTO sequence VALUES(1, 10080, 1) - GO -INSERT INTO sequence VALUES(1, 10090, 1) - GO -INSERT INTO sequence VALUES(1, 10096, 1) - GO -INSERT INTO sequence VALUES(1, 10120, 1) - GO -INSERT INTO sequence VALUES(1, 10121, 1) - GO -INSERT INTO sequence VALUES(1, 10200, 1) - GO -INSERT INTO sequence VALUES(1, 10201, 1) - GO -INSERT INTO sequence VALUES(1, 10202, 1) - GO -INSERT INTO sequence VALUES(1, 10210, 1) - GO -INSERT INTO sequence VALUES(1, 10220, 1) - GO -INSERT INTO sequence VALUES(1, 10300, 1) - GO -INSERT INTO sequence VALUES(1, 10310, 1) - GO -INSERT INTO sequence VALUES(1, 10400, 1) - GO -INSERT INTO sequence VALUES(1, 10500, 1) - GO -INSERT INTO sequence VALUES(1, 10501, 1) - GO -INSERT INTO sequence VALUES(1, 20010, 1) - GO -INSERT INTO sequence VALUES(1, 20011, 1) - GO -INSERT INTO sequence VALUES(1, 20013, 1) - GO -INSERT INTO sequence VALUES(1, 20040, 1) - GO -INSERT INTO sequence VALUES(1, 20050, 1) - GO -INSERT INTO sequence VALUES(1, 20210, 1) - GO -INSERT INTO sequence VALUES(1, 20220, 1) - GO -INSERT INTO sequence VALUES(1, 20096, 1) - GO +INSERT INTO sequence VALUES (-1, 1, 1); +INSERT INTO sequence VALUES (-1, 2, 1); +INSERT INTO sequence VALUES (-1, 3, 1); +INSERT INTO sequence VALUES (-1, 4, 1); +INSERT INTO sequence VALUES (-1, 5, 1); +INSERT INTO sequence VALUES(1, 10, 1); +INSERT INTO sequence VALUES(1, 11, 1); +INSERT INTO sequence VALUES(1, 20, 1); +INSERT INTO sequence VALUES(1, 21, 1); +INSERT INTO sequence VALUES(1, 22, 1); +INSERT INTO sequence VALUES(1, 23, 1); +INSERT INTO sequence VALUES(1, 24, 1); +INSERT INTO sequence VALUES(1, 25, 1); +INSERT INTO sequence VALUES(1, 26, 1); +INSERT INTO sequence VALUES(1, 27, 1); +INSERT INTO sequence VALUES(1, 30, 1); +INSERT INTO sequence VALUES(1, 31, 1); +INSERT INTO sequence VALUES(1, 70, 1); +INSERT INTO sequence VALUES(1, 71, 1); +INSERT INTO sequence VALUES(1, 72, 1); +INSERT INTO sequence VALUES(1, 90, 1); +INSERT INTO sequence VALUES(1, 9990, 1); +INSERT INTO sequence VALUES(1, 9992, 1); +INSERT INTO sequence VALUES(1, 10000, 1); +INSERT INTO sequence VALUES(1, 10001, 1); +INSERT INTO sequence VALUES(1, 10010, 1); +INSERT INTO sequence VALUES(1, 10011, 1); +INSERT INTO sequence VALUES(1, 10012, 1); +INSERT INTO sequence VALUES(1, 10014, 1); +INSERT INTO sequence VALUES(1, 10015, 1); +INSERT INTO sequence VALUES(1, 10016, 1); +INSERT INTO sequence VALUES(1, 10017, 1); +INSERT INTO sequence VALUES(1, 10018, 1); +INSERT INTO sequence VALUES(1, 10020, 1); +INSERT INTO sequence VALUES(1, 10021, 1); +INSERT INTO sequence VALUES(1, 10030, 1); +INSERT INTO sequence VALUES(1, 10031, 1); +INSERT INTO sequence VALUES(1, 10040, 1); +INSERT INTO sequence VALUES(1, 20051, 1); +INSERT INTO sequence VALUES(1, 10050, 1); +INSERT INTO sequence VALUES(1, 10060, 1); +INSERT INTO sequence VALUES(1, 10070, 1); +INSERT INTO sequence VALUES(1, 10080, 1); +INSERT INTO sequence VALUES(1, 10090, 1); +INSERT INTO sequence VALUES(1, 10096, 1); +INSERT INTO sequence VALUES(1, 10120, 1); +INSERT INTO sequence VALUES(1, 10121, 1); +INSERT INTO sequence VALUES(1, 10200, 1); +INSERT INTO sequence VALUES(1, 10201, 1); +INSERT INTO sequence VALUES(1, 10202, 1); +INSERT INTO sequence VALUES(1, 10210, 1); +INSERT INTO sequence VALUES(1, 10220, 1); +INSERT INTO sequence VALUES(1, 10300, 1); +INSERT INTO sequence VALUES(1, 10310, 1); +INSERT INTO sequence VALUES(1, 10400, 1); +INSERT INTO sequence VALUES(1, 10500, 1); +INSERT INTO sequence VALUES(1, 10501, 1); +INSERT INTO sequence VALUES(1, 20010, 1); +INSERT INTO sequence VALUES(1, 20011, 1); +INSERT INTO sequence VALUES(1, 20013, 1); +INSERT INTO sequence VALUES(1, 20040, 1); +INSERT INTO sequence VALUES(1, 20050, 1); +INSERT INTO sequence VALUES(1, 20210, 1); +INSERT INTO sequence VALUES(1, 20220, 1); +INSERT INTO sequence VALUES(1, 20096, 1); diff --git a/platform/platform-resources/src/main/resources/sql/sqlserver/postCreateStructure.sql b/platform/platform-resources/src/main/resources/sql/sqlserver/postCreateStructure.sql index 95a3ff97c3..9b9c721bbc 100755 --- a/platform/platform-resources/src/main/resources/sql/sqlserver/postCreateStructure.sql +++ b/platform/platform-resources/src/main/resources/sql/sqlserver/postCreateStructure.sql @@ -1,127 +1,70 @@ -- ------------------------------------------------ Foreign Keys ----------------------------------------------- -ALTER TABLE actor ADD CONSTRAINT fk_actor_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE actormember ADD CONSTRAINT fk_actormember_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE actormember ADD CONSTRAINT fk_actormember_actorId FOREIGN KEY (tenantid, actorId) REFERENCES actor(tenantid, id) -GO --- ALTER TABLE queriable_log ADD CONSTRAINT fk_queriable_log_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE queriablelog_p ADD CONSTRAINT fk_queriablelog_p_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE category ADD CONSTRAINT fk_category_tenantId FOREIGN KEY (tenantid) REFERENCES tenant (id) -GO -ALTER TABLE command ADD CONSTRAINT fk_command_tenantId FOREIGN KEY (tenantid) REFERENCES tenant (id) -GO -ALTER TABLE connector_instance ADD CONSTRAINT fk_connector_instance_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE data_instance ADD CONSTRAINT fk_data_instance_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE dependency ADD CONSTRAINT fk_dependency_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE dependencymapping ADD CONSTRAINT fk_dependencymapping_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE document ADD CONSTRAINT fk_document_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE document_mapping ADD CONSTRAINT fk_document_mapping_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE document_mapping ADD CONSTRAINT fk_docmap_docid FOREIGN KEY (tenantid, documentid) REFERENCES document(tenantid, id) ON DELETE CASCADE -GO -ALTER TABLE event_trigger_instance ADD CONSTRAINT fk_event_trigger_instance_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE external_identity_mapping ADD CONSTRAINT fk_external_identity_mapping_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE flownode_instance ADD CONSTRAINT fk_flownode_instance_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE group_ ADD CONSTRAINT fk_group__tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE job_desc ADD CONSTRAINT fk_job_desc_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE job_param ADD CONSTRAINT fk_job_param_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE message_instance ADD CONSTRAINT fk_message_instance_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE custom_usr_inf_def ADD CONSTRAINT fk_custom_usr_inf_def_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE custom_usr_inf_val ADD CONSTRAINT fk_custom_usr_inf_val_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE pending_mapping ADD CONSTRAINT fk_pending_mapping_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE pending_mapping ADD CONSTRAINT fk_pending_mapping_flownode_instanceId FOREIGN KEY (tenantid, activityId) REFERENCES flownode_instance(tenantid, id) -GO -ALTER TABLE processcategorymapping ADD CONSTRAINT fk_processcategorymapping_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE process_comment ADD CONSTRAINT fk_process_comment_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE process_definition ADD CONSTRAINT fk_process_definition_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE process_definition ADD CONSTRAINT fk_process_definition_content FOREIGN KEY (content_tenantid, content_id) REFERENCES process_content(tenantid, id) -GO -ALTER TABLE processsupervisor ADD CONSTRAINT fk_processsupervisor_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE profile ADD CONSTRAINT fk_profile_tenantId FOREIGN KEY (tenantId) REFERENCES tenant(id) -GO -ALTER TABLE profilemember ADD CONSTRAINT fk_profilemember_tenantId FOREIGN KEY (tenantId) REFERENCES tenant(id) -GO -ALTER TABLE multi_biz_data ADD CONSTRAINT fk_multi_biz_data_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE ref_biz_data_inst ADD CONSTRAINT fk_ref_biz_data_inst_tenantId FOREIGN KEY (tenantId) REFERENCES tenant(id) -GO -ALTER TABLE role ADD CONSTRAINT fk_role_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE user_ ADD CONSTRAINT fk_user__tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE user_membership ADD CONSTRAINT fk_user_membership_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE waiting_event ADD CONSTRAINT fk_waiting_event_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO +ALTER TABLE actor ADD CONSTRAINT fk_actor_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE actormember ADD CONSTRAINT fk_actormember_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE actormember ADD CONSTRAINT fk_actormember_actorId FOREIGN KEY (tenantid, actorId) REFERENCES actor(tenantid, id); +-- ALTER TABLE queriable_log ADD CONSTRAINT fk_queriable_log_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE queriablelog_p ADD CONSTRAINT fk_queriablelog_p_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE category ADD CONSTRAINT fk_category_tenantId FOREIGN KEY (tenantid) REFERENCES tenant (id); +ALTER TABLE command ADD CONSTRAINT fk_command_tenantId FOREIGN KEY (tenantid) REFERENCES tenant (id); +ALTER TABLE connector_instance ADD CONSTRAINT fk_connector_instance_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE data_instance ADD CONSTRAINT fk_data_instance_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE dependency ADD CONSTRAINT fk_dependency_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE dependencymapping ADD CONSTRAINT fk_dependencymapping_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE document ADD CONSTRAINT fk_document_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE document_mapping ADD CONSTRAINT fk_document_mapping_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE document_mapping ADD CONSTRAINT fk_docmap_docid FOREIGN KEY (tenantid, documentid) REFERENCES document(tenantid, id) ON DELETE CASCADE; +ALTER TABLE event_trigger_instance ADD CONSTRAINT fk_event_trigger_instance_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE external_identity_mapping ADD CONSTRAINT fk_external_identity_mapping_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE flownode_instance ADD CONSTRAINT fk_flownode_instance_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE group_ ADD CONSTRAINT fk_group__tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE job_desc ADD CONSTRAINT fk_job_desc_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE job_param ADD CONSTRAINT fk_job_param_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE message_instance ADD CONSTRAINT fk_message_instance_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE custom_usr_inf_def ADD CONSTRAINT fk_custom_usr_inf_def_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE custom_usr_inf_val ADD CONSTRAINT fk_custom_usr_inf_val_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE pending_mapping ADD CONSTRAINT fk_pending_mapping_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE pending_mapping ADD CONSTRAINT fk_pending_mapping_flownode_instanceId FOREIGN KEY (tenantid, activityId) REFERENCES flownode_instance(tenantid, id); +ALTER TABLE processcategorymapping ADD CONSTRAINT fk_processcategorymapping_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE process_comment ADD CONSTRAINT fk_process_comment_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE process_definition ADD CONSTRAINT fk_process_definition_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE process_definition ADD CONSTRAINT fk_process_definition_content FOREIGN KEY (content_tenantid, content_id) REFERENCES process_content(tenantid, id); +ALTER TABLE processsupervisor ADD CONSTRAINT fk_processsupervisor_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE profile ADD CONSTRAINT fk_profile_tenantId FOREIGN KEY (tenantId) REFERENCES tenant(id); +ALTER TABLE profilemember ADD CONSTRAINT fk_profilemember_tenantId FOREIGN KEY (tenantId) REFERENCES tenant(id); +ALTER TABLE multi_biz_data ADD CONSTRAINT fk_multi_biz_data_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE ref_biz_data_inst ADD CONSTRAINT fk_ref_biz_data_inst_tenantId FOREIGN KEY (tenantId) REFERENCES tenant(id); +ALTER TABLE role ADD CONSTRAINT fk_role_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE user_ ADD CONSTRAINT fk_user__tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE user_membership ADD CONSTRAINT fk_user_membership_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE waiting_event ADD CONSTRAINT fk_waiting_event_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); -ALTER TABLE profilemember ADD CONSTRAINT fk_profilemember_profileId FOREIGN KEY (tenantId, profileId) REFERENCES profile(tenantId, id) -GO --- ALTER TABLE process_comment ADD CONSTRAINT fk_process_comment_process_instanceId FOREIGN KEY (processInstanceId) REFERENCES process_instance(id) -GO +ALTER TABLE profilemember ADD CONSTRAINT fk_profilemember_profileId FOREIGN KEY (tenantId, profileId) REFERENCES profile(tenantId, id); +-- ALTER TABLE process_comment ADD CONSTRAINT fk_process_comment_process_instanceId FOREIGN KEY (processInstanceId) REFERENCES process_instance(id); -- business application -ALTER TABLE business_app ADD CONSTRAINT fk_app_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE business_app ADD CONSTRAINT fk_app_profileId FOREIGN KEY (tenantid, profileId) REFERENCES profile (tenantid, id) -GO -ALTER TABLE business_app ADD CONSTRAINT fk_app_layoutId FOREIGN KEY (tenantid, layoutId) REFERENCES page (tenantid, id) -GO -ALTER TABLE business_app ADD CONSTRAINT fk_app_themeId FOREIGN KEY (tenantid, themeId) REFERENCES page (tenantid, id) -GO -ALTER TABLE business_app_page ADD CONSTRAINT fk_app_page_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE business_app_page ADD CONSTRAINT fk_bus_app_id FOREIGN KEY (tenantid, applicationId) REFERENCES business_app (tenantid, id) ON DELETE CASCADE -GO -ALTER TABLE business_app_page ADD CONSTRAINT fk_page_id FOREIGN KEY (tenantid, pageId) REFERENCES page (tenantid, id) -GO +ALTER TABLE business_app ADD CONSTRAINT fk_app_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE business_app ADD CONSTRAINT fk_app_profileId FOREIGN KEY (tenantid, profileId) REFERENCES profile (tenantid, id); +ALTER TABLE business_app ADD CONSTRAINT fk_app_layoutId FOREIGN KEY (tenantid, layoutId) REFERENCES page (tenantid, id); +ALTER TABLE business_app ADD CONSTRAINT fk_app_themeId FOREIGN KEY (tenantid, themeId) REFERENCES page (tenantid, id); +ALTER TABLE business_app_page ADD CONSTRAINT fk_app_page_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE business_app_page ADD CONSTRAINT fk_bus_app_id FOREIGN KEY (tenantid, applicationId) REFERENCES business_app (tenantid, id) ON DELETE CASCADE; +ALTER TABLE business_app_page ADD CONSTRAINT fk_page_id FOREIGN KEY (tenantid, pageId) REFERENCES page (tenantid, id); -ALTER TABLE business_app_menu ADD CONSTRAINT fk_app_menu_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO +ALTER TABLE business_app_menu ADD CONSTRAINT fk_app_menu_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); -- cannot have both fk_app_menu_appId and fk_app_menu_pageId because this create to path for deletion of business_app_menu elements: -- business_app -> business_app_menu -- business_app -> business_app_page -> business_app_menu -- this is not allowed in SQL Server -ALTER TABLE business_app_menu ADD CONSTRAINT fk_app_menu_appId FOREIGN KEY (tenantid, applicationId) REFERENCES business_app (tenantid, id) -GO -ALTER TABLE business_app_menu ADD CONSTRAINT fk_app_menu_pageId FOREIGN KEY (tenantid, applicationPageId) REFERENCES business_app_page (tenantid, id) -GO +ALTER TABLE business_app_menu ADD CONSTRAINT fk_app_menu_appId FOREIGN KEY (tenantid, applicationId) REFERENCES business_app (tenantid, id); +ALTER TABLE business_app_menu ADD CONSTRAINT fk_app_menu_pageId FOREIGN KEY (tenantid, applicationPageId) REFERENCES business_app_page (tenantid, id); -ALTER TABLE business_app_menu ADD CONSTRAINT fk_app_menu_parentId FOREIGN KEY (tenantid, parentId) REFERENCES business_app_menu (tenantid, id) -GO +ALTER TABLE business_app_menu ADD CONSTRAINT fk_app_menu_parentId FOREIGN KEY (tenantid, parentId) REFERENCES business_app_menu (tenantid, id); -- ------------------------ Foreign Keys to disable if archiving is on another BD ------------------ -ALTER TABLE arch_document_mapping ADD CONSTRAINT fk_arch_document_mapping_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE arch_document_mapping ADD CONSTRAINT fk_archdocmap_docid FOREIGN KEY (tenantid, documentid) REFERENCES document(tenantid, id) ON DELETE CASCADE -GO -ALTER TABLE arch_flownode_instance ADD CONSTRAINT fk_arch_flownode_instance_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE arch_process_comment ADD CONSTRAINT fk_arch_process_comment_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE arch_process_instance ADD CONSTRAINT fk_arch_process_instance_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO -ALTER TABLE arch_data_instance ADD CONSTRAINT fk_arch_data_instance_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id) -GO +ALTER TABLE arch_document_mapping ADD CONSTRAINT fk_arch_document_mapping_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE arch_document_mapping ADD CONSTRAINT fk_archdocmap_docid FOREIGN KEY (tenantid, documentid) REFERENCES document(tenantid, id) ON DELETE CASCADE; +ALTER TABLE arch_flownode_instance ADD CONSTRAINT fk_arch_flownode_instance_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE arch_process_comment ADD CONSTRAINT fk_arch_process_comment_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE arch_process_instance ADD CONSTRAINT fk_arch_process_instance_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); +ALTER TABLE arch_data_instance ADD CONSTRAINT fk_arch_data_instance_tenantId FOREIGN KEY (tenantid) REFERENCES tenant(id); diff --git a/platform/platform-resources/src/main/resources/sql/sqlserver/preDropStructure.sql b/platform/platform-resources/src/main/resources/sql/sqlserver/preDropStructure.sql index 127cbb6f60..3b9d8f6acd 100755 --- a/platform/platform-resources/src/main/resources/sql/sqlserver/preDropStructure.sql +++ b/platform/platform-resources/src/main/resources/sql/sqlserver/preDropStructure.sql @@ -1,120 +1,63 @@ -- ------------------------------------------------ Foreign Keys ----------------------------------------------- -ALTER TABLE actor DROP CONSTRAINT fk_actor_tenantId -GO -ALTER TABLE actormember DROP CONSTRAINT fk_actormember_tenantId -GO -ALTER TABLE actormember DROP CONSTRAINT fk_actormember_actorId -GO --- ALTER TABLE queriable_log DROP CONSTRAINT fk_queriable_log_tenantId -GO -ALTER TABLE queriablelog_p DROP CONSTRAINT fk_queriablelog_p_tenantId -GO -ALTER TABLE category DROP CONSTRAINT fk_category_tenantId -GO -ALTER TABLE command DROP CONSTRAINT fk_command_tenantId -GO -ALTER TABLE connector_instance DROP CONSTRAINT fk_connector_instance_tenantId -GO -ALTER TABLE data_instance DROP CONSTRAINT fk_data_instance_tenantId -GO -ALTER TABLE dependency DROP CONSTRAINT fk_dependency_tenantId -GO -ALTER TABLE dependencymapping DROP CONSTRAINT fk_dependencymapping_tenantId -GO -ALTER TABLE document DROP CONSTRAINT fk_document_tenantId -GO -ALTER TABLE document_mapping DROP CONSTRAINT fk_document_mapping_tenantId -GO -ALTER TABLE document_mapping DROP CONSTRAINT fk_docmap_docid -GO -ALTER TABLE event_trigger_instance DROP CONSTRAINT fk_event_trigger_instance_tenantId -GO -ALTER TABLE external_identity_mapping DROP CONSTRAINT fk_external_identity_mapping_tenantId -GO -ALTER TABLE flownode_instance DROP CONSTRAINT fk_flownode_instance_tenantId -GO -ALTER TABLE group_ DROP CONSTRAINT fk_group__tenantId -GO -ALTER TABLE job_desc DROP CONSTRAINT fk_job_desc_tenantId -GO -ALTER TABLE job_param DROP CONSTRAINT fk_job_param_tenantId -GO -ALTER TABLE message_instance DROP CONSTRAINT fk_message_instance_tenantId -GO -ALTER TABLE custom_usr_inf_def DROP CONSTRAINT fk_custom_usr_inf_def_tenantId -GO -ALTER TABLE custom_usr_inf_val DROP CONSTRAINT fk_custom_usr_inf_val_tenantId -GO -ALTER TABLE pending_mapping DROP CONSTRAINT fk_pending_mapping_tenantId -GO -ALTER TABLE pending_mapping DROP CONSTRAINT fk_pending_mapping_flownode_instanceId -GO -ALTER TABLE processcategorymapping DROP CONSTRAINT fk_processcategorymapping_tenantId -GO -ALTER TABLE process_comment DROP CONSTRAINT fk_process_comment_tenantId -GO -ALTER TABLE process_definition DROP CONSTRAINT fk_process_definition_tenantId -GO -ALTER TABLE process_definition DROP CONSTRAINT fk_process_definition_content -GO -ALTER TABLE processsupervisor DROP CONSTRAINT fk_processsupervisor_tenantId -GO -ALTER TABLE profile DROP CONSTRAINT fk_profile_tenantId -GO -ALTER TABLE profilemember DROP CONSTRAINT fk_profilemember_tenantId -GO -ALTER TABLE multi_biz_data DROP CONSTRAINT fk_multi_biz_data_tenantId -GO -ALTER TABLE ref_biz_data_inst DROP CONSTRAINT fk_ref_biz_data_inst_tenantId -GO -ALTER TABLE role DROP CONSTRAINT fk_role_tenantId -GO -ALTER TABLE user_ DROP CONSTRAINT fk_user__tenantId -GO -ALTER TABLE user_membership DROP CONSTRAINT fk_user_membership_tenantId -GO -ALTER TABLE waiting_event DROP CONSTRAINT fk_waiting_event_tenantId -GO +ALTER TABLE actor DROP CONSTRAINT fk_actor_tenantId; +ALTER TABLE actormember DROP CONSTRAINT fk_actormember_tenantId; +ALTER TABLE actormember DROP CONSTRAINT fk_actormember_actorId; +-- ALTER TABLE queriable_log DROP CONSTRAINT fk_queriable_log_tenantId; +ALTER TABLE queriablelog_p DROP CONSTRAINT fk_queriablelog_p_tenantId; +ALTER TABLE category DROP CONSTRAINT fk_category_tenantId; +ALTER TABLE command DROP CONSTRAINT fk_command_tenantId; +ALTER TABLE connector_instance DROP CONSTRAINT fk_connector_instance_tenantId; +ALTER TABLE data_instance DROP CONSTRAINT fk_data_instance_tenantId; +ALTER TABLE dependency DROP CONSTRAINT fk_dependency_tenantId; +ALTER TABLE dependencymapping DROP CONSTRAINT fk_dependencymapping_tenantId; +ALTER TABLE document DROP CONSTRAINT fk_document_tenantId; +ALTER TABLE document_mapping DROP CONSTRAINT fk_document_mapping_tenantId; +ALTER TABLE document_mapping DROP CONSTRAINT fk_docmap_docid; +ALTER TABLE event_trigger_instance DROP CONSTRAINT fk_event_trigger_instance_tenantId; +ALTER TABLE external_identity_mapping DROP CONSTRAINT fk_external_identity_mapping_tenantId; +ALTER TABLE flownode_instance DROP CONSTRAINT fk_flownode_instance_tenantId; +ALTER TABLE group_ DROP CONSTRAINT fk_group__tenantId; +ALTER TABLE job_desc DROP CONSTRAINT fk_job_desc_tenantId; +ALTER TABLE job_param DROP CONSTRAINT fk_job_param_tenantId; +ALTER TABLE message_instance DROP CONSTRAINT fk_message_instance_tenantId; +ALTER TABLE custom_usr_inf_def DROP CONSTRAINT fk_custom_usr_inf_def_tenantId; +ALTER TABLE custom_usr_inf_val DROP CONSTRAINT fk_custom_usr_inf_val_tenantId; +ALTER TABLE pending_mapping DROP CONSTRAINT fk_pending_mapping_tenantId; +ALTER TABLE pending_mapping DROP CONSTRAINT fk_pending_mapping_flownode_instanceId; +ALTER TABLE processcategorymapping DROP CONSTRAINT fk_processcategorymapping_tenantId; +ALTER TABLE process_comment DROP CONSTRAINT fk_process_comment_tenantId; +ALTER TABLE process_definition DROP CONSTRAINT fk_process_definition_tenantId; +ALTER TABLE process_definition DROP CONSTRAINT fk_process_definition_content; +ALTER TABLE processsupervisor DROP CONSTRAINT fk_processsupervisor_tenantId; +ALTER TABLE profile DROP CONSTRAINT fk_profile_tenantId; +ALTER TABLE profilemember DROP CONSTRAINT fk_profilemember_tenantId; +ALTER TABLE multi_biz_data DROP CONSTRAINT fk_multi_biz_data_tenantId; +ALTER TABLE ref_biz_data_inst DROP CONSTRAINT fk_ref_biz_data_inst_tenantId; +ALTER TABLE role DROP CONSTRAINT fk_role_tenantId; +ALTER TABLE user_ DROP CONSTRAINT fk_user__tenantId; +ALTER TABLE user_membership DROP CONSTRAINT fk_user_membership_tenantId; +ALTER TABLE waiting_event DROP CONSTRAINT fk_waiting_event_tenantId; -ALTER TABLE profilemember DROP CONSTRAINT fk_profilemember_profileId -GO --- ALTER TABLE process_comment DROP CONSTRAINT fk_process_comment_process_instanceId -GO +ALTER TABLE profilemember DROP CONSTRAINT fk_profilemember_profileId; +-- ALTER TABLE process_comment DROP CONSTRAINT fk_process_comment_process_instanceId; -- business application -ALTER TABLE business_app_menu DROP CONSTRAINT fk_app_menu_tenantId -GO -ALTER TABLE business_app_menu DROP CONSTRAINT fk_app_menu_appId -GO -ALTER TABLE business_app_menu DROP CONSTRAINT fk_app_menu_pageId -GO -ALTER TABLE business_app_menu DROP CONSTRAINT fk_app_menu_parentId -GO -ALTER TABLE business_app_page DROP CONSTRAINT fk_app_page_tenantId -GO -ALTER TABLE business_app_page DROP CONSTRAINT fk_bus_app_id -GO -ALTER TABLE business_app_page DROP CONSTRAINT fk_page_id -GO -ALTER TABLE business_app DROP CONSTRAINT fk_app_profileId -GO -ALTER TABLE business_app DROP CONSTRAINT fk_app_tenantId -GO -ALTER TABLE business_app DROP CONSTRAINT fk_app_layoutId -GO -ALTER TABLE business_app DROP CONSTRAINT fk_app_themeId -GO +ALTER TABLE business_app_menu DROP CONSTRAINT fk_app_menu_tenantId; +ALTER TABLE business_app_menu DROP CONSTRAINT fk_app_menu_appId; +ALTER TABLE business_app_menu DROP CONSTRAINT fk_app_menu_pageId; +ALTER TABLE business_app_menu DROP CONSTRAINT fk_app_menu_parentId; +ALTER TABLE business_app_page DROP CONSTRAINT fk_app_page_tenantId; +ALTER TABLE business_app_page DROP CONSTRAINT fk_bus_app_id; +ALTER TABLE business_app_page DROP CONSTRAINT fk_page_id; +ALTER TABLE business_app DROP CONSTRAINT fk_app_profileId; +ALTER TABLE business_app DROP CONSTRAINT fk_app_tenantId; +ALTER TABLE business_app DROP CONSTRAINT fk_app_layoutId; +ALTER TABLE business_app DROP CONSTRAINT fk_app_themeId; -- ------------------------ Foreign Keys to disable if archiving is on another BD ------------------ -ALTER TABLE arch_document_mapping DROP CONSTRAINT fk_arch_document_mapping_tenantId -GO -ALTER TABLE arch_document_mapping DROP CONSTRAINT fk_archdocmap_docid -GO -ALTER TABLE arch_flownode_instance DROP CONSTRAINT fk_arch_flownode_instance_tenantId -GO -ALTER TABLE arch_process_comment DROP CONSTRAINT fk_arch_process_comment_tenantId -GO -ALTER TABLE arch_process_instance DROP CONSTRAINT fk_arch_process_instance_tenantId -GO -ALTER TABLE arch_data_instance DROP CONSTRAINT fk_arch_data_instance_tenantId -GO +ALTER TABLE arch_document_mapping DROP CONSTRAINT fk_arch_document_mapping_tenantId; +ALTER TABLE arch_document_mapping DROP CONSTRAINT fk_archdocmap_docid; +ALTER TABLE arch_flownode_instance DROP CONSTRAINT fk_arch_flownode_instance_tenantId; +ALTER TABLE arch_process_comment DROP CONSTRAINT fk_arch_process_comment_tenantId; +ALTER TABLE arch_process_instance DROP CONSTRAINT fk_arch_process_instance_tenantId; +ALTER TABLE arch_data_instance DROP CONSTRAINT fk_arch_data_instance_tenantId; diff --git a/platform/platform-setup/src/test/java/org/bonitasoft/platform/configuration/impl/ConfigurationServiceImplIT.java b/platform/platform-setup/src/test/java/org/bonitasoft/platform/configuration/impl/ConfigurationServiceImplIT.java index 7d8493ca08..ccc10d4156 100644 --- a/platform/platform-setup/src/test/java/org/bonitasoft/platform/configuration/impl/ConfigurationServiceImplIT.java +++ b/platform/platform-setup/src/test/java/org/bonitasoft/platform/configuration/impl/ConfigurationServiceImplIT.java @@ -282,7 +282,7 @@ private void createTables() throws Exception { try (Connection connection = getConnection()) { ScriptUtils.executeSqlScript(connection, new EncodedResource(new InputStreamResource(createTableResource)), false, false, - DEFAULT_COMMENT_PREFIX, getDefaultStatementSeparator(), + DEFAULT_COMMENT_PREFIX, DEFAULT_STATEMENT_SEPARATOR, DEFAULT_BLOCK_COMMENT_START_DELIMITER, DEFAULT_BLOCK_COMMENT_END_DELIMITER); } } @@ -293,20 +293,11 @@ private void dropTables() throws Exception { try (Connection connection = getConnection()) { ScriptUtils.executeSqlScript(connection, new EncodedResource(new InputStreamResource(dropTablesResource)), true, true, - DEFAULT_COMMENT_PREFIX, getDefaultStatementSeparator(), + DEFAULT_COMMENT_PREFIX, DEFAULT_STATEMENT_SEPARATOR, DEFAULT_BLOCK_COMMENT_START_DELIMITER, DEFAULT_BLOCK_COMMENT_END_DELIMITER); } } - private String getDefaultStatementSeparator() { - switch (dbVendor) { - case "sqlserver": - return "GO"; - default: - return DEFAULT_STATEMENT_SEPARATOR; - } - } - private File createLicenseFolder() throws IOException { File licenses = temporaryFolder.newFolder("licenses"); Files.write(licenses.toPath().resolve("license1.lic"), "license 1 content".getBytes(UTF_8)); From cb320d7ea3167de78ea00b2b558df96d0b334f9e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 09:48:19 +0200 Subject: [PATCH 16/24] chore(deps): bump org.apache.commons:commons-lang3 from 3.16.0 to 3.17.0 in /community in the production-dependencies group (#3123) Bumps the production-dependencies group in /community with 1 update: org.apache.commons:commons-lang3. Updates `org.apache.commons:commons-lang3` from 3.16.0 to 3.17.0 --- updated-dependencies: - dependency-name: org.apache.commons:commons-lang3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 27a7d5a2ec..52ac1d144b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -4,7 +4,7 @@ groovyVersion = "3.0.22" springVersion = "5.3.39" springSessionVersion = "2.7.4" springBootVersion = "2.7.18" -commonsLangVersion = "3.16.0" +commonsLangVersion = "3.17.0" junit5Version = "5.11.0" bonitaArtifactsModelVersion = "1.1.1" commonsIOVersion = "2.16.1" From 6a5f3d330b2639c18a276fc2c128befde09bec80 Mon Sep 17 00:00:00 2001 From: Romain Bioteau Date: Tue, 3 Sep 2024 22:03:15 +0200 Subject: [PATCH 17/24] fix(contract): remove file input value from complex input (#3126) when archiving. Also delete file content for FileInput inside complex input --- .../core/contract/data/SAContractData.java | 12 +++++++++--- .../data/SAProcessContractDataTest.java | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/bpm/bonita-core/bonita-contract-data/src/main/java/org/bonitasoft/engine/core/contract/data/SAContractData.java b/bpm/bonita-core/bonita-contract-data/src/main/java/org/bonitasoft/engine/core/contract/data/SAContractData.java index ac7d084f2a..5cbcb51505 100644 --- a/bpm/bonita-core/bonita-contract-data/src/main/java/org/bonitasoft/engine/core/contract/data/SAContractData.java +++ b/bpm/bonita-core/bonita-contract-data/src/main/java/org/bonitasoft/engine/core/contract/data/SAContractData.java @@ -15,6 +15,7 @@ import java.io.Serializable; import java.util.Collection; +import java.util.Map; import javax.persistence.*; @@ -64,11 +65,16 @@ protected SAContractData(long sourceObjectId, String name, Serializable value, l private static Serializable clearFileInputContent(Serializable value) { if (value instanceof FileInputValue inputValue) { inputValue.setContent(null); + } else if (value instanceof Map) { + ((Map) value).values().stream() + .filter(Serializable.class::isInstance) + .map(Serializable.class::cast) + .forEach(v -> clearFileInputContent(v)); } else if (value instanceof Collection) { ((Collection) value).stream() - .filter(FileInputValue.class::isInstance) - .map(FileInputValue.class::cast) - .forEach(v -> v.setContent(null)); + .filter(Serializable.class::isInstance) + .map(Serializable.class::cast) + .forEach(v -> clearFileInputContent(v)); } return value; } diff --git a/bpm/bonita-core/bonita-contract-data/src/test/java/org/bonitasoft/engine/core/contract/data/SAProcessContractDataTest.java b/bpm/bonita-core/bonita-contract-data/src/test/java/org/bonitasoft/engine/core/contract/data/SAProcessContractDataTest.java index ce9d601b2d..6f76bde984 100644 --- a/bpm/bonita-core/bonita-contract-data/src/test/java/org/bonitasoft/engine/core/contract/data/SAProcessContractDataTest.java +++ b/bpm/bonita-core/bonita-contract-data/src/test/java/org/bonitasoft/engine/core/contract/data/SAProcessContractDataTest.java @@ -18,6 +18,7 @@ import java.io.Serializable; import java.util.Collection; import java.util.List; +import java.util.Map; import org.bonitasoft.engine.bpm.contract.FileInputValue; import org.junit.jupiter.api.Test; @@ -55,6 +56,23 @@ void clearMultipleFileInputContent() { .containsNull(); } + @Test + void clearComplexInputWithFileInputContent() { + var contractData = new SProcessContractData(); + contractData.setId(1); + contractData.setName("parent"); + contractData.setValue( + (Serializable) Map.ofEntries(Map.entry("myFile", new FileInputValue("theFile", "content".getBytes())))); + + var archivedContractData = new SAProcessContractData(contractData); + + assertThat(archivedContractData.getValue()).isInstanceOf(Map.class); + assertThat((Map) archivedContractData.getValue()) + .hasEntrySatisfying("myFile", value -> assertThat(value).isInstanceOf(FileInputValue.class) + .extracting("content") + .isNull()); + } + @Test void creatingSAProcessContractDataShouldCopyNonArchivedValues() { long processInstanceId = 555L; From 0b04de42493a19aba9de5f20d83db24aba192a15 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 22 Sep 2024 16:42:25 +0200 Subject: [PATCH 18/24] chore(deps): bump the production-dependencies group across 1 directory with 6 updates (#3161) Bumps the production-dependencies group with 6 updates in the /community directory: | Package | From | To | | --- | --- | --- | | commons-io:commons-io | `2.16.1` | `2.17.0` | | org.apache.tomcat:tomcat-dbcp | `9.0.93` | `9.0.95` | | [org.eclipse.jdt:ecj](https://github.com/eclipse-jdt/eclipse.jdt.core) | `3.38.0` | `3.39.0` | | [io.micrometer:micrometer-core](https://github.com/micrometer-metrics/micrometer) | `1.13.3` | `1.13.4` | | [io.micrometer:micrometer-registry-jmx](https://github.com/micrometer-metrics/micrometer) | `1.13.3` | `1.13.4` | | [io.micrometer:micrometer-registry-prometheus](https://github.com/micrometer-metrics/micrometer) | `1.13.3` | `1.13.4` | Updates `commons-io:commons-io` from 2.16.1 to 2.17.0 Updates `org.apache.tomcat:tomcat-dbcp` from 9.0.93 to 9.0.95 Updates `org.eclipse.jdt:ecj` from 3.38.0 to 3.39.0 - [Commits](https://github.com/eclipse-jdt/eclipse.jdt.core/commits) Updates `io.micrometer:micrometer-core` from 1.13.3 to 1.13.4 - [Release notes](https://github.com/micrometer-metrics/micrometer/releases) - [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.13.3...v1.13.4) Updates `io.micrometer:micrometer-registry-jmx` from 1.13.3 to 1.13.4 - [Release notes](https://github.com/micrometer-metrics/micrometer/releases) - [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.13.3...v1.13.4) Updates `io.micrometer:micrometer-registry-prometheus` from 1.13.3 to 1.13.4 - [Release notes](https://github.com/micrometer-metrics/micrometer/releases) - [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.13.3...v1.13.4) Updates `io.micrometer:micrometer-registry-jmx` from 1.13.3 to 1.13.4 - [Release notes](https://github.com/micrometer-metrics/micrometer/releases) - [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.13.3...v1.13.4) Updates `io.micrometer:micrometer-registry-prometheus` from 1.13.3 to 1.13.4 - [Release notes](https://github.com/micrometer-metrics/micrometer/releases) - [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.13.3...v1.13.4) --- updated-dependencies: - dependency-name: commons-io:commons-io dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: org.apache.tomcat:tomcat-dbcp dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.eclipse.jdt:ecj dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: io.micrometer:micrometer-core dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: io.micrometer:micrometer-registry-jmx dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: io.micrometer:micrometer-registry-prometheus dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: io.micrometer:micrometer-registry-jmx dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: io.micrometer:micrometer-registry-prometheus dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 52ac1d144b..29bfd3e648 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -7,11 +7,11 @@ springBootVersion = "2.7.18" commonsLangVersion = "3.17.0" junit5Version = "5.11.0" bonitaArtifactsModelVersion = "1.1.1" -commonsIOVersion = "2.16.1" +commonsIOVersion = "2.17.0" commonsFileUploadVersion = "1.5" commonsBeanutilsVersion = "1.9.4" commonsCollectionsVersion = "4.4" -tomcatVersion = "9.0.93" +tomcatVersion = "9.0.95" commonsCLIVersion = "1.9.0" semver4jVersion = '3.1.0' slf4jVersion = "1.7.36" @@ -29,10 +29,10 @@ javaxServletVersion = "4.0.1" httpComponentsVersion = "4.5.14" xstreamVersion = "1.4.20" ehCacheVersion = "2.10.10.12.7" -eclipseCompilerVersion = "3.38.0" +eclipseCompilerVersion = "3.39.0" jakartaActivationVersion = "1.2.2" quartzVersion = "2.3.2" -micrometerVersion = "1.13.3" +micrometerVersion = "1.13.4" # DB drivers: mysqlVersion = "8.4.0" msSqlServerVersion = "9.4.1.jre11" From 4618c90ec9d8b005bb1bc5e30b915577f749612c Mon Sep 17 00:00:00 2001 From: Vincent HEMERY Date: Thu, 26 Sep 2024 10:12:02 +0200 Subject: [PATCH 19/24] fix: Set updatedBy and icon correctly on application import (#3171) * Fix: Set updatedBy and icon correctly on application import These must be set, regardless of link or legacy. Closes [BPM-252](https://bonitasoft.atlassian.net/browse/BPM-252) --- .../converter/NodeToApplicationConverter.java | 5 +++-- .../application/importer/LivingApplicationImporter.java | 4 ++-- .../converter/NodeToApplicationConverterTest.java | 9 ++++++++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/bpm/bonita-core/bonita-process-engine/src/main/java/org/bonitasoft/engine/business/application/converter/NodeToApplicationConverter.java b/bpm/bonita-core/bonita-process-engine/src/main/java/org/bonitasoft/engine/business/application/converter/NodeToApplicationConverter.java index 03b7844f64..1810f797b6 100644 --- a/bpm/bonita-core/bonita-process-engine/src/main/java/org/bonitasoft/engine/business/application/converter/NodeToApplicationConverter.java +++ b/bpm/bonita-core/bonita-process-engine/src/main/java/org/bonitasoft/engine/business/application/converter/NodeToApplicationConverter.java @@ -64,6 +64,7 @@ public ImportResult toSApplication(final AbstractApplicationNode applicationNode application.setCreationDate(currentDate); application.setLastUpdateDate(currentDate); application.setCreatedBy(createdBy); + application.setUpdatedBy(createdBy); application.setIconPath(applicationNode.getIconPath()); application.setDescription(applicationNode.getDescription()); application.setState(applicationNode.getState()); @@ -73,9 +74,9 @@ public ImportResult toSApplication(final AbstractApplicationNode applicationNode if (applicationNode instanceof ApplicationNode legacy) { application.setLayoutId(getLayoutId(getLayoutName(legacy), token, importStatus)); application.setThemeId(getThemeId(getThemeName(legacy), token, importStatus)); - application.setIconContent(iconContent); - application.setIconMimeType(iconMimeType); } + application.setIconContent(iconContent); + application.setIconMimeType(iconMimeType); if (applicationNode.getProfile() != null) { setProfile(applicationNode.getProfile(), application, importStatus); diff --git a/bpm/bonita-core/bonita-process-engine/src/main/java/org/bonitasoft/engine/business/application/importer/LivingApplicationImporter.java b/bpm/bonita-core/bonita-process-engine/src/main/java/org/bonitasoft/engine/business/application/importer/LivingApplicationImporter.java index 4c36a977c0..5e407f4f43 100644 --- a/bpm/bonita-core/bonita-process-engine/src/main/java/org/bonitasoft/engine/business/application/importer/LivingApplicationImporter.java +++ b/bpm/bonita-core/bonita-process-engine/src/main/java/org/bonitasoft/engine/business/application/importer/LivingApplicationImporter.java @@ -24,7 +24,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.IOUtils; import org.bonitasoft.engine.api.ImportStatus; -import org.bonitasoft.engine.business.application.xml.ApplicationNode; +import org.bonitasoft.engine.business.application.xml.AbstractApplicationNode; import org.bonitasoft.engine.business.application.xml.ApplicationNodeContainer; import org.bonitasoft.engine.commons.exceptions.SBonitaException; import org.bonitasoft.engine.exception.AlreadyExistsException; @@ -137,7 +137,7 @@ protected List importProvidedApplications(final byte[] xmlContent, throws ImportException, AlreadyExistsException { List importStatuses = new ArrayList<>(); ApplicationNodeContainer applicationNodeContainer = applicationImporter.getApplicationNodeContainer(xmlContent); - for (ApplicationNode applicationNode : applicationNodeContainer.getApplications()) { + for (AbstractApplicationNode applicationNode : applicationNodeContainer.getAllApplications()) { // set the strategy to skip it if a version already exists importStatuses.add( applicationImporter.importApplication(applicationNode, editable, SessionService.SYSTEM_ID, diff --git a/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/business/application/converter/NodeToApplicationConverterTest.java b/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/business/application/converter/NodeToApplicationConverterTest.java index 8f9733e018..6cfe9f75af 100644 --- a/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/business/application/converter/NodeToApplicationConverterTest.java +++ b/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/business/application/converter/NodeToApplicationConverterTest.java @@ -85,7 +85,7 @@ public void setUp() throws Exception { private ImportResult convertToSApplication(final AbstractApplicationNode applicationNode, final long createdBy) throws Exception { - return converter.toSApplication(applicationNode, null, "", createdBy, true); + return converter.toSApplication(applicationNode, null, null, createdBy, true); } @Test @@ -128,6 +128,7 @@ public void toSApplication_should_return_ImportResult_with_no_errors_and_applica final SProfile profile = mock(SProfile.class); given(profile.getId()).willReturn(profileId); given(profileService.getProfileByName("admin")).willReturn(profile); + final long before = System.currentTimeMillis(); //when long createdBy = 1L; @@ -154,6 +155,12 @@ public void toSApplication_should_return_ImportResult_with_no_errors_and_applica assertThat(application.isEditable()).isEqualTo(editable); assertThat(application.isLink()).isFalse(); + // also check auto fields + final long after = System.currentTimeMillis(); + assertThat(application.getUpdatedBy()).isEqualTo(createdBy); + assertThat(application.getCreationDate()).isBetween(before, after); + assertThat(application.getLastUpdateDate()).isEqualTo(application.getCreationDate()); + final ImportStatus importStatus = importResult.getImportStatus(); assertThat(importStatus.getName()).isEqualTo("app"); assertThat(importStatus.getStatus()).isEqualTo(ImportStatus.Status.ADDED); From 5afcf49f29789b3cbede4682de5ca157ab9c2ee3 Mon Sep 17 00:00:00 2001 From: abirembaut Date: Thu, 26 Sep 2024 14:19:07 +0200 Subject: [PATCH 20/24] chore(dependencies): fix snakeyaml packaged in 2 (old) versions (#3170) * exclude snakeyaml completely --------- Co-authored-by: Romain Bioteau --- bpm/bonita-web-server/build.gradle | 1 + platform/platform-setup/build.gradle | 1 + 2 files changed, 2 insertions(+) diff --git a/bpm/bonita-web-server/build.gradle b/bpm/bonita-web-server/build.gradle index 3355db647a..26866e3ca6 100644 --- a/bpm/bonita-web-server/build.gradle +++ b/bpm/bonita-web-server/build.gradle @@ -28,6 +28,7 @@ dependencies { implementation("org.restlet.jse:org.restlet.ext.jackson:${Deps.restletVersion}") { exclude(group: "org.codehaus.woodstox", module: "woodstox-core-asl") exclude(group: "org.codehaus.woodstox", module: "stax2-api") + exclude(group: "org.yaml", module: "snakeyaml") } implementation "com.fasterxml.woodstox:woodstox-core:${Deps.woodstoxCoreVersion}" implementation libs.groovyCore diff --git a/platform/platform-setup/build.gradle b/platform/platform-setup/build.gradle index 7a7edd324f..b81fe8a9e1 100644 --- a/platform/platform-setup/build.gradle +++ b/platform/platform-setup/build.gradle @@ -92,6 +92,7 @@ distributions { exclude(module: 'commons-logging') exclude(module: 'log4j-api') exclude(module: 'log4j-to-slf4j') + exclude(module: 'snakeyaml') } } configurations.inDistrib.resolvedConfiguration.resolvedArtifacts.each { From 78cbfcf4e7ab4b57b6ffc4314f8a1ee4a049bb40 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 09:20:42 +0200 Subject: [PATCH 21/24] chore(deps): bump the test group in /community with 3 updates (#3174) Bumps the test group in /community with 3 updates: [org.junit.jupiter:junit-jupiter-api](https://github.com/junit-team/junit5), [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) and [org.junit.vintage:junit-vintage-engine](https://github.com/junit-team/junit5). Updates `org.junit.jupiter:junit-jupiter-api` from 5.11.0 to 5.11.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.0...r5.11.1) Updates `org.junit.jupiter:junit-jupiter-engine` from 5.11.0 to 5.11.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.0...r5.11.1) Updates `org.junit.vintage:junit-vintage-engine` from 5.11.0 to 5.11.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.0...r5.11.1) Updates `org.junit.jupiter:junit-jupiter-engine` from 5.11.0 to 5.11.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.0...r5.11.1) Updates `org.junit.vintage:junit-vintage-engine` from 5.11.0 to 5.11.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.0...r5.11.1) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-type: direct:production update-type: version-update:semver-patch dependency-group: test - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:production update-type: version-update:semver-patch dependency-group: test - dependency-name: org.junit.vintage:junit-vintage-engine dependency-type: direct:production update-type: version-update:semver-patch dependency-group: test - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:production update-type: version-update:semver-patch dependency-group: test - dependency-name: org.junit.vintage:junit-vintage-engine dependency-type: direct:production update-type: version-update:semver-patch dependency-group: test ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 73f668c5bd..0962a82c1b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,7 +5,7 @@ springVersion = "5.3.39" springSessionVersion = "2.7.4" springBootVersion = "2.7.18" commonsLangVersion = "3.17.0" -junit5Version = "5.11.0" +junit5Version = "5.11.1" bonitaArtifactsModelVersion = "1.1.1" commonsIOVersion = "2.17.0" commonsFileUploadVersion = "1.5" From 73ae214aeddc82ab8634bf7009b20fc1649e5bcf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 09:22:02 +0200 Subject: [PATCH 22/24] chore(deps): bump the production-dependencies group (#3175) Bumps the production-dependencies group in /community with 3 updates: [com.google.guava:guava](https://github.com/google/guava), org.apache.commons:commons-text and [com.fasterxml.jackson:jackson-bom](https://github.com/FasterXML/jackson-bom). Updates `com.google.guava:guava` from 33.3.0-jre to 33.3.1-jre - [Release notes](https://github.com/google/guava/releases) - [Commits](https://github.com/google/guava/commits) Updates `org.apache.commons:commons-text` from 1.10.0 to 1.12.0 Updates `com.fasterxml.jackson:jackson-bom` from 2.17.2 to 2.18.0 - [Commits](https://github.com/FasterXML/jackson-bom/compare/jackson-bom-2.17.2...jackson-bom-2.18.0) --- updated-dependencies: - dependency-name: com.google.guava:guava dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies - dependency-name: org.apache.commons:commons-text dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: com.fasterxml.jackson:jackson-bom dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 0962a82c1b..b3531db33a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -13,7 +13,7 @@ commonsBeanutilsVersion = "1.9.4" commonsCollectionsVersion = "4.4" tomcatVersion = "9.0.95" commonsCLIVersion = "1.9.0" -commonsTextVersion = "1.10.0" +commonsTextVersion = "1.12.0" semver4jVersion = '3.1.0' slf4jVersion = "1.7.36" # Attention, see PassingPropertiesJCacheRegionFactory javadoc if this version changes: @@ -22,7 +22,7 @@ hibernateVersion = "5.4.33" javassistVersion = "3.27.0-GA" # javax.persistence-api is used by hibernate: javaxPersistenceApiVersion = "2.2" -jacksonBomVersion = "2.17.2" +jacksonBomVersion = "2.18.0" jakartaTransactionVersion = "1.3.3" jakartaServletVersion = "4.0.4" # Keep this until all client projects have migrated to jakarta or it will break their builds ! @@ -46,7 +46,7 @@ jaxbVersion = "2.3.9" javaxAnnotationsVersion = "1.3.2" hazelcastVersion = "5.4.0" # Also update http://www.hazelcast.com/schema/config/hazelcast-config-.xsd if needed jcacheVersion = "1.1.1" -guavaVersion = "33.3.0-jre" +guavaVersion = "33.3.1-jre" antlr4RuntimeVersion = "4.7.2" [libraries] From 0525197a8ea321ce1f6cf521bc2c1f9db679a081 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:46:04 +0200 Subject: [PATCH 23/24] chore(deps): bump org.sonarqube from 3.0 to 5.1.0.4882 in /community (#3074) Bumps org.sonarqube from 3.0 to 5.1.0.4882. --- updated-dependencies: - dependency-name: org.sonarqube dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index e97fc384e2..7bcc9cb62b 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id "org.sonarqube" version "3.0" + id "org.sonarqube" version "5.1.0.4882" alias(libs.plugins.taskInfo) } From ecf368a901dd55e4327cb789ad848f478a55bc0a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 14:14:01 +0200 Subject: [PATCH 24/24] chore(deps): bump com.bonitasoft.gradle.bonita-formatting from 0.1.63 to 0.1.64 in /community (#3088) * chore(deps): bump com.bonitasoft.gradle.bonita-formatting in /community Bumps com.bonitasoft.gradle.bonita-formatting from 0.1.63 to 0.1.64. --- updated-dependencies: - dependency-name: com.bonitasoft.gradle.bonita-formatting dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * [SpotlessApply] Squash me --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: bonita-ci --- .../BonitaEngineAutoConfigurationTest.java | 2 +- .../engine/activity/ContractIT.java | 5 +++-- .../engine/application/ApplicationIT.java | 2 +- .../engine/business/data/BDRepositoryIT.java | 12 +++++----- .../engine/event/EventTriggerIT.java | 2 +- .../bonitasoft/engine/form/FormMappingIT.java | 3 ++- .../bonitasoft/engine/identity/UserIT.java | 4 ++-- .../engine/process/EvaluateExpressionIT.java | 4 ++-- .../engine/process/document/DocumentIT.java | 3 ++- .../instance/AbortProcessInstanceIT.java | 2 +- .../engine/supervisor/SupervisorIT.java | 6 ++--- .../ApplicationInstallerUpdateIT.java | 4 ++-- .../bpm/process/DeleteProcessInstancesIT.java | 2 +- .../business/data/BDRepositoryLocalIT.java | 2 +- .../api/organization/APIUserAnotherIT.java | 10 ++++----- .../instance/model/FlowNodeInstanceTest.java | 20 ++++++++--------- .../TenantResourceServiceQueriesTest.java | 2 +- .../servlet/HttpAPIServletCallTest.java | 2 +- .../engine/bar/BusinessArchiveTest.java | 2 +- .../bonitasoft/engine/api/DocumentAPI.java | 15 ++++++++----- .../engine/api/ProcessRuntimeAPI.java | 15 ++++++++----- .../engine/page/impl/PageImplTest.java | 4 ++-- .../engine/home/BonitaHomeServerTest.java | 4 ++-- .../ProcessDefinitionServiceImplTest.java | 22 +++++++++---------- .../CaseContextPermissionRule.groovy | 1 - .../FormMappingAndPageArtifactManager.java | 4 ++-- .../ActorMemberPermissionRuleTest.groovy | 2 -- .../ActorPermissionRuleTest.groovy | 2 -- .../permissions/CasePermissionRuleTest.groovy | 2 -- .../CaseVariablePermissionRuleTest.groovy | 6 ----- .../CommentPermissionRuleTest.groovy | 2 -- .../DocumentPermissionRuleTest.groovy | 2 -- ...cessConfigurationPermissionRuleTest.groovy | 2 -- ...nnectorDependencyPermissionRuleTest.groovy | 1 - ...cessInstantiationPermissionRuleTest.groovy | 2 -- ...ResolutionProblemPermissionRuleTest.groovy | 1 - ...ProcessSupervisorPermissionRuleTest.groovy | 3 --- .../engine/api/impl/ProcessAPIImplTest.java | 8 +++---- .../engine/api/impl/ServerAPIImplTest.java | 2 +- .../ApplicationInstallerUpdateTest.java | 5 +++-- .../ResetAllFailedConnectorStrategyTest.java | 9 +++++--- .../ApplicationModelConverterTest.java | 2 +- ...cumentInitialValueArtifactManagerTest.java | 6 ++--- ...FormMappingAndPageArtifactManagerTest.java | 4 ++-- .../importer/ApplicationImporterTest.java | 18 +++++++-------- .../BusinessDataLeftOperandHandlerTest.java | 2 +- .../engine/service/ModelConvertorTest.java | 2 +- .../tenant/restart/FlowNodesRecoverTest.java | 2 +- .../connector/impl/ConnectorServiceImpl.java | 2 +- .../ConnectorInstanceServiceImplTest.java | 2 +- .../impl/ConnectorServiceImplTest.java | 18 +++++++-------- .../impl/ActivityInstanceServiceImplTest.java | 8 +++---- .../impl/UserFilterServiceImplTest.java | 4 ++-- .../AbstractApplicationDefinition.java | 2 +- .../model/bpm/flownode/TaskDefinition.java | 2 +- .../flownode/AbstractActivityDatastore.java | 3 ++- .../AuthenticationManagerPropertiesTest.java | 2 +- .../ProcessDefinitionDesignResourceTest.java | 4 ++-- .../ProcessInstantiationResourceTest.java | 2 +- gradle/libs.versions.toml | 2 +- .../configuration/util/FolderComparator.java | 2 +- .../setup/ConfigurationCheckerTest.java | 2 +- .../configure/DatabaseConfigurationTest.java | 4 ++-- .../impl/ApplicationServiceImplTest.java | 9 +++++--- .../application/impl/IndexUpdaterTest.java | 4 ++-- .../AbstractBDMCodeGeneratorTest.java | 2 +- .../OnlyDAOImplementationFileFilterTest.java | 2 +- ...ithoutDAOImplementationFileFilterTest.java | 2 +- .../BusinessDataModelRepositoryImplTest.java | 10 ++++----- .../JPABusinessDataRepositoryImplITest.java | 2 +- .../api/impl/CommandServiceImplTest.java | 6 ++--- .../engine/DeepRegexFileFilterTest.java | 10 ++++----- .../engine/commons/JavaMethodInvokerTest.java | 2 +- .../impl/ConnectorExecutorImplTest.java | 3 ++- .../api/impl/DataInstanceServiceImplTest.java | 4 ++-- .../impl/IdentityServiceImplForGroupTest.java | 16 +++++++------- ...ntityServiceImplForUserMembershipTest.java | 6 ++--- .../HibernatePersistenceService.java | 2 +- .../JobServiceImplForJobDescriptorTest.java | 4 ++-- .../impl/JobServiceImplForJobLogTest.java | 2 +- .../JobServiceImplForJobParameterTest.java | 4 ++-- ...faultBonitaExecutorServiceFactoryTest.java | 6 +++-- ...ultExceptionRetryabilityEvaluatorTest.java | 8 +++---- 83 files changed, 198 insertions(+), 204 deletions(-) diff --git a/bonita-engine-spring-boot-starter/src/test/java/org/bonitasoft/engine/spring/autoconfigure/BonitaEngineAutoConfigurationTest.java b/bonita-engine-spring-boot-starter/src/test/java/org/bonitasoft/engine/spring/autoconfigure/BonitaEngineAutoConfigurationTest.java index 2f5ba6f5c0..178e75359f 100644 --- a/bonita-engine-spring-boot-starter/src/test/java/org/bonitasoft/engine/spring/autoconfigure/BonitaEngineAutoConfigurationTest.java +++ b/bonita-engine-spring-boot-starter/src/test/java/org/bonitasoft/engine/spring/autoconfigure/BonitaEngineAutoConfigurationTest.java @@ -57,7 +57,7 @@ public void should_configure_database_using_properties() { assertThat(businessDataDatabaseConfiguration.getXaDatasource().getMaxPoolSize()).isEqualTo(6); assertThat( businessDataDatabaseConfiguration.getDbVendor()) - .isEqualTo("mysql"); + .isEqualTo("mysql"); }); } diff --git a/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/activity/ContractIT.java b/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/activity/ContractIT.java index f4997d7af8..0fc90ce509 100644 --- a/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/activity/ContractIT.java +++ b/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/activity/ContractIT.java @@ -447,13 +447,14 @@ public void use_a_multiple_complex_input_in_user_tasks() throws Exception { waitForUserTaskAndGetIt(TASK2); assertThat((List>) getProcessAPI() .getArchivedActivityDataInstance("expenseData", userTask.getId()).getValue()).as( - "should have my expense report data").hasSize(3); + "should have my expense report data") + .hasSize(3); final Serializable reportData = getProcessAPI().getArchivedActivityDataInstance("reportData", userTask.getId()) .getValue(); assertThat(reportData).as("should have single file").isEqualTo(reportFile); assertThat((List) getProcessAPI().getArchivedActivityDataInstance("receiptsData", userTask.getId()) .getValue()).as("should have multiple file") - .containsExactly(receipt1, receipt2); + .containsExactly(receipt1, receipt2); final List receiptsAsDoc = getProcessAPI().getDocumentList(processInstance.getId(), "receiptsAsDoc", 0, 100); final Document reportAsDoc = getProcessAPI().getLastDocument(processInstance.getId(), "reportAsDoc"); diff --git a/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/application/ApplicationIT.java b/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/application/ApplicationIT.java index 47fb49d839..8363c266f8 100644 --- a/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/application/ApplicationIT.java +++ b/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/application/ApplicationIT.java @@ -168,7 +168,7 @@ public void should_access_identity_api_using_default_application_permissions() t long userId = user.getId(); assertThat( getPermissionAPI().isAuthorized(new APICallContext("GET", "identity", "user", String.valueOf(userId)))) - .isTrue(); + .isTrue(); assertThat(getPermissionAPI() .isAuthorized(new APICallContext("GET", "identity", "user", String.valueOf(userId + 1)))).isFalse(); assertThat(getPermissionAPI().isAuthorized(new APICallContext("GET", "identity", "user", null))).isFalse(); diff --git a/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/business/data/BDRepositoryIT.java b/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/business/data/BDRepositoryIT.java index cb3d908209..4b5717cb0a 100644 --- a/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/business/data/BDRepositoryIT.java +++ b/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/business/data/BDRepositoryIT.java @@ -149,7 +149,7 @@ public void deploying_bdm_with_invalid_query_should_throw_a_BDM_deployment_excep getTenantAdministrationAPI().cleanAndUninstallBusinessDataModel(); assertThatThrownBy( () -> getTenantAdministrationAPI().updateBusinessDataModel(getZip(buildBOMWithInvalidQuery()))) - .isInstanceOf(BusinessDataRepositoryDeploymentException.class); + .isInstanceOf(BusinessDataRepositoryDeploymentException.class); } @Test @@ -2527,7 +2527,7 @@ public void should_event_sub_process_only_start_element_in_the_event_sub_process waitForUserTask("userTask"); assertThat(new String(getProcessAPI().getDocumentContent( getProcessAPI().getLastDocument(processInstance.getId(), "myDoc").getContentStorageId()))) - .isEqualTo("updatedContents"); + .isEqualTo("updatedContents"); getProcessAPI().sendSignal("theSignal"); //then @@ -2536,7 +2536,7 @@ public void should_event_sub_process_only_start_element_in_the_event_sub_process //instantiation of the event sub process work and did not reinitialized elements assertThat(new String(getProcessAPI().getDocumentContent( getProcessAPI().getLastDocument(processInstance.getId(), "myDoc").getContentStorageId()))) - .isEqualTo("updatedContents"); + .isEqualTo("updatedContents"); assertThat(getProcessAPI().getDocumentList(processInstance.getId(), "MyList", 0, 100)).hasSize(2); try { getProcessAPI().getLastDocument(eventSubProcessActivity.getParentProcessInstanceId(), "myDoc"); @@ -2545,7 +2545,7 @@ public void should_event_sub_process_only_start_element_in_the_event_sub_process } assertThat( getProcessAPI().getDocumentList(eventSubProcessActivity.getParentProcessInstanceId(), "MyList", 0, 100)) - .isEmpty(); + .isEmpty(); disableAndDeleteProcess(processDefinition); } @@ -2590,7 +2590,7 @@ public void should_be_able_to_update_business_object_in_event_sub_process() thro assertThatJson( getBusinessDataAsJson((SimpleBusinessDataReference) getProcessAPI().getProcessInstanceExecutionContext( processInstance.getId()).get("ref_myBusinessData"))) - .node("lastName").isEqualTo("\"Doe\""); + .node("lastName").isEqualTo("\"Doe\""); //when getProcessAPI().sendSignal("theSignal"); waitForUserTask("userTaskInSubProcess"); @@ -2599,7 +2599,7 @@ public void should_be_able_to_update_business_object_in_event_sub_process() thro assertThatJson( getBusinessDataAsJson((SimpleBusinessDataReference) getProcessAPI().getProcessInstanceExecutionContext( processInstance.getId()).get("ref_myBusinessData"))) - .node("lastName").isEqualTo("\"newName\""); + .node("lastName").isEqualTo("\"newName\""); disableAndDeleteProcess(processDefinition); } diff --git a/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/event/EventTriggerIT.java b/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/event/EventTriggerIT.java index e80bfa3c9f..8abb5abce0 100644 --- a/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/event/EventTriggerIT.java +++ b/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/event/EventTriggerIT.java @@ -110,7 +110,7 @@ public void updateTimerEventTriggerInstance() throws Exception { // Without optimisations, it takes around 30 seconds assertThat(Duration.between(LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault()), LocalDateTime.now(ZoneId.systemDefault()))) - .isLessThanOrEqualTo(Duration.ofSeconds(10)); + .isLessThanOrEqualTo(Duration.ofSeconds(10)); assertThat(getProcessAPI().searchTimerEventTriggerInstances(processInstance2.getId(), options).getResult()) .hasSize(1); diff --git a/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/form/FormMappingIT.java b/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/form/FormMappingIT.java index 476fe51b69..682b6944e1 100644 --- a/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/form/FormMappingIT.java +++ b/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/form/FormMappingIT.java @@ -148,7 +148,8 @@ public void deployProcessesWithFormMappings() throws Exception { processConfigurationAPI .searchFormMappings(new SearchOptionsBuilder(0, 100) .sort(FormMappingSearchDescriptor.ID, Order.DESC).done()) - .getResult()).isEmpty(); + .getResult()) + .isEmpty(); } diff --git a/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/identity/UserIT.java b/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/identity/UserIT.java index 2f94421690..5cb20df6bd 100644 --- a/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/identity/UserIT.java +++ b/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/identity/UserIT.java @@ -745,11 +745,11 @@ public void should_search_user_case_insensitively() throws BonitaException { assertThat(getIdentityAPI().searchUsers( new SearchOptionsBuilder(0, 10).searchTerm("jean").sort(UserSearchDescriptor.ID, Order.ASC).done()) .getResult()) - .hasSize(1).allMatch(user -> user.getUserName().equals("Jean_Michel")); + .hasSize(1).allMatch(user -> user.getUserName().equals("Jean_Michel")); assertThat(getIdentityAPI().searchUsers( new SearchOptionsBuilder(0, 10).searchTerm("Jean").sort(UserSearchDescriptor.ID, Order.ASC).done()) .getResult()) - .hasSize(1).allMatch(user -> user.getUserName().equals("Jean_Michel")); + .hasSize(1).allMatch(user -> user.getUserName().equals("Jean_Michel")); deleteUsers(users); } diff --git a/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/process/EvaluateExpressionIT.java b/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/process/EvaluateExpressionIT.java index 678b3b09b4..33abd919b5 100644 --- a/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/process/EvaluateExpressionIT.java +++ b/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/process/EvaluateExpressionIT.java @@ -215,8 +215,8 @@ private ProcessDefinition createAndDeployProcessDefinitionAndInstance(final Stri final DesignProcessDefinition processDef = createProcessDefinitionBuilderWithHumanAndAutomaticSteps( "My_Process", "1.0", Collections.singletonList("step1"), Collections.singletonList(isHuman)) - .addIntegerData(dataName, dataDefaultExp) - .addDescription("Delivery all day and night long").getProcess(); + .addIntegerData(dataName, dataDefaultExp) + .addDescription("Delivery all day and night long").getProcess(); return deployAndEnableProcessWithActor(processDef, "Actor1", user); } diff --git a/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/process/document/DocumentIT.java b/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/process/document/DocumentIT.java index 67a6bdbded..52f6c5e50b 100644 --- a/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/process/document/DocumentIT.java +++ b/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/process/document/DocumentIT.java @@ -701,7 +701,8 @@ public void searchArchivedDocuments() throws Exception { assertThat( getProcessAPI().searchArchivedDocuments(new SearchOptionsBuilder(0, 45).searchTerm("doc1").done()) .getResult().get(0) - .getContentFileName()).isEqualTo("doc1.jpg"); + .getContentFileName()) + .isEqualTo("doc1.jpg"); } finally { disableAndDeleteProcess(processInstance.getProcessDefinitionId()); diff --git a/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/process/instance/AbortProcessInstanceIT.java b/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/process/instance/AbortProcessInstanceIT.java index 531e7b8534..e9ff20da7c 100644 --- a/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/process/instance/AbortProcessInstanceIT.java +++ b/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/process/instance/AbortProcessInstanceIT.java @@ -440,7 +440,7 @@ private Expression string(String calledProcess) throws InvalidExpressionExceptio private void shouldNotHaveFailedTasks() throws SearchException { assertThat(getProcessAPI().searchArchivedFlowNodeInstances(new SearchOptionsBuilder(0, 1000).done()).getResult() .stream().map(ArchivedFlowNodeInstance::getState)) - .doesNotContain("failed"); + .doesNotContain("failed"); } private List getAllCompletedArchivedFlowNodeInstances() throws SearchException { diff --git a/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/supervisor/SupervisorIT.java b/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/supervisor/SupervisorIT.java index 781024c114..1a05d99d66 100644 --- a/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/supervisor/SupervisorIT.java +++ b/bonita-integration-tests/bonita-integration-tests-client/src/test/java/org/bonitasoft/engine/supervisor/SupervisorIT.java @@ -327,9 +327,9 @@ public void deleteSupervisor_should_throw_SupervisorNotFoundException_when_super // Already deleted Supervisor assertThatThrownBy( () -> getProcessAPI().deleteSupervisor(myProcess1.getId(), null, role2.getId(), group2.getId())) - .isInstanceOf(DeletionException.class) - // Only check the name and not the cause, because in HTTP mode, the stacks are merged and the cause removed: - .hasMessageContaining("SupervisorNotFoundException"); + .isInstanceOf(DeletionException.class) + // Only check the name and not the cause, because in HTTP mode, the stacks are merged and the cause removed: + .hasMessageContaining("SupervisorNotFoundException"); } @Test diff --git a/bonita-integration-tests/bonita-integration-tests-local/src/test/java/org/bonitasoft/engine/application/installer/ApplicationInstallerUpdateIT.java b/bonita-integration-tests/bonita-integration-tests-local/src/test/java/org/bonitasoft/engine/application/installer/ApplicationInstallerUpdateIT.java index 770cba2e38..504b43e1d2 100644 --- a/bonita-integration-tests/bonita-integration-tests-local/src/test/java/org/bonitasoft/engine/application/installer/ApplicationInstallerUpdateIT.java +++ b/bonita-integration-tests/bonita-integration-tests-local/src/test/java/org/bonitasoft/engine/application/installer/ApplicationInstallerUpdateIT.java @@ -171,7 +171,7 @@ public void process_update_custom_application_with_same_installed_version() thro assertThat(updatedApplication.getLastUpdateDate().after(application.getLastUpdateDate())).isTrue(); assertThat( updatedProcessStarterAPI.getLastModificationDate().after(processStarterAPI.getLastModificationDate())) - .isTrue(); + .isTrue(); assertThat(updatedHealthPage.getLastModificationDate().after(healthPage.getLastModificationDate())).isTrue(); assertThat(updatedPmLayout.getLastModificationDate().after(pmLayout.getLastModificationDate())).isTrue(); @@ -224,7 +224,7 @@ public void process_update_custom_application_with_new_version() // check updated custom pages assertThat( updatedProcessStarterAPI.getLastModificationDate().after(processStarterAPI.getLastModificationDate())) - .isTrue(); + .isTrue(); assertThat(updatedProcessStarterAPI.getContentName()).isEqualTo("processStarter-1.1.zip"); assertThat(updatedHealthPage.getLastModificationDate().after(healthPage.getLastModificationDate())).isTrue(); assertThat(updatedHealthPage.getContentName()).isEqualTo("page_HealthPage.zip"); diff --git a/bonita-integration-tests/bonita-integration-tests-local/src/test/java/org/bonitasoft/engine/bpm/process/DeleteProcessInstancesIT.java b/bonita-integration-tests/bonita-integration-tests-local/src/test/java/org/bonitasoft/engine/bpm/process/DeleteProcessInstancesIT.java index ed03e448b1..0994e11451 100644 --- a/bonita-integration-tests/bonita-integration-tests-local/src/test/java/org/bonitasoft/engine/bpm/process/DeleteProcessInstancesIT.java +++ b/bonita-integration-tests/bonita-integration-tests-local/src/test/java/org/bonitasoft/engine/bpm/process/DeleteProcessInstancesIT.java @@ -241,7 +241,7 @@ protected ProcessDefinition createSubProcessDefinition2() throws Exception { .addAutomaticTask("autoWithConnector") .addConnector("connector1", "myConnector", "1.0", ConnectorEvent.ON_ENTER) .addAutomaticTask("autoWithData").addShortTextData("activityData", s("activityDataValue")).getProcess()) - .done()); + .done()); } protected ProcessDefinition createSubProcessDefinitionWithUserTask(User user) throws Exception { diff --git a/bonita-integration-tests/bonita-integration-tests-local/src/test/java/org/bonitasoft/engine/business/data/BDRepositoryLocalIT.java b/bonita-integration-tests/bonita-integration-tests-local/src/test/java/org/bonitasoft/engine/business/data/BDRepositoryLocalIT.java index f8a696a9ea..a27f85df23 100644 --- a/bonita-integration-tests/bonita-integration-tests-local/src/test/java/org/bonitasoft/engine/business/data/BDRepositoryLocalIT.java +++ b/bonita-integration-tests/bonita-integration-tests-local/src/test/java/org/bonitasoft/engine/business/data/BDRepositoryLocalIT.java @@ -496,7 +496,7 @@ public void deploy_a_BDR_and_verify_sequence_behaviour_by_DBVendor() throws Exce case "oracle": assertThat(((List) execute_native_sql( "SELECT COUNT(*) FROM user_sequences WHERE sequence_name = 'HIBERNATE_SEQUENCE'")).get(0) - .intValue()).isEqualTo(1); + .intValue()).isEqualTo(1); break; case "mysql": assertThat(Arrays.toString((Object[]) execute_native_sql("describe EMPLOYEE").get(0))) diff --git a/bonita-integration-tests/bonita-integration-tests-web/src/test/java/org/bonitasoft/web/rest/server/api/organization/APIUserAnotherIT.java b/bonita-integration-tests/bonita-integration-tests-web/src/test/java/org/bonitasoft/web/rest/server/api/organization/APIUserAnotherIT.java index d9bd05ae80..60ee595f9e 100644 --- a/bonita-integration-tests/bonita-integration-tests-web/src/test/java/org/bonitasoft/web/rest/server/api/organization/APIUserAnotherIT.java +++ b/bonita-integration-tests/bonita-integration-tests-web/src/test/java/org/bonitasoft/web/rest/server/api/organization/APIUserAnotherIT.java @@ -246,11 +246,11 @@ public UserCreator buildEngineUser(final UserItem user) throws NumberFormatExcep final UserCreator userCreator = new UserCreator(user.getAttributeValue(UserItem.ATTRIBUTE_USERNAME), user.getAttributeValue(UserItem.ATTRIBUTE_PASSWORD)) - .setFirstName(user.getAttributeValue(UserItem.ATTRIBUTE_FIRSTNAME)) - .setLastName(user.getAttributeValue(UserItem.ATTRIBUTE_LASTNAME)) - .setTitle(user.getAttributeValue(UserItem.ATTRIBUTE_TITLE)) - .setIconPath(user.getAttributeValue(UserItem.ATTRIBUTE_ICON)) - .setJobTitle(user.getAttributeValue(UserItem.ATTRIBUTE_JOB_TITLE)); + .setFirstName(user.getAttributeValue(UserItem.ATTRIBUTE_FIRSTNAME)) + .setLastName(user.getAttributeValue(UserItem.ATTRIBUTE_LASTNAME)) + .setTitle(user.getAttributeValue(UserItem.ATTRIBUTE_TITLE)) + .setIconPath(user.getAttributeValue(UserItem.ATTRIBUTE_ICON)) + .setJobTitle(user.getAttributeValue(UserItem.ATTRIBUTE_JOB_TITLE)); // .setPersonalData(personalInfo.done()) // .setProfessionalData(professionalInfo.done()); diff --git a/bonita-integration-tests/bonita-query-tests/src/test/java/org/bonitasoft/engine/core/process/instance/model/FlowNodeInstanceTest.java b/bonita-integration-tests/bonita-query-tests/src/test/java/org/bonitasoft/engine/core/process/instance/model/FlowNodeInstanceTest.java index b8dd07cb63..f9b99ddcce 100755 --- a/bonita-integration-tests/bonita-query-tests/src/test/java/org/bonitasoft/engine/core/process/instance/model/FlowNodeInstanceTest.java +++ b/bonita-integration-tests/bonita-query-tests/src/test/java/org/bonitasoft/engine/core/process/instance/model/FlowNodeInstanceTest.java @@ -158,8 +158,8 @@ public void getFlowNodeInstanceIdsToRecover_should_return_ids_of_flow_nodes_that .get(SFlowNodeInstance.class, new PersistentObjectId(id, PersistentObjectBuilder.DEFAULT_TENANT_ID)) .getName())) - .containsOnly("executingTask", "notStableTask", "terminalTask", - "abortingBoundary", "cancellingBoundary"); + .containsOnly("executingTask", "notStableTask", "terminalTask", + "abortingBoundary", "cancellingBoundary"); } @Test @@ -189,11 +189,11 @@ public void getGatewayInstanceIdsToRecover_should_return_ids_of_gateways_flagged assertThat(nodeToRestart.stream() .map(id -> (repository.getSession().get(SFlowNodeInstance.class, new PersistentObjectId(id, PersistentObjectBuilder.DEFAULT_TENANT_ID))).getName())) - .containsOnly( - "gateway_initializing_but_finished", - "gateway_completed", - "gateway_aborting", - "gateway_cancelling"); + .containsOnly( + "gateway_initializing_but_finished", + "gateway_completed", + "gateway_aborting", + "gateway_cancelling"); } @Test @@ -218,9 +218,9 @@ public void getGatewayInstanceIdsToRecover_should_return_ids_of_gateways_flagged assertThat(nodeToRestart.stream() .map(id -> (repository.getSession().get(SFlowNodeInstance.class, new PersistentObjectId(id, PersistentObjectBuilder.DEFAULT_TENANT_ID))).getName())) - .containsOnly( - "gateway_completed", - "gateway_aborting"); + .containsOnly( + "gateway_completed", + "gateway_aborting"); } @Test diff --git a/bonita-integration-tests/bonita-query-tests/src/test/java/org/bonitasoft/engine/resources/TenantResourceServiceQueriesTest.java b/bonita-integration-tests/bonita-query-tests/src/test/java/org/bonitasoft/engine/resources/TenantResourceServiceQueriesTest.java index 94705288b9..1bdbb51324 100644 --- a/bonita-integration-tests/bonita-query-tests/src/test/java/org/bonitasoft/engine/resources/TenantResourceServiceQueriesTest.java +++ b/bonita-integration-tests/bonita-query-tests/src/test/java/org/bonitasoft/engine/resources/TenantResourceServiceQueriesTest.java @@ -56,7 +56,7 @@ public void getTenantResource_should_get_one_resource() { String.class)).isEqualTo("INSTALLED"); assertThat( jdbcTemplate.queryForObject("select type from tenant_resource where name = 'MyResource'", String.class)) - .isEqualTo("BDM"); + .isEqualTo("BDM"); //when STenantResource myResource = repository.getTenantResource(TenantResourceType.BDM, "MyResource"); diff --git a/bpm/bonita-api/bonita-server-api-http/src/test/java/org/bonitasoft/engine/api/internal/servlet/HttpAPIServletCallTest.java b/bpm/bonita-api/bonita-server-api-http/src/test/java/org/bonitasoft/engine/api/internal/servlet/HttpAPIServletCallTest.java index 21222202a2..02a01a5a45 100644 --- a/bpm/bonita-api/bonita-server-api-http/src/test/java/org/bonitasoft/engine/api/internal/servlet/HttpAPIServletCallTest.java +++ b/bpm/bonita-api/bonita-server-api-http/src/test/java/org/bonitasoft/engine/api/internal/servlet/HttpAPIServletCallTest.java @@ -72,7 +72,7 @@ public void should_manage_login_request() throws Exception { when(serverAPI.invokeMethod(new HashMap<>(), "com.bonitasoft.engine.api.LoginAPI", "login", asList(String.class.getName(), String.class.getName()) // , new Object[] { "install", "install" })) // - .thenReturn(apiSession); + .thenReturn(apiSession); //when: httpAPIServletCall.doPost(); diff --git a/bpm/bonita-client/src/test/java/org/bonitasoft/engine/bar/BusinessArchiveTest.java b/bpm/bonita-client/src/test/java/org/bonitasoft/engine/bar/BusinessArchiveTest.java index b826282e50..25f149b4df 100644 --- a/bpm/bonita-client/src/test/java/org/bonitasoft/engine/bar/BusinessArchiveTest.java +++ b/bpm/bonita-client/src/test/java/org/bonitasoft/engine/bar/BusinessArchiveTest.java @@ -580,7 +580,7 @@ public void readProcessFromBusinessArchive() throws Exception { assertThat(result.getProcessContainer().getFlowNode("start1").getOutgoingTransitions().get(0).getCondition() .getContent()) - .as("the condition on the transition was not kept").isEqualTo("true"); + .as("the condition on the transition was not kept").isEqualTo("true"); assertEquals(process.getFlowElementContainer().getConnectors().size(), result.getFlowElementContainer().getConnectors().size()); diff --git a/bpm/bonita-common/src/main/java/org/bonitasoft/engine/api/DocumentAPI.java b/bpm/bonita-common/src/main/java/org/bonitasoft/engine/api/DocumentAPI.java index 483e0df1e0..d718961894 100644 --- a/bpm/bonita-common/src/main/java/org/bonitasoft/engine/api/DocumentAPI.java +++ b/bpm/bonita-common/src/main/java/org/bonitasoft/engine/api/DocumentAPI.java @@ -430,12 +430,15 @@ SearchResult searchDocumentsSupervisedBy(long userId, SearchOptions se * *
      * {@code
-     *   public List retrieveDocuments(DocumentAPI documentAPI, ArchivedProcessInstance archivedProcessInstance) {
-     *       SearchOptions searchOptions = new SearchOptionsBuilder(0, Integer.MAX_VALUE)
-     *               .filter(ArchivedDocumentsSearchDescriptor.PROCESSINSTANCE_ID, archivedProcessInstance.getSourceObjectId())
-     *               .done();
-     *       return documentAPI.searchArchivedDocuments(searchOptions).getResult();
-     *   }
+     *
+     * public List retrieveDocuments(DocumentAPI documentAPI,
+     *         ArchivedProcessInstance archivedProcessInstance) {
+     *     SearchOptions searchOptions = new SearchOptionsBuilder(0, Integer.MAX_VALUE)
+     *             .filter(ArchivedDocumentsSearchDescriptor.PROCESSINSTANCE_ID,
+     *                     archivedProcessInstance.getSourceObjectId())
+     *             .done();
+     *     return documentAPI.searchArchivedDocuments(searchOptions).getResult();
+     * }
      * }
      * 
* diff --git a/bpm/bonita-common/src/main/java/org/bonitasoft/engine/api/ProcessRuntimeAPI.java b/bpm/bonita-common/src/main/java/org/bonitasoft/engine/api/ProcessRuntimeAPI.java index dc30f8dc80..a07bb7a834 100644 --- a/bpm/bonita-common/src/main/java/org/bonitasoft/engine/api/ProcessRuntimeAPI.java +++ b/bpm/bonita-common/src/main/java/org/bonitasoft/engine/api/ProcessRuntimeAPI.java @@ -2207,12 +2207,15 @@ long getProcessDefinitionIdFromActivityInstanceId(long activityInstanceId) * *
      * {@code
-     *  public List retrieveComments(ProcessRuntimeAPI processRuntimeAPI, ArchivedProcessInstance archivedProcessInstance) {
-     *      SearchOptions searchOptions = new SearchOptionsBuilder(0, Integer.MAX_VALUE)
-     *          .filter(ArchivedCommentsSearchDescriptor.PROCESS_INSTANCE_ID, archivedProcessInstance.getSourceObjectId())
-     *          .done();
-     *      return processRuntimeAPI.searchArchivedComments(searchOptions).getResult();
-     *  }
+     *
+     * public List retrieveComments(ProcessRuntimeAPI processRuntimeAPI,
+     *         ArchivedProcessInstance archivedProcessInstance) {
+     *     SearchOptions searchOptions = new SearchOptionsBuilder(0, Integer.MAX_VALUE)
+     *             .filter(ArchivedCommentsSearchDescriptor.PROCESS_INSTANCE_ID,
+     *                     archivedProcessInstance.getSourceObjectId())
+     *             .done();
+     *     return processRuntimeAPI.searchArchivedComments(searchOptions).getResult();
+     * }
      * }
      * 
* diff --git a/bpm/bonita-common/src/test/java/org/bonitasoft/engine/page/impl/PageImplTest.java b/bpm/bonita-common/src/test/java/org/bonitasoft/engine/page/impl/PageImplTest.java index 1abbebba21..019c7e68f0 100644 --- a/bpm/bonita-common/src/test/java/org/bonitasoft/engine/page/impl/PageImplTest.java +++ b/bpm/bonita-common/src/test/java/org/bonitasoft/engine/page/impl/PageImplTest.java @@ -98,8 +98,8 @@ public void should_display_all_fields_in_to_string() { date.getTime(), USER_ID, modificationDate.getTime(), USER_ID, "content.zip", ContentType.FORM, PROCESS_DEFINITION_ID).toString()) - .contains(String.valueOf(PROCESS_DEFINITION_ID)).contains( - ContentType.FORM); + .contains(String.valueOf(PROCESS_DEFINITION_ID)).contains( + ContentType.FORM); } } diff --git a/bpm/bonita-core/bonita-home-server/src/test/java/org/bonitasoft/engine/home/BonitaHomeServerTest.java b/bpm/bonita-core/bonita-home-server/src/test/java/org/bonitasoft/engine/home/BonitaHomeServerTest.java index 821489846d..2bef0cac15 100644 --- a/bpm/bonita-core/bonita-home-server/src/test/java/org/bonitasoft/engine/home/BonitaHomeServerTest.java +++ b/bpm/bonita-core/bonita-home-server/src/test/java/org/bonitasoft/engine/home/BonitaHomeServerTest.java @@ -137,11 +137,11 @@ public void tenant_properties_should_inherit_from_platform_properties() throws E doReturn(Collections.singletonList(new BonitaConfiguration("platform.properties", getPropertiesAsByteArray("prop2=prop2PlatformDB", "prop3=prop3PlatformDB", "prop4=prop4PlatformDB")))) - .when(configurationService).getPlatformEngineConf(); + .when(configurationService).getPlatformEngineConf(); doReturn(Collections.singletonList(new BonitaConfiguration("tenant.properties", getPropertiesAsByteArray("prop4=prop4TenantDB")))) - .when(configurationService).getTenantEngineConf(1); + .when(configurationService).getTenantEngineConf(1); //when Properties allProperties = bonitaHomeServer.getTenantProperties(1); //then diff --git a/bpm/bonita-core/bonita-process-definition/src/test/java/org/bonitasoft/engine/core/process/definition/ProcessDefinitionServiceImplTest.java b/bpm/bonita-core/bonita-process-definition/src/test/java/org/bonitasoft/engine/core/process/definition/ProcessDefinitionServiceImplTest.java index 7079f08b0d..eb3e1e40c1 100644 --- a/bpm/bonita-core/bonita-process-definition/src/test/java/org/bonitasoft/engine/core/process/definition/ProcessDefinitionServiceImplTest.java +++ b/bpm/bonita-core/bonita-process-definition/src/test/java/org/bonitasoft/engine/core/process/definition/ProcessDefinitionServiceImplTest.java @@ -557,7 +557,7 @@ public void searchProcessDeploymentInfosStartedBy() throws Exception { final long startedBy = 9; when(persistenceService.searchEntity(SProcessDefinitionDeployInfo.class, "StartedBy", options, Collections.singletonMap("startedBy", (Object) startedBy))) - .thenReturn(new ArrayList()); + .thenReturn(new ArrayList()); // When final List result = processDefinitionServiceImpl @@ -683,7 +683,7 @@ public void searchProcessDeploymentInfosCanBeStartedBy() throws Exception { final long userId = 9; when(persistenceService.searchEntity(SProcessDefinitionDeployInfo.class, "UserCanStart", options, Collections.singletonMap("userId", (Object) userId))) - .thenReturn(new ArrayList()); + .thenReturn(new ArrayList()); // When final List result = processDefinitionServiceImpl @@ -750,7 +750,7 @@ public void searchProcessDeploymentInfosCanStartForUsersManagedBy() throws Excep final long userId = 9; when(persistenceService.searchEntity(SProcessDefinitionDeployInfo.class, "UsersManagedByCanStart", options, Collections.singletonMap("managerUserId", (Object) userId))) - .thenReturn(new ArrayList()); + .thenReturn(new ArrayList()); // When final List result = processDefinitionServiceImpl @@ -820,7 +820,7 @@ public void searchProcessDeploymentInfosWithParameters() throws Exception { final String querySuffix = "suffix"; when(persistenceService.searchEntity(SProcessDefinitionDeployInfo.class, querySuffix, options, Collections.singletonMap("userId", (Object) userId))) - .thenReturn(new ArrayList()); + .thenReturn(new ArrayList()); // When final List result = processDefinitionServiceImpl @@ -953,7 +953,7 @@ public void searchUncategorizedProcessDeploymentInfosSupervisedBy() throws Excep when(persistenceService.searchEntity(SProcessDefinitionDeployInfo.class, "UncategorizedAndWithSupervisor", options, Collections.singletonMap("userId", (Object) userId))) - .thenReturn(new ArrayList()); + .thenReturn(new ArrayList()); // When final List result = processDefinitionServiceImpl @@ -1023,7 +1023,7 @@ public void searchUncategorizedProcessDeploymentInfosCanBeStartedBy() throws Exc final long userId = 9; when(persistenceService.searchEntity(SProcessDefinitionDeployInfo.class, "UncategorizedUserCanStart", options, Collections.singletonMap("userId", (Object) userId))) - .thenReturn(new ArrayList()); + .thenReturn(new ArrayList()); // When final List result = processDefinitionServiceImpl @@ -1414,7 +1414,7 @@ public void searchUsersWhoCanStartProcessDeploymentInfo() throws Exception { final long processDefinitionId = 9; when(persistenceService.searchEntity(SUser.class, "WhoCanStartProcess", options, Collections.singletonMap("processId", (Object) processDefinitionId))) - .thenReturn(new ArrayList()); + .thenReturn(new ArrayList()); // When final List result = processDefinitionServiceImpl @@ -1431,7 +1431,7 @@ public void searchUsersWhoCanStartProcessDeploymentInfoThrowException() throws E final long processDefinitionId = 9; when(persistenceService.searchEntity(SUser.class, "WhoCanStartProcess", options, Collections.singletonMap("processId", (Object) processDefinitionId))) - .thenThrow(new SBonitaReadException("")); + .thenThrow(new SBonitaReadException("")); // When processDefinitionServiceImpl.searchUsersWhoCanStartProcessDeploymentInfo(processDefinitionId, options); @@ -1465,7 +1465,7 @@ public void getNumberOfUsersWhoCanStartProcessDeploymentInfoThrowException() thr final long processDefinitionId = 9; when(persistenceService.getNumberOfEntities(SUser.class, "WhoCanStartProcess", options, Collections.singletonMap("processId", (Object) processDefinitionId))) - .thenThrow(new SBonitaReadException("")); + .thenThrow(new SBonitaReadException("")); // When processDefinitionServiceImpl.getNumberOfUsersWhoCanStartProcessDeploymentInfo(processDefinitionId, options); @@ -1484,7 +1484,7 @@ public void searchProcessDeploymentInfosWithAssignedOrPendingHumanTasksFor() thr when(persistenceService.searchEntity(SProcessDefinitionDeployInfo.class, "WithAssignedOrPendingHumanTasksFor", options, Collections.singletonMap("userId", (Object) userId))) - .thenReturn(new ArrayList()); + .thenReturn(new ArrayList()); // When final List result = processDefinitionServiceImpl @@ -1558,7 +1558,7 @@ public void searchProcessDeploymentInfosWithAssignedOrPendingHumanTasksSupervise when(persistenceService.searchEntity(SProcessDefinitionDeployInfo.class, "WithAssignedOrPendingHumanTasksSupervisedBy", options, Collections.singletonMap("userId", (Object) userId))) - .thenReturn(new ArrayList()); + .thenReturn(new ArrayList()); // When final List result = processDefinitionServiceImpl diff --git a/bpm/bonita-core/bonita-process-engine/src/main/groovy/org/bonitasoft/permissions/CaseContextPermissionRule.groovy b/bpm/bonita-core/bonita-process-engine/src/main/groovy/org/bonitasoft/permissions/CaseContextPermissionRule.groovy index 36811d8c68..48338826bd 100644 --- a/bpm/bonita-core/bonita-process-engine/src/main/groovy/org/bonitasoft/permissions/CaseContextPermissionRule.groovy +++ b/bpm/bonita-core/bonita-process-engine/src/main/groovy/org/bonitasoft/permissions/CaseContextPermissionRule.groovy @@ -73,5 +73,4 @@ class CaseContextPermissionRule implements PermissionRule { } return Long.valueOf(compoundResourceId.get(0)) } - } diff --git a/bpm/bonita-core/bonita-process-engine/src/main/java/org/bonitasoft/engine/api/impl/resolver/FormMappingAndPageArtifactManager.java b/bpm/bonita-core/bonita-process-engine/src/main/java/org/bonitasoft/engine/api/impl/resolver/FormMappingAndPageArtifactManager.java index c18bf868d4..3eba415b27 100644 --- a/bpm/bonita-core/bonita-process-engine/src/main/java/org/bonitasoft/engine/api/impl/resolver/FormMappingAndPageArtifactManager.java +++ b/bpm/bonita-core/bonita-process-engine/src/main/java/org/bonitasoft/engine/api/impl/resolver/FormMappingAndPageArtifactManager.java @@ -123,8 +123,8 @@ private void deployPage(String resourcePath, byte[] pageContent, Long processDef final Properties pageProperties = pageService.readPageZip(pageContent); final PageCreator pageCreator = new PageCreator(pageName, contentName, ContentType.FORM, processDefinitionId) - .setDisplayName(pageProperties.getProperty(PageService.PROPERTIES_DISPLAY_NAME)) - .setDescription(pageProperties.getProperty(PageService.PROPERTIES_DESCRIPTION)); + .setDisplayName(pageProperties.getProperty(PageService.PROPERTIES_DISPLAY_NAME)) + .setDescription(pageProperties.getProperty(PageService.PROPERTIES_DESCRIPTION)); final SPage newPage = new PageModelConverter().constructSPage(pageCreator, userId); pageService.addPage(newPage, pageContent); } diff --git a/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ActorMemberPermissionRuleTest.groovy b/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ActorMemberPermissionRuleTest.groovy index 72da976aed..90188f1f85 100644 --- a/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ActorMemberPermissionRuleTest.groovy +++ b/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ActorMemberPermissionRuleTest.groovy @@ -115,7 +115,6 @@ public class ActorMemberPermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then assertThat(isAuthorized).isTrue() - } @Test @@ -144,6 +143,5 @@ public class ActorMemberPermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then assertThat(isAuthorized).isFalse() - } } diff --git a/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ActorPermissionRuleTest.groovy b/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ActorPermissionRuleTest.groovy index 8e39b3932b..badcca133c 100644 --- a/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ActorPermissionRuleTest.groovy +++ b/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ActorPermissionRuleTest.groovy @@ -71,7 +71,6 @@ public class ActorPermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then assertThat(isAuthorized).isTrue() - } @Test @@ -102,7 +101,6 @@ public class ActorPermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then assertThat(isAuthorized).isTrue() - } @Test diff --git a/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/CasePermissionRuleTest.groovy b/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/CasePermissionRuleTest.groovy index 56b2c50200..1d3cfe9497 100644 --- a/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/CasePermissionRuleTest.groovy +++ b/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/CasePermissionRuleTest.groovy @@ -289,7 +289,6 @@ public class CasePermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then Assertions.assertThat(isAuthorized).isTrue() - } @Test @@ -324,6 +323,5 @@ public class CasePermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then Assertions.assertThat(isAuthorized).isTrue() - } } diff --git a/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/CaseVariablePermissionRuleTest.groovy b/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/CaseVariablePermissionRuleTest.groovy index fd3736a644..a8f39cb714 100644 --- a/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/CaseVariablePermissionRuleTest.groovy +++ b/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/CaseVariablePermissionRuleTest.groovy @@ -79,7 +79,6 @@ class CaseVariablePermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then assertThat(isAuthorized).isFalse() - } @Test @@ -92,7 +91,6 @@ class CaseVariablePermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then assertThat(isAuthorized).isTrue() - } @Test @@ -105,7 +103,6 @@ class CaseVariablePermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then assertThat(isAuthorized).isFalse() - } @Test @@ -118,7 +115,6 @@ class CaseVariablePermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then assertThat(isAuthorized).isTrue() - } @Test @@ -129,7 +125,6 @@ class CaseVariablePermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then assertThat(isAuthorized).isTrue() - } @Test @@ -140,6 +135,5 @@ class CaseVariablePermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then assertThat(isAuthorized).isFalse() - } } diff --git a/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/CommentPermissionRuleTest.groovy b/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/CommentPermissionRuleTest.groovy index e4d0f3216a..f271f773a7 100644 --- a/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/CommentPermissionRuleTest.groovy +++ b/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/CommentPermissionRuleTest.groovy @@ -198,7 +198,6 @@ public class CommentPermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then Assertions.assertThat(isAuthorized).isTrue() - } @Test @@ -258,6 +257,5 @@ public class CommentPermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then Assertions.assertThat(isAuthorized).isTrue() - } } diff --git a/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/DocumentPermissionRuleTest.groovy b/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/DocumentPermissionRuleTest.groovy index ccab1fe4e8..7bc43735ca 100644 --- a/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/DocumentPermissionRuleTest.groovy +++ b/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/DocumentPermissionRuleTest.groovy @@ -196,7 +196,6 @@ public class DocumentPermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then assertThat(isAuthorized).isTrue() - } @Test @@ -236,6 +235,5 @@ public class DocumentPermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then assertThat(isAuthorized).isTrue() - } } diff --git a/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ProcessConfigurationPermissionRuleTest.groovy b/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ProcessConfigurationPermissionRuleTest.groovy index d3cd25199b..ed676f6574 100644 --- a/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ProcessConfigurationPermissionRuleTest.groovy +++ b/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ProcessConfigurationPermissionRuleTest.groovy @@ -68,7 +68,6 @@ public class ProcessConfigurationPermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then assertThat(isAuthorized).isTrue() - } @Test @@ -97,7 +96,6 @@ public class ProcessConfigurationPermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then assertThat(isAuthorized).isTrue() - } @Test diff --git a/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ProcessConnectorDependencyPermissionRuleTest.groovy b/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ProcessConnectorDependencyPermissionRuleTest.groovy index e7602358e4..23c856692d 100644 --- a/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ProcessConnectorDependencyPermissionRuleTest.groovy +++ b/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ProcessConnectorDependencyPermissionRuleTest.groovy @@ -68,7 +68,6 @@ public class ProcessConnectorDependencyPermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then assertThat(isAuthorized).isTrue() - } @Test diff --git a/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ProcessInstantiationPermissionRuleTest.groovy b/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ProcessInstantiationPermissionRuleTest.groovy index 68d3e1e5b2..172441a2b5 100644 --- a/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ProcessInstantiationPermissionRuleTest.groovy +++ b/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ProcessInstantiationPermissionRuleTest.groovy @@ -92,7 +92,6 @@ public class ProcessInstantiationPermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then Assertions.assertThat(isAuthorized).isTrue() - } @Test @@ -131,7 +130,6 @@ public class ProcessInstantiationPermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then Assertions.assertThat(isAuthorized).isTrue() - } @Test diff --git a/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ProcessResolutionProblemPermissionRuleTest.groovy b/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ProcessResolutionProblemPermissionRuleTest.groovy index 536b6312a9..40cb026eb5 100644 --- a/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ProcessResolutionProblemPermissionRuleTest.groovy +++ b/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ProcessResolutionProblemPermissionRuleTest.groovy @@ -68,7 +68,6 @@ public class ProcessResolutionProblemPermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then assertThat(isAuthorized).isTrue() - } @Test diff --git a/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ProcessSupervisorPermissionRuleTest.groovy b/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ProcessSupervisorPermissionRuleTest.groovy index f06d5e45b9..db6b28317a 100644 --- a/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ProcessSupervisorPermissionRuleTest.groovy +++ b/bpm/bonita-core/bonita-process-engine/src/test/groovy/org/bonitasoft/permissions/ProcessSupervisorPermissionRuleTest.groovy @@ -104,7 +104,6 @@ public class ProcessSupervisorPermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then assertThat(isAuthorized).isTrue() - } @Test @@ -132,7 +131,6 @@ public class ProcessSupervisorPermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then assertThat(isAuthorized).isFalse() - } @Test @@ -145,6 +143,5 @@ public class ProcessSupervisorPermissionRuleTest { def isAuthorized = rule.isAllowed(apiSession, apiCallContext, apiAccessor, logger) //then assertThat(isAuthorized).isTrue() - } } diff --git a/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/ProcessAPIImplTest.java b/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/ProcessAPIImplTest.java index 7efe06ed7d..6ca9a1a1a6 100644 --- a/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/ProcessAPIImplTest.java +++ b/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/ProcessAPIImplTest.java @@ -579,7 +579,7 @@ public void getActivityTransientDataInstances() throws Exception { final List sDataInstances = singletonList(sDataInstance); when(transientDataService.getDataInstances(FLOW_NODE_INSTANCE_ID, DataInstanceContainer.ACTIVITY_INSTANCE.name(), startIndex, nbResults)) - .thenReturn(sDataInstances); + .thenReturn(sDataInstances); final IntegerDataInstanceImpl dataInstance = mock(IntegerDataInstanceImpl.class); doReturn(singletonList(dataInstance)).when(processAPI).convertModelToDataInstances(sDataInstances); @@ -1567,8 +1567,8 @@ public void failFirstTx() { public void should_get_external_resources_from_process() throws Exception { doReturn( new SBARResource("myResource", BARResourceType.EXTERNAL, PROCESS_DEFINITION_ID, new byte[] { 1, 2, 3 })) - .when(processResourcesService) - .get(PROCESS_DEFINITION_ID, BARResourceType.EXTERNAL, "myResource"); + .when(processResourcesService) + .get(PROCESS_DEFINITION_ID, BARResourceType.EXTERNAL, "myResource"); byte[] myResource = processAPI.getExternalProcessResource(PROCESS_DEFINITION_ID, "myResource"); @@ -1653,7 +1653,7 @@ public void should_disconnect_connector_execution_when_output_operation_throw_an // When assertThatThrownBy(() -> processAPI.executeOperations(connectorResult, new ArrayList<>(), new HashMap<>(), new SExpressionContext(), ProcessAPIImplTest.class.getClassLoader(), serviceAccessor)) - .isInstanceOf(SOperationExecutionException.class); + .isInstanceOf(SOperationExecutionException.class); // Then verify(connectorService).disconnect(connectorResult); diff --git a/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/ServerAPIImplTest.java b/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/ServerAPIImplTest.java index 1695d6c4aa..49bf9f40bc 100644 --- a/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/ServerAPIImplTest.java +++ b/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/ServerAPIImplTest.java @@ -132,7 +132,7 @@ public void createServerAPI() throws Exception { doReturn(true).when(platformLoginService).isValid(PLATFORM_SESSION_ID); doAnswer(invocation -> (isMaintenanceEnabled ? MaintenanceDetails.State.ENABLED : MaintenanceDetails.State.DISABLED)) - .when(maintenanceDetails).getMaintenanceState(); + .when(maintenanceDetails).getMaintenanceState(); doAnswer(invocation -> maintenanceDetails).when(maintenanceAPI).getMaintenanceDetails(); accessResolver = new APIAccessResolver() { diff --git a/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/application/installer/ApplicationInstallerUpdateTest.java b/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/application/installer/ApplicationInstallerUpdateTest.java index 7731fafa48..6a866b66a4 100644 --- a/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/application/installer/ApplicationInstallerUpdateTest.java +++ b/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/application/installer/ApplicationInstallerUpdateTest.java @@ -130,7 +130,8 @@ public void should_update_application_containing_all_kind_of_custom_pages() thro assertThat( captor.getAllValues().stream().allMatch(file -> Stream.of("page", "layout", "theme", "restApiExtension") - .anyMatch(name -> file.getName().startsWith(name)))).isTrue(); + .anyMatch(name -> file.getName().startsWith(name)))) + .isTrue(); } @Test @@ -344,7 +345,7 @@ private byte[] createValidBusinessArchive() private byte[] createValidBDMZipFile() throws IOException { return zip(file("bom.xml", ("\n" + "") - .getBytes())); + .getBytes())); } } diff --git a/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/connector/ResetAllFailedConnectorStrategyTest.java b/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/connector/ResetAllFailedConnectorStrategyTest.java index e3d3a4a438..fca9f1fd3d 100644 --- a/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/connector/ResetAllFailedConnectorStrategyTest.java +++ b/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/connector/ResetAllFailedConnectorStrategyTest.java @@ -58,11 +58,13 @@ public void resetConnectorsOf_should_put_all_failed_connectors_in_the_state_TO_R given( connectorInstanceService.getConnectorInstancesWithFailureInfo(20L, SConnectorInstance.FLOWNODE_TYPE, ConnectorState.FAILED.name(), 0, - MAX_RESULTS)).willReturn(Arrays.asList(instance1, instance2)); + MAX_RESULTS)) + .willReturn(Arrays.asList(instance1, instance2)); given( connectorInstanceService.getConnectorInstancesWithFailureInfo(20L, SConnectorInstance.FLOWNODE_TYPE, ConnectorState.FAILED.name(), MAX_RESULTS, - MAX_RESULTS)).willReturn(Arrays.asList(instance3)); + MAX_RESULTS)) + .willReturn(Arrays.asList(instance3)); //when strategy.resetConnectorsOf(20L); @@ -80,7 +82,8 @@ public void resetConnectorsOf_should_throw_ActivityExecution_Exception_when_conn given( connectorInstanceService.getConnectorInstancesWithFailureInfo(20L, SConnectorInstance.FLOWNODE_TYPE, ConnectorState.FAILED.name(), 0, - MAX_RESULTS)).willThrow(new SConnectorInstanceReadException(new Exception())); + MAX_RESULTS)) + .willThrow(new SConnectorInstanceReadException(new Exception())); //when strategy.resetConnectorsOf(20L); diff --git a/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/converter/ApplicationModelConverterTest.java b/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/converter/ApplicationModelConverterTest.java index cd17252d13..a1dde51274 100644 --- a/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/converter/ApplicationModelConverterTest.java +++ b/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/converter/ApplicationModelConverterTest.java @@ -323,7 +323,7 @@ public void toApplicationUpdateDescriptor_should_fail_to_update_icon_filename_wh assertThatThrownBy(() -> converter.toApplicationUpdateDescriptor(updater, LOGGED_USER_ID)).isInstanceOf(IllegalArgumentException.class) - .hasMessageContaining("An icon can't have mimetype"); + .hasMessageContaining("An icon can't have mimetype"); } @Test diff --git a/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/resolver/DocumentInitialValueArtifactManagerTest.java b/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/resolver/DocumentInitialValueArtifactManagerTest.java index 1c3aed63b1..34b2320bc1 100644 --- a/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/resolver/DocumentInitialValueArtifactManagerTest.java +++ b/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/resolver/DocumentInitialValueArtifactManagerTest.java @@ -72,9 +72,9 @@ public void exportBusinessArchive_should_export_only_initial_documents() throws doReturn(getBarResources()).when(processResourcesService).get(PROCESS_ID, BARResourceType.DOCUMENT, 0, 10); doReturn(Collections .singletonList(new SBARResource("10.pdf", BARResourceType.DOCUMENT, PROCESS_ID, new byte[] { 10 }))) - .when( - processResourcesService) - .get(PROCESS_ID, BARResourceType.DOCUMENT, 10, 10); + .when( + processResourcesService) + .get(PROCESS_ID, BARResourceType.DOCUMENT, 10, 10); documentInitialValueDependencyManager.exportToBusinessArchive(PROCESS_ID, businessArchiveBuilder); diff --git a/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/resolver/FormMappingAndPageArtifactManagerTest.java b/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/resolver/FormMappingAndPageArtifactManagerTest.java index 2aa6d9fb2d..2be23c19b9 100644 --- a/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/resolver/FormMappingAndPageArtifactManagerTest.java +++ b/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/api/impl/resolver/FormMappingAndPageArtifactManagerTest.java @@ -524,7 +524,7 @@ public void should_export_form_mapping_with_existing_page() throws Exception { "task1"), withFormMapping("myPage4", PROCESS_DEFINITION_ID, FormMappingType.TASK, FormMappingTarget.INTERNAL, "task2"))) - .when(formMappingService).list(PROCESS_DEFINITION_ID, 0, Integer.MAX_VALUE); + .when(formMappingService).list(PROCESS_DEFINITION_ID, 0, Integer.MAX_VALUE); //when formMappingAndPageArtifactManager.exportToBusinessArchive(PROCESS_DEFINITION_ID, businessArchiveBuilder); //then @@ -548,7 +548,7 @@ public void should_export_form_mapping_with_unexisting_page() throws Exception { .addUserTask("task1", "actor").addUserTask("task2", "actor").getProcess()); doReturn(Collections.singletonList(withFormMapping(null, PROCESS_DEFINITION_ID, FormMappingType.TASK, FormMappingTarget.INTERNAL, "task2"))) - .when(formMappingService).list(PROCESS_DEFINITION_ID, 0, Integer.MAX_VALUE); + .when(formMappingService).list(PROCESS_DEFINITION_ID, 0, Integer.MAX_VALUE); //when formMappingAndPageArtifactManager.exportToBusinessArchive(PROCESS_DEFINITION_ID, businessArchiveBuilder); //then diff --git a/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/business/application/importer/ApplicationImporterTest.java b/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/business/application/importer/ApplicationImporterTest.java index f04ae36173..0ece49598d 100755 --- a/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/business/application/importer/ApplicationImporterTest.java +++ b/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/business/application/importer/ApplicationImporterTest.java @@ -106,7 +106,7 @@ public void importApplication_should_create_application_import_pages_and_menus_a given(nodeToApplicationConverter.toSApplication(applicationNode, ICON_CONTENT, ICON_MIME_TYPE, createdBy, editable)) - .willReturn(importResult); + .willReturn(importResult); long homePageId = 222L; SApplicationPage applicationPage = new SApplicationPage(app.getId(), homePageId, "home"); @@ -174,7 +174,7 @@ public void importApplication_should_not_create_application_when_no_application_ given(nodeToApplicationConverter.toSApplication(applicationNode, ICON_CONTENT, ICON_MIME_TYPE, createdBy, editable)) - .willReturn(importResult); + .willReturn(importResult); long homePageId = 222L; @@ -220,7 +220,7 @@ public void importApplication_should_not_add_error_when_error_already_exists() t applicationNode.addApplicationPage(pageNode1); given(nodeToApplicationConverter.toSApplication(applicationNode, ICON_CONTENT, ICON_MIME_TYPE, createdBy, editable)) - .willReturn(importResult); + .willReturn(importResult); given(applicationService.createApplication(app)).willReturn(app); @@ -250,7 +250,7 @@ public void importApplication_should_not_set_home_page_when_applicationNode_does applicationNode.setToken("app"); given(nodeToApplicationConverter.toSApplication(applicationNode, ICON_CONTENT, ICON_MIME_TYPE, createdBy, editable)) - .willReturn(importResult); + .willReturn(importResult); given(applicationService.createApplication(app)).willReturn(app); //when @@ -281,7 +281,7 @@ public void importApplication_should_add_error_when_home_page_is_not_found() thr given(nodeToApplicationConverter.toSApplication(applicationNode, ICON_CONTENT, ICON_MIME_TYPE, createdBy, editable)) - .willReturn(importResult); + .willReturn(importResult); given(applicationService.createApplication(app)).willReturn(app); given(applicationService.getApplicationPage("app", "home")).willThrow(new SObjectNotFoundException("")); @@ -313,7 +313,7 @@ public void importApplication_should_skip_when_strategy_return_skip() throws Exc ApplicationNode applicationNode = mock(ApplicationNode.class); given(nodeToApplicationConverter.toSApplication(applicationNode, ICON_CONTENT, ICON_MIME_TYPE, createdBy, editable)) - .willReturn(importResult); + .willReturn(importResult); given(applicationService.getApplicationByToken("application")).willReturn(appInConflict); given(strategy.whenApplicationExists(any(), any())).willReturn(ApplicationImportStrategy.ImportStrategy.SKIP); //when @@ -341,7 +341,7 @@ public void importApplication_replace_application_when_strategy_is_replace_dupli ApplicationNode applicationNode = mock(ApplicationNode.class); given(nodeToApplicationConverter.toSApplication(applicationNode, ICON_CONTENT, ICON_MIME_TYPE, createdBy, editable)) - .willReturn(importResult); + .willReturn(importResult); given(applicationService.getApplicationByToken("application")).willReturn(appInConflict); //when @@ -376,7 +376,7 @@ public void importApplication_should_throw_alreadyExistsException_when_strategy_ ApplicationNode applicationNode = mock(ApplicationNode.class); given(nodeToApplicationConverter.toSApplication(applicationNode, ICON_CONTENT, ICON_MIME_TYPE, createdBy, editable)) - .willReturn(importResult); + .willReturn(importResult); given(applicationService.getApplicationByToken("application")).willReturn(appInConflict); //when - then exception @@ -404,7 +404,7 @@ public void importApplication_should_throw_ExecutionException_when_application_s ApplicationNode applicationNode = mock(ApplicationNode.class); given(nodeToApplicationConverter.toSApplication(applicationNode, ICON_CONTENT, ICON_MIME_TYPE, createdBy, editable)) - .willReturn(importResult); + .willReturn(importResult); given(applicationService.createApplication(app1)).willThrow(new SObjectCreationException("")); diff --git a/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/operation/BusinessDataLeftOperandHandlerTest.java b/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/operation/BusinessDataLeftOperandHandlerTest.java index 4184f8f350..e9e3d75cd1 100644 --- a/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/operation/BusinessDataLeftOperandHandlerTest.java +++ b/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/operation/BusinessDataLeftOperandHandlerTest.java @@ -161,7 +161,7 @@ public void deleteThrowsExceptionIfAnInternalExceptionOccurs() throws Exception given(refBusinessDataRetriever.getRefBusinessDataInstance( new BusinessDataContext(leftOperand.getName(), new Container(45, PROCESS_INSTANCE)))) - .willThrow(new SFlowNodeNotFoundException(45)); + .willThrow(new SFlowNodeNotFoundException(45)); //then expectedException.expect(SOperationExecutionException.class); diff --git a/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/service/ModelConvertorTest.java b/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/service/ModelConvertorTest.java index ccbb1cf123..e9b713f525 100644 --- a/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/service/ModelConvertorTest.java +++ b/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/service/ModelConvertorTest.java @@ -699,7 +699,7 @@ void toArchivedFlownodeInstance_should_convert_reachStateDate_for_sendtask() { final SASendTaskInstance sendTaskInstance = new SASendTaskInstance(); assertThat( ModelConvertor.toArchivedFlowNodeInstance(sendTaskInstance, flowNodeStateManager).getReachedStateDate()) - .isNotNull(); + .isNotNull(); } @Test diff --git a/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/tenant/restart/FlowNodesRecoverTest.java b/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/tenant/restart/FlowNodesRecoverTest.java index 2b243eb97e..5049f3a03e 100644 --- a/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/tenant/restart/FlowNodesRecoverTest.java +++ b/bpm/bonita-core/bonita-process-engine/src/test/java/org/bonitasoft/engine/tenant/restart/FlowNodesRecoverTest.java @@ -195,7 +195,7 @@ public void should_fail_batch_if_one_register_work_fails() throws Exception { assertThatThrownBy(() -> flowNodesRecover.execute(recoveryMonitor, flowNodeIds(automaticTaskInstance1, automaticTaskInstance2))) - .isInstanceOf(SWorkRegisterException.class); + .isInstanceOf(SWorkRegisterException.class); } @Test diff --git a/bpm/bonita-core/bonita-process-instance/src/main/java/org/bonitasoft/engine/core/connector/impl/ConnectorServiceImpl.java b/bpm/bonita-core/bonita-process-instance/src/main/java/org/bonitasoft/engine/core/connector/impl/ConnectorServiceImpl.java index 7e87b81a4e..0ba90d4f55 100644 --- a/bpm/bonita-core/bonita-process-instance/src/main/java/org/bonitasoft/engine/core/connector/impl/ConnectorServiceImpl.java +++ b/bpm/bonita-core/bonita-process-instance/src/main/java/org/bonitasoft/engine/core/connector/impl/ConnectorServiceImpl.java @@ -262,7 +262,7 @@ public ConnectorResult executeMultipleEvaluation(final long processDefinitionId, throws SConnectorException { final String implementationClassName = getConnectorImplementationDescriptor(processDefinitionId, connectorDefinitionId, connectorDefinitionVersion) - .getImplementationClassName(); + .getImplementationClassName(); final Map inputParameters; try { inputParameters = evaluateInputParameters(connectorDefinitionId, connectorInputParameters, diff --git a/bpm/bonita-core/bonita-process-instance/src/test/java/org/bonitasoft/engine/core/connector/impl/ConnectorInstanceServiceImplTest.java b/bpm/bonita-core/bonita-process-instance/src/test/java/org/bonitasoft/engine/core/connector/impl/ConnectorInstanceServiceImplTest.java index 2beef47148..ab45ba20bc 100755 --- a/bpm/bonita-core/bonita-process-instance/src/test/java/org/bonitasoft/engine/core/connector/impl/ConnectorInstanceServiceImplTest.java +++ b/bpm/bonita-core/bonita-process-instance/src/test/java/org/bonitasoft/engine/core/connector/impl/ConnectorInstanceServiceImplTest.java @@ -204,7 +204,7 @@ public void getConnectorInstanceWithFailureInfo_should_return_the_result_of_sele parameters, SConnectorInstanceWithFailureInfo.class, new QueryOptions(0, 100, SConnectorInstanceWithFailureInfo.class, "id", OrderByType.ASC)))) - .willReturn(connectors); + .willReturn(connectors); //when List retrievedConnectors = connectorInstanceServiceImpl diff --git a/bpm/bonita-core/bonita-process-instance/src/test/java/org/bonitasoft/engine/core/connector/impl/ConnectorServiceImplTest.java b/bpm/bonita-core/bonita-process-instance/src/test/java/org/bonitasoft/engine/core/connector/impl/ConnectorServiceImplTest.java index 03c0f49554..e5b639e179 100644 --- a/bpm/bonita-core/bonita-process-instance/src/test/java/org/bonitasoft/engine/core/connector/impl/ConnectorServiceImplTest.java +++ b/bpm/bonita-core/bonita-process-instance/src/test/java/org/bonitasoft/engine/core/connector/impl/ConnectorServiceImplTest.java @@ -306,8 +306,8 @@ private void checkGetConnectorImplementationUsesCache(final int givenCacheSizeTo .singletonList(new SBARResource("HoogardenBeerConnector.impl", BARResourceType.CONNECTOR, processDefinition.getId(), connectorImplFile))) - .when(processResourcesService) - .get(eq(processDefinition.getId()), eq(BARResourceType.CONNECTOR), eq(0), anyInt()); + .when(processResourcesService) + .get(eq(processDefinition.getId()), eq(BARResourceType.CONNECTOR), eq(0), anyInt()); //setConnectorImplementation store to cache connectorService.setConnectorImplementation(processDefinition, connectorDefId, connectorDefVersion, zip1); @@ -422,8 +422,8 @@ public void should_setConnectorImplementation_replace_jar_even_if_jar_was_not_in doReturn(Collections.singletonList( new SBARResource("myConnector1.impl", BARResourceType.CONNECTOR, processDefinition.getId(), createConnectorImplFile("connectorId", "connectorVersion")))) - .when(processResourcesService) - .get(eq(processDefinition.getId()), eq(BARResourceType.CONNECTOR), anyInt(), anyInt()); + .when(processResourcesService) + .get(eq(processDefinition.getId()), eq(BARResourceType.CONNECTOR), anyInt(), anyInt()); doReturn(new SDependency("jar2.jar", "jar2.jar", new byte[] { 2 })).when(dependencyService) .getDependencyOfArtifact(processDefinition.getId(), ScopeType.PROCESS, "jar2.jar"); systemOutRule.clearLog(); @@ -502,8 +502,8 @@ private void havingConnector(SProcessDefinitionImpl processDefinition, String im doReturn(Collections.singletonList( new SBARResource(implName, BARResourceType.CONNECTOR, processDefinition.getId(), createConnectorImplFile(connectorId, connectorVersion, jars)))) - .when(processResourcesService) - .get(eq(processDefinition.getId()), eq(BARResourceType.CONNECTOR), anyInt(), anyInt()); + .when(processResourcesService) + .get(eq(processDefinition.getId()), eq(BARResourceType.CONNECTOR), anyInt(), anyInt()); for (BarResource jar : jars) { doReturn(new SDependency(jar.getName(), jar.getName(), jar.getContent())).when(dependencyService) .getDependencyOfArtifact(processDefinition.getId(), ScopeType.PROCESS, jar.getName()); @@ -530,8 +530,8 @@ private void havingConnectorWithWrongJarName(SProcessDefinitionImpl processDefin doReturn(Collections.singletonList( new SBARResource(implName, BARResourceType.CONNECTOR, processDefinition.getId(), createConnectorImplFile(connectorId, connectorVersion, jars)))) - .when(processResourcesService) - .get(eq(processDefinition.getId()), eq(BARResourceType.CONNECTOR), anyInt(), anyInt()); + .when(processResourcesService) + .get(eq(processDefinition.getId()), eq(BARResourceType.CONNECTOR), anyInt(), anyInt()); for (BarResource jar : jars) { doReturn(null).when(dependencyService).getDependencyOfArtifact(processDefinition.getId(), ScopeType.PROCESS, jar.getName()); @@ -649,7 +649,7 @@ public void should_disconnect_connector_when_executeOutputOperation_throw_a_SOpe assertThatThrownBy( () -> connectorService.executeOutputOperation(new ArrayList<>(), new SExpressionContext(1L, "", 1L), connectorResult)) - .isInstanceOf(SConnectorException.class); + .isInstanceOf(SConnectorException.class); // Then verify(connectorExecutor).disconnect(any(SConnectorAdapter.class)); diff --git a/bpm/bonita-core/bonita-process-instance/src/test/java/org/bonitasoft/engine/core/process/instance/impl/ActivityInstanceServiceImplTest.java b/bpm/bonita-core/bonita-process-instance/src/test/java/org/bonitasoft/engine/core/process/instance/impl/ActivityInstanceServiceImplTest.java index 44be868b68..e0e40829f4 100644 --- a/bpm/bonita-core/bonita-process-instance/src/test/java/org/bonitasoft/engine/core/process/instance/impl/ActivityInstanceServiceImplTest.java +++ b/bpm/bonita-core/bonita-process-instance/src/test/java/org/bonitasoft/engine/core/process/instance/impl/ActivityInstanceServiceImplTest.java @@ -404,7 +404,7 @@ public void should_search_pending_tasks_assigned_to_a_user() throws Exception { List expectedResult = new ArrayList<>(); when(persistenceService.searchEntity(SHumanTaskInstance.class, "PendingAssignedTo", options, Collections.singletonMap("userId", 61L))) - .thenReturn(expectedResult); + .thenReturn(expectedResult); // When final List result = activityInstanceServiceImpl.searchPendingTasksAssignedTo(61L, options); @@ -419,7 +419,7 @@ public void should_search_pending_tasks_assigned_to_a_user_throw_exception_on_pe final QueryOptions options = new QueryOptions(0, 10); when(persistenceService.searchEntity(SHumanTaskInstance.class, "PendingAssignedTo", options, Collections.singletonMap("userId", 99L))) - .thenThrow(new SBonitaReadException("Fake for test")); + .thenThrow(new SBonitaReadException("Fake for test")); // When Throwable thrown = catchThrowable(() -> { @@ -438,7 +438,7 @@ public void should_count_number_of_pending_tasks_assigned_to_user() throws Excep final QueryOptions options = new QueryOptions(0, 10); when(persistenceService.getNumberOfEntities(SHumanTaskInstance.class, "PendingAssignedTo", options, Collections.singletonMap("userId", 365L))) - .thenReturn(14L); + .thenReturn(14L); // When final long count = activityInstanceServiceImpl.getNumberOfPendingTasksAssignedTo(365L, options); @@ -454,7 +454,7 @@ public void should_count_number_of_pending_tasks_assigned_to_user_throw_exceptio final QueryOptions options = new QueryOptions(0, 10); when(persistenceService.getNumberOfEntities(SHumanTaskInstance.class, "PendingAssignedTo", options, Collections.singletonMap("userId", 3365L))) - .thenThrow(new SBonitaReadException("Fake for test")); + .thenThrow(new SBonitaReadException("Fake for test")); // When Throwable thrown = catchThrowable(() -> { diff --git a/bpm/bonita-core/bonita-user-filter/src/test/java/org/bonitasoft/engine/core/filter/impl/UserFilterServiceImplTest.java b/bpm/bonita-core/bonita-user-filter/src/test/java/org/bonitasoft/engine/core/filter/impl/UserFilterServiceImplTest.java index f339bf87e1..06afa8c766 100644 --- a/bpm/bonita-core/bonita-user-filter/src/test/java/org/bonitasoft/engine/core/filter/impl/UserFilterServiceImplTest.java +++ b/bpm/bonita-core/bonita-user-filter/src/test/java/org/bonitasoft/engine/core/filter/impl/UserFilterServiceImplTest.java @@ -136,8 +136,8 @@ public void should_parse_user_filter_implementation_file_and_cache_it_when_loadi "\n").getBytes(); doReturn(Collections.singletonList(new SBARResource("my-user-filter.impl", BARResourceType.USER_FILTER, PROCESS_DEFINITION_ID, userFilterImplContent))) - .when(resourceService) - .get(eq(PROCESS_DEFINITION_ID), eq(BARResourceType.USER_FILTER), anyInt(), anyInt()); + .when(resourceService) + .get(eq(PROCESS_DEFINITION_ID), eq(BARResourceType.USER_FILTER), anyInt(), anyInt()); //when userFilterService.loadUserFilters(PROCESS_DEFINITION_ID); diff --git a/bpm/bonita-web-server/src/main/java/org/bonitasoft/web/rest/model/application/AbstractApplicationDefinition.java b/bpm/bonita-web-server/src/main/java/org/bonitasoft/web/rest/model/application/AbstractApplicationDefinition.java index 66d9e9ef89..0c3888a368 100644 --- a/bpm/bonita-web-server/src/main/java/org/bonitasoft/web/rest/model/application/AbstractApplicationDefinition.java +++ b/bpm/bonita-web-server/src/main/java/org/bonitasoft/web/rest/model/application/AbstractApplicationDefinition.java @@ -100,7 +100,7 @@ public Supplier findItemCreator(Map attributes) { public Supplier findItemCreator(TreeIndexed tree) { // We need the "link" attribute to discriminate between legacy application and application link. boolean isLink; - if (tree != null && tree.get(AbstractApplicationItem.ATTRIBUTE_LINK)instanceof TreeLeaf v) { + if (tree != null && tree.get(AbstractApplicationItem.ATTRIBUTE_LINK) instanceof TreeLeaf v) { isLink = Optional.ofNullable(v.getValue()).map(Object::toString).map(Boolean::parseBoolean) .orElse(Boolean.FALSE); } else { diff --git a/bpm/bonita-web-server/src/main/java/org/bonitasoft/web/rest/model/bpm/flownode/TaskDefinition.java b/bpm/bonita-web-server/src/main/java/org/bonitasoft/web/rest/model/bpm/flownode/TaskDefinition.java index 91e7ceb768..c6fc8c7d58 100644 --- a/bpm/bonita-web-server/src/main/java/org/bonitasoft/web/rest/model/bpm/flownode/TaskDefinition.java +++ b/bpm/bonita-web-server/src/main/java/org/bonitasoft/web/rest/model/bpm/flownode/TaskDefinition.java @@ -50,7 +50,7 @@ protected void defineAttributes() { // add extra state ((EnumValidator) getAttribute(FlowNodeItem.ATTRIBUTE_STATE) .getValidator(EnumValidator.class.getName())) - .addValue(TaskItem.VALUE_STATE_REPLAY); + .addValue(TaskItem.VALUE_STATE_REPLAY); } @Override diff --git a/bpm/bonita-web-server/src/main/java/org/bonitasoft/web/rest/server/datastore/bpm/flownode/AbstractActivityDatastore.java b/bpm/bonita-web-server/src/main/java/org/bonitasoft/web/rest/server/datastore/bpm/flownode/AbstractActivityDatastore.java index dd2599743a..6a4f3e1329 100644 --- a/bpm/bonita-web-server/src/main/java/org/bonitasoft/web/rest/server/datastore/bpm/flownode/AbstractActivityDatastore.java +++ b/bpm/bonita-web-server/src/main/java/org/bonitasoft/web/rest/server/datastore/bpm/flownode/AbstractActivityDatastore.java @@ -110,7 +110,8 @@ protected SearchOptionsBuilder makeSearchOptionBuilder(final int page, final int return new SearchOptionsCreator(page, resultsByPage, search, new Sorts(orders, new ActivityAttributeConverter()), new Filters(filters, - new ActivityFilterCreator())).getBuilder(); + new ActivityFilterCreator())) + .getBuilder(); } @Override diff --git a/bpm/bonita-web-server/src/test/java/org/bonitasoft/console/common/server/auth/AuthenticationManagerPropertiesTest.java b/bpm/bonita-web-server/src/test/java/org/bonitasoft/console/common/server/auth/AuthenticationManagerPropertiesTest.java index 38857846b3..4580b016d9 100644 --- a/bpm/bonita-web-server/src/test/java/org/bonitasoft/console/common/server/auth/AuthenticationManagerPropertiesTest.java +++ b/bpm/bonita-web-server/src/test/java/org/bonitasoft/console/common/server/auth/AuthenticationManagerPropertiesTest.java @@ -39,7 +39,7 @@ public void setUp() throws IOException { "OAuth.consumerKey = ove2vcdjptar\n" + "OAuth.consumerSecret = vdaBrCmHvkgJoYz1\n" + "OAuth.callbackURL = http://127.0.0.1:8888/loginservice").getBytes())).when(loginManagerProperties) - .getTenantPropertiesOfScope(); + .getTenantPropertiesOfScope(); } @After diff --git a/bpm/bonita-web-server/src/test/java/org/bonitasoft/web/rest/server/api/bpm/process/ProcessDefinitionDesignResourceTest.java b/bpm/bonita-web-server/src/test/java/org/bonitasoft/web/rest/server/api/bpm/process/ProcessDefinitionDesignResourceTest.java index ccf57a9b5d..4e3bdadf1a 100644 --- a/bpm/bonita-web-server/src/test/java/org/bonitasoft/web/rest/server/api/bpm/process/ProcessDefinitionDesignResourceTest.java +++ b/bpm/bonita-web-server/src/test/java/org/bonitasoft/web/rest/server/api/bpm/process/ProcessDefinitionDesignResourceTest.java @@ -80,8 +80,8 @@ public void testReplaceLongIdToString() throws Exception { .isEqualToIgnoringCase("{ \"id\": \"123\"}"); assertThat( processDefinitionDesignResource.replaceLongIdToString("{ \"id\":123, \"test\": [ otherid: \"zerze\"]}")) - .isEqualToIgnoringCase( - "{ \"id\":\"123\", \"test\": [ otherid: \"zerze\"]}"); + .isEqualToIgnoringCase( + "{ \"id\":\"123\", \"test\": [ otherid: \"zerze\"]}"); assertThat(processDefinitionDesignResource.replaceLongIdToString("{ \"iaed\": 123}")) .isEqualToIgnoringCase("{ \"iaed\": 123}"); assertThat(processDefinitionDesignResource.replaceLongIdToString("{ \"name\": \"\\\"id\\\": 123\"}")) diff --git a/bpm/bonita-web-server/src/test/java/org/bonitasoft/web/rest/server/api/bpm/process/ProcessInstantiationResourceTest.java b/bpm/bonita-web-server/src/test/java/org/bonitasoft/web/rest/server/api/bpm/process/ProcessInstantiationResourceTest.java index c5ea4ddcb7..5c8cbf0b97 100644 --- a/bpm/bonita-web-server/src/test/java/org/bonitasoft/web/rest/server/api/bpm/process/ProcessInstantiationResourceTest.java +++ b/bpm/bonita-web-server/src/test/java/org/bonitasoft/web/rest/server/api/bpm/process/ProcessInstantiationResourceTest.java @@ -160,7 +160,7 @@ public void should_respond_400_Bad_request_when_contract_is_not_validated_when_i throws Exception { doThrow(new ContractViolationException("aMessage", "aMessage", asList("first explanation", "second explanation"), null)) - .when(processAPI).startProcessWithInputs(anyLong(), anyMapOf(String.class, Serializable.class)); + .when(processAPI).startProcessWithInputs(anyLong(), anyMapOf(String.class, Serializable.class)); when(processAPI.getProcessContract(PROCESS_DEFINITION_ID)).thenReturn(contractDefinition); final Response response = request(URL_API_PROCESS_INSTANTIATION_TEST).post(VALID_POST_BODY); diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 024bc25002..4bfb4b52da 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -166,6 +166,6 @@ groovy = ["groovyCore", "groovyServlet", "groovyXml", "groovyJson", "groovyJmx", "groovyDateutil", "groovyDocgenerator", "groovyJsr223", "groovySql", "groovyTemplates", "groovyYaml"] [plugins] -bonitaFormatting = { id = "com.bonitasoft.gradle.bonita-formatting", version = "0.1.63" } +bonitaFormatting = { id = "com.bonitasoft.gradle.bonita-formatting", version = "0.1.64" } dependencyUpdates = { id = "com.github.ben-manes.versions", version = "0.51.0" } # used by "List out-of-date dependencies" script taskInfo = { id = "org.barfuin.gradle.taskinfo", version = "2.2.0" } # Adds a 'tiTree' task to display Gradle task-graph diff --git a/platform/platform-setup/src/test/java/org/bonitasoft/platform/configuration/util/FolderComparator.java b/platform/platform-setup/src/test/java/org/bonitasoft/platform/configuration/util/FolderComparator.java index e737e879b1..8b6fb5dd0f 100644 --- a/platform/platform-setup/src/test/java/org/bonitasoft/platform/configuration/util/FolderComparator.java +++ b/platform/platform-setup/src/test/java/org/bonitasoft/platform/configuration/util/FolderComparator.java @@ -76,7 +76,7 @@ private void compareFileContent(File expectedFile, File givenFile) throws Except case XML: final List allDifferences = new DetailedDiff( XMLUnit.compareXML(new FileReader(givenFile), new FileReader(expectedFile))) - .getAllDifferences(); + .getAllDifferences(); Assertions.assertThat(allDifferences).as("should xml file be equals").isEmpty(); break; default: diff --git a/platform/platform-setup/src/test/java/org/bonitasoft/platform/setup/ConfigurationCheckerTest.java b/platform/platform-setup/src/test/java/org/bonitasoft/platform/setup/ConfigurationCheckerTest.java index e5d6a02826..58ce7a9ef6 100644 --- a/platform/platform-setup/src/test/java/org/bonitasoft/platform/setup/ConfigurationCheckerTest.java +++ b/platform/platform-setup/src/test/java/org/bonitasoft/platform/setup/ConfigurationCheckerTest.java @@ -70,7 +70,7 @@ public void validate_should_fail_mandatory_property_is_not_set() throws Exceptio System.setProperty(PlatformSetup.BONITA_DB_VENDOR_PROPERTY, dbVendor); final Properties propertiesWithMissingServerName = new PropertyLoader( TEST_DATASOURCE_CONFIG_DIR + "incomplete_database.properties") - .loadProperties(); + .loadProperties(); expectedException.expect(PlatformException.class); expectedException.expectMessage("Mandatory property"); diff --git a/platform/platform-setup/src/test/java/org/bonitasoft/platform/setup/command/configure/DatabaseConfigurationTest.java b/platform/platform-setup/src/test/java/org/bonitasoft/platform/setup/command/configure/DatabaseConfigurationTest.java index d4f4044783..868924cd20 100644 --- a/platform/platform-setup/src/test/java/org/bonitasoft/platform/setup/command/configure/DatabaseConfigurationTest.java +++ b/platform/platform-setup/src/test/java/org/bonitasoft/platform/setup/command/configure/DatabaseConfigurationTest.java @@ -189,8 +189,8 @@ public void jdbc_pool_size_values_must_be_integers() throws Exception { // expect: assertThatThrownBy( () -> new DatabaseConfiguration("bdm.", properties, null)) - .isExactlyInstanceOf(PlatformException.class) - .hasMessage("Invalid integer value 'ten' for property 'bdm.connection-pool.maxIdle'"); + .isExactlyInstanceOf(PlatformException.class) + .hasMessage("Invalid integer value 'ten' for property 'bdm.connection-pool.maxIdle'"); } } diff --git a/services/bonita-business-application/src/test/java/org/bonitasoft/engine/business/application/impl/ApplicationServiceImplTest.java b/services/bonita-business-application/src/test/java/org/bonitasoft/engine/business/application/impl/ApplicationServiceImplTest.java index 207a329147..40f32484c8 100755 --- a/services/bonita-business-application/src/test/java/org/bonitasoft/engine/business/application/impl/ApplicationServiceImplTest.java +++ b/services/bonita-business-application/src/test/java/org/bonitasoft/engine/business/application/impl/ApplicationServiceImplTest.java @@ -407,7 +407,8 @@ public void createApplicationPage_should_throw_SObjectAlreadyExistsException_whe inputParameters.put("applicationPageToken", "mainDashBoard"); given(persistenceService.selectOne( new SelectOneDescriptor("getApplicationPageByTokenAndApplicationId", inputParameters, - SApplicationPage.class))).willReturn(applicationPage); + SApplicationPage.class))) + .willReturn(applicationPage); //when final SApplicationPage applicationPageToCreate = buildApplicationPage(7, 5, 16, "mainDashBoard"); @@ -679,7 +680,8 @@ public void getApplicationHomePage_should_return_result_of_persitence_service_se inputParameters.put("applicationId", 100); given(persistenceService .selectOne(new SelectOneDescriptor("getApplicationHomePage", inputParameters, - SApplicationPage.class))).willReturn(applicationPage); + SApplicationPage.class))) + .willReturn(applicationPage); //when final SApplicationPage homePage = applicationServiceImpl.getApplicationHomePage(100); @@ -696,7 +698,8 @@ public void getApplicationHomePage_should_throw_SObjectNotFoundException_when_pe inputParameters.put("applicationId", 100); given(persistenceService .selectOne(new SelectOneDescriptor("getApplicationHomePage", inputParameters, - SApplicationPage.class))).willReturn(null); + SApplicationPage.class))) + .willReturn(null); //when applicationServiceImpl.getApplicationHomePage(100); diff --git a/services/bonita-business-application/src/test/java/org/bonitasoft/engine/business/application/impl/IndexUpdaterTest.java b/services/bonita-business-application/src/test/java/org/bonitasoft/engine/business/application/impl/IndexUpdaterTest.java index 30c11907ab..199c153fdf 100755 --- a/services/bonita-business-application/src/test/java/org/bonitasoft/engine/business/application/impl/IndexUpdaterTest.java +++ b/services/bonita-business-application/src/test/java/org/bonitasoft/engine/business/application/impl/IndexUpdaterTest.java @@ -78,7 +78,7 @@ public void incrementIndexes_should_increment_indexes_of_all_elements_in_the_spe .willReturn(Arrays.asList(menu3, menu4)); given(applicationService .searchApplicationMenus(new QueryOptions(MAX_RESULTS, MAX_RESULTS, orderBy, filters, null))) - .willReturn(Arrays.asList(menu5)); + .willReturn(Arrays.asList(menu5)); //when indexUpdater.incrementIndexes(1L, 3, 5); @@ -118,7 +118,7 @@ public void decrementIndexes_should_decrement_indexes_of_all_elements_in_the_spe .willReturn(Arrays.asList(menu3, menu4)); given(applicationService .searchApplicationMenus(new QueryOptions(MAX_RESULTS, MAX_RESULTS, orderBy, filters, null))) - .willReturn(Arrays.asList(menu5)); + .willReturn(Arrays.asList(menu5)); //when indexUpdater.decrementIndexes(1L, 3, 5); diff --git a/services/bonita-business-data/bonita-business-data-generator/src/test/java/org/bonitasoft/engine/business/data/generator/AbstractBDMCodeGeneratorTest.java b/services/bonita-business-data/bonita-business-data-generator/src/test/java/org/bonitasoft/engine/business/data/generator/AbstractBDMCodeGeneratorTest.java index 4ff362ee64..b84b331c1f 100644 --- a/services/bonita-business-data/bonita-business-data-generator/src/test/java/org/bonitasoft/engine/business/data/generator/AbstractBDMCodeGeneratorTest.java +++ b/services/bonita-business-data/bonita-business-data-generator/src/test/java/org/bonitasoft/engine/business/data/generator/AbstractBDMCodeGeneratorTest.java @@ -36,7 +36,7 @@ public void should_createMethodForNewInstance_return_jmethod_with_valid_name_and final AbstractBDMCodeGenerator abstractBDMCodeGenerator = mock(AbstractBDMCodeGenerator.class); when(abstractBDMCodeGenerator.createMethodForNewInstance(any(BusinessObject.class), any(JDefinedClass.class), any(JDefinedClass.class))) - .thenCallRealMethod(); + .thenCallRealMethod(); when(abstractBDMCodeGenerator.addMethodSignature(any(JDefinedClass.class), anyString(), any(JType.class))) .thenCallRealMethod(); when(abstractBDMCodeGenerator.getModel()).thenReturn(new JCodeModel()); diff --git a/services/bonita-business-data/bonita-business-data-generator/src/test/java/org/bonitasoft/engine/business/data/generator/filter/OnlyDAOImplementationFileFilterTest.java b/services/bonita-business-data/bonita-business-data-generator/src/test/java/org/bonitasoft/engine/business/data/generator/filter/OnlyDAOImplementationFileFilterTest.java index 751f38458a..31ee7d405e 100644 --- a/services/bonita-business-data/bonita-business-data-generator/src/test/java/org/bonitasoft/engine/business/data/generator/filter/OnlyDAOImplementationFileFilterTest.java +++ b/services/bonita-business-data/bonita-business-data-generator/src/test/java/org/bonitasoft/engine/business/data/generator/filter/OnlyDAOImplementationFileFilterTest.java @@ -72,7 +72,7 @@ private void checkAcceptShouldReturns(String domain, String subDomain, String ex doReturn("Employee." + extension).when(file).getName(); doReturn(domain + File.separatorChar + subDomain + File.separatorChar + "model" + File.separatorChar + "Employee." + extension).when(file) - .getAbsolutePath(); + .getAbsolutePath(); // when then assertThat(fileFilter.accept(file)) diff --git a/services/bonita-business-data/bonita-business-data-generator/src/test/java/org/bonitasoft/engine/business/data/generator/filter/WithoutDAOImplementationFileFilterTest.java b/services/bonita-business-data/bonita-business-data-generator/src/test/java/org/bonitasoft/engine/business/data/generator/filter/WithoutDAOImplementationFileFilterTest.java index c09ac832e3..27b67a8a9f 100644 --- a/services/bonita-business-data/bonita-business-data-generator/src/test/java/org/bonitasoft/engine/business/data/generator/filter/WithoutDAOImplementationFileFilterTest.java +++ b/services/bonita-business-data/bonita-business-data-generator/src/test/java/org/bonitasoft/engine/business/data/generator/filter/WithoutDAOImplementationFileFilterTest.java @@ -60,7 +60,7 @@ private void checkAcceptShouldReturns(String domain, String subDomain, String ex doReturn("Employee." + extension).when(file).getName(); doReturn(domain + File.separatorChar + subDomain + File.separatorChar + "model" + File.separatorChar + "Employee." + extension).when(file) - .getAbsolutePath(); + .getAbsolutePath(); // when then assertThat(fileFilter.accept(file)) diff --git a/services/bonita-business-data/bonita-business-data-impl/src/test/java/org/bonitasoft/engine/business/data/impl/BusinessDataModelRepositoryImplTest.java b/services/bonita-business-data/bonita-business-data-impl/src/test/java/org/bonitasoft/engine/business/data/impl/BusinessDataModelRepositoryImplTest.java index 9121130433..0c208678d0 100644 --- a/services/bonita-business-data/bonita-business-data-impl/src/test/java/org/bonitasoft/engine/business/data/impl/BusinessDataModelRepositoryImplTest.java +++ b/services/bonita-business-data/bonita-business-data-impl/src/test/java/org/bonitasoft/engine/business/data/impl/BusinessDataModelRepositoryImplTest.java @@ -243,7 +243,7 @@ public void update_should_convert_exceptions_to_allow_to_see_entire_root_cause() doReturn(singletonList(new CommandAcceptanceException("Error executing DDL bla bla bla...", new SQLSyntaxErrorException("ORA-02275: une telle contrainte référentielle existe déjà dans la table", new Exception("Root Oracle Cause"))))) - .when(schemaManager).update(anySet()); + .when(schemaManager).update(anySet()); // when - then: assertThatExceptionOfType(SBusinessDataRepositoryDeploymentException.class) @@ -264,7 +264,7 @@ public void update_should_convert_all_exceptions_in_the_list() { new Exception("Root Oracle Cause"))), new CommandAcceptanceException("CommandAcceptanceException bliblibli", new SQLSyntaxErrorException("Hibernate error")))) - .when(schemaManager).update(anySet()); + .when(schemaManager).update(anySet()); // when - then: assertThatExceptionOfType(SBusinessDataRepositoryDeploymentException.class) @@ -296,7 +296,7 @@ public void isDeployedComparesBdmWithSameContent() throws Exception { var generatedJarContent = "fake jar content".getBytes(); when(dependencyService.getIdOfDependencyOfArtifact(TENANT_ID, ScopeType.TENANT, BusinessDataModelRepositoryImpl.BDR_DEPENDENCY_FILENAME)) - .thenReturn(Optional.of(1L)); + .thenReturn(Optional.of(1L)); var deployedBdm = new SDependency(); deployedBdm.setValue_(generatedJarContent); when(dependencyService.getDependency(1L)).thenReturn(deployedBdm); @@ -318,7 +318,7 @@ public void isDeployedComparesBdmWithDifferentContent() throws Exception { var generatedJarContent = "fake jar content".getBytes(); when(dependencyService.getIdOfDependencyOfArtifact(TENANT_ID, ScopeType.TENANT, BusinessDataModelRepositoryImpl.BDR_DEPENDENCY_FILENAME)) - .thenReturn(Optional.of(1L)); + .thenReturn(Optional.of(1L)); var deployedBdm = new SDependency(); deployedBdm.setValue_(existingJarContent); when(dependencyService.getDependency(1L)).thenReturn(deployedBdm); @@ -338,7 +338,7 @@ public void isDeployedWithoutBdmDeployed() throws Exception { var bdmArchive = "fake archive content".getBytes(); when(dependencyService.getIdOfDependencyOfArtifact(TENANT_ID, ScopeType.TENANT, BusinessDataModelRepositoryImpl.BDR_DEPENDENCY_FILENAME)) - .thenReturn(Optional.empty()); + .thenReturn(Optional.empty()); // when: var isDeployed = businessDataModelRepository.isDeployed(bdmArchive); diff --git a/services/bonita-business-data/bonita-business-data-impl/src/test/java/org/bonitasoft/engine/business/data/impl/JPABusinessDataRepositoryImplITest.java b/services/bonita-business-data/bonita-business-data-impl/src/test/java/org/bonitasoft/engine/business/data/impl/JPABusinessDataRepositoryImplITest.java index 319b5aa5d3..415238278b 100644 --- a/services/bonita-business-data/bonita-business-data-impl/src/test/java/org/bonitasoft/engine/business/data/impl/JPABusinessDataRepositoryImplITest.java +++ b/services/bonita-business-data/bonita-business-data-impl/src/test/java/org/bonitasoft/engine/business/data/impl/JPABusinessDataRepositoryImplITest.java @@ -218,7 +218,7 @@ public void returnNullnWhenFindingAnUnknownEmployee() throws Exception { (Serializable) "Unknown_lastName"); assertThat( businessDataRepository.find(Employee.class, "FROM Employee e WHERE e.lastName = :lastName", parameters)) - .isNull(); + .isNull(); } @Test(expected = IllegalStateException.class) diff --git a/services/bonita-command/src/test/java/org/bonitasoft/engine/command/api/impl/CommandServiceImplTest.java b/services/bonita-command/src/test/java/org/bonitasoft/engine/command/api/impl/CommandServiceImplTest.java index 726c621bfa..562a946d66 100644 --- a/services/bonita-command/src/test/java/org/bonitasoft/engine/command/api/impl/CommandServiceImplTest.java +++ b/services/bonita-command/src/test/java/org/bonitasoft/engine/command/api/impl/CommandServiceImplTest.java @@ -249,7 +249,7 @@ public final void getUserCommands() throws SCommandGettingException, SBonitaRead final int maxResults = 1; when(persistence .selectList(SelectDescriptorBuilder.getUserCommands(field, orderByType, startIndex, maxResults))) - .thenReturn(sCommands); + .thenReturn(sCommands); // When final List userCommands = commandServiceImpl.getUserCommands(startIndex, maxResults, @@ -268,8 +268,8 @@ public final void getUserCommandsThrowException() throws SCommandGettingExceptio final int maxResults = 1; when(persistence .selectList(SelectDescriptorBuilder.getUserCommands(field, orderByType, startIndex, maxResults))) - .thenThrow( - new SBonitaReadException("")); + .thenThrow( + new SBonitaReadException("")); // When commandServiceImpl.getUserCommands(startIndex, maxResults, SCommandCriterion.NAME_DESC); diff --git a/services/bonita-commons/src/test/java/org/bonitasoft/engine/DeepRegexFileFilterTest.java b/services/bonita-commons/src/test/java/org/bonitasoft/engine/DeepRegexFileFilterTest.java index 2753b7878b..9db17bdd49 100644 --- a/services/bonita-commons/src/test/java/org/bonitasoft/engine/DeepRegexFileFilterTest.java +++ b/services/bonita-commons/src/test/java/org/bonitasoft/engine/DeepRegexFileFilterTest.java @@ -27,7 +27,7 @@ public void acceptShouldWorkForMatchingPattern() { final String parentPatternPathname = "/media/drive/some_folder"; assertThat(new DeepRegexFileFilter(new File(parentPatternPathname), pattern) .accept(new File("/media/drive/some_folder/folder/sub/matchingFile.txt"))) - .isTrue(); + .isTrue(); } @Test @@ -36,7 +36,7 @@ public void acceptShouldWorkForMatchingPatternOnFolderWithTrailingSlash() { final String parentPatternPathname = "/home/some_folder/"; assertThat(new DeepRegexFileFilter(new File(parentPatternPathname), pattern) .accept(new File("/home/some_folder/folder/sub/matchingFile.txt"))) - .isTrue(); + .isTrue(); } @Test @@ -45,7 +45,7 @@ public void acceptShouldRejectNonMatchingFile() { final String parentPatternPathname = "/home/some_folder/"; assertThat(new DeepRegexFileFilter(new File(parentPatternPathname), pattern) .accept(new File("/home/some_folder/folder/sub/someReport.pdf"))) - .isFalse(); + .isFalse(); } @Test @@ -54,7 +54,7 @@ public void acceptShouldMatchDeepSubFolders() { final String parentPatternPathname = "/home"; assertThat(new DeepRegexFileFilter(new File(parentPatternPathname), pattern) .accept(new File("/home/folder/sub/sub2/fileHiddenInDeepFolder.txt"))) - .isTrue(); + .isTrue(); } @Test @@ -63,7 +63,7 @@ public void acceptShouldNotMatchSlashBeginingPatterns() { final String parentPatternPathname = "/home"; assertThat(new DeepRegexFileFilter(new File(parentPatternPathname), pattern) .accept(new File("/home/folder/sub/sub2/fileHiddenInDeepFolder.txt"))) - .isFalse(); + .isFalse(); } } diff --git a/services/bonita-commons/src/test/java/org/bonitasoft/engine/commons/JavaMethodInvokerTest.java b/services/bonita-commons/src/test/java/org/bonitasoft/engine/commons/JavaMethodInvokerTest.java index 2a4ca56cb2..2f0703404a 100644 --- a/services/bonita-commons/src/test/java/org/bonitasoft/engine/commons/JavaMethodInvokerTest.java +++ b/services/bonita-commons/src/test/java/org/bonitasoft/engine/commons/JavaMethodInvokerTest.java @@ -103,7 +103,7 @@ void invokeJavaMethod_should_throw_nosuchmethodexception() throws Exception { myData, "setDoesNotExistMethod", "java.lang.String"); }) - .isInstanceOf(NoSuchMethodException.class); + .isInstanceOf(NoSuchMethodException.class); } } diff --git a/services/bonita-connector-executor/src/test/java/org/bonitasoft/engine/connector/impl/ConnectorExecutorImplTest.java b/services/bonita-connector-executor/src/test/java/org/bonitasoft/engine/connector/impl/ConnectorExecutorImplTest.java index 289981ad6f..4a7aaa8821 100644 --- a/services/bonita-connector-executor/src/test/java/org/bonitasoft/engine/connector/impl/ConnectorExecutorImplTest.java +++ b/services/bonita-connector-executor/src/test/java/org/bonitasoft/engine/connector/impl/ConnectorExecutorImplTest.java @@ -272,7 +272,8 @@ public void createExecutorService_should_register_ExecutorServiceMetrics() { meterRegistry.find("executor.pool.size") .tag("name", "bonita-connector-executor") .tag("tenant", String.valueOf(TENANT_ID)) - .gauge()).isNotNull(); + .gauge()) + .isNotNull(); } // ================================================================================================================= diff --git a/services/bonita-data-instance/src/test/java/org/bonitasoft/engine/data/instance/api/impl/DataInstanceServiceImplTest.java b/services/bonita-data-instance/src/test/java/org/bonitasoft/engine/data/instance/api/impl/DataInstanceServiceImplTest.java index e1b9b67354..bc151788a0 100644 --- a/services/bonita-data-instance/src/test/java/org/bonitasoft/engine/data/instance/api/impl/DataInstanceServiceImplTest.java +++ b/services/bonita-data-instance/src/test/java/org/bonitasoft/engine/data/instance/api/impl/DataInstanceServiceImplTest.java @@ -181,7 +181,7 @@ public void should_return_the_archived_data_in_the_up_most_container() throws Ex doReturn(dataInstances).when(persistenceService).selectList(any(SelectListDescriptor.class)); doReturn(Arrays.asList(new DataContainer(68L, "SUBTASK"), new DataContainer(67L, "TASK"), new DataContainer(66L, "PROC"))).when(parentContainerResolver) - .getArchivedContainerHierarchy(new DataContainer(68L, "SUBTASK")); + .getArchivedContainerHierarchy(new DataContainer(68L, "SUBTASK")); //when SADataInstance dataInstance = dataInstanceServiceImpl.getLastSADataInstance("testData", 68L, "SUBTASK", parentContainerResolver); @@ -219,7 +219,7 @@ public void should_return_the_data_in_the_up_most_container() throws Exception { doReturn(dataInstances).when(persistenceService).selectList(any(SelectListDescriptor.class)); doReturn(Arrays.asList(new DataContainer(68L, "SUBTASK"), new DataContainer(67L, "TASK"), new DataContainer(66L, "PROC"))).when(parentContainerResolver) - .getContainerHierarchy(new DataContainer(68L, "SUBTASK")); + .getContainerHierarchy(new DataContainer(68L, "SUBTASK")); //when SDataInstance dataInstance = dataInstanceServiceImpl.getDataInstance("testData", 68L, "SUBTASK", parentContainerResolver); diff --git a/services/bonita-identity/src/test/java/org/bonitasoft/engine/identity/impl/IdentityServiceImplForGroupTest.java b/services/bonita-identity/src/test/java/org/bonitasoft/engine/identity/impl/IdentityServiceImplForGroupTest.java index a1d2066acf..738c1006b6 100644 --- a/services/bonita-identity/src/test/java/org/bonitasoft/engine/identity/impl/IdentityServiceImplForGroupTest.java +++ b/services/bonita-identity/src/test/java/org/bonitasoft/engine/identity/impl/IdentityServiceImplForGroupTest.java @@ -128,8 +128,8 @@ public void getGroupChildrenPaginatedByIdWithOrder() throws Exception { .thenReturn(group); when(persistenceService .selectList(SelectDescriptorBuilder.getChildrenOfGroup(group, "name", OrderByType.ASC, 0, 10))) - .thenReturn( - Collections.singletonList(child)); + .thenReturn( + Collections.singletonList(child)); assertEquals(child, identityServiceImpl.getGroupChildren(123l, 0, 10, "name", OrderByType.ASC).get(0)); } @@ -141,8 +141,8 @@ public void getGroupChildrenPaginatedByIdWithOrderThrowException() throws Except .thenReturn(group); when(persistenceService .selectList(SelectDescriptorBuilder.getChildrenOfGroup(group, "name", OrderByType.ASC, 0, 10))) - .thenThrow( - new SBonitaReadException("")); + .thenThrow( + new SBonitaReadException("")); identityServiceImpl.getGroupChildren(123l, 0, 10, "name", OrderByType.ASC); } @@ -286,8 +286,8 @@ public final void getGroupsByIds() throws SBonitaReadException, SGroupNotFoundEx final SGroup group = mock(SGroup.class); when(persistenceService .selectList(SelectDescriptorBuilder.getElementsByIds(SGroup.class, "Group", Arrays.asList(123l)))) - .thenReturn( - Arrays.asList(group)); + .thenReturn( + Arrays.asList(group)); assertEquals(group, identityServiceImpl.getGroups(Arrays.asList(123l)).get(0)); } @@ -341,8 +341,8 @@ public void getGroupsPaginatedWithOrder() throws Exception { final SGroup group = mock(SGroup.class); when(persistenceService .selectList(SelectDescriptorBuilder.getElements(SGroup.class, "Group", "name", OrderByType.ASC, 0, 10))) - .thenReturn( - Arrays.asList(group)); + .thenReturn( + Arrays.asList(group)); assertEquals(group, identityServiceImpl.getGroups(0, 10, "name", OrderByType.ASC).get(0)); } diff --git a/services/bonita-identity/src/test/java/org/bonitasoft/engine/identity/impl/IdentityServiceImplForUserMembershipTest.java b/services/bonita-identity/src/test/java/org/bonitasoft/engine/identity/impl/IdentityServiceImplForUserMembershipTest.java index 55f2c8ec11..e1ec771f97 100644 --- a/services/bonita-identity/src/test/java/org/bonitasoft/engine/identity/impl/IdentityServiceImplForUserMembershipTest.java +++ b/services/bonita-identity/src/test/java/org/bonitasoft/engine/identity/impl/IdentityServiceImplForUserMembershipTest.java @@ -338,7 +338,7 @@ public void getUserMembershipsPaginatedWithOrderThrowException() throws Exceptio persistenceService .selectList(SelectDescriptorBuilder.getElements(SUserMembership.class, "UserMembership", new QueryOptions(0, 10, Collections.singletonList(orderByOption))))) - .thenThrow(new SBonitaReadException("")); + .thenThrow(new SBonitaReadException("")); identityServiceImpl.getUserMemberships(0, 10, orderByOption); } @@ -352,7 +352,7 @@ public void getUserMembershipsOrderByRole() throws Exception { .selectList(SelectDescriptorBuilder.getUserMembershipsWithRole(new QueryOptions(0, 10, Collections .singletonList(orderByOption))))) - .thenReturn(Collections.singletonList(userMembership)); + .thenReturn(Collections.singletonList(userMembership)); final List userMemberships = identityServiceImpl.getUserMemberships(0, 10, orderByOption); @@ -368,7 +368,7 @@ public void getUserMembershipsOrderByGroup() throws Exception { .selectList(SelectDescriptorBuilder.getUserMembershipsWithGroup(new QueryOptions(0, 10, Collections .singletonList(orderByOption))))) - .thenReturn(Collections.singletonList(userMembership)); + .thenReturn(Collections.singletonList(userMembership)); final List userMemberships = identityServiceImpl.getUserMemberships(0, 10, orderByOption); diff --git a/services/bonita-persistence/src/main/java/org/bonitasoft/engine/persistence/HibernatePersistenceService.java b/services/bonita-persistence/src/main/java/org/bonitasoft/engine/persistence/HibernatePersistenceService.java index f1394ef8b8..d7ccc92a6a 100644 --- a/services/bonita-persistence/src/main/java/org/bonitasoft/engine/persistence/HibernatePersistenceService.java +++ b/services/bonita-persistence/src/main/java/org/bonitasoft/engine/persistence/HibernatePersistenceService.java @@ -612,7 +612,7 @@ public void deleteByTenant(final Class entityClass, } QueryGeneratorForFilters.QueryGeneratedFilters whereClause = new QueryGeneratorForFilters( getClassAliasMappings(), '%'/* there is no 'like' in these delete queries */) - .generate(filters); + .generate(filters); parameters.putAll(whereClause.getParameters()); baseQuery += " WHERE ( " + whereClause.getFilters() + " )"; } diff --git a/services/bonita-scheduler/src/test/java/org/bonitasoft/engine/scheduler/impl/JobServiceImplForJobDescriptorTest.java b/services/bonita-scheduler/src/test/java/org/bonitasoft/engine/scheduler/impl/JobServiceImplForJobDescriptorTest.java index fcb8830e7f..f15e05ae95 100644 --- a/services/bonita-scheduler/src/test/java/org/bonitasoft/engine/scheduler/impl/JobServiceImplForJobDescriptorTest.java +++ b/services/bonita-scheduler/src/test/java/org/bonitasoft/engine/scheduler/impl/JobServiceImplForJobDescriptorTest.java @@ -260,8 +260,8 @@ public void getJobDescriptor_by_id_should_return_jobDescriptor() final SJobDescriptor sJobDescriptor = mock(SJobDescriptor.class); when(readPersistenceService.selectById( SelectDescriptorBuilder.getElementById(SJobDescriptor.class, "SJobDescriptor", jobDescriptorId))) - .thenReturn( - sJobDescriptor); + .thenReturn( + sJobDescriptor); // When final SJobDescriptor jobDescriptor = jobServiceImpl.getJobDescriptor(jobDescriptorId); diff --git a/services/bonita-scheduler/src/test/java/org/bonitasoft/engine/scheduler/impl/JobServiceImplForJobLogTest.java b/services/bonita-scheduler/src/test/java/org/bonitasoft/engine/scheduler/impl/JobServiceImplForJobLogTest.java index 42fa7a0562..11439be3d5 100644 --- a/services/bonita-scheduler/src/test/java/org/bonitasoft/engine/scheduler/impl/JobServiceImplForJobLogTest.java +++ b/services/bonita-scheduler/src/test/java/org/bonitasoft/engine/scheduler/impl/JobServiceImplForJobLogTest.java @@ -224,7 +224,7 @@ public void getJobLog() throws SBonitaReadException { final SJobLog sJobLog = mock(SJobLog.class); when(readPersistenceService .selectById(SelectDescriptorBuilder.getElementById(SJobLog.class, "SJobLog", jobLogId))) - .thenReturn(sJobLog); + .thenReturn(sJobLog); // When final SJobLog result = jobServiceImpl.getJobLog(jobLogId); diff --git a/services/bonita-scheduler/src/test/java/org/bonitasoft/engine/scheduler/impl/JobServiceImplForJobParameterTest.java b/services/bonita-scheduler/src/test/java/org/bonitasoft/engine/scheduler/impl/JobServiceImplForJobParameterTest.java index ce2f01af15..cdab83c367 100644 --- a/services/bonita-scheduler/src/test/java/org/bonitasoft/engine/scheduler/impl/JobServiceImplForJobParameterTest.java +++ b/services/bonita-scheduler/src/test/java/org/bonitasoft/engine/scheduler/impl/JobServiceImplForJobParameterTest.java @@ -275,8 +275,8 @@ public void getJobParameter_by_id() throws Exception { final SJobParameter sJobParameter = mock(SJobParameter.class); when(readPersistenceService.selectById( SelectDescriptorBuilder.getElementById(SJobParameter.class, "SJobParameter", jobParameterId))) - .thenReturn( - sJobParameter); + .thenReturn( + sJobParameter); // When final SJobParameter result = jobServiceImpl.getJobParameter(jobParameterId); diff --git a/services/bonita-work/src/test/java/org/bonitasoft/engine/work/DefaultBonitaExecutorServiceFactoryTest.java b/services/bonita-work/src/test/java/org/bonitasoft/engine/work/DefaultBonitaExecutorServiceFactoryTest.java index 4239d442b8..701d289f00 100644 --- a/services/bonita-work/src/test/java/org/bonitasoft/engine/work/DefaultBonitaExecutorServiceFactoryTest.java +++ b/services/bonita-work/src/test/java/org/bonitasoft/engine/work/DefaultBonitaExecutorServiceFactoryTest.java @@ -76,7 +76,8 @@ public void createExecutorService_should_register_ExecutorServiceMetrics() { meterRegistry.find("executor.pool.size") .tag("name", "bonita-work-executor") .tag("tenant", String.valueOf(tenantId)) - .gauge()).isNotNull(); + .gauge()) + .isNotNull(); } @Test @@ -102,6 +103,7 @@ public void should_not_have_metrics_when_unbind_is_called() { meterRegistry.find("executor.pool.size") .tag("name", "bonita-work-executor") .tag("tenant", String.valueOf(tenantId)) - .gauge()).isNull(); + .gauge()) + .isNull(); } } diff --git a/services/bonita-work/src/test/java/org/bonitasoft/engine/work/DefaultExceptionRetryabilityEvaluatorTest.java b/services/bonita-work/src/test/java/org/bonitasoft/engine/work/DefaultExceptionRetryabilityEvaluatorTest.java index bbff55c51a..830ca47003 100644 --- a/services/bonita-work/src/test/java/org/bonitasoft/engine/work/DefaultExceptionRetryabilityEvaluatorTest.java +++ b/services/bonita-work/src/test/java/org/bonitasoft/engine/work/DefaultExceptionRetryabilityEvaluatorTest.java @@ -138,7 +138,7 @@ public void should_retry_sql_connection_exceptions() { assertThat(defaultExceptionRetryabilityEvaluator .evaluateRetryability(new IllegalStateException(new SQLException("connection issue")))) - .isEqualTo(RETRYABLE); + .isEqualTo(RETRYABLE); assertThat(defaultExceptionRetryabilityEvaluator .evaluateRetryability(new CannotGetJdbcConnectionException("I/O error"))).isEqualTo(RETRYABLE); } @@ -149,7 +149,7 @@ public void should_be_UNCERTAIN_COMPLETION_OF_COMMIT_when_retryable_exception_ha assertThat(defaultExceptionRetryabilityEvaluator .evaluateRetryability(new STransactionCommitException(new SQLException("connection issue")))) - .isEqualTo(UNCERTAIN_COMPLETION_OF_COMMIT); + .isEqualTo(UNCERTAIN_COMPLETION_OF_COMMIT); } @Test @@ -158,7 +158,7 @@ public void should_not_be_UNCERTAIN_COMPLETION_OF_COMMIT_when_retryable_exceptio assertThat(defaultExceptionRetryabilityEvaluator.evaluateRetryability( new STransactionCommitException(new SRetryableException(new IOException("some file issue"))))) - .isEqualTo(RETRYABLE); + .isEqualTo(RETRYABLE); } @Test @@ -167,7 +167,7 @@ public void should_retry_retryable_xa_exceptions() { assertThat( defaultExceptionRetryabilityEvaluator.evaluateRetryability(new XAException(XAException.XA_RBTIMEOUT))) - .isEqualTo(RETRYABLE); + .isEqualTo(RETRYABLE); } @Test