diff --git a/.ci/environments/common/update_quarkus.sh b/.ci/environments/common/update_quarkus.sh
index eea7aac746..71f0d1a3c2 100755
--- a/.ci/environments/common/update_quarkus.sh
+++ b/.ci/environments/common/update_quarkus.sh
@@ -1,9 +1,28 @@
#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
set -euo pipefail
mvn_cmd="mvn ${BUILD_MVN_OPTS:-} ${BUILD_MVN_OPTS_QUARKUS_UPDATE:-}"
-source <(curl -s https://raw.githubusercontent.com/kiegroup/kogito-pipelines/main/dsl/seed/scripts/install_quarkus.sh)
+source <(curl -s https://raw.githubusercontent.com/apache/incubator-kie-kogito-pipelines/main/dsl/seed/scripts/install_quarkus.sh)
echo "Update project with Quarkus version ${QUARKUS_VERSION}"
diff --git a/.ci/environments/quarkus-3/after.sh b/.ci/environments/quarkus-3/after.sh
index 32f9a6ba6b..89de57acd8 100755
--- a/.ci/environments/quarkus-3/after.sh
+++ b/.ci/environments/quarkus-3/after.sh
@@ -1,4 +1,23 @@
#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
set -euo pipefail
script_dir_path=$(cd `dirname "${BASH_SOURCE[0]}"`; pwd -P)
diff --git a/.ci/environments/quarkus-3/before.sh b/.ci/environments/quarkus-3/before.sh
index 0636d08632..30e4520d4f 100755
--- a/.ci/environments/quarkus-3/before.sh
+++ b/.ci/environments/quarkus-3/before.sh
@@ -1,4 +1,23 @@
#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
set -euo pipefail
script_dir_path=$(cd `dirname "${BASH_SOURCE[0]}"`; pwd -P)
diff --git a/.ci/environments/quarkus-3/jbang/CreateKieQuarkusProjectMigrationRecipe.java b/.ci/environments/quarkus-3/jbang/CreateKieQuarkusProjectMigrationRecipe.java
index ef4a67020b..f4085cf234 100755
--- a/.ci/environments/quarkus-3/jbang/CreateKieQuarkusProjectMigrationRecipe.java
+++ b/.ci/environments/quarkus-3/jbang/CreateKieQuarkusProjectMigrationRecipe.java
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
import java.net.URL;
import java.nio.charset.Charset;
import java.nio.file.Files;
diff --git a/.ci/environments/quarkus-3/quarkus3-base-recipe.yml b/.ci/environments/quarkus-3/quarkus3-base-recipe.yml
index 06f4b906da..58269018c3 100644
--- a/.ci/environments/quarkus-3/quarkus3-base-recipe.yml
+++ b/.ci/environments/quarkus-3/quarkus3-base-recipe.yml
@@ -1,17 +1,20 @@
#
-# Copyright 2021 the original author or authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
#
#####
@@ -30,111 +33,111 @@ name: io.quarkus.updates.core.quarkus30.UpgradeQuarkiverse
recipeList:
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkus.bot
- artifactId: 'build-reporter-*'
+ artifactId: "build-reporter-*"
newVersion: 3.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.vault
- artifactId: '*'
+ artifactId: "*"
newVersion: 3.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.amazonservices
- artifactId: '*'
+ artifactId: "*"
newVersion: 2.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.cxf
- artifactId: '*'
+ artifactId: "*"
newVersion: 2.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.jsch
- artifactId: '*'
+ artifactId: "*"
newVersion: 3.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.jberet
- artifactId: '*'
+ artifactId: "*"
newVersion: 2.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.artemis
- artifactId: '*'
+ artifactId: "*"
newVersion: 3.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.config
- artifactId: '*'
+ artifactId: "*"
newVersion: 2.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.freemarker
- artifactId: '*'
+ artifactId: "*"
newVersion: 1.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.githubapp
- artifactId: '*'
+ artifactId: "*"
newVersion: 2.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.mybatis
- artifactId: '*'
+ artifactId: "*"
newVersion: 2.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.messaginghub
- artifactId: '*'
+ artifactId: "*"
newVersion: 2.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.prettytime
- artifactId: '*'
+ artifactId: "*"
newVersion: 2.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.xmlsec
- artifactId: '*'
+ artifactId: "*"
newVersion: 2.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.jef
- artifactId: '*'
+ artifactId: "*"
newVersion: 3.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.githubaction
- artifactId: '*'
+ artifactId: "*"
newVersion: 2.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.hibernatesearchextras
- artifactId: '*'
+ artifactId: "*"
newVersion: 2.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.jackson-jq
- artifactId: '*'
+ artifactId: "*"
newVersion: 2.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.jdbc
- artifactId: '*'
+ artifactId: "*"
newVersion: 3.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.microprofile
- artifactId: '*'
+ artifactId: "*"
newVersion: 3.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.minio
- artifactId: '*'
+ artifactId: "*"
newVersion: 3.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.pact
- artifactId: '*'
+ artifactId: "*"
newVersion: 1.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.poi
- artifactId: '*'
+ artifactId: "*"
newVersion: 2.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.primefaces
- artifactId: '*'
+ artifactId: "*"
newVersion: 3.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.reactivemessaging.http
- artifactId: '*'
+ artifactId: "*"
newVersion: 2.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.renarde
- artifactId: '*'
+ artifactId: "*"
newVersion: 3.x
- org.openrewrite.maven.UpgradeDependencyVersion:
groupId: io.quarkiverse.shardingsphere
- artifactId: '*'
+ artifactId: "*"
newVersion: 2.x
---
@@ -1147,13 +1150,13 @@ name: io.quarkus.updates.core.quarkus30.RenameJavaxServiceFiles
displayName: Rename a file example
recipeList:
- org.openrewrite.RenameFile:
- fileMatcher: '**/META-INF/services/javax.ws.rs.ext.Providers'
+ fileMatcher: "**/META-INF/services/javax.ws.rs.ext.Providers"
fileName: jakarta.ws.rs.ext.Providers
- org.openrewrite.RenameFile:
- fileMatcher: '**/META-INF/services/javax.ws.rs.client.ClientBuilder'
+ fileMatcher: "**/META-INF/services/javax.ws.rs.client.ClientBuilder"
fileName: jakarta.ws.rs.client.ClientBuilder
- org.openrewrite.RenameFile:
- fileMatcher: '**/META-INF/services/javax.ws.rs.sse.SseEventSource$Builder'
+ fileMatcher: "**/META-INF/services/javax.ws.rs.sse.SseEventSource$Builder"
fileName: jakarta.ws.rs.sse.SseEventSource$Builder
#####
@@ -1193,7 +1196,7 @@ recipeList:
- org.openrewrite.text.FindAndReplace:
find: quarkus-bootstrap-maven-plugin
replace: quarkus-extension-maven-plugin
- fileMatcher: '**/pom.xml'
+ fileMatcher: "**/pom.xml"
#####
# Adjust properties in application.properties
diff --git a/.ci/environments/quarkus-3/quarkus3.yml b/.ci/environments/quarkus-3/quarkus3.yml
index 911d6c57b9..46b5569fed 100644
--- a/.ci/environments/quarkus-3/quarkus3.yml
+++ b/.ci/environments/quarkus-3/quarkus3.yml
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
name: io.quarkus.openrewrite.Quarkus
description: Update Quarkus version and refactor imports and resources if needed.
type: specs.openrewrite.org/v1beta/recipe
diff --git a/.ci/environments/quarkus-branch/before.sh b/.ci/environments/quarkus-branch/before.sh
index d2cf2e71c0..a14e406f43 100755
--- a/.ci/environments/quarkus-branch/before.sh
+++ b/.ci/environments/quarkus-branch/before.sh
@@ -1,4 +1,23 @@
#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
set -euo pipefail
script_dir_path=$(cd `dirname "${BASH_SOURCE[0]}"`; pwd -P)
diff --git a/.ci/environments/quarkus-lts/before.sh b/.ci/environments/quarkus-lts/before.sh
index d2cf2e71c0..a14e406f43 100755
--- a/.ci/environments/quarkus-lts/before.sh
+++ b/.ci/environments/quarkus-lts/before.sh
@@ -1,4 +1,23 @@
#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
set -euo pipefail
script_dir_path=$(cd `dirname "${BASH_SOURCE[0]}"`; pwd -P)
diff --git a/.ci/environments/quarkus-main/before.sh b/.ci/environments/quarkus-main/before.sh
index d2cf2e71c0..a14e406f43 100755
--- a/.ci/environments/quarkus-main/before.sh
+++ b/.ci/environments/quarkus-main/before.sh
@@ -1,4 +1,23 @@
#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
set -euo pipefail
script_dir_path=$(cd `dirname "${BASH_SOURCE[0]}"`; pwd -P)
diff --git a/.ci/environments/update.sh b/.ci/environments/update.sh
index 80abdd7110..045654561d 100755
--- a/.ci/environments/update.sh
+++ b/.ci/environments/update.sh
@@ -1,4 +1,23 @@
#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
set -euo pipefail
script_dir_path=$(cd `dirname "${BASH_SOURCE[0]}"`; pwd -P)
@@ -44,4 +63,4 @@ if [ -f "${env_path}/after.sh" ]; then
fi
# Download `setup_integration_branch` script and execute
-curl -s https://raw.githubusercontent.com/kiegroup/kogito-pipelines/main/dsl/seed/scripts/setup_integration_branch.sh | bash
\ No newline at end of file
+curl -s https://raw.githubusercontent.com/apache/incubator-kie-kogito-pipelines/main/dsl/seed/scripts/setup_integration_branch.sh | bash
\ No newline at end of file
diff --git a/.ci/jenkins/Jenkinsfile b/.ci/jenkins/Jenkinsfile
new file mode 100644
index 0000000000..12df4ee154
--- /dev/null
+++ b/.ci/jenkins/Jenkinsfile
@@ -0,0 +1,50 @@
+@Library('jenkins-pipeline-shared-libraries')_
+
+pr_check_script = null
+
+pipeline {
+ agent {
+ label 'ubuntu'
+ }
+ options {
+ timestamps()
+ timeout(time: 480, unit: 'MINUTES')
+ disableConcurrentBuilds(abortPrevious: true)
+ skipDefaultCheckout()
+ }
+ environment {
+ BUILDCHAIN_PROJECT = 'apache/incubator-kie-kogito-apps'
+
+ ENABLE_SONARCLOUD = 'false'
+ SONAR_PROJECT_KEY = 'apache_incubator-kie-kogito-apps'
+ KOGITO_APPS_BUILD_MVN_OPTS = '-Dvalidate-formatting -Prun-code-coverage'
+ }
+ stages {
+ stage('Initialize') {
+ steps {
+ cleanWs(disableDeferredWipeout: true)
+ script {
+ // load `pr_check.groovy` file from kogito-pipelines:main
+ dir('kogito-pipelines') {
+ checkout(githubscm.resolveRepository('incubator-kie-kogito-pipelines', 'apache', 'main', false, 'ASF_Cloudbees_Jenkins_ci-builds'))
+ pr_check_script = load 'dsl/scripts/pr_check.groovy'
+ }
+ }
+ }
+ }
+ stage('PR check') {
+ steps {
+ script {
+ dir('kogito-pipelines') {
+ pr_check_script.launch()
+ }
+ }
+ }
+ }
+ }
+ post {
+ cleanup {
+ cleanWs()
+ }
+ }
+}
diff --git a/.ci/jenkins/Jenkinsfile.deploy b/.ci/jenkins/Jenkinsfile.deploy
index 3ec158f6fb..34664e57d0 100644
--- a/.ci/jenkins/Jenkinsfile.deploy
+++ b/.ci/jenkins/Jenkinsfile.deploy
@@ -8,12 +8,10 @@ deployProperties = [:]
pipeline {
agent {
- label 'kie-rhel8 && docker && kie-mem16g && !built-in'
- }
-
- tools {
- maven env.BUILD_MAVEN_TOOL
- jdk env.BUILD_JDK_TOOL
+ docker {
+ image env.AGENT_DOCKER_BUILDER_IMAGE
+ args env.AGENT_DOCKER_BUILDER_ARGS
+ }
}
options {
@@ -30,19 +28,15 @@ pipeline {
KOGITO_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}")
- // Keep here for visitibility
- MAVEN_OPTS = '-Xms1024m -Xmx4g'
- NODE_OPTIONS = '--max_old_space_size=4096'
-
PR_BRANCH_HASH = "${util.generateHash(10)}"
- MAVEN_DEPLOY_LOCAL_DIR = "${WORKSPACE}/maven_deploy_dir"
+ MAVEN_DEPLOY_LOCAL_DIR = "/tmp/maven_deploy_dir"
}
stages {
stage('Initialize') {
steps {
script {
- cleanWs()
+ cleanWs(disableDeferredWipeout: true)
if (params.DISPLAY_NAME) {
currentBuild.displayName = params.DISPLAY_NAME
@@ -61,8 +55,6 @@ pipeline {
dir(getRepoName()) {
checkoutRepo()
}
-
- setupCypressEnv('12.17.0')
}
}
post {
@@ -84,7 +76,7 @@ pipeline {
script {
dir(getRepoName()) {
if (githubscm.isBranchExist('origin',getPRBranch())) {
- githubscm.removeRemoteBranch('origin', getPRBranch())
+ githubscm.removeRemoteBranch('origin', getPRBranch(), getGitAuthorPushCredsId())
}
githubscm.createBranch(getPRBranch())
}
@@ -98,7 +90,13 @@ pipeline {
steps {
script {
dir(getRepoName()) {
- maven.mvnVersionsUpdateParentAndChildModules(getMavenCommand(), getProjectVersion(), !isRelease())
+ configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){
+ maven.mvnVersionsUpdateParentAndChildModules(
+ getMavenCommand().withSettingsXmlFile(MAVEN_SETTINGS_FILE),
+ getProjectVersion(),
+ !isRelease()
+ )
+ }
}
}
}
@@ -184,18 +182,12 @@ pipeline {
}
cleanup {
script {
- util.cleanNode('docker')
+ util.cleanNode()
}
}
}
}
-void setupCypressEnv(String cypressVersion) {
- if (env.CYPRESS_BINARY_URL) {
- env.CYPRESS_INSTALL_BINARY = "${CYPRESS_BINARY_URL}/cypress-${cypressVersion}.zip"
- }
-}
-
void sendNotification() {
if (params.SEND_NOTIFICATION) {
mailer.sendMarkdownTestSummaryNotification('Deploy', "[${getBuildBranch()}] Kogito Apps", [env.KOGITO_CI_EMAIL_TO])
@@ -214,7 +206,7 @@ void saveReports() {
void checkoutRepo() {
deleteDir()
- checkout(githubscm.resolveRepository(getRepoName(), getGitAuthor(), getBuildBranch(), false))
+ checkout(githubscm.resolveRepository(getRepoName(), getGitAuthor(), getBuildBranch(), false, getGitAuthorCredsId()))
}
void commitAndCreatePR() {
@@ -226,8 +218,8 @@ void commitAndCreatePR() {
prBody += '\nPlease review and merge.'
}
githubscm.commitChanges(commitMsg, { githubscm.findAndStageNotIgnoredFiles('pom.xml') })
- githubscm.pushObject('origin', getPRBranch(), getGitAuthorCredsID())
- deployProperties["${getRepoName()}.pr.link"] = githubscm.createPRWithLabels(commitMsg, prBody, getBuildBranch(), ['skip-ci'] as String[], getGitAuthorCredsID())
+ githubscm.pushObject('origin', getPRBranch(), getGitAuthorPushCredsId())
+ deployProperties["${getRepoName()}.pr.link"] = githubscm.createPRWithLabels(commitMsg, prBody, getBuildBranch(), ['skip-ci'] as String[], getGitAuthorCredsId())
}
boolean isSpecificArtifactsUpload() {
@@ -239,7 +231,7 @@ boolean shouldStageArtifacts() {
}
boolean shouldDeployToRepository() {
- return env.MAVEN_DEPLOY_REPOSITORY && env.MAVEN_REPO_CREDS_ID && getGitAuthor() == 'kiegroup'
+ return env.MAVEN_DEPLOY_REPOSITORY && env.MAVEN_REPO_CREDS_ID && getGitAuthor() == 'apache'
}
boolean isRelease() {
@@ -259,8 +251,8 @@ String getGitAuthor() {
return "${GIT_AUTHOR}"
}
-String getGitAuthorCredsID() {
- return env.AUTHOR_CREDS_ID
+String getGitAuthorCredsId() {
+ return env.GIT_AUTHOR_CREDS_ID
}
String getBuildBranch() {
@@ -283,7 +275,6 @@ void setDeployPropertyIfNeeded(String key, def value) {
MavenCommand getMavenCommand() {
return new MavenCommand(this, ['-fae', '-ntp'])
- .withSettingsXmlId(env.MAVEN_SETTINGS_CONFIG_FILE_ID)
.withOptions(env.BUILD_MVN_OPTS ? [ env.BUILD_MVN_OPTS ] : [])
.withProperty('full')
}
@@ -297,21 +288,26 @@ void runMavenDeploy(boolean skipTests = true, boolean localDeployment = false) {
mvnCmd.withDeployRepository(env.MAVEN_DEPLOY_REPOSITORY)
}
- mvnCmd.withProperty('maven.test.failure.ignore', true)
- .withOptions(env.BUILD_MVN_OPTS_CURRENT ? [ env.BUILD_MVN_OPTS_CURRENT ] : [])
- .withOptions(env.KOGITO_APPS_BUILD_MVN_OPTS ? [ env.KOGITO_APPS_BUILD_MVN_OPTS ] : [])
- .skipTests(skipTests)
- .run('clean deploy')
+ configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){
+ mvnCmd.withProperty('maven.test.failure.ignore', true)
+ .withOptions(env.BUILD_MVN_OPTS_CURRENT ? [ env.BUILD_MVN_OPTS_CURRENT ] : [])
+ .withOptions(env.KOGITO_APPS_BUILD_MVN_OPTS ? [ env.KOGITO_APPS_BUILD_MVN_OPTS ] : [])
+ .skipTests(skipTests)
+ .withSettingsXmlFile(MAVEN_SETTINGS_FILE)
+ .run('clean deploy')
+ }
}
void runMavenStage() {
- MavenStagingHelper stagingHelper = getStagingHelper()
- deployProperties.putAll(stagingHelper.stageLocalArtifacts(env.NEXUS_STAGING_PROFILE_ID, getLocalDeploymentFolder()))
- stagingHelper.promoteStagingRepository(env.NEXUS_BUILD_PROMOTION_PROFILE_ID)
+ configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){
+ MavenStagingHelper stagingHelper = getStagingHelper(getMavenCommand().withSettingsXmlFile(MAVEN_SETTINGS_FILE))
+ deployProperties.putAll(stagingHelper.stageLocalArtifacts(env.NEXUS_STAGING_PROFILE_ID, getLocalDeploymentFolder()))
+ stagingHelper.promoteStagingRepository(env.NEXUS_BUILD_PROMOTION_PROFILE_ID)
+ }
}
-MavenStagingHelper getStagingHelper() {
- return new MavenStagingHelper(this, getMavenCommand())
+MavenStagingHelper getStagingHelper(MavenCommand mavenCommand) {
+ return new MavenStagingHelper(this, mavenCommand)
.withNexusReleaseUrl(env.NEXUS_RELEASE_URL)
.withNexusReleaseRepositoryId(env.NEXUS_RELEASE_REPOSITORY_ID)
}
diff --git a/.ci/jenkins/Jenkinsfile.optaplanner b/.ci/jenkins/Jenkinsfile.optaplanner
index 51e2147049..7c81c104fc 100644
--- a/.ci/jenkins/Jenkinsfile.optaplanner
+++ b/.ci/jenkins/Jenkinsfile.optaplanner
@@ -2,18 +2,17 @@
import org.kie.jenkins.MavenCommand
-droolsRepo = 'drools'
-optaplannerRepo = 'optaplanner'
-kogitoRuntimesRepo = 'kogito-runtimes'
-kogitoAppsRepo = 'kogito-apps'
+droolsRepo = 'incubator-kie-drools'
+optaplannerRepo = 'incubator-kie-optaplanner'
+kogitoRuntimesRepo = 'incubator-kie-kogito-runtimes'
+kogitoAppsRepo = 'incubator-kie-kogito-apps'
pipeline {
agent {
- label 'kie-rhel8 && docker && kie-mem16g'
- }
- tools {
- maven env.BUILD_MAVEN_TOOL
- jdk env.BUILD_JDK_TOOL
+ docker {
+ image env.AGENT_DOCKER_BUILDER_IMAGE
+ args env.AGENT_DOCKER_BUILDER_ARGS
+ }
}
options {
timestamps()
@@ -21,7 +20,6 @@ pipeline {
}
environment {
KOGITO_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}")
- MAVEN_OPTS = '-Xms1024m -Xmx6g'
}
stages {
stage('Initialize') {
@@ -37,18 +35,24 @@ pipeline {
stage('Build Drools') {
steps {
script {
- getMavenCommand(droolsRepo)
- .withProperty('quickly')
- .run('clean install')
+ configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){
+ getMavenCommand(droolsRepo)
+ .withProperty('quickly')
+ .withSettingsXmlFile(MAVEN_SETTINGS_FILE)
+ .run('clean install')
+ }
}
}
}
stage('Build Optaplanner') {
steps {
script {
- getMavenCommand(optaplannerRepo)
- .withProperty('quickly')
- .run('clean install')
+ configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){
+ getMavenCommand(optaplannerRepo)
+ .withProperty('quickly')
+ .withSettingsXmlFile(MAVEN_SETTINGS_FILE)
+ .run('clean install')
+ }
}
}
}
@@ -70,22 +74,28 @@ pipeline {
stage('Build Runtimes') {
steps {
script {
- getMavenCommand(kogitoRuntimesRepo)
- .withProperty('quickly')
- .run('clean install')
+ configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){
+ getMavenCommand(kogitoRuntimesRepo)
+ .withProperty('quickly')
+ .withSettingsXmlFile(MAVEN_SETTINGS_FILE)
+ .run('clean install')
+ }
}
}
}
stage('Build Apps') {
steps {
script {
- getMavenCommand(kogitoAppsRepo)
- .withOptions(env.BUILD_MVN_OPTS_CURRENT ? [ env.BUILD_MVN_OPTS_CURRENT ] : [])
- .withProperty('skipUI')
- .withProperty('maven.test.failure.ignore', true)
- .withProperty('version.org.optaplanner', env.OPTAPLANNER_VERSION)
- .withProperty('optaplanner') // Use specific profile https://github.com/kiegroup/kogito-apps/blob/48a5c8f9a905a2c17b9d0e01cee744902a4824f0/pom.xml#L63
- .run('clean install')
+ configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){
+ getMavenCommand(kogitoAppsRepo)
+ .withOptions(env.BUILD_MVN_OPTS_CURRENT ? [ env.BUILD_MVN_OPTS_CURRENT ] : [])
+ .withProperty('skipUI')
+ .withProperty('maven.test.failure.ignore', true)
+ .withProperty('version.org.optaplanner', env.OPTAPLANNER_VERSION)
+ .withProperty('optaplanner') // Use specific profile https://github.com/apache/incubator-kie-kogito-apps/blob/48a5c8f9a905a2c17b9d0e01cee744902a4824f0/pom.xml#L63
+ .withSettingsXmlFile(MAVEN_SETTINGS_FILE)
+ .run('clean install')
+ }
}
}
post {
@@ -96,11 +106,6 @@ pipeline {
util.archiveConsoleLog()
}
}
- cleanup {
- script {
- cleanContainers()
- }
- }
}
}
}
@@ -110,7 +115,7 @@ pipeline {
}
cleanup {
script {
- util.cleanNode('docker')
+ util.cleanNode()
}
}
}
@@ -134,7 +139,7 @@ void checkoutDroolsRepo() {
void checkoutOptaplannerRepo() {
dir(optaplannerRepo) {
- checkout(githubscm.resolveRepository(optaplannerRepo, 'kiegroup', getOptaPlannerBranch(), false))
+ checkout(githubscm.resolveRepository(optaplannerRepo, 'apache', getOptaPlannerBranch(), false))
}
}
@@ -169,16 +174,11 @@ String getOptaPlannerBranch() {
MavenCommand getMavenCommand(String directory) {
return new MavenCommand(this, ['-fae', '-ntp'])
- .withSettingsXmlId('kogito_release_settings')
.withProperty('java.net.preferIPv4Stack', true)
.withOptions(env.BUILD_MVN_OPTS ? [ env.BUILD_MVN_OPTS ] : [])
.inDirectory(directory)
}
-void cleanContainers() {
- cloud.cleanContainersAndImages('docker')
-}
-
String getNativeBuilderImage() {
return env.NATIVE_BUILDER_IMAGE
}
diff --git a/.ci/jenkins/Jenkinsfile.promote b/.ci/jenkins/Jenkinsfile.promote
index 9fab40bf99..62804e64c2 100644
--- a/.ci/jenkins/Jenkinsfile.promote
+++ b/.ci/jenkins/Jenkinsfile.promote
@@ -6,7 +6,10 @@ pipelineProperties = [:]
pipeline {
agent {
- label 'rhel8 && !built-in'
+ docker {
+ image env.AGENT_DOCKER_BUILDER_IMAGE
+ args env.AGENT_DOCKER_BUILDER_ARGS
+ }
}
options {
@@ -16,15 +19,13 @@ pipeline {
environment {
KOGITO_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}")
-
- NODE_OPTIONS = '--max_old_space_size=4096'
}
stages {
stage('Initialization') {
steps {
script {
- cleanWs()
+ cleanWs(disableDeferredWipeout: true)
if (params.DISPLAY_NAME) {
currentBuild.displayName = params.DISPLAY_NAME
@@ -55,11 +56,11 @@ pipeline {
script {
dir(getRepoName()) {
checkoutRepo()
- if (githubscm.isReleaseExist(getGitTag(), getGitAuthorCredsID())) {
- githubscm.deleteRelease(getGitTag(), getGitAuthorCredsID())
+ if (githubscm.isReleaseExist(getGitTag(), getGitAuthorCredsId())) {
+ githubscm.deleteRelease(getGitTag(), getGitAuthorCredsId())
}
- githubscm.createReleaseWithGeneratedReleaseNotes(getGitTag(), getBuildBranch(), githubscm.getPreviousTagFromVersion(getGitTag()), getGitAuthorCredsID())
- githubscm.updateReleaseBody(getGitTag(), getGitAuthorCredsID())
+ githubscm.createReleaseWithGeneratedReleaseNotes(getGitTag(), getBuildBranch(), githubscm.getPreviousTagFromVersion(getGitTag()), getGitAuthorCredsId())
+ githubscm.updateReleaseBody(getGitTag(), getGitAuthorCredsId())
}
}
}
@@ -71,7 +72,7 @@ pipeline {
}
cleanup {
script {
- util.cleanNode('docker')
+ util.cleanNode()
}
}
}
@@ -144,8 +145,12 @@ String getGitAuthor() {
return env.GIT_AUTHOR
}
-String getGitAuthorCredsID() {
- return env.AUTHOR_CREDS_ID
+String getGitAuthorCredsId() {
+ return env.GIT_AUTHOR_CREDS_ID
+}
+
+String getGitAuthorPushCredsId() {
+ return env.GIT_AUTHOR_PUSH_CREDS_ID
}
String getDeployPrLink() {
@@ -158,20 +163,20 @@ String getDeployPrLink() {
void checkoutRepo() {
deleteDir()
- checkout(githubscm.resolveRepository(getRepoName(), getGitAuthor(), getBuildBranch(), false))
+ checkout(githubscm.resolveRepository(getRepoName(), getGitAuthor(), getBuildBranch(), false, getGitAuthorCredsId()))
// need to manually checkout branch since on a detached branch after checkout command
sh "git checkout ${getBuildBranch()}"
}
void mergeAndPush(String prLink) {
if (prLink) {
- githubscm.mergePR(prLink, getGitAuthorCredsID())
- githubscm.pushObject('origin', getBuildBranch(), getGitAuthorCredsID())
+ githubscm.mergePR(prLink, getGitAuthorCredsId())
+ githubscm.pushObject('origin', getBuildBranch(), getGitAuthorPushCredsId())
}
}
void tagLatest() {
if (getGitTag()) {
- githubscm.tagLocalAndRemoteRepository('origin', getGitTag(), getGitAuthorCredsID(), env.BUILD_TAG, true)
+ githubscm.tagLocalAndRemoteRepository('origin', getGitTag(), getGitAuthorPushCredsId(), env.BUILD_TAG, true)
}
}
diff --git a/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.pr b/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.pr
index 1f8920ee78..73e25a9eb6 100644
--- a/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.pr
+++ b/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.pr
@@ -8,11 +8,10 @@ changeTarget = env.ghprbTargetBranch ?: CHANGE_TARGET
pipeline {
agent {
- label 'kie-rhel8 && kie-mem16g && !built-in'
- }
- tools {
- maven env.BUILD_MAVEN_TOOL
- jdk env.BUILD_JDK_TOOL
+ docker {
+ image env.AGENT_DOCKER_BUILDER_IMAGE
+ args env.AGENT_DOCKER_BUILDER_ARGS
+ }
}
options {
timestamps()
@@ -22,13 +21,13 @@ pipeline {
stage('Initialization') {
steps {
script {
- cleanWs()
+ cleanWs(disableDeferredWipeout: true)
sh 'printenv > env_props'
archiveArtifacts artifacts: 'env_props'
dir(getRepoName()) {
- checkout(githubscm.resolveRepository(getRepoName(), changeAuthor, changeBranch, false))
+ checkout(githubscm.resolveRepository(getRepoName(), changeAuthor, changeBranch, false, getGitAuthorCredsId()))
// need to manually checkout branch since on a detached branch after checkout command
sh "git checkout ${changeBranch}"
}
@@ -38,11 +37,16 @@ pipeline {
stage('Build upstream projects') {
steps {
script {
- [ 'drools', 'kogito-runtimes' ].each { project ->
+ [ 'incubator-kie-drools', 'incubator-kie-kogito-runtimes' ].each { project ->
dir(project) {
- githubscm.checkoutIfExists(project, changeAuthor, changeBranch, 'kiegroup', changeTarget, true)
+ githubscm.checkoutIfExists(project, changeAuthor, changeBranch, 'apache', changeTarget, true)
sh '.ci/environments/update.sh quarkus-3'
- getMavenCommand().withProperty('quickly').run('clean install')
+ configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){
+ getMavenCommand()
+ .withProperty('quickly')
+ .withSettingsXmlFile(MAVEN_SETTINGS_FILE)
+ .run('clean install')
+ }
}
}
}
@@ -66,17 +70,15 @@ pipeline {
steps {
script {
dir(getRepoName()) {
- githubscm.pushObject('origin', changeBranch, getGitAuthorCredsId())
+ githubscm.pushObject('origin', changeBranch, getGitAuthorPushCredsId())
}
}
}
}
}
post {
- always {
- script {
- cleanWs()
- }
+ cleanup {
+ cleanWs()
}
unsuccessful {
script {
@@ -91,12 +93,15 @@ String getRepoName() {
}
String getGitAuthorCredsId() {
- return env.AUTHOR_CREDS_ID
+ return env.GIT_AUTHOR_CREDS_ID
+}
+
+String getGitAuthorPushCredsId() {
+ return env.GIT_AUTHOR_PUSH_CREDS_ID
}
MavenCommand getMavenCommand() {
return new MavenCommand(this, ['-fae', '-ntp'])
- .withSettingsXmlId(env.MAVEN_SETTINGS_CONFIG_FILE_ID)
.withOptions(env.BUILD_MVN_OPTS ? [ env.BUILD_MVN_OPTS ] : [])
.withProperty('enforcer.skip')
}
diff --git a/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.standalone b/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.standalone
index 18fb14c6f6..6c8fe19e67 100644
--- a/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.standalone
+++ b/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.standalone
@@ -7,12 +7,10 @@ previousHash = ''
pipeline {
agent {
- label 'kie-rhel8 && kie-mem16g && !built-in'
- }
-
- tools {
- maven env.BUILD_MAVEN_TOOL
- jdk env.BUILD_JDK_TOOL
+ docker {
+ image env.AGENT_DOCKER_BUILDER_IMAGE
+ args env.AGENT_DOCKER_BUILDER_ARGS
+ }
}
options {
@@ -57,11 +55,16 @@ pipeline {
stage('Build upstream projects') {
steps {
script {
- [ 'drools', 'kogito-runtimes' ].each { project ->
+ [ 'incubator-kie-drools', 'incubator-kie-kogito-runtimes' ].each { project ->
dir(project) {
githubscm.checkoutIfExists(project, getGitAuthor(), getBuildBranch(), getBaseAuthor(), getBaseBranch(), true)
sh '.ci/environments/update.sh quarkus-3'
- getMavenCommand().withProperty('quickly').run('clean install')
+ configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){
+ getMavenCommand()
+ .withProperty('quickly')
+ .withSettingsXmlFile(MAVEN_SETTINGS_FILE)
+ .run('clean install')
+ }
}
}
}
@@ -85,7 +88,7 @@ pipeline {
steps {
script {
dir(getRepoName()) {
- githubscm.pushObject('origin', isPRSourceBranch() ? getBuildBranch() : getPRBranch(), getGitAuthorCredsId())
+ githubscm.pushObject('origin', isPRSourceBranch() ? getBuildBranch() : getPRBranch(), getGitAuthorPushCredsId())
}
}
}
@@ -122,7 +125,7 @@ pipeline {
void clean() {
sh 'rm -rf ~/.rewrite-cache/'
- util.cleanNode('docker')
+ util.cleanNode()
}
void sendErrorNotification() {
@@ -136,7 +139,7 @@ void sendNotification(String body) {
}
void checkoutRepo(String repository, String branch) {
- checkout(githubscm.resolveRepository(repository, getGitAuthor(), branch, false))
+ checkout(githubscm.resolveRepository(repository, getGitAuthor(), branch, false, getGitAuthorCredsId()))
// need to manually checkout branch since on a detached branch after checkout command
sh "git checkout ${branch}"
}
@@ -167,7 +170,11 @@ boolean isPRSourceBranch() {
}
String getGitAuthorCredsId() {
- return env.AUTHOR_CREDS_ID
+ return env.GIT_AUTHOR_CREDS_ID
+}
+
+String getGitAuthorPushCredsId() {
+ return env.GIT_AUTHOR_PUSH_CREDS_ID
}
String getPRBranch() {
@@ -176,7 +183,6 @@ String getPRBranch() {
MavenCommand getMavenCommand() {
return new MavenCommand(this, ['-fae', '-ntp'])
- .withSettingsXmlId(env.MAVEN_SETTINGS_CONFIG_FILE_ID)
.withOptions(env.BUILD_MVN_OPTS ? [ env.BUILD_MVN_OPTS ] : [])
.withProperty('enforcer.skip')
}
diff --git a/.ci/jenkins/Jenkinsfile.setup-branch b/.ci/jenkins/Jenkinsfile.setup-branch
index 65c1f02606..3978a696e1 100644
--- a/.ci/jenkins/Jenkinsfile.setup-branch
+++ b/.ci/jenkins/Jenkinsfile.setup-branch
@@ -3,17 +3,15 @@ import org.jenkinsci.plugins.workflow.libs.Library
import org.kie.jenkins.MavenCommand
-droolsRepo = 'drools'
-kogitoRuntimesRepo = 'kogito-runtimes'
+droolsRepo = 'incubator-kie-drools'
+kogitoRuntimesRepo = 'incubator-kie-kogito-runtimes'
pipeline {
agent {
- label 'kie-rhel8 && !built-in'
- }
-
- tools {
- maven env.BUILD_MAVEN_TOOL
- jdk env.BUILD_JDK_TOOL
+ docker {
+ image env.AGENT_DOCKER_BUILDER_IMAGE
+ args env.AGENT_DOCKER_BUILDER_ARGS
+ }
}
options {
@@ -21,24 +19,15 @@ pipeline {
timeout(time: 60, unit: 'MINUTES')
}
- // parameters {
- // For parameters, check into ./dsl/jobs.groovy file
- // }
-
environment {
- // Static env is defined into ./dsl/jobs.groovy file
-
KOGITO_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}")
-
- // Keep here for visitibility
- MAVEN_OPTS = '-Xms1024m -Xmx4g'
}
stages {
stage('Initialize') {
steps {
script {
- cleanWs()
+ cleanWs(disableDeferredWipeout: true)
if (params.DISPLAY_NAME) {
currentBuild.displayName = params.DISPLAY_NAME
@@ -53,29 +42,41 @@ pipeline {
stage('Build Drools') {
steps {
script {
- getMavenCommand(droolsRepo)
- .withOptions(env.BUILD_MVN_OPTS_UPSTREAM ? [ env.BUILD_MVN_OPTS_UPSTREAM ] : [])
- .withOptions(env.DROOLS_BUILD_MVN_OPTS_UPSTREAM ? [ env.DROOLS_BUILD_MVN_OPTS_UPSTREAM ] : [])
- .withProperty('quickly')
- .run('clean install')
+ configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){
+ getMavenCommand(droolsRepo)
+ .withOptions(env.BUILD_MVN_OPTS_UPSTREAM ? [ env.BUILD_MVN_OPTS_UPSTREAM ] : [])
+ .withOptions(env.DROOLS_BUILD_MVN_OPTS_UPSTREAM ? [ env.DROOLS_BUILD_MVN_OPTS_UPSTREAM ] : [])
+ .withProperty('quickly')
+ .withSettingsXmlFile(MAVEN_SETTINGS_FILE)
+ .run('clean install')
+ }
}
}
}
stage('Build Kogito Runtimes') {
steps {
script {
- getMavenCommand(kogitoRuntimesRepo)
- .withOptions(env.BUILD_MVN_OPTS_UPSTREAM ? [ env.BUILD_MVN_OPTS_UPSTREAM ] : [])
- .withOptions(env.KOGITO_RUNTIMES_BUILD_MVN_OPTS_UPSTREAM ? [ env.KOGITO_RUNTIMES_BUILD_MVN_OPTS_UPSTREAM ] : [])
- .withProperty('quickly')
- .run('clean install')
+ configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){
+ getMavenCommand(kogitoRuntimesRepo)
+ .withOptions(env.BUILD_MVN_OPTS_UPSTREAM ? [ env.BUILD_MVN_OPTS_UPSTREAM ] : [])
+ .withOptions(env.KOGITO_RUNTIMES_BUILD_MVN_OPTS_UPSTREAM ? [ env.KOGITO_RUNTIMES_BUILD_MVN_OPTS_UPSTREAM ] : [])
+ .withProperty('quickly')
+ .withSettingsXmlFile(MAVEN_SETTINGS_FILE)
+ .run('clean install')
+ }
}
}
}
stage('Update project version') {
steps {
script {
- maven.mvnVersionsUpdateParentAndChildModules(getMavenCommand(getRepoName()), getKogitoVersion(), true)
+ configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){
+ maven.mvnVersionsUpdateParentAndChildModules(
+ getMavenCommand(getRepoName()).withSettingsXmlFile(MAVEN_SETTINGS_FILE),
+ getKogitoVersion(),
+ true
+ )
+ }
}
}
}
@@ -87,7 +88,7 @@ pipeline {
def commitMsg = "Update version to ${getKogitoVersion()}"
githubscm.commitChanges(commitMsg, { githubscm.findAndStageNotIgnoredFiles('pom.xml') })
- githubscm.pushObject('origin', getBuildBranch(), getGitAuthorCredsID())
+ githubscm.pushObject('origin', getBuildBranch(), getGitAuthorPushCredsId())
} else {
println '[WARN] no changes to commit'
}
@@ -102,7 +103,7 @@ pipeline {
}
cleanup {
script {
- util.cleanNode('docker')
+ util.cleanNode()
}
}
}
@@ -119,7 +120,7 @@ void sendNotification() {
void checkoutRepo(String repository, String branch) {
dir(repository) {
deleteDir()
- checkout(githubscm.resolveRepository(repository, getGitAuthor(), branch, false))
+ checkout(githubscm.resolveRepository(repository, getGitAuthor(), branch, false, getGitAuthorCredsId()))
// need to manually checkout branch since on a detached branch after checkout command
sh "git checkout ${branch}"
}
@@ -154,13 +155,16 @@ String getKogitoVersion() {
return params.KOGITO_VERSION
}
-String getGitAuthorCredsID() {
- return env.AUTHOR_CREDS_ID
+String getGitAuthorCredsId() {
+ return env.GIT_AUTHOR_CREDS_ID
+}
+
+String getGitAuthorPushCredsId() {
+ return env.GIT_AUTHOR_PUSH_CREDS_ID
}
MavenCommand getMavenCommand(String directory) {
return new MavenCommand(this, ['-fae', '-ntp'])
- .withSettingsXmlId(env.MAVEN_SETTINGS_CONFIG_FILE_ID)
.withOptions(env.BUILD_MVN_OPTS ? [ env.BUILD_MVN_OPTS ] : [])
.inDirectory(directory)
}
diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy
index 62a9df76a4..fb21019bf2 100644
--- a/.ci/jenkins/dsl/jobs.groovy
+++ b/.ci/jenkins/dsl/jobs.groovy
@@ -1,11 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
/*
* This file is describing all the Jenkins jobs in the DSL format (see https://plugins.jenkins.io/job-dsl/)
* needed by the Kogito pipelines.
*
-* The main part of Jenkins job generation is defined into the https://github.com/kiegroup/kogito-pipelines repository.
+* The main part of Jenkins job generation is defined into the https://github.com/apache/incubator-kie-kogito-pipelines repository.
*
* This file is making use of shared libraries defined in
-* https://github.com/kiegroup/kogito-pipelines/tree/main/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl.
+* https://github.com/apache/incubator-kie-kogito-pipelines/tree/main/dsl/seed/src/main/groovy/org/kie/jenkins/jobdsl.
*/
import org.kie.jenkins.jobdsl.model.JenkinsFolder
@@ -33,7 +51,6 @@ Map getMultijobPRConfig(JenkinsFolder jobFolder) {
id: 'kogito-apps',
primary: true,
env : [
- NODE_OPTIONS: '--max_old_space_size=4096',
// Sonarcloud analysis only on main branch
// As we have only Community edition
ENABLE_SONARCLOUD: EnvUtils.isDefaultEnvironment(this, jobFolder.getEnvironmentName()) && Utils.isMainBranch(this),
@@ -41,27 +58,27 @@ Map getMultijobPRConfig(JenkinsFolder jobFolder) {
]
], [
id: 'kogito-quarkus-examples',
- repository: 'kogito-examples',
+ repository: 'incubator-kie-kogito-examples',
dependsOn: 'kogito-apps',
env : [
KOGITO_EXAMPLES_SUBFOLDER_POM: 'kogito-quarkus-examples/',
- BUILD_MVN_OPTS_CURRENT: "${defaultBuildMvnOptsCurrent} ${isProdEnv(jobFolder) ? '' : (isNative(jobFolder) ? '-Pkogito-apps-downstream-native' : '-Pkogito-apps-downstream')}"
+ BUILD_MVN_OPTS_CURRENT: "${defaultBuildMvnOptsCurrent} ${isNative(jobFolder) ? '-Pkogito-apps-downstream-native' : '-Pkogito-apps-downstream'}"
],
], [
id: 'kogito-springboot-examples',
- repository: 'kogito-examples',
+ repository: 'incubator-kie-kogito-examples',
dependsOn: 'kogito-apps',
env : [
KOGITO_EXAMPLES_SUBFOLDER_POM: 'kogito-springboot-examples/',
- BUILD_MVN_OPTS_CURRENT: "${defaultBuildMvnOptsCurrent} ${isProdEnv(jobFolder) ? '' : (isNative(jobFolder) ? '-Pkogito-apps-downstream-native' : '-Pkogito-apps-downstream')}"
+ BUILD_MVN_OPTS_CURRENT: "${defaultBuildMvnOptsCurrent} ${isNative(jobFolder) ? '-Pkogito-apps-downstream-native' : '-Pkogito-apps-downstream'}"
],
], [
id: 'serverless-workflow-examples',
- repository: 'kogito-examples',
+ repository: 'incubator-kie-kogito-examples',
dependsOn: 'kogito-apps',
env : [
KOGITO_EXAMPLES_SUBFOLDER_POM: 'serverless-workflow-examples/',
- BUILD_MVN_OPTS_CURRENT: "${defaultBuildMvnOptsCurrent} ${isProdEnv(jobFolder) ? '' : (isNative(jobFolder) ? '-Pkogito-apps-downstream-native' : '-Pkogito-apps-downstream')}"
+ BUILD_MVN_OPTS_CURRENT: "${defaultBuildMvnOptsCurrent} ${isNative(jobFolder) ? '-Pkogito-apps-downstream-native' : '-Pkogito-apps-downstream'}"
],
]
]
@@ -84,35 +101,42 @@ List getAppsBuildMvnOptions(JenkinsFolder jobFolder) {
return mvnOpts
}
-boolean isProdEnv(JenkinsFolder jobFolder) {
- return EnvUtils.hasEnvironmentId(this, jobFolder.getEnvironmentName(), 'prod')
-}
-
boolean isNative(JenkinsFolder jobFolder) {
return EnvUtils.hasEnvironmentId(this, jobFolder.getEnvironmentName(), 'native')
}
// PR checks
-KogitoJobUtils.createAllEnvironmentsPerRepoPRJobs(this) { jobFolder -> getMultijobPRConfig(jobFolder) }
+Utils.isMainBranch(this) && KogitoJobTemplate.createPullRequestMultibranchPipelineJob(this, "${jenkins_path}/Jenkinsfile")
// Init branch
createSetupBranchJob()
// Nightly jobs
-Closure addNodeOptionsEnvJobParamsGetter = { script ->
- def jobParams = JobParamsUtils.DEFAULT_PARAMS_GETTER(script)
- jobParams.env.put('NODE_OPTIONS', '--max_old_space_size=4096')
- return jobParams
-}
Closure setup4AMCronTriggerJobParamsGetter = { script ->
- def jobParams = addNodeOptionsEnvJobParamsGetter(script)
+ def jobParams = JobParamsUtils.DEFAULT_PARAMS_GETTER(script)
jobParams.triggers = [ cron: 'H 4 * * *' ]
return jobParams
}
-Closure nightlyJobParamsGetter = isMainStream() ? addNodeOptionsEnvJobParamsGetter : setup4AMCronTriggerJobParamsGetter
-KogitoJobUtils.createNightlyBuildChainBuildAndDeployJobForCurrentRepo(this, '', true, addNodeOptionsEnvJobParamsGetter)
-setupSpecificBuildChainNightlyJob('sonarcloud', nightlyJobParamsGetter)
+Closure setupAdditionalTimeout = { Closure paramsGetter ->
+ return { script ->
+ def jobParams = paramsGetter(script)
+ jobParams.env.put('ADDITIONAL_TIMEOUT', '480')
+ return jobParams
+ }
+}
+
+Closure setupSonarProjectKeyEnv = { Closure paramsGetter ->
+ return { script ->
+ def jobParams = paramsGetter(script)
+ jobParams.env.put('SONAR_PROJECT_KEY', 'apache_incubator-kie-kogito-apps')
+ return jobParams
+ }
+}
+
+Closure nightlyJobParamsGetter = isMainStream() ? JobParamsUtils.DEFAULT_PARAMS_GETTER : setup4AMCronTriggerJobParamsGetter
+KogitoJobUtils.createNightlyBuildChainBuildAndDeployJobForCurrentRepo(this, '', true, setupAdditionalTimeout(JobParamsUtils.DEFAULT_PARAMS_GETTER))
+setupSpecificBuildChainNightlyJob('sonarcloud', setupAdditionalTimeout(setupSonarProjectKeyEnv(nightlyJobParamsGetter)))
setupSpecificBuildChainNightlyJob('native', nightlyJobParamsGetter)
setupNightlyQuarkusIntegrationJob('quarkus-main', nightlyJobParamsGetter)
setupNightlyQuarkusIntegrationJob('quarkus-branch', nightlyJobParamsGetter)
@@ -131,7 +155,8 @@ if (isMainStream()) {
])
// Quarkus 3
if (EnvUtils.isEnvironmentEnabled(this, 'quarkus-3')) {
- setupPrQuarkus3RewriteJob()
+ // TODO create PR job with branch source plugin. how to ?
+ // setupPrQuarkus3RewriteJob() // Deactivated due to ghprb not available on Apache Jenkins
setupStandaloneQuarkus3RewriteJob()
}
}
@@ -154,7 +179,7 @@ void setupSpecificBuildChainNightlyJob(String envName, Closure defaultJobParamsG
void setupOptaplannerJob(String optaplannerBranch) {
def jobParams = JobParamsUtils.getBasicJobParamsWithEnv(this, 'kogito-apps-optaplanner-snapshot', JobType.NIGHTLY, 'ecosystem', "${jenkins_path}/Jenkinsfile.optaplanner", 'Kogito Apps Testing against Optaplanner snapshot')
- JobParamsUtils.setupJobParamsDefaultMavenConfiguration(this, jobParams)
+ JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams)
jobParams.triggers = [ cron : 'H 6 * * *' ]
jobParams.env.putAll([
JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
@@ -172,12 +197,13 @@ void setupOptaplannerJob(String optaplannerBranch) {
void createSetupBranchJob() {
def jobParams = JobParamsUtils.getBasicJobParams(this, 'kogito-apps', JobType.SETUP_BRANCH, "${jenkins_path}/Jenkinsfile.setup-branch", 'Kogito Apps Init branch')
- JobParamsUtils.setupJobParamsDefaultMavenConfiguration(this, jobParams)
+ JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams)
jobParams.env.putAll([
JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
GIT_AUTHOR: "${GIT_AUTHOR_NAME}",
- AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
+ GIT_AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
+ GIT_AUTHOR_PUSH_CREDS_ID: "${GIT_AUTHOR_PUSH_CREDENTIALS_ID}",
MAVEN_SETTINGS_CONFIG_FILE_ID: "${MAVEN_SETTINGS_FILE_ID}",
@@ -198,13 +224,13 @@ void createSetupBranchJob() {
void setupReleaseDeployJob() {
def jobParams = JobParamsUtils.getBasicJobParams(this, 'kogito-apps-deploy', JobType.RELEASE, "${jenkins_path}/Jenkinsfile.deploy", 'Kogito Apps Deploy')
- JobParamsUtils.setupJobParamsDefaultMavenConfiguration(this, jobParams)
+ JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams)
jobParams.env.putAll([
JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
GIT_AUTHOR: "${GIT_AUTHOR_NAME}",
- AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
- GITHUB_TOKEN_CREDS_ID: "${GIT_AUTHOR_TOKEN_CREDENTIALS_ID}",
+ GIT_AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
+ GIT_AUTHOR_PUSH_CREDS_ID: "${GIT_AUTHOR_PUSH_CREDENTIALS_ID}",
MAVEN_SETTINGS_CONFIG_FILE_ID: "${MAVEN_SETTINGS_FILE_ID}",
MAVEN_DEPENDENCIES_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",
@@ -235,7 +261,7 @@ void setupReleaseDeployJob() {
void setupReleasePromoteJob() {
def jobParams = JobParamsUtils.getBasicJobParams(this, 'kogito-apps-promote', JobType.RELEASE, "${jenkins_path}/Jenkinsfile.promote", 'Kogito Apps Promote')
- JobParamsUtils.setupJobParamsDefaultMavenConfiguration(this, jobParams)
+ JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams)
jobParams.env.putAll([
PROPERTIES_FILE_NAME: 'deployment.properties',
@@ -243,8 +269,8 @@ void setupReleasePromoteJob() {
GIT_AUTHOR: "${GIT_AUTHOR_NAME}",
- AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
- GITHUB_TOKEN_CREDS_ID: "${GIT_AUTHOR_TOKEN_CREDENTIALS_ID}",
+ GIT_AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
+ GIT_AUTHOR_PUSH_CREDS_ID: "${GIT_AUTHOR_PUSH_CREDENTIALS_ID}",
MAVEN_SETTINGS_CONFIG_FILE_ID: "${MAVEN_SETTINGS_FILE_ID}",
MAVEN_DEPENDENCIES_REPOSITORY: "${MAVEN_ARTIFACTS_REPOSITORY}",
@@ -270,7 +296,7 @@ void setupReleasePromoteJob() {
void setupPrQuarkus3RewriteJob() {
def jobParams = JobParamsUtils.getBasicJobParamsWithEnv(this, 'kogito-apps.rewrite', JobType.PULL_REQUEST, 'quarkus-3', "${jenkins_path}/Jenkinsfile.quarkus-3.rewrite.pr", 'Kogito Apps Quarkus 3 rewrite patch regeneration')
- JobParamsUtils.setupJobParamsDefaultMavenConfiguration(this, jobParams)
+ JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams)
jobParams.jenkinsfile = "${jenkins_path}/Jenkinsfile.quarkus-3.rewrite.pr"
jobParams.pr.putAll([
run_only_for_branches: [ "${GIT_BRANCH}" ],
@@ -281,7 +307,8 @@ void setupPrQuarkus3RewriteJob() {
commitContext: 'Quarkus 3 rewrite',
])
jobParams.env.putAll([
- AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
+ GIT_AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
+ GIT_AUTHOR_PUSH_CREDS_ID: "${GIT_AUTHOR_PUSH_CREDENTIALS_ID}",
MAVEN_SETTINGS_CONFIG_FILE_ID: "${MAVEN_SETTINGS_FILE_ID}",
])
KogitoJobTemplate.createPRJob(this, jobParams)
@@ -290,9 +317,10 @@ void setupPrQuarkus3RewriteJob() {
void setupStandaloneQuarkus3RewriteJob() {
def jobParams = JobParamsUtils.getBasicJobParams(this, 'kogito-apps.quarkus-3.rewrite', JobType.TOOLS, "${jenkins_path}/Jenkinsfile.quarkus-3.rewrite.standalone", 'Kogito Apps Quarkus 3 rewrite patch regeneration')
jobParams.env.putAll(EnvUtils.getEnvironmentEnvVars(this, 'quarkus-3'))
- JobParamsUtils.setupJobParamsDefaultMavenConfiguration(this, jobParams)
+ JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams)
jobParams.env.putAll([
- AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
+ GIT_AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}",
+ GIT_AUTHOR_PUSH_CREDS_ID: "${GIT_AUTHOR_PUSH_CREDENTIALS_ID}",
JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}",
BASE_BRANCH: Utils.getGitBranch(this),
BASE_AUTHOR: Utils.getGitAuthor(this),
diff --git a/.ci/jenkins/dsl/test.sh b/.ci/jenkins/dsl/test.sh
index ad8af34ac2..a15d034b0f 100755
--- a/.ci/jenkins/dsl/test.sh
+++ b/.ci/jenkins/dsl/test.sh
@@ -1,6 +1,25 @@
#!/bin/bash -e
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
file=$(mktemp)
# For more usage of the script, use ./test.sh -h
-curl -o ${file} https://raw.githubusercontent.com/kiegroup/kogito-pipelines/main/dsl/seed/scripts/seed_test.sh
+curl -o ${file} https://raw.githubusercontent.com/apache/incubator-kie-kogito-pipelines/main/dsl/seed/scripts/seed_test.sh
chmod u+x ${file}
${file} $@
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 9e826c14bf..d35739991e 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
name: Bug Report
description: Report a bug in Kogito
labels: kind/bug
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index 07b5e85888..5ac7d62edf 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
blank_issues_enabled: true
contact_links:
- name: Jira
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
index ea3857d267..1a0094c5e6 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.yml
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
name: Feature request / Enhancement
description: Request or propose a new feature/enhancement
labels: kind/enhancement
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 2dcf0d8f54..a939586c34 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
version: 2
updates:
- package-ecosystem: maven
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index b85de6c416..1836c3c86a 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -2,7 +2,7 @@ Many thanks for submitting your Pull Request :heart:!
Please make sure that your PR meets the following requirements:
-- [ ] You have read the [contributors guide](https://github.com/kiegroup/kogito-runtimes#contributing-to-kogito)
+- [ ] You have read the [contributors guide](https://github.com/apache/incubator-kie-kogito-runtimes#contributing-to-kogito)
- [ ] Pull Request title is properly formatted: `KOGITO-XYZ Subject`
- [ ] Pull Request title contains the target branch if not targeting main: `[0.9.x] KOGITO-XYZ Subject`
- [ ] Pull Request contains link to the JIRA issue
diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml
index 12a88a29ff..ee509870bd 100644
--- a/.github/workflows/issues.yml
+++ b/.github/workflows/issues.yml
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
name: Workflows to notify the team about github issues
on:
diff --git a/.github/workflows/pr-backporting.yml b/.github/workflows/pr-backporting.yml
index 62b31d56de..c9dc69c0ed 100644
--- a/.github/workflows/pr-backporting.yml
+++ b/.github/workflows/pr-backporting.yml
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
name: Pull Request Backporting
on:
@@ -17,7 +36,7 @@ jobs:
steps:
- name: Set target branches
id: set-targets
- uses: kiegroup/kie-ci/.ci/actions/parse-labels@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/parse-labels@main
with:
labels: ${LABELS}
@@ -34,7 +53,7 @@ jobs:
REVIEWERS: ${{ toJSON(github.event.pull_request.requested_reviewers) }}
steps:
- name: Backporting
- uses: kiegroup/kie-ci/.ci/actions/backporting@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/backporting@main
with:
target-branch: ${{ matrix.target-branch }}
additional-reviewers: ${REVIEWERS}
diff --git a/.github/workflows/pr-downstream.yml b/.github/workflows/pr-downstream.yml
index 04a3074a3c..ddf1fbb333 100644
--- a/.github/workflows/pr-downstream.yml
+++ b/.github/workflows/pr-downstream.yml
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
name: Kogito Downstream
on:
@@ -26,41 +45,41 @@ jobs:
maven-version: ['3.8.7']
include:
- job_name: kogito-quarkus-examples
- repository: kogito-examples
+ repository: incubator-kie-kogito-examples
env_KOGITO_EXAMPLES_SUBFOLDER_POM: kogito-quarkus-examples/
- job_name: kogito-springboot-examples
- repository: kogito-examples
+ repository: incubator-kie-kogito-examples
env_KOGITO_EXAMPLES_SUBFOLDER_POM: kogito-springboot-examples/
- job_name: serverless-workflow-examples
- repository: kogito-examples
+ repository: incubator-kie-kogito-examples
env_KOGITO_EXAMPLES_SUBFOLDER_POM: serverless-workflow-examples/
fail-fast: false
runs-on: ${{ matrix.os }}
name: ${{ matrix.job_name }} (${{ matrix.os }} / Java-${{ matrix.java-version }} / Maven-${{ matrix.maven-version }})
steps:
- name: Clean Disk Space
- uses: kiegroup/kie-ci/.ci/actions/ubuntu-disk-space@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/ubuntu-disk-space@main
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: Support long paths
if: ${{ matrix.os == 'windows-latest' }}
- uses: kiegroup/kie-ci/.ci/actions/long-paths@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/long-paths@main
- name: Java and Maven Setup
- uses: kiegroup/kie-ci/.ci/actions/maven@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/maven@main
with:
java-version: ${{ matrix.java-version }}
maven-version: ${{ matrix.maven-version }}
cache-key-prefix: ${{ runner.os }}-${{ matrix.java-version }}-maven${{ matrix.maven-version }}
- name: Build Chain
- uses: kiegroup/kie-ci/.ci/actions/build-chain@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/build-chain@main
with:
- definition-file: https://raw.githubusercontent.com/${GROUP:kiegroup}/kogito-pipelines/${BRANCH:main}/.ci/pull-request-config.yaml
+ definition-file: https://raw.githubusercontent.com/${GROUP:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/pull-request-config.yaml
annotations-prefix: ${{ runner.os }}-${{ matrix.java-version }}/${{ matrix.maven-version }}
- starting-project: kiegroup/${{ matrix.repository }}
+ starting-project: apache/${{ matrix.repository }}
github-token: "${{ secrets.GITHUB_TOKEN }}"
env:
KOGITO_EXAMPLES_SUBFOLDER_POM: ${{ matrix.env_KOGITO_EXAMPLES_SUBFOLDER_POM }}
- name: Surefire Report
- uses: kiegroup/kie-ci/.ci/actions/surefire-report@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/surefire-report@main
if: ${{ always() }}
with:
report_paths: '**/*-reports/TEST-*.xml'
\ No newline at end of file
diff --git a/.github/workflows/pr-jenkins.yml b/.github/workflows/pr-jenkins.yml
index f0ca27557a..454e55ae6f 100644
--- a/.github/workflows/pr-jenkins.yml
+++ b/.github/workflows/pr-jenkins.yml
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Jenkins Tests
@@ -16,8 +35,8 @@ jobs:
name: DSL
steps:
- name: DSL tests
- uses: kiegroup/kie-ci/.ci/actions/dsl-tests@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/dsl-tests@main
with:
- main-config-file-repo: kiegroup/kogito-pipelines
+ main-config-file-repo: apache/incubator-kie-kogito-pipelines
main-config-file-path: .ci/jenkins/config/main.yaml
- branch-config-file-repo: kiegroup/kogito-pipelines
+ branch-config-file-repo: apache/incubator-kie-kogito-pipelines
diff --git a/.github/workflows/pr-kogito-apps.yml b/.github/workflows/pr-kogito-apps.yml
index 1b7051a650..930c437fab 100644
--- a/.github/workflows/pr-kogito-apps.yml
+++ b/.github/workflows/pr-kogito-apps.yml
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
name: Kogito Apps
on:
@@ -17,7 +36,7 @@ jobs:
concurrency:
group: pr-kogito-apps_${{ matrix.os }}_${{ matrix.java-version }}_${{ matrix.maven-version }}_${{ github.head_ref }}
cancel-in-progress: true
- timeout-minutes: 210
+ timeout-minutes: 360
strategy:
matrix:
os: [ubuntu-latest]
@@ -28,27 +47,27 @@ jobs:
name: ${{ matrix.os }} / Java-${{ matrix.java-version }} / Maven-${{ matrix.maven-version }}
steps:
- name: Clean Disk Space
- uses: kiegroup/kie-ci/.ci/actions/ubuntu-disk-space@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/ubuntu-disk-space@main
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: Support long paths
if: ${{ matrix.os == 'windows-latest' }}
- uses: kiegroup/kie-ci/.ci/actions/long-paths@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/long-paths@main
- name: Java and Maven Setup
- uses: kiegroup/kie-ci/.ci/actions/maven@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/maven@main
with:
java-version: ${{ matrix.java-version }}
maven-version: ${{ matrix.maven-version }}
cache-key-prefix: ${{ runner.os }}-${{ matrix.java-version }}-maven${{ matrix.maven-version }}
- name: Build Chain
- uses: kiegroup/kie-ci/.ci/actions/build-chain@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/build-chain@main
env:
NODE_OPTIONS: "--max_old_space_size=4096"
with:
- definition-file: https://raw.githubusercontent.com/${GROUP:kiegroup}/kogito-pipelines/${BRANCH:main}/.ci/pull-request-config.yaml
+ definition-file: https://raw.githubusercontent.com/${GROUP:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/pull-request-config.yaml
annotations-prefix: ${{ runner.os }}-${{ matrix.java-version }}/${{ matrix.maven-version }}
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Surefire Report
- uses: kiegroup/kie-ci/.ci/actions/surefire-report@main
+ uses: apache/incubator-kie-kogito-pipelines/.ci/actions/surefire-report@main
if: ${{ always() }}
with:
report_paths: '**/*-reports/TEST-*.xml'
diff --git a/.github/workflows/upstream-sync.yml b/.github/workflows/upstream-sync.yml
new file mode 100644
index 0000000000..069555f41b
--- /dev/null
+++ b/.github/workflows/upstream-sync.yml
@@ -0,0 +1,47 @@
+name: Sync main-apache branch with upstream/main
+
+env:
+ USERNAME: kie-ci
+ USEREMAIL: kie-ci0@redhat.com
+ UPSTREAM_REMOTE: https://github.com/apache/incubator-kie-kogito-apps.git
+ GITHUB_TOKEN: ${{ secrets.APACHE_SYNC_MIDSTREAM_TOKEN }}
+
+on:
+ schedule:
+ - cron: "0 0 * * *" # every day at midnight
+ workflow_dispatch:
+
+jobs:
+ sync-main-apache:
+ name: Sync main-apache branch
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ with:
+ token: ${{ secrets.APACHE_SYNC_MIDSTREAM_TOKEN }}
+
+ - name: Setup git environment
+ run: |
+ git config --global user.name "$USERNAME"
+ git config --global user.email "$USEREMAIL"
+ git remote add upstream $UPSTREAM_REMOTE
+
+ - name: Fetch all
+ run: git fetch --all --tags
+
+ - name: Checkout main-apache branch
+ run: git checkout --track origin/main-apache
+
+ - name: Pull main-apache branch
+ run: git pull
+
+ - name: Merge upstream/main branch
+ run: git merge --no-edit upstream/main
+
+ - name: Push changes
+ run: git push
+
+ - name: Push last tag
+ run: git push origin $(git tag --sort=creatordate | tail -n 1)
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000000..6a7d335aa3
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,9 @@
+Apache KIE
+Copyright 2023 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+The Initial Developer of some parts of the framework, which are copied from, derived from, or
+inspired by KIE (Knowledge Is Everthing) group, is Red Hat, Inc (https://www.redhat.com/).
+Copyright Red Hat, Inc. and/or its affiliates.. All Rights Reserved.
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/pom.xml b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/pom.xml
index cc85884b7b..a1e4ce2540 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/pom.xml
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/acme/travels/Address.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/acme/travels/Address.java
index a4aa77e78e..831e6a2e59 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/acme/travels/Address.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/acme/travels/Address.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.acme.travels;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/acme/travels/Traveller.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/acme/travels/Traveller.java
index 1be7d0b7c3..ff5e841dee 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/acme/travels/Traveller.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/acme/travels/Traveller.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.acme.travels;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/test/java/org/kie/kogito/index/AbstractProcessDataIndexIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/test/java/org/kie/kogito/index/AbstractProcessDataIndexIT.java
index 82341e8ff4..72aebeb09a 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/test/java/org/kie/kogito/index/AbstractProcessDataIndexIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/test/java/org/kie/kogito/index/AbstractProcessDataIndexIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index;
@@ -25,6 +28,7 @@
import java.time.ZonedDateTime;
import java.time.temporal.ChronoUnit;
import java.util.Map;
+import java.util.concurrent.atomic.AtomicReference;
import org.junit.jupiter.api.Test;
import org.testcontainers.shaded.com.fasterxml.jackson.databind.JsonNode;
@@ -274,6 +278,7 @@ public void testProcessInstanceEvents() throws IOException {
public void testProcessGatewayAPI() throws IOException {
String pId2 = createTestProcessInstance();
+
await()
.atMost(TIMEOUT)
.untilAsserted(() -> getProcessInstanceById(pId2, "ACTIVE"));
@@ -471,6 +476,18 @@ public void testProcessGatewayAPIComments(String taskId, String processInstanceI
.body("$.size()", is(1))
.body("[0].content", is(commentContent)));
+ await()
+ .atMost(TIMEOUT)
+ .untilAsserted(() -> given().spec(dataIndexSpec()).contentType(ContentType.JSON)
+ .body("{ \"query\" : \"{ UserTaskInstances (where: { processInstanceId: {equal: \\\"" + processInstanceId + "\\\"}}) { " +
+ "id description priority potentialGroups comments {id content updatedBy updatedAt} } }\"}")
+ .when().post("/graphql")
+ .then()
+ .statusCode(200)
+ .body("data.UserTaskInstances[0].comments", notNullValue())
+ .body("data.UserTaskInstances[0].comments.size()", is(1))
+ .extract().jsonPath().getMap("data.UserTaskInstances[0].comments[0]"));
+
Map commentMap = given().spec(dataIndexSpec()).contentType(ContentType.JSON)
.body("{ \"query\" : \"{ UserTaskInstances (where: { processInstanceId: {equal: \\\"" + processInstanceId + "\\\"}}) { " +
"id description priority potentialGroups comments {id content updatedBy updatedAt} } }\"}")
@@ -482,6 +499,7 @@ public void testProcessGatewayAPIComments(String taskId, String processInstanceI
.body("data.UserTaskInstances[0].potentialGroups[0]", equalTo("managers"))
.body("data.UserTaskInstances[0].comments.size()", is(1))
.extract().jsonPath().getMap("data.UserTaskInstances[0].comments[0]");
+
checkExpectedCreatedItemData(commentCreationResult, commentMap);
String commentNewContent = "commentNewContent";
String commentUpdateResult = given().spec(dataIndexSpec()).contentType(ContentType.JSON)
@@ -569,18 +587,23 @@ public void testProcessGatewayAPIAttachments(String taskId, String processInstan
.body("$.size()", is(1))
.body("[0].name", is(attachmentName)));
- Map attachmentMap = given().spec(dataIndexSpec()).contentType(ContentType.JSON)
- .body("{ \"query\" : \"{ UserTaskInstances (where: { processInstanceId: {equal: \\\"" + processInstanceId + "\\\"}}) { " +
- "id description priority potentialGroups attachments {id name content updatedBy updatedAt} } }\"}")
- .when().post("/graphql")
- .then()
- .statusCode(200)
- .body("data.UserTaskInstances[0].description", equalTo("NewDescription"))
- .body("data.UserTaskInstances[0].priority", equalTo("low"))
- .body("data.UserTaskInstances[0].potentialGroups[0]", equalTo("managers"))
- .body("data.UserTaskInstances[0].attachments.size()", is(1))
- .body("data.UserTaskInstances[0].attachments[0].name", equalTo(attachmentName))
- .extract().jsonPath().getMap("data.UserTaskInstances[0].attachments[0]");
+ AtomicReference> attachmentMapRef = new AtomicReference<>();
+ await()
+ .atMost(TIMEOUT)
+ .untilAsserted(() -> attachmentMapRef.set(given().spec(dataIndexSpec()).contentType(ContentType.JSON)
+ .body("{ \"query\" : \"{ UserTaskInstances (where: { processInstanceId: {equal: \\\"" + processInstanceId + "\\\"}}) { " +
+ "id description priority potentialGroups attachments {id name content updatedBy updatedAt} } }\"}")
+ .when().post("/graphql")
+ .then()
+ .statusCode(200)
+ .body("data.UserTaskInstances[0].description", equalTo("NewDescription"))
+ .body("data.UserTaskInstances[0].priority", equalTo("low"))
+ .body("data.UserTaskInstances[0].potentialGroups[0]", equalTo("managers"))
+ .body("data.UserTaskInstances[0].attachments.size()", is(1))
+ .body("data.UserTaskInstances[0].attachments[0].name", equalTo(attachmentName))
+ .extract().jsonPath().getMap("data.UserTaskInstances[0].attachments[0]")));
+
+ Map attachmentMap = attachmentMapRef.get();
checkExpectedCreatedItemData(attachmentCreationResult, attachmentMap);
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus-devservice/pom.xml b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus-devservice/pom.xml
index 03201bad30..67bf29a4f6 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus-devservice/pom.xml
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus-devservice/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus-devservice/src/test/java/org/kie/kogito/index/inmemory/KogitoDevServiceTest.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus-devservice/src/test/java/org/kie/kogito/index/inmemory/KogitoDevServiceTest.java
index 401ecbc1a0..dc48d88085 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus-devservice/src/test/java/org/kie/kogito/index/inmemory/KogitoDevServiceTest.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus-devservice/src/test/java/org/kie/kogito/index/inmemory/KogitoDevServiceTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.inmemory;
import java.time.Duration;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/pom.xml b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/pom.xml
index b560b385e6..4fc424a831 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/pom.xml
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/main/resources/application.properties b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/main/resources/application.properties
index a6bb6880c5..3f50675a3d 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/main/resources/application.properties
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/main/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
kogito.persistence.type=filesystem
kogito.service.url=http://localhost:8080
@@ -13,8 +32,8 @@ mp.messaging.outgoing.kogito-usertaskinstances-events.value.serializer=org.apach
mp.messaging.outgoing.kogito-usertaskinstances-events.group.id=kogito-data-index-it
mp.messaging.outgoing.kogito-usertaskinstances-events.auto.offset.reset=earliest
-mp.messaging.outgoing.kogito-variables-events.connector=smallrye-kafka
-mp.messaging.outgoing.kogito-variables-events.topic=kogito-variables-events
-mp.messaging.outgoing.kogito-variables-events.value.serializer=org.apache.kafka.common.serialization.StringSerializer
-mp.messaging.outgoing.kogito-variables-events.group.id=kogito-data-index-it
-mp.messaging.outgoing.kogito-variables-events.auto.offset.reset=earliest
\ No newline at end of file
+mp.messaging.outgoing.kogito-processdefinitions-events.connector=smallrye-kafka
+mp.messaging.outgoing.kogito-processdefinitions-events.topic=kogito-processdefinitions-events
+mp.messaging.outgoing.kogito-processdefinitions-events.value.serializer=org.apache.kafka.common.serialization.StringSerializer
+mp.messaging.outgoing.kogito-processdefinitions-events.group.id=kogito-data-index-it
+mp.messaging.outgoing.kogito-processdefinitions-events.auto.offset.reset=earliest
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/infinispan/AbstractProcessDataIndexInfinispanIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/infinispan/AbstractProcessDataIndexInfinispanIT.java
index 8c7600f7bc..cb194469ab 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/infinispan/AbstractProcessDataIndexInfinispanIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/infinispan/AbstractProcessDataIndexInfinispanIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.infinispan;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/infinispan/ProcessDataIndexInfinispanHttpIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/infinispan/ProcessDataIndexInfinispanHttpIT.java
index d49add93a9..3242b68df5 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/infinispan/ProcessDataIndexInfinispanHttpIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/infinispan/ProcessDataIndexInfinispanHttpIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.infinispan;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/infinispan/ProcessDataIndexInfinispanKafkaIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/infinispan/ProcessDataIndexInfinispanKafkaIT.java
index 3fac4bfc58..8f6fc3be18 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/infinispan/ProcessDataIndexInfinispanKafkaIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/infinispan/ProcessDataIndexInfinispanKafkaIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.infinispan;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/inmemory/ProcessDataIndexInMemoryIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/inmemory/ProcessDataIndexInMemoryIT.java
index e30506e897..7069f251a2 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/inmemory/ProcessDataIndexInMemoryIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/inmemory/ProcessDataIndexInMemoryIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.inmemory;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/mongodb/AbstractProcessDataIndexMongoDBIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/mongodb/AbstractProcessDataIndexMongoDBIT.java
index da90def2db..064be8abd4 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/mongodb/AbstractProcessDataIndexMongoDBIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/mongodb/AbstractProcessDataIndexMongoDBIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.mongodb;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/mongodb/ProcessDataIndexMongoDBHttpIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/mongodb/ProcessDataIndexMongoDBHttpIT.java
index 7c4cfcfcc3..88b02e16e9 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/mongodb/ProcessDataIndexMongoDBHttpIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/mongodb/ProcessDataIndexMongoDBHttpIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.mongodb;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/mongodb/ProcessDataIndexMongoDBKafkaIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/mongodb/ProcessDataIndexMongoDBKafkaIT.java
index b15c96a599..ad7d8f04be 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/mongodb/ProcessDataIndexMongoDBKafkaIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/mongodb/ProcessDataIndexMongoDBKafkaIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.mongodb;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/oracle/AbstractProcessDataIndexOracleIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/oracle/AbstractProcessDataIndexOracleIT.java
index 1476650eed..fd5d48fccd 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/oracle/AbstractProcessDataIndexOracleIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/oracle/AbstractProcessDataIndexOracleIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.oracle;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/oracle/ProcessDataIndexOracleHttpIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/oracle/ProcessDataIndexOracleHttpIT.java
index 9b6722c3b4..d323cbc6e0 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/oracle/ProcessDataIndexOracleHttpIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/oracle/ProcessDataIndexOracleHttpIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.oracle;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/oracle/ProcessDataIndexOracleKafkaIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/oracle/ProcessDataIndexOracleKafkaIT.java
index 8d3283dd0f..bfcd0a7486 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/oracle/ProcessDataIndexOracleKafkaIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/oracle/ProcessDataIndexOracleKafkaIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.oracle;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/postgresql/AbstractProcessDataIndexPostgreSqlIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/postgresql/AbstractProcessDataIndexPostgreSqlIT.java
index 14a62f35e1..d0e8c41a80 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/postgresql/AbstractProcessDataIndexPostgreSqlIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/postgresql/AbstractProcessDataIndexPostgreSqlIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.postgresql;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/postgresql/ProcessDataIndexPostgreSqlHttpIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/postgresql/ProcessDataIndexPostgreSqlHttpIT.java
index 2a3dee9f9d..63ace7656f 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/postgresql/ProcessDataIndexPostgreSqlHttpIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/postgresql/ProcessDataIndexPostgreSqlHttpIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.postgresql;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/postgresql/ProcessDataIndexPostgreSqlKafkaIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/postgresql/ProcessDataIndexPostgreSqlKafkaIT.java
index d057695930..15caa49253 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/postgresql/ProcessDataIndexPostgreSqlKafkaIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/postgresql/ProcessDataIndexPostgreSqlKafkaIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.postgresql;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/InMemoryTestProfile.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/InMemoryTestProfile.java
index 152aa4b9ef..f8bebce87f 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/InMemoryTestProfile.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/InMemoryTestProfile.java
@@ -1,26 +1,28 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.quarkus;
import java.util.Arrays;
import java.util.List;
-import org.kie.kogito.index.quarkus.http.KogitoServiceRandomPortQuarkusHttpTestResource;
import org.kie.kogito.index.test.quarkus.DataIndexInMemoryQuarkusTestResource;
+import org.kie.kogito.index.test.quarkus.http.KogitoServiceRandomPortQuarkusHttpTestResource;
import io.quarkus.test.junit.QuarkusTestProfile;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/InfinispanHttpTestProfile.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/InfinispanHttpTestProfile.java
index 808b0d9f2f..1075212bf1 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/InfinispanHttpTestProfile.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/InfinispanHttpTestProfile.java
@@ -1,25 +1,28 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.quarkus.http;
import java.util.Arrays;
import java.util.List;
import org.kie.kogito.index.test.quarkus.http.DataIndexInfinispanHttpQuarkusTestResource;
+import org.kie.kogito.index.test.quarkus.http.KogitoServiceRandomPortQuarkusHttpTestResource;
import io.quarkus.test.junit.QuarkusTestProfile;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/MongoDBHttpTestProfile.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/MongoDBHttpTestProfile.java
index 478211d231..f48cb27b7e 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/MongoDBHttpTestProfile.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/MongoDBHttpTestProfile.java
@@ -1,25 +1,28 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.quarkus.http;
import java.util.Arrays;
import java.util.List;
import org.kie.kogito.index.test.quarkus.http.DataIndexMongoDBHttpQuarkusTestResource;
+import org.kie.kogito.index.test.quarkus.http.KogitoServiceRandomPortQuarkusHttpTestResource;
import io.quarkus.test.junit.QuarkusTestProfile;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/OracleHttpTestProfile.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/OracleHttpTestProfile.java
index 58674b31ab..e8bc357953 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/OracleHttpTestProfile.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/OracleHttpTestProfile.java
@@ -1,25 +1,28 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.quarkus.http;
import java.util.Arrays;
import java.util.List;
import org.kie.kogito.index.test.quarkus.http.DataIndexOracleHttpQuarkusTestResource;
+import org.kie.kogito.index.test.quarkus.http.KogitoServiceRandomPortQuarkusHttpTestResource;
import io.quarkus.test.junit.QuarkusTestProfile;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/PostgreSqlHttpTestProfile.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/PostgreSqlHttpTestProfile.java
index 8da0393cff..782e72ba3f 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/PostgreSqlHttpTestProfile.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/PostgreSqlHttpTestProfile.java
@@ -1,25 +1,28 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.quarkus.http;
import java.util.Arrays;
import java.util.List;
import org.kie.kogito.index.test.quarkus.http.DataIndexPostgreSqlHttpQuarkusTestResource;
+import org.kie.kogito.index.test.quarkus.http.KogitoServiceRandomPortQuarkusHttpTestResource;
import io.quarkus.test.junit.QuarkusTestProfile;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/InfinispanKafkaTestProfile.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/InfinispanKafkaTestProfile.java
index 2ad4df5b1a..a40ff5fe66 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/InfinispanKafkaTestProfile.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/InfinispanKafkaTestProfile.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.quarkus.kafka;
import java.util.Arrays;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/KogitoServiceRandomPortQuarkusKafkaTestResource.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/KogitoServiceRandomPortQuarkusKafkaTestResource.java
index 6165b9d458..98688a6fcd 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/KogitoServiceRandomPortQuarkusKafkaTestResource.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/KogitoServiceRandomPortQuarkusKafkaTestResource.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.quarkus.kafka;
@@ -47,8 +50,9 @@ protected Map getProperties() {
properties.put(QUARKUS_SERVICE_HTTP_PORT, String.valueOf(getTestResource().getMappedPort()));
properties.put(KOGITO_SERVICE_URL, "http://host.testcontainers.internal:" + getTestResource().getMappedPort());
properties.put("mp.messaging.outgoing.kogito-processinstances-events.connector", "smallrye-kafka");
+ properties.put("mp.messaging.outgoing.kogito-processdefinitions-events.connector", "smallrye-kafka");
properties.put("mp.messaging.outgoing.kogito-usertaskinstances-events.connector", "smallrye-kafka");
- properties.put("mp.messaging.outgoing.kogito-variables-events.connector", "smallrye-kafka");
+ properties.put("mp.messaging.outgoing.kogito-processdefinitions-events.connector", "smallrye-kafka");
return properties;
}
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/MongoDBKafkaTestProfile.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/MongoDBKafkaTestProfile.java
index 36e307f944..a0c2c8493b 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/MongoDBKafkaTestProfile.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/MongoDBKafkaTestProfile.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.quarkus.kafka;
import java.util.Arrays;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/OracleKafkaTestProfile.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/OracleKafkaTestProfile.java
index a8f3ba1d45..4e129fb0f0 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/OracleKafkaTestProfile.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/OracleKafkaTestProfile.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.quarkus.kafka;
import java.util.Arrays;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/PostgreSqlKafkaTestProfile.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/PostgreSqlKafkaTestProfile.java
index b6b2d7531b..0bbb98ce7c 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/PostgreSqlKafkaTestProfile.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/kafka/PostgreSqlKafkaTestProfile.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.quarkus.kafka;
import java.util.Arrays;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/resources/application.properties b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/resources/application.properties
index 0829044d79..5521cae262 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/resources/application.properties
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Quarkus
quarkus.log.console.enable=true
quarkus.log.console.level=INFO
@@ -10,13 +29,13 @@ mp.messaging.outgoing.kogito-processinstances-events.connector=smallrye-kafka
mp.messaging.outgoing.kogito-processinstances-events.topic=kogito-processinstances-events
mp.messaging.outgoing.kogito-processinstances-events.value.serializer=org.apache.kafka.common.serialization.StringSerializer
+mp.messaging.outgoing.kogito-processdefinitions-events.connector=smallrye-kafka
+mp.messaging.outgoing.kogito-processdefinitions-events.topic=kogito-processdefinitions-events
+mp.messaging.outgoing.kogito-processdefinitions-events.value.serializer=org.apache.kafka.common.serialization.StringSerializer
+
mp.messaging.outgoing.kogito-usertaskinstances-events.connector=smallrye-kafka
mp.messaging.outgoing.kogito-usertaskinstances-events.topic=kogito-usertaskinstances-events
mp.messaging.outgoing.kogito-usertaskinstances-events.value.serializer=org.apache.kafka.common.serialization.StringSerializer
-mp.messaging.outgoing.kogito-variables-events.connector=smallrye-kafka
-mp.messaging.outgoing.kogito-variables-events.topic=kogito-variables-events
-mp.messaging.outgoing.kogito-variables-events.value.serializer=org.apache.kafka.common.serialization.StringSerializer
-
quarkus.http.auth.permission.source-files-addon.paths=/management/*
quarkus.http.auth.permission.source-files-addon.policy=permit
\ No newline at end of file
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/pom.xml b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/pom.xml
index 44a8edd1cd..fe40940221 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/pom.xml
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/main/java/org/kie/kogito/KogitoApplication.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/main/java/org/kie/kogito/KogitoApplication.java
index d5bd9e790f..ffce47714a 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/main/java/org/kie/kogito/KogitoApplication.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/main/java/org/kie/kogito/KogitoApplication.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/main/resources/application.properties b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/main/resources/application.properties
index 108616e114..a4856961d3 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/main/resources/application.properties
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/main/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
kogito.persistence.type=filesystem
spring.kafka.consumer.group-id=kogito-data-index-it
spring.kafka.consumer.auto-offset-reset=earliest
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexInfinispanIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexInfinispanIT.java
index 0a51b94fad..49e9d2a878 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexInfinispanIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexInfinispanIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexMongoDBIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexMongoDBIT.java
index a7308ac7bd..492153321a 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexMongoDBIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexMongoDBIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexOracleIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexOracleIT.java
index 8c6ef976a0..0b760e7091 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexOracleIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexOracleIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexPostgreSqlIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexPostgreSqlIT.java
index d514f13d01..def1ece2aa 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexPostgreSqlIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/ProcessDataIndexPostgreSqlIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexInfinispanSpringTestResource.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexInfinispanSpringTestResource.java
index d1301e5374..5168678287 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexInfinispanSpringTestResource.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexInfinispanSpringTestResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.spring;
import java.util.HashMap;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexMongoDBSpringTestResource.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexMongoDBSpringTestResource.java
index ce22c550f0..8ec213cc81 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexMongoDBSpringTestResource.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexMongoDBSpringTestResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.spring;
import java.util.HashMap;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexOracleSpringTestResource.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexOracleSpringTestResource.java
index c96fc04c73..fd8d1ef41c 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexOracleSpringTestResource.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexOracleSpringTestResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.spring;
import java.util.HashMap;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexPostgreSqlSpringTestResource.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexPostgreSqlSpringTestResource.java
index 39d82bfbc2..f6b07272e6 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexPostgreSqlSpringTestResource.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/DataIndexPostgreSqlSpringTestResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.spring;
import java.util.HashMap;
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/KogitoServiceRandomPortSpringTestResource.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/KogitoServiceRandomPortSpringTestResource.java
index 59e6202539..fb9cfc74c3 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/KogitoServiceRandomPortSpringTestResource.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-springboot/src/test/java/org/kie/kogito/index/spring/KogitoServiceRandomPortSpringTestResource.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.spring;
diff --git a/apps-integration-tests/integration-tests-data-index-service/pom.xml b/apps-integration-tests/integration-tests-data-index-service/pom.xml
index 3ac3877f8d..839b4f8201 100644
--- a/apps-integration-tests/integration-tests-data-index-service/pom.xml
+++ b/apps-integration-tests/integration-tests-data-index-service/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/pom.xml b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/pom.xml
index 958e0ce826..2c8a488303 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/pom.xml
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/AbstractHelloService.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/AbstractHelloService.java
index e493223374..1c41f758dc 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/AbstractHelloService.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/AbstractHelloService.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/it/jobs/BaseMultipleTimerInstancesIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/it/jobs/BaseMultipleTimerInstancesIT.java
index 217ea2fdfd..b4d432a097 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/it/jobs/BaseMultipleTimerInstancesIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/it/jobs/BaseMultipleTimerInstancesIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.it.jobs;
import org.junit.jupiter.api.Test;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/it/jobs/BaseProcessAsyncIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/it/jobs/BaseProcessAsyncIT.java
index bc6c291394..4651900e48 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/it/jobs/BaseProcessAsyncIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/it/jobs/BaseProcessAsyncIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.it.jobs;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/it/jobs/BaseProcessTimerIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/it/jobs/BaseProcessTimerIT.java
index fbf30b06ed..4ab10943e5 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/it/jobs/BaseProcessTimerIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/it/jobs/BaseProcessTimerIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.it.jobs;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/it/jobs/JobServiceHealthAware.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/it/jobs/JobServiceHealthAware.java
index 23402b6da6..dcbc588971 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/it/jobs/JobServiceHealthAware.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/it/jobs/JobServiceHealthAware.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.it.jobs;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/test/TestUtils.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/test/TestUtils.java
index 2fa35241f3..c970667951 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/test/TestUtils.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/test/TestUtils.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.test;
import java.time.Duration;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/test/resources/CompositeTestResource.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/test/resources/CompositeTestResource.java
index 7686bb5a1b..802896bb4b 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/test/resources/CompositeTestResource.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/test/resources/CompositeTestResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.test.resources;
import java.text.MessageFormat;
@@ -27,6 +29,7 @@
import java.util.stream.Collectors;
import java.util.stream.Stream;
+import org.kie.kogito.testcontainers.Constants;
import org.kie.kogito.testcontainers.KogitoGenericContainer;
import org.kie.kogito.testcontainers.KogitoKafkaContainer;
import org.kie.kogito.testcontainers.KogitoPostgreSqlContainer;
@@ -92,7 +95,7 @@ public void start() {
final Network network = Network.newNetwork();
sharedDependencyContainers.values().stream()
.map(c -> c.withNetwork(network))
- .map(c -> c.waitingFor(Wait.forListeningPort()))
+ .map(c -> c.waitingFor(Wait.forListeningPort()).withStartupTimeout(Constants.CONTAINER_START_TIMEOUT))
.forEach(GenericContainer::start);
configureKafkaToService(sharedDependencyContainers.values(), serviceContainers.values().toArray(GenericContainer[]::new));
startServices(network);
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/test/resources/KogitoServiceRandomPortTestResource.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/test/resources/KogitoServiceRandomPortTestResource.java
index 6f466da1d0..ca82f30e96 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/test/resources/KogitoServiceRandomPortTestResource.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/test/resources/KogitoServiceRandomPortTestResource.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.test.resources;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/testcontainers/JobServiceContainer.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/testcontainers/JobServiceContainer.java
index 77841a9db3..9781a04b47 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/testcontainers/JobServiceContainer.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-common/src/main/java/org/kie/kogito/testcontainers/JobServiceContainer.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.testcontainers;
@@ -26,7 +29,7 @@ public class JobServiceContainer extends KogitoGenericContainer
+
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/main/java/org/kie/kogito/test/resources/JobServiceCompositeQuarkusTestResource.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/main/java/org/kie/kogito/test/resources/JobServiceCompositeQuarkusTestResource.java
index 881b00b9bb..8b4eee8991 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/main/java/org/kie/kogito/test/resources/JobServiceCompositeQuarkusTestResource.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/main/java/org/kie/kogito/test/resources/JobServiceCompositeQuarkusTestResource.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.test.resources;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/main/java/org/kie/kogito/test/resources/JobServiceTestResource.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/main/java/org/kie/kogito/test/resources/JobServiceTestResource.java
index c8fa913afc..852e4e488e 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/main/java/org/kie/kogito/test/resources/JobServiceTestResource.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/main/java/org/kie/kogito/test/resources/JobServiceTestResource.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.test.resources;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/main/java/org/kie/kogito/test/resources/KogitoServiceRandomPortQuarkusTestResource.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/main/java/org/kie/kogito/test/resources/KogitoServiceRandomPortQuarkusTestResource.java
index f24ff3cf47..0ab467e293 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/main/java/org/kie/kogito/test/resources/KogitoServiceRandomPortQuarkusTestResource.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/main/java/org/kie/kogito/test/resources/KogitoServiceRandomPortQuarkusTestResource.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.test.resources;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/BaseCallbackStateTimeoutsIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/BaseCallbackStateTimeoutsIT.java
index 864d2d9e82..dc5480e592 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/BaseCallbackStateTimeoutsIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/BaseCallbackStateTimeoutsIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.it.jobs;
import org.junit.jupiter.api.Test;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/BaseMultipleTimerInstancesQuarkusIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/BaseMultipleTimerInstancesQuarkusIT.java
index b6e5efd783..da7631a4bd 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/BaseMultipleTimerInstancesQuarkusIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/BaseMultipleTimerInstancesQuarkusIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.it.jobs;
import org.junit.jupiter.api.Test;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/BaseSwitchStateTimeoutsIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/BaseSwitchStateTimeoutsIT.java
index 0e0ee8e092..33034f65fa 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/BaseSwitchStateTimeoutsIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/BaseSwitchStateTimeoutsIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.it.jobs;
import org.junit.jupiter.api.Test;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/BaseWorkflowTimeoutsIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/BaseWorkflowTimeoutsIT.java
index a49ee424f1..bfe00d5632 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/BaseWorkflowTimeoutsIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/BaseWorkflowTimeoutsIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.it.jobs;
import org.junit.jupiter.api.Test;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/JobServiceLeaderIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/JobServiceLeaderIT.java
index f31a967665..069a5c3fa7 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/JobServiceLeaderIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/JobServiceLeaderIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.it.jobs;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/KafkaBaseSwitchStateTimeoutsIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/KafkaBaseSwitchStateTimeoutsIT.java
index 3836a74689..6e36d1a2cb 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/KafkaBaseSwitchStateTimeoutsIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-common-quarkus/src/test/java/org/kie/kogito/it/jobs/KafkaBaseSwitchStateTimeoutsIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.it.jobs;
import org.eclipse.microprofile.config.ConfigProvider;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/pom.xml b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/pom.xml
index 029a1eb7e5..c00d7e5c82 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/pom.xml
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/main/java/org/kie/kogito/HelloService.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/main/java/org/kie/kogito/HelloService.java
index a2f165965b..6363355d04 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/main/java/org/kie/kogito/HelloService.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/main/java/org/kie/kogito/HelloService.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/main/resources/application.properties b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/main/resources/application.properties
index b3fbeadd44..c3f997dc10 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/main/resources/application.properties
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/main/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
quarkus.log.category."org.kie.kogito.jobs.management.quarkus".level=DEBUG
quarkus.kafka.devservices.enabled=true
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/CallbackStateTimeoutsIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/CallbackStateTimeoutsIT.java
index 317d0db2c8..40dfbef40d 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/CallbackStateTimeoutsIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/CallbackStateTimeoutsIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.it.jobs;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/MultipleTimerInstancesIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/MultipleTimerInstancesIT.java
index 632c22db4b..6e648993fd 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/MultipleTimerInstancesIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/MultipleTimerInstancesIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.it.jobs;
import io.quarkus.test.junit.QuarkusIntegrationTest;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/ProcessAsyncIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/ProcessAsyncIT.java
index beafd532ec..e95eab8881 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/ProcessAsyncIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/ProcessAsyncIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.it.jobs;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/ProcessTimerIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/ProcessTimerIT.java
index 2ac54e4c07..aae46ece59 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/ProcessTimerIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/ProcessTimerIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.it.jobs;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/SwitchStateTimeoutsIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/SwitchStateTimeoutsIT.java
index b1bf1992d5..dad71eaecd 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/SwitchStateTimeoutsIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/SwitchStateTimeoutsIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.it.jobs;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/WorkflowTimeoutsIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/WorkflowTimeoutsIT.java
index 5372ea2bcb..555af5c9fa 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/WorkflowTimeoutsIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-embedded/src/test/java/org/kie/kogito/it/jobs/WorkflowTimeoutsIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.it.jobs;
import io.quarkus.test.junit.QuarkusIntegrationTest;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/pom.xml b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/pom.xml
index 2800114544..d13d21d7fd 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/pom.xml
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/main/java/org/kie/kogito/HelloService.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/main/java/org/kie/kogito/HelloService.java
index b42d5fa5ec..6363355d04 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/main/java/org/kie/kogito/HelloService.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/main/java/org/kie/kogito/HelloService.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/main/resources/application.properties b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/main/resources/application.properties
index 64f1b8f0d4..c5b50e5220 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/main/resources/application.properties
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/main/resources/application.properties
@@ -1,8 +1,28 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
kogito.service.url=http://localhost:8080
# Disable the KSinkInjectionHealthCheck since the K_SINK env variable is not passed in this context.
quarkus.smallrye-health.check."org.kie.kogito.addons.quarkus.knative.eventing.KSinkInjectionHealthCheck".enabled=false
+quarkus.kafka.devservices.enabled=false
quarkus.kogito.devservices.enabled=false
# Events produced by kogito-addons-quarkus-jobs-knative-eventing to program the timers on the jobs service.
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/CallbackStateTimeoutsIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/CallbackStateTimeoutsIT.java
index 3519140d0d..aa553b6e85 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/CallbackStateTimeoutsIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/CallbackStateTimeoutsIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.it.jobs;
import org.kie.kogito.test.resources.JobServiceTestResource;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/MultipleTimerInstancesIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/MultipleTimerInstancesIT.java
index 5207f1e0db..b56367f66e 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/MultipleTimerInstancesIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/MultipleTimerInstancesIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.it.jobs;
import org.kie.kogito.test.resources.JobServiceTestResource;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/ProcessAsyncIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/ProcessAsyncIT.java
index e9c281d9fc..b3ed2397d9 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/ProcessAsyncIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/ProcessAsyncIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.it.jobs;
import org.kie.kogito.test.resources.JobServiceTestResource;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/ProcessTimerIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/ProcessTimerIT.java
index cff73a99d6..77d4ec61cb 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/ProcessTimerIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/ProcessTimerIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.it.jobs;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/SinkMock.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/SinkMock.java
index fd9523acfa..3252478904 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/SinkMock.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/SinkMock.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.it.jobs;
import java.util.Collections;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/SwitchStateTimeoutsIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/SwitchStateTimeoutsIT.java
index f9ba5cf1cf..8d04406264 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/SwitchStateTimeoutsIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/SwitchStateTimeoutsIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.it.jobs;
import org.kie.kogito.test.resources.JobServiceTestResource;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/WorkflowTimeoutsIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/WorkflowTimeoutsIT.java
index cc42f9c977..3b59ec3d28 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/WorkflowTimeoutsIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-knative-eventing/src/test/java/org/kie/kogito/it/jobs/WorkflowTimeoutsIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.it.jobs;
import org.kie.kogito.test.resources.JobServiceTestResource;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/pom.xml b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/pom.xml
index 31ce53558b..d39b850942 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/pom.xml
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/main/java/org/kie/kogito/HelloService.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/main/java/org/kie/kogito/HelloService.java
index 065d0dcfc3..6363355d04 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/main/java/org/kie/kogito/HelloService.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/main/java/org/kie/kogito/HelloService.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/main/resources/application.properties b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/main/resources/application.properties
index 8266faec56..8d35e2fecd 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/main/resources/application.properties
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/main/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
kogito.service.url=http://localhost:8080
quarkus.log.category."org.kie.kogito.jobs.management.quarkus".level=DEBUG
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/test/java/org/kie/kogito/it/jobs/CallbackStateTimeoutsIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/test/java/org/kie/kogito/it/jobs/CallbackStateTimeoutsIT.java
index 6614c03018..481672c4db 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/test/java/org/kie/kogito/it/jobs/CallbackStateTimeoutsIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/test/java/org/kie/kogito/it/jobs/CallbackStateTimeoutsIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.it.jobs;
import org.kie.kogito.test.resources.JobServiceTestResource;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/test/java/org/kie/kogito/it/jobs/MultipleTimerInstancesIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/test/java/org/kie/kogito/it/jobs/MultipleTimerInstancesIT.java
index edd25c6055..cb6b50cf29 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/test/java/org/kie/kogito/it/jobs/MultipleTimerInstancesIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/test/java/org/kie/kogito/it/jobs/MultipleTimerInstancesIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.it.jobs;
import org.kie.kogito.test.resources.JobServiceTestResource;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/test/java/org/kie/kogito/it/jobs/ProcessAsyncIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/test/java/org/kie/kogito/it/jobs/ProcessAsyncIT.java
index 8bd3b4c241..e257c491f7 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/test/java/org/kie/kogito/it/jobs/ProcessAsyncIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/test/java/org/kie/kogito/it/jobs/ProcessAsyncIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.it.jobs;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/test/java/org/kie/kogito/it/jobs/ProcessTimerIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/test/java/org/kie/kogito/it/jobs/ProcessTimerIT.java
index 35d7e5fbcc..96a354e5d3 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/test/java/org/kie/kogito/it/jobs/ProcessTimerIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/test/java/org/kie/kogito/it/jobs/ProcessTimerIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.it.jobs;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/test/java/org/kie/kogito/it/jobs/SwitchStateTimeoutsIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/test/java/org/kie/kogito/it/jobs/SwitchStateTimeoutsIT.java
index 53604cb1f0..a57b9264bc 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/test/java/org/kie/kogito/it/jobs/SwitchStateTimeoutsIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/test/java/org/kie/kogito/it/jobs/SwitchStateTimeoutsIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.it.jobs;
import org.kie.kogito.test.resources.JobServiceTestResource;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/test/java/org/kie/kogito/it/jobs/WorkflowTimeoutsIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/test/java/org/kie/kogito/it/jobs/WorkflowTimeoutsIT.java
index 9ed0467087..99dd8ee0dd 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/test/java/org/kie/kogito/it/jobs/WorkflowTimeoutsIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-management/src/test/java/org/kie/kogito/it/jobs/WorkflowTimeoutsIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.it.jobs;
import org.kie.kogito.test.resources.JobServiceTestResource;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/pom.xml b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/pom.xml
index 38f3d18789..bafe0c0e40 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/pom.xml
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/main/java/org/kie/kogito/HelloService.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/main/java/org/kie/kogito/HelloService.java
index 065d0dcfc3..6363355d04 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/main/java/org/kie/kogito/HelloService.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/main/java/org/kie/kogito/HelloService.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/main/resources/application.properties b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/main/resources/application.properties
index 96298ca1f4..b215aedc6c 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/main/resources/application.properties
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/main/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
kogito.service.url=http://localhost:8080
quarkus.log.category."org.kie.kogito.jobs.messaging.quarkus".level=DEBUG
@@ -43,6 +62,10 @@ mp.messaging.outgoing.kogito-variables-events.connector=smallrye-kafka
mp.messaging.outgoing.kogito-variables-events.topic=kogito-variables-events
mp.messaging.outgoing.kogito-variables-events.value.serializer=org.apache.kafka.common.serialization.StringSerializer
+mp.messaging.outgoing.kogito-processdefinitions-events.connector=smallrye-kafka
+mp.messaging.outgoing.kogito-processdefinitions-events.topic=kogito-processdefinitions-events
+mp.messaging.outgoing.kogito-processdefinitions-events.value.serializer=org.apache.kafka.common.serialization.StringSerializer
+
kogito.persistence.type=filesystem
-quarkus.devservices.enabled=false
\ No newline at end of file
+quarkus.devservices.enabled=false
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/test/java/org/kie/kogito/it/jobs/CallbackStateTimeoutsIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/test/java/org/kie/kogito/it/jobs/CallbackStateTimeoutsIT.java
index 3592fa917c..8e3b5e4d19 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/test/java/org/kie/kogito/it/jobs/CallbackStateTimeoutsIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/test/java/org/kie/kogito/it/jobs/CallbackStateTimeoutsIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.it.jobs;
import org.kie.kogito.test.resources.JobServiceTestResource;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/test/java/org/kie/kogito/it/jobs/MultipleTimerInstancesIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/test/java/org/kie/kogito/it/jobs/MultipleTimerInstancesIT.java
index c5216a2f3a..c86aaaeb93 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/test/java/org/kie/kogito/it/jobs/MultipleTimerInstancesIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/test/java/org/kie/kogito/it/jobs/MultipleTimerInstancesIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.it.jobs;
import org.kie.kogito.test.resources.JobServiceTestResource;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/test/java/org/kie/kogito/it/jobs/ProcessAsyncIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/test/java/org/kie/kogito/it/jobs/ProcessAsyncIT.java
index 556dbe30f1..0a3c03de9d 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/test/java/org/kie/kogito/it/jobs/ProcessAsyncIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/test/java/org/kie/kogito/it/jobs/ProcessAsyncIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.it.jobs;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/test/java/org/kie/kogito/it/jobs/ProcessTimerIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/test/java/org/kie/kogito/it/jobs/ProcessTimerIT.java
index 24325f5a29..bc99e26e8b 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/test/java/org/kie/kogito/it/jobs/ProcessTimerIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/test/java/org/kie/kogito/it/jobs/ProcessTimerIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.it.jobs;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/test/java/org/kie/kogito/it/jobs/SwitchStateTimeoutsIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/test/java/org/kie/kogito/it/jobs/SwitchStateTimeoutsIT.java
index 5e6f52abc1..d4426a0592 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/test/java/org/kie/kogito/it/jobs/SwitchStateTimeoutsIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/test/java/org/kie/kogito/it/jobs/SwitchStateTimeoutsIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.it.jobs;
import org.kie.kogito.test.resources.JobServiceTestResource;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/test/java/org/kie/kogito/it/jobs/WorkflowTimeoutsIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/test/java/org/kie/kogito/it/jobs/WorkflowTimeoutsIT.java
index cf3c0e992e..8a3fb0e57a 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/test/java/org/kie/kogito/it/jobs/WorkflowTimeoutsIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/integration-tests-jobs-service-quarkus-messaging/src/test/java/org/kie/kogito/it/jobs/WorkflowTimeoutsIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.it.jobs;
import org.kie.kogito.test.resources.JobServiceTestResource;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/pom.xml b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/pom.xml
index a013792ac4..9c65357577 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/pom.xml
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-quarkus/pom.xml
@@ -1,3 +1,23 @@
+
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/pom.xml b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/pom.xml
index 2ac7dea916..01898d003e 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/pom.xml
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/pom.xml
@@ -1,3 +1,23 @@
+
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/main/java/org/kie/kogito/HelloService.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/main/java/org/kie/kogito/HelloService.java
index ffeec5bbb0..840160cbe3 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/main/java/org/kie/kogito/HelloService.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/main/java/org/kie/kogito/HelloService.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/main/java/org/kie/kogito/KogitoApplication.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/main/java/org/kie/kogito/KogitoApplication.java
index 8fe7a5bb5c..614f76caef 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/main/java/org/kie/kogito/KogitoApplication.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/main/java/org/kie/kogito/KogitoApplication.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/test/java/org/kie/kogito/it/jobs/MultipleTimerInstancesIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/test/java/org/kie/kogito/it/jobs/MultipleTimerInstancesIT.java
index 3f9c08bc1f..f764acdeee 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/test/java/org/kie/kogito/it/jobs/MultipleTimerInstancesIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/test/java/org/kie/kogito/it/jobs/MultipleTimerInstancesIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.it.jobs;
import org.junit.jupiter.api.BeforeEach;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/test/java/org/kie/kogito/it/jobs/ProcessAsyncIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/test/java/org/kie/kogito/it/jobs/ProcessAsyncIT.java
index b9bb543d7f..08bb6a8982 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/test/java/org/kie/kogito/it/jobs/ProcessAsyncIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/test/java/org/kie/kogito/it/jobs/ProcessAsyncIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.it.jobs;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/test/java/org/kie/kogito/it/jobs/ProcessTimerIT.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/test/java/org/kie/kogito/it/jobs/ProcessTimerIT.java
index 14a0a7a789..8dcea71510 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/test/java/org/kie/kogito/it/jobs/ProcessTimerIT.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/test/java/org/kie/kogito/it/jobs/ProcessTimerIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.it.jobs;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/test/java/org/kie/kogito/test/resources/JobServiceSpringBootTestResource.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/test/java/org/kie/kogito/test/resources/JobServiceSpringBootTestResource.java
index 6e03486eb9..bc2160d713 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/test/java/org/kie/kogito/test/resources/JobServiceSpringBootTestResource.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/test/java/org/kie/kogito/test/resources/JobServiceSpringBootTestResource.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.test.resources;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/test/java/org/kie/kogito/test/resources/KogitoServiceRandomPortSpringBootTestResource.java b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/test/java/org/kie/kogito/test/resources/KogitoServiceRandomPortSpringBootTestResource.java
index 3e152d704e..d68747b249 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/test/java/org/kie/kogito/test/resources/KogitoServiceRandomPortSpringBootTestResource.java
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/test/java/org/kie/kogito/test/resources/KogitoServiceRandomPortSpringBootTestResource.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.test.resources;
diff --git a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/test/resources/application.properties b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/test/resources/application.properties
index c066f97e26..7b44d0c551 100644
--- a/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/test/resources/application.properties
+++ b/apps-integration-tests/integration-tests-jobs-service/integration-tests-jobs-service-springboot/src/test/resources/application.properties
@@ -1,17 +1,20 @@
-##
-# Copyright 2020 Red Hat, Inc. and/or its affiliates.
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
#
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE-2.0
#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
#
# Runtime Configuration #
diff --git a/apps-integration-tests/integration-tests-jobs-service/pom.xml b/apps-integration-tests/integration-tests-jobs-service/pom.xml
index 4872c9dd79..e0474d4bad 100644
--- a/apps-integration-tests/integration-tests-jobs-service/pom.xml
+++ b/apps-integration-tests/integration-tests-jobs-service/pom.xml
@@ -1,3 +1,23 @@
+
4.0.0
diff --git a/apps-integration-tests/integration-tests-trusty-audit/pom.xml b/apps-integration-tests/integration-tests-trusty-audit/pom.xml
index d3a8a52806..feeff4ef7e 100644
--- a/apps-integration-tests/integration-tests-trusty-audit/pom.xml
+++ b/apps-integration-tests/integration-tests-trusty-audit/pom.xml
@@ -1,3 +1,23 @@
+
4.0.0
diff --git a/apps-integration-tests/integration-tests-trusty-audit/src/test/resources/infinispan/infinispan.xml b/apps-integration-tests/integration-tests-trusty-audit/src/test/resources/infinispan/infinispan.xml
index f9a70ec290..1201a8dc47 100644
--- a/apps-integration-tests/integration-tests-trusty-audit/src/test/resources/infinispan/infinispan.xml
+++ b/apps-integration-tests/integration-tests-trusty-audit/src/test/resources/infinispan/infinispan.xml
@@ -1,3 +1,23 @@
+
diff --git a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-common/pom.xml b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-common/pom.xml
index 178bf8ccba..2039550765 100644
--- a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-common/pom.xml
+++ b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-common/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-common/src/main/java/org/kie/kogito/it/trusty/AbstractTrustyExplainabilityEnd2EndIT.java b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-common/src/main/java/org/kie/kogito/it/trusty/AbstractTrustyExplainabilityEnd2EndIT.java
index 1cbbdce0c1..4207ff9ae6 100644
--- a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-common/src/main/java/org/kie/kogito/it/trusty/AbstractTrustyExplainabilityEnd2EndIT.java
+++ b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-common/src/main/java/org/kie/kogito/it/trusty/AbstractTrustyExplainabilityEnd2EndIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.it.trusty;
import java.util.ArrayList;
diff --git a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-common/src/main/java/org/kie/kogito/testcontainers/ExplainabilityServiceMessagingContainer.java b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-common/src/main/java/org/kie/kogito/testcontainers/ExplainabilityServiceMessagingContainer.java
index 9fbbc2ce09..0502d26c97 100644
--- a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-common/src/main/java/org/kie/kogito/testcontainers/ExplainabilityServiceMessagingContainer.java
+++ b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-common/src/main/java/org/kie/kogito/testcontainers/ExplainabilityServiceMessagingContainer.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.testcontainers;
@@ -24,6 +27,6 @@ public ExplainabilityServiceMessagingContainer(String kafkaBootstrapServers, int
addEnv("KAFKA_BOOTSTRAP_SERVERS", kafkaBootstrapServers);
addEnv("TRUSTY_EXPLAINABILITY_NUMBEROFSAMPLES", String.valueOf(numberOfSamples));
addExposedPort(8080);
- waitingFor(Wait.forListeningPort());
+ waitingFor(Wait.forListeningPort()).withStartupTimeout(Constants.CONTAINER_START_TIMEOUT);
}
}
diff --git a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-common/src/main/java/org/kie/kogito/testcontainers/InfinispanTrustyServiceContainer.java b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-common/src/main/java/org/kie/kogito/testcontainers/InfinispanTrustyServiceContainer.java
index a8c7dd8e9d..5e92b2b154 100644
--- a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-common/src/main/java/org/kie/kogito/testcontainers/InfinispanTrustyServiceContainer.java
+++ b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-common/src/main/java/org/kie/kogito/testcontainers/InfinispanTrustyServiceContainer.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.testcontainers;
@@ -26,6 +29,6 @@ public InfinispanTrustyServiceContainer(String infinispanServerList, String kafk
addEnv("KAFKA_BOOTSTRAP_SERVERS", kafkaBootstrapServer);
addEnv("TRUSTY_EXPLAINABILITY_ENABLED", String.valueOf(explainabilityEnabled));
addExposedPort(8080);
- waitingFor(Wait.forListeningPort());
+ waitingFor(Wait.forListeningPort()).withStartupTimeout(Constants.CONTAINER_START_TIMEOUT);
}
}
diff --git a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-common/src/main/java/org/kie/kogito/testcontainers/KogitoServiceContainer.java b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-common/src/main/java/org/kie/kogito/testcontainers/KogitoServiceContainer.java
index 0b2eac4187..161d6e4296 100644
--- a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-common/src/main/java/org/kie/kogito/testcontainers/KogitoServiceContainer.java
+++ b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-common/src/main/java/org/kie/kogito/testcontainers/KogitoServiceContainer.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.testcontainers;
diff --git a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-quarkus/pom.xml b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-quarkus/pom.xml
index fe308cab43..00be09b2f6 100644
--- a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-quarkus/pom.xml
+++ b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-quarkus/pom.xml
@@ -1,3 +1,23 @@
+
diff --git a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-quarkus/src/main/resources/application.properties b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-quarkus/src/main/resources/application.properties
index a80601281c..7ac9937d39 100644
--- a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-quarkus/src/main/resources/application.properties
+++ b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-quarkus/src/main/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Container image
quarkus.container-image.build=${quarkus.build.image:true}
quarkus.container-image.group=org.kie.kogito
diff --git a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-quarkus/src/test/java/org/kie/kogito/it/trusty/NativeQuarkusTrustyExplainabilityEnd2EndIT.java b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-quarkus/src/test/java/org/kie/kogito/it/trusty/NativeQuarkusTrustyExplainabilityEnd2EndIT.java
index ecce9235e3..155e810a6c 100644
--- a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-quarkus/src/test/java/org/kie/kogito/it/trusty/NativeQuarkusTrustyExplainabilityEnd2EndIT.java
+++ b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-quarkus/src/test/java/org/kie/kogito/it/trusty/NativeQuarkusTrustyExplainabilityEnd2EndIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.it.trusty;
diff --git a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-quarkus/src/test/java/org/kie/kogito/it/trusty/QuarkusTrustyExplainabilityEnd2EndIT.java b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-quarkus/src/test/java/org/kie/kogito/it/trusty/QuarkusTrustyExplainabilityEnd2EndIT.java
index d5294d7fa6..a664ed8bde 100644
--- a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-quarkus/src/test/java/org/kie/kogito/it/trusty/QuarkusTrustyExplainabilityEnd2EndIT.java
+++ b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-quarkus/src/test/java/org/kie/kogito/it/trusty/QuarkusTrustyExplainabilityEnd2EndIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.it.trusty;
diff --git a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-quarkus/src/test/java/org/kie/kogito/testcontainers/QuarkusKogitoServiceContainer.java b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-quarkus/src/test/java/org/kie/kogito/testcontainers/QuarkusKogitoServiceContainer.java
index dd330b855a..68e546e2a5 100644
--- a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-quarkus/src/test/java/org/kie/kogito/testcontainers/QuarkusKogitoServiceContainer.java
+++ b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-quarkus/src/test/java/org/kie/kogito/testcontainers/QuarkusKogitoServiceContainer.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.testcontainers;
@@ -22,6 +25,6 @@ public class QuarkusKogitoServiceContainer extends KogitoServiceContainer {
public QuarkusKogitoServiceContainer(String kafkaBootstrapServer, String kogitoServiceUrl) {
super(kogitoServiceUrl);
addEnv("KAFKA_BOOTSTRAP_SERVERS", kafkaBootstrapServer);
- waitingFor(Wait.forListeningPort());
+ waitingFor(Wait.forListeningPort()).withStartupTimeout(Constants.CONTAINER_START_TIMEOUT);
}
}
diff --git a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-springboot/pom.xml b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-springboot/pom.xml
index c86d0a4e71..4dc2971fb6 100644
--- a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-springboot/pom.xml
+++ b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-springboot/pom.xml
@@ -1,3 +1,23 @@
+
diff --git a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-springboot/src/main/java/org/kie/kogito/KogitoApplication.java b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-springboot/src/main/java/org/kie/kogito/KogitoApplication.java
index 8041663c9b..6c1a30c551 100644
--- a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-springboot/src/main/java/org/kie/kogito/KogitoApplication.java
+++ b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-springboot/src/main/java/org/kie/kogito/KogitoApplication.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito;
diff --git a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-springboot/src/main/resources/application.properties b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-springboot/src/main/resources/application.properties
index 726c1ef37e..2db689ca70 100644
--- a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-springboot/src/main/resources/application.properties
+++ b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-springboot/src/main/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
server.address=0.0.0.0
spring.kafka.consumer.group-id=kogito-trusty
spring.kafka.consumer.auto-offset-reset=earliest
diff --git a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-springboot/src/test/java/org/kie/kogito/it/trusty/SpringBootTrustyExplainabilityEnd2EndIT.java b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-springboot/src/test/java/org/kie/kogito/it/trusty/SpringBootTrustyExplainabilityEnd2EndIT.java
index d67db2d687..4e019354c4 100644
--- a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-springboot/src/test/java/org/kie/kogito/it/trusty/SpringBootTrustyExplainabilityEnd2EndIT.java
+++ b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-springboot/src/test/java/org/kie/kogito/it/trusty/SpringBootTrustyExplainabilityEnd2EndIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.it.trusty;
diff --git a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-springboot/src/test/java/org/kie/kogito/testcontainers/SpringBootKogitoServiceContainer.java b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-springboot/src/test/java/org/kie/kogito/testcontainers/SpringBootKogitoServiceContainer.java
index 0529cde44d..a302c98a9d 100644
--- a/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-springboot/src/test/java/org/kie/kogito/testcontainers/SpringBootKogitoServiceContainer.java
+++ b/apps-integration-tests/integration-tests-trusty-service/integration-tests-trusty-service-springboot/src/test/java/org/kie/kogito/testcontainers/SpringBootKogitoServiceContainer.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.testcontainers;
@@ -22,6 +25,6 @@ public class SpringBootKogitoServiceContainer extends KogitoServiceContainer {
public SpringBootKogitoServiceContainer(String kafkaBootstrapServer, String kogitoServiceUrl) {
super(kogitoServiceUrl);
addEnv("KOGITO_ADDON_TRACING_DECISION_KAFKA_BOOTSTRAPADDRESS", kafkaBootstrapServer);
- waitingFor(Wait.forLogMessage(".*Started KogitoApplication in.*", 1));
+ waitingFor(Wait.forLogMessage(".*Started KogitoApplication in.*", 1)).withStartupTimeout(Constants.CONTAINER_START_TIMEOUT);
}
}
diff --git a/apps-integration-tests/integration-tests-trusty-service/pom.xml b/apps-integration-tests/integration-tests-trusty-service/pom.xml
index ab2ba92c76..2956189499 100644
--- a/apps-integration-tests/integration-tests-trusty-service/pom.xml
+++ b/apps-integration-tests/integration-tests-trusty-service/pom.xml
@@ -1,3 +1,23 @@
+
4.0.0
diff --git a/apps-integration-tests/pom.xml b/apps-integration-tests/pom.xml
index 65bd8956ad..9512af458e 100644
--- a/apps-integration-tests/pom.xml
+++ b/apps-integration-tests/pom.xml
@@ -1,3 +1,23 @@
+
4.0.0
diff --git a/data-index/data-index-common/pom.xml b/data-index/data-index-common/pom.xml
index b744de0205..f25994ad6e 100644
--- a/data-index/data-index-common/pom.xml
+++ b/data-index/data-index-common/pom.xml
@@ -1,4 +1,24 @@
+
@@ -25,10 +45,26 @@
io.quarkus
quarkus-jackson
+
+ io.quarkus
+ quarkus-smallrye-fault-tolerance
+
com.google.guava
guava
+
+ io.quarkus
+ quarkus-vertx
+
+
+ io.vertx
+ vertx-web-client
+
+
+ io.quarkus
+ quarkus-oidc
+
io.quarkus
quarkus-junit5
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/DateTimeUtils.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/DateTimeUtils.java
index 51fcdcd304..294d85c3bb 100644
--- a/data-index/data-index-common/src/main/java/org/kie/kogito/index/DateTimeUtils.java
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/DateTimeUtils.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index;
import java.time.LocalDateTime;
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/api/KogitoRuntimeClient.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/api/KogitoRuntimeClient.java
index 40d02f690c..50b94365ee 100644
--- a/data-index/data-index-common/src/main/java/org/kie/kogito/index/api/KogitoRuntimeClient.java
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/api/KogitoRuntimeClient.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.api;
import java.util.List;
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/api/KogitoRuntimeCommonClient.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/api/KogitoRuntimeCommonClient.java
new file mode 100644
index 0000000000..11291f6aeb
--- /dev/null
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/api/KogitoRuntimeCommonClient.java
@@ -0,0 +1,162 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.index.api;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Optional;
+import java.util.concurrent.CompletableFuture;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+import org.kie.kogito.index.model.Job;
+import org.kie.kogito.index.service.DataIndexServiceException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import io.quarkus.security.credential.TokenCredential;
+import io.quarkus.security.identity.SecurityIdentity;
+import io.vertx.core.AsyncResult;
+import io.vertx.core.Vertx;
+import io.vertx.core.buffer.Buffer;
+import io.vertx.core.json.JsonObject;
+import io.vertx.ext.web.client.HttpResponse;
+import io.vertx.ext.web.client.WebClient;
+import io.vertx.ext.web.client.WebClientOptions;
+
+import static java.lang.String.format;
+
+@ApplicationScoped
+public class KogitoRuntimeCommonClient {
+
+ public static final String CANCEL_JOB_PATH = "/jobs/%s";
+ public static final String RESCHEDULE_JOB_PATH = "/jobs/%s";
+
+ public static final String FROM_PROCESS_INSTANCE_WITH_ID = "from ProcessInstance with id: ";
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(KogitoRuntimeCommonClient.class);
+
+ protected Vertx vertx;
+
+ protected SecurityIdentity identity;
+
+ protected Map serviceWebClientMap = new HashMap<>();
+
+ @ConfigProperty(name = "kogito.dataindex.gateway.url")
+ protected Optional gatewayTargetUrl;
+
+ public void setGatewayTargetUrl(Optional gatewayTargetUrl) {
+ this.gatewayTargetUrl = gatewayTargetUrl;
+ }
+
+ public void addServiceWebClient(String serviceUrl, WebClient webClient) {
+ serviceWebClientMap.put(serviceUrl, webClient);
+ }
+
+ protected WebClient getWebClient(String runtimeServiceUrl) {
+ if (runtimeServiceUrl == null) {
+ throw new DataIndexServiceException("Runtime service URL not defined, please review the kogito.service.url system property to point the public URL for this runtime.");
+ } else {
+ return serviceWebClientMap.computeIfAbsent(runtimeServiceUrl, url -> WebClient.create(vertx, getWebClientToURLOptions(runtimeServiceUrl)));
+ }
+ }
+
+ public WebClientOptions getWebClientToURLOptions(String targetHttpURL) {
+ try {
+ URL dataIndexURL = new URL(targetHttpURL);
+ return new WebClientOptions()
+ .setDefaultHost(gatewayTargetUrl.orElse(dataIndexURL.getHost()))
+ .setDefaultPort((dataIndexURL.getPort() != -1 ? dataIndexURL.getPort() : dataIndexURL.getDefaultPort()))
+ .setSsl(dataIndexURL.getProtocol().compareToIgnoreCase("https") == 0);
+ } catch (MalformedURLException ex) {
+ LOGGER.error(String.format("Invalid runtime service URL: %s", targetHttpURL), ex);
+ return null;
+ }
+ }
+
+ public CompletableFuture cancelJob(String serviceURL, Job job) {
+ String requestURI = format(CANCEL_JOB_PATH, job.getId());
+ LOGGER.debug("Sending DELETE to URI {}", requestURI);
+ return sendDeleteClientRequest(getWebClient(serviceURL), requestURI, "CANCEL Job with id: " + job.getId());
+ }
+
+ public CompletableFuture rescheduleJob(String serviceURL, Job job, String newJobData) {
+ String requestURI = format(RESCHEDULE_JOB_PATH, job.getId());
+ LOGGER.debug("Sending body: {} PATCH to URI {}", newJobData, requestURI);
+ return sendPatchClientRequest(getWebClient(serviceURL), requestURI,
+ "RESCHEDULED JOB with id: " + job.getId(), new JsonObject(newJobData));
+ }
+
+ public CompletableFuture sendDeleteClientRequest(WebClient webClient, String requestURI, String logMessage) {
+ CompletableFuture future = new CompletableFuture<>();
+ webClient.delete(requestURI)
+ .putHeader("Authorization", getAuthHeader())
+ .send(res -> asyncHttpResponseTreatment(res, future, logMessage));
+ LOGGER.debug("Sending DELETE to URI {}", requestURI);
+ return future;
+ }
+
+ protected void asyncHttpResponseTreatment(AsyncResult> res, CompletableFuture future, String logMessage) {
+ if (res.succeeded() && (res.result().statusCode() == 200 || res.result().statusCode() == 201)) {
+ future.complete(res.result().bodyAsString() != null ? res.result().bodyAsString() : "Successfully performed: " + logMessage);
+ } else {
+ future.completeExceptionally(new DataIndexServiceException(getErrorMessage(logMessage, res.result())));
+ }
+ }
+
+ public CompletableFuture sendPatchClientRequest(WebClient webClient, String requestURI, String logMessage, JsonObject jsonBody) {
+ CompletableFuture future = new CompletableFuture<>();
+ webClient.patch(requestURI)
+ .putHeader("Authorization", getAuthHeader())
+ .sendJson(jsonBody, res -> asyncHttpResponseTreatment(res, future, logMessage));
+ return future;
+ }
+
+ protected String getErrorMessage(String logMessage, HttpResponse result) {
+ String errorMessage = "FAILED: " + logMessage;
+ if (result != null) {
+ errorMessage += " errorCode:" + result.statusCode() +
+ " errorStatus:" + result.statusMessage() +
+ " errorMessage:" + (result.body() != null ? result.body().toString() : "-");
+ }
+ return errorMessage;
+ }
+
+ public String getAuthHeader() {
+ if (identity != null && identity.getCredential(TokenCredential.class) != null) {
+ return "Bearer " + identity.getCredential(TokenCredential.class).getToken();
+ }
+ return "";
+ }
+
+ @Inject
+ public void setIdentity(SecurityIdentity identity) {
+ this.identity = identity;
+ }
+
+ @Inject
+ public void setVertx(Vertx vertx) {
+ this.vertx = vertx;
+ }
+
+}
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/AbstractBuilder.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/AbstractBuilder.java
index 6c714dafe7..5d99a7d8fe 100644
--- a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/AbstractBuilder.java
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/AbstractBuilder.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.event;
import java.net.URI;
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/KogitoCloudEvent.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/KogitoCloudEvent.java
index cf2d6de990..cad657ebe8 100644
--- a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/KogitoCloudEvent.java
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/KogitoCloudEvent.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.event;
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/KogitoJobCloudEvent.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/KogitoJobCloudEvent.java
index 00f7bbc2b5..c3419c44ba 100644
--- a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/KogitoJobCloudEvent.java
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/KogitoJobCloudEvent.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.event;
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/ProcessInstanceEventMapper.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/ProcessInstanceEventMapper.java
deleted file mode 100644
index 01b70c56a2..0000000000
--- a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/ProcessInstanceEventMapper.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.kie.kogito.index.event;
-
-import java.util.Set;
-import java.util.function.Function;
-
-import org.kie.kogito.event.process.MilestoneEventBody;
-import org.kie.kogito.event.process.NodeInstanceEventBody;
-import org.kie.kogito.event.process.ProcessInstanceDataEvent;
-import org.kie.kogito.index.model.Milestone;
-import org.kie.kogito.index.model.NodeInstance;
-import org.kie.kogito.index.model.ProcessDefinition;
-import org.kie.kogito.index.model.ProcessInstance;
-import org.kie.kogito.index.model.ProcessInstanceError;
-
-import static com.google.common.base.Strings.isNullOrEmpty;
-import static java.util.stream.Collectors.toList;
-import static org.kie.kogito.index.DateTimeUtils.toZonedDateTime;
-import static org.kie.kogito.index.json.JsonUtils.getObjectMapper;
-
-public class ProcessInstanceEventMapper implements Function {
-
- @Override
- public ProcessInstance apply(ProcessInstanceDataEvent event) {
- if (event == null || event.getData() == null) {
- return null;
- }
-
- ProcessInstance pi = new ProcessInstance();
- pi.setId(event.getData().getId());
- pi.setProcessId(event.getData().getProcessId());
- pi.setProcessName(event.getData().getProcessName());
- pi.setRootProcessInstanceId(event.getData().getRootInstanceId());
- pi.setRootProcessId(event.getData().getRootProcessId());
- pi.setParentProcessInstanceId(event.getData().getParentInstanceId());
- pi.setRoles(event.getData().getRoles());
- pi.setVariables(getObjectMapper().valueToTree(event.getData().getVariables()));
- pi.setNodes(event.getData().getNodeInstances().stream().map(nodeInstance()).collect(toList()));
- pi.setState(event.getData().getState());
- pi.setStart(toZonedDateTime(event.getData().getStartDate()));
- pi.setEnd(toZonedDateTime(event.getData().getEndDate()));
- if (event.getData().getError() != null) {
- pi.setError(new ProcessInstanceError(event.getData().getError().getNodeDefinitionId(), event.getData().getError().getErrorMessage()));
- }
- pi.setMilestones(event.getData().getMilestones().stream().map(milestone()).collect(toList()));
- pi.setBusinessKey(event.getData().getBusinessKey());
- pi.setAddons(isNullOrEmpty(event.getKogitoAddons()) ? null : Set.of(event.getKogitoAddons().split(",")));
- pi.setEndpoint(event.getSource() == null ? null : event.getSource().toString());
- pi.setLastUpdate(toZonedDateTime(event.getTime()));
- pi.setVersion(event.getData().getVersion());
- pi.setDefinition(definition().apply(event));
- pi.setUpdatedBy(event.getData().getIdentity());
- return pi;
- }
-
- private Function definition() {
- return event -> {
- ProcessDefinition pd = new ProcessDefinition();
- pd.setId(event.getData().getProcessId());
- pd.setName(event.getData().getProcessName());
- pd.setVersion(event.getData().getVersion());
- pd.setAddons(isNullOrEmpty(event.getKogitoAddons()) ? null : Set.of(event.getKogitoAddons().split(",")));
- pd.setRoles(event.getData().getRoles());
- pd.setType(event.getKogitoProcessType());
- pd.setEndpoint(event.getSource() == null ? null : event.getSource().toString());
- return pd;
- };
- }
-
- private Function nodeInstance() {
- return nib -> {
- NodeInstance ni = new NodeInstance();
- ni.setId(nib.getId());
- ni.setEnter(toZonedDateTime(nib.getTriggerTime()));
- ni.setName(nib.getNodeName());
- ni.setType(nib.getNodeType());
- ni.setNodeId(nib.getNodeId());
- ni.setDefinitionId(nib.getNodeDefinitionId());
- ni.setExit(toZonedDateTime(nib.getLeaveTime()));
- return ni;
- };
- }
-
- private Function milestone() {
- return m -> Milestone.builder()
- .id(m.getId())
- .name(m.getName())
- .status(m.getStatus())
- .build();
- }
-}
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/UserTaskInstanceEventMapper.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/UserTaskInstanceEventMapper.java
deleted file mode 100644
index ce9908b85a..0000000000
--- a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/UserTaskInstanceEventMapper.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.kie.kogito.index.event;
-
-import java.net.URI;
-import java.util.function.Function;
-
-import org.kie.kogito.event.process.AttachmentEventBody;
-import org.kie.kogito.event.process.CommentEventBody;
-import org.kie.kogito.event.process.UserTaskInstanceDataEvent;
-import org.kie.kogito.index.model.Attachment;
-import org.kie.kogito.index.model.Comment;
-import org.kie.kogito.index.model.UserTaskInstance;
-
-import com.google.common.net.UrlEscapers;
-
-import static java.lang.String.format;
-import static java.util.stream.Collectors.toList;
-import static org.kie.kogito.index.DateTimeUtils.toZonedDateTime;
-import static org.kie.kogito.index.json.JsonUtils.getObjectMapper;
-
-public class UserTaskInstanceEventMapper implements Function {
-
- @Override
- public UserTaskInstance apply(UserTaskInstanceDataEvent event) {
- if (event == null || event.getData() == null) {
- return null;
- }
-
- UserTaskInstance task = new UserTaskInstance();
- task.setId(event.getData().getId());
- task.setProcessInstanceId(event.getData().getProcessInstanceId());
- task.setProcessId(event.getData().getProcessId());
- task.setRootProcessId(event.getData().getRootProcessId());
- task.setRootProcessInstanceId(event.getData().getRootProcessInstanceId());
- task.setName(event.getData().getTaskName());
- task.setDescription(event.getData().getTaskDescription());
- task.setState(event.getData().getState());
- task.setPriority(event.getData().getTaskPriority());
- task.setStarted(toZonedDateTime(event.getData().getStartDate()));
- task.setCompleted(toZonedDateTime(event.getData().getCompleteDate()));
- task.setActualOwner(event.getData().getActualOwner());
- task.setAdminUsers(event.getData().getAdminUsers());
- task.setAdminGroups(event.getData().getAdminGroups());
- task.setExcludedUsers(event.getData().getExcludedUsers());
- task.setPotentialUsers(event.getData().getPotentialUsers());
- task.setPotentialGroups(event.getData().getPotentialGroups());
- task.setComments(event.getData().getComments().stream().map(comment()).collect(toList()));
- task.setAttachments(event.getData().getAttachments().stream().map(attachment()).collect(toList()));
- task.setInputs(getObjectMapper().valueToTree(event.getData().getInputs()));
- task.setOutputs(getObjectMapper().valueToTree(event.getData().getOutputs()));
- task.setEndpoint(event.getSource() == null ? null : getEndpoint(event.getSource(), event.getData().getProcessInstanceId(), event.getData().getTaskName(), event.getData().getId()));
- task.setLastUpdate(toZonedDateTime(event.getTime()));
- task.setReferenceName(event.getData().getReferenceName());
- return task;
- }
-
- private Function comment() {
- return c -> Comment.builder()
- .id(c.getId())
- .content(c.getContent())
- .updatedBy(c.getUpdatedBy())
- .updatedAt(toZonedDateTime(c.getUpdatedAt()))
- .build();
- }
-
- private Function attachment() {
- return a -> Attachment.builder()
- .id(a.getId())
- .content(a.getContent() == null ? null : a.getContent().toString())
- .name(a.getName())
- .updatedBy(a.getUpdatedBy())
- .updatedAt(toZonedDateTime(a.getUpdatedAt()))
- .build();
- }
-
- public String getEndpoint(URI source, String pId, String taskName, String taskId) {
- String name = UrlEscapers.urlPathSegmentEscaper().escape(taskName);
- return source.toString() + format("/%s/%s/%s", pId, name, taskId);
- }
-}
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/Merger.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/Merger.java
new file mode 100644
index 0000000000..0f685661ed
--- /dev/null
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/Merger.java
@@ -0,0 +1,7 @@
+package org.kie.kogito.index.event.mapper;
+
+public interface Merger {
+ boolean accept(Object input);
+
+ R merge(R instance, I input);
+}
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessDefinitionDataEventMerger.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessDefinitionDataEventMerger.java
new file mode 100644
index 0000000000..3b5ab8e6ac
--- /dev/null
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessDefinitionDataEventMerger.java
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.index.event.mapper;
+
+import java.util.AbstractMap;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+import javax.enterprise.context.ApplicationScoped;
+
+import org.kie.kogito.event.process.NodeDefinition;
+import org.kie.kogito.event.process.ProcessDefinitionDataEvent;
+import org.kie.kogito.event.process.ProcessDefinitionEventBody;
+import org.kie.kogito.index.json.JsonUtils;
+import org.kie.kogito.index.model.Node;
+import org.kie.kogito.index.model.ProcessDefinition;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+
+import static java.util.stream.Collectors.toList;
+
+@ApplicationScoped
+public class ProcessDefinitionDataEventMerger implements ProcessDefinitionEventMerger {
+ @Override
+ public boolean accept(Object input) {
+ return input != null && input instanceof ProcessDefinitionDataEvent;
+ }
+
+ @Override
+ public ProcessDefinition merge(ProcessDefinition instance, ProcessDefinitionDataEvent event) {
+ ProcessDefinitionEventBody data = event.getData();
+ if (event == null || data == null) {
+ return instance;
+ }
+ if (instance == null) {
+ instance = new ProcessDefinition();
+ }
+ instance.setId(doMerge(data.getId(), instance.getId()));
+ instance.setName(doMerge(data.getName(), instance.getName()));
+ instance.setVersion(doMerge(data.getVersion(), instance.getVersion()));
+ instance.setAddons(doMerge(data.getAddons(), instance.getAddons()));
+ instance.setRoles(doMerge(data.getRoles(), instance.getRoles()));
+ instance.setType(doMerge(data.getType(), instance.getType()));
+ instance.setEndpoint(doMerge(data.getEndpoint(), instance.getEndpoint()));
+ instance.setDescription(doMerge(data.getDescription(), instance.getDescription()));
+ instance.setAnnotations(doMerge(data.getAnnotations(), instance.getAnnotations()));
+ instance.setMetadata(doMerge(toStringMap(data.getMetadata()), instance.getMetadata()));
+ instance.setNodes(doMerge(nodeDefinitions(data), instance.getNodes()));
+ return instance;
+ }
+
+ private List nodeDefinitions(ProcessDefinitionEventBody data) {
+ if (data.getNodes() == null && data.getNodes().isEmpty()) {
+ return Collections.emptyList();
+ }
+ return data.getNodes().stream().map(this::nodeDefinition).collect(toList());
+ }
+
+ private Node nodeDefinition(NodeDefinition definition) {
+ Node node = new Node();
+ node.setId(definition.getId());
+ node.setName(definition.getName());
+ node.setUniqueId(definition.getUniqueId());
+ node.setType(definition.getType());
+ node.setMetadata(toStringMap(definition.getMetadata()));
+ return node;
+ }
+
+ private T doMerge(T incoming, T current) {
+ boolean notEmpty = (incoming instanceof Collection) ? !((Collection) incoming).isEmpty() : incoming != null;
+ boolean notEquals = !Objects.deepEquals(incoming, current);
+ if (notEmpty && notEquals) {
+ return incoming;
+ }
+ return current;
+ }
+
+ public static Map toStringMap(Map input) {
+ if (input == null) {
+ return null;
+ }
+ return input.entrySet().stream()
+ .map(entry -> {
+ if (String.class.isInstance(entry.getValue())) {
+ return entry;
+ }
+ String value = null;
+ try {
+ value = JsonUtils.getObjectMapper().writeValueAsString(entry.getValue());
+ } catch (JsonProcessingException e) {
+ throw new RuntimeException(e);
+ }
+ return new AbstractMap.SimpleEntry<>(entry.getKey(), value);
+ }).collect(Collectors.toMap(Map.Entry::getKey, e -> (String) e.getValue()));
+ }
+}
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessDefinitionEventMerger.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessDefinitionEventMerger.java
new file mode 100644
index 0000000000..0e38d838ac
--- /dev/null
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessDefinitionEventMerger.java
@@ -0,0 +1,7 @@
+package org.kie.kogito.index.event.mapper;
+
+import org.kie.kogito.event.process.ProcessDefinitionDataEvent;
+import org.kie.kogito.index.model.ProcessDefinition;
+
+public interface ProcessDefinitionEventMerger extends Merger {
+}
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessInstanceErrorDataEventMerger.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessInstanceErrorDataEventMerger.java
new file mode 100644
index 0000000000..5c8cd13103
--- /dev/null
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessInstanceErrorDataEventMerger.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.index.event.mapper;
+
+import javax.enterprise.context.ApplicationScoped;
+
+import org.kie.kogito.event.process.ProcessInstanceDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceErrorDataEvent;
+import org.kie.kogito.index.model.ProcessInstance;
+import org.kie.kogito.index.model.ProcessInstanceError;
+
+@ApplicationScoped
+public class ProcessInstanceErrorDataEventMerger implements ProcessInstanceEventMerger {
+
+ @Override
+ public boolean accept(Object event) {
+ return event instanceof ProcessInstanceErrorDataEvent;
+ }
+
+ @Override
+ public ProcessInstance merge(ProcessInstance pi, ProcessInstanceDataEvent> data) {
+ pi = getOrNew(pi, data);
+ ProcessInstanceErrorDataEvent event = (ProcessInstanceErrorDataEvent) data;
+ ProcessInstanceError error = new ProcessInstanceError();
+ error.setMessage(event.getData().getErrorMessage());
+ error.setNodeDefinitionId(event.getData().getNodeDefinitionId());
+ pi.setError(error);
+ return pi;
+ }
+
+}
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessInstanceEventMerger.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessInstanceEventMerger.java
new file mode 100644
index 0000000000..d7abdb92a2
--- /dev/null
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessInstanceEventMerger.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.index.event.mapper;
+
+import java.util.ArrayList;
+
+import org.kie.kogito.event.process.ProcessInstanceDataEvent;
+import org.kie.kogito.index.model.ProcessInstance;
+
+public interface ProcessInstanceEventMerger extends Merger, ProcessInstance> {
+
+ default ProcessInstance getOrNew(ProcessInstance pi, ProcessInstanceDataEvent> event) {
+ if (pi == null) {
+ pi = new ProcessInstance();
+ pi.setId(event.getKogitoProcessInstanceId());
+ pi.setProcessId(event.getKogitoProcessId());
+ pi.setMilestones(new ArrayList<>());
+ pi.setNodes(new ArrayList<>());
+ }
+ return pi;
+ }
+}
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessInstanceNodeDataEventMerger.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessInstanceNodeDataEventMerger.java
new file mode 100644
index 0000000000..4984dbde88
--- /dev/null
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessInstanceNodeDataEventMerger.java
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.index.event.mapper;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Optional;
+
+import javax.enterprise.context.ApplicationScoped;
+
+import org.kie.kogito.event.process.ProcessInstanceDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceNodeDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceNodeEventBody;
+import org.kie.kogito.index.model.Milestone;
+import org.kie.kogito.index.model.MilestoneStatus;
+import org.kie.kogito.index.model.Node;
+import org.kie.kogito.index.model.NodeInstance;
+import org.kie.kogito.index.model.ProcessInstance;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.kie.kogito.event.process.ProcessInstanceNodeEventBody.EVENT_TYPE_ENTER;
+import static org.kie.kogito.event.process.ProcessInstanceNodeEventBody.EVENT_TYPE_EXIT;
+import static org.kie.kogito.index.DateTimeUtils.toZonedDateTime;
+
+@ApplicationScoped
+public class ProcessInstanceNodeDataEventMerger implements ProcessInstanceEventMerger {
+ private static final Logger LOGGER = LoggerFactory.getLogger(ProcessInstanceNodeDataEventMerger.class);
+
+ @Override
+ public boolean accept(Object event) {
+ return event instanceof ProcessInstanceNodeDataEvent;
+ }
+
+ @Override
+ public ProcessInstance merge(ProcessInstance pi, ProcessInstanceDataEvent> data) {
+ pi = getOrNew(pi, data);
+ ProcessInstanceNodeDataEvent event = (ProcessInstanceNodeDataEvent) data;
+
+ List nodeInstances = Optional.ofNullable(pi.getNodes()).orElse(new ArrayList<>());
+
+ ProcessInstanceNodeEventBody body = event.getData();
+
+ NodeInstance nodeInstance = nodeInstances.stream().filter(e -> body.getNodeInstanceId().equals(e.getId())).findAny().orElse(new NodeInstance());
+ nodeInstances.removeIf(e -> e.getId().equals(body.getNodeInstanceId()));
+
+ LOGGER.debug("before merging: {}", nodeInstance);
+ nodeInstance.setDefinitionId(body.getNodeDefinitionId());
+ nodeInstance.setId(body.getNodeInstanceId());
+ nodeInstance.setNodeId(body.getNodeDefinitionId());
+ nodeInstance.setName(body.getNodeName());
+ nodeInstance.setType(body.getNodeType());
+ switch (body.getEventType()) {
+ case EVENT_TYPE_ENTER:
+ nodeInstance.setEnter(toZonedDateTime(body.getEventDate()));
+ break;
+ case EVENT_TYPE_EXIT:
+ nodeInstance.setExit(toZonedDateTime(body.getEventDate()));
+
+ if (nodeInstance.getEnter() == null) {
+ // Adding a default enter time for exit events triggered by EventNodeInstances
+ nodeInstance.setEnter(nodeInstance.getExit());
+ }
+ break;
+ }
+ nodeInstances.add(nodeInstance);
+
+ // milestone
+ if ("MilestoneNode".equals(event.getData().getNodeType())) {
+ List milestones = Optional.ofNullable(pi.getMilestones()).orElse(new ArrayList<>());
+ Optional found = milestones.stream().filter(e -> body.getNodeInstanceId().equals(e.getId())).findAny();
+ Milestone milestone = null;
+ if (found.isEmpty()) {
+ milestone = new Milestone();
+ milestones.add(milestone);
+ } else {
+ milestone = found.get();
+ }
+
+ milestone.setId(nodeInstance.getId());
+ milestone.setName(nodeInstance.getName());
+ milestone.setStatus(nodeInstance.getExit() != null ? MilestoneStatus.COMPLETED.name() : MilestoneStatus.ACTIVE.name());
+ milestones.add(milestone);
+
+ pi.setMilestones(milestones);
+ }
+
+ if (pi.getDefinition() != null) {
+ List nodes = Optional.ofNullable(pi.getDefinition().getNodes()).orElse(new ArrayList<>());
+
+ nodes.removeIf(e -> e.getId().equals(body.getNodeDefinitionId()));
+ Node node = new Node();
+ node.setId(body.getNodeDefinitionId());
+ node.setType(body.getNodeType());
+ node.setUniqueId(body.getNodeDefinitionId());
+ node.setMetadata(new HashMap<>());
+
+ nodes.add(node);
+ pi.getDefinition().setNodes(nodes);
+ }
+ LOGGER.debug("after merging: {}", nodeInstance);
+ pi.setNodes(nodeInstances);
+ return pi;
+ }
+
+}
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessInstanceSLADataEventMerger.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessInstanceSLADataEventMerger.java
new file mode 100644
index 0000000000..9f05431f98
--- /dev/null
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessInstanceSLADataEventMerger.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.index.event.mapper;
+
+import org.kie.kogito.event.process.ProcessInstanceDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceSLADataEvent;
+import org.kie.kogito.index.model.ProcessInstance;
+
+public class ProcessInstanceSLADataEventMerger implements ProcessInstanceEventMerger {
+
+ @Override
+ public boolean accept(Object event) {
+ return event instanceof ProcessInstanceSLADataEvent;
+ }
+
+ @Override
+ public ProcessInstance merge(ProcessInstance pi, ProcessInstanceDataEvent> event) {
+ // do nothing
+ return pi;
+ }
+
+}
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessInstanceStateDataEventMerger.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessInstanceStateDataEventMerger.java
new file mode 100644
index 0000000000..9c1d1303ad
--- /dev/null
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessInstanceStateDataEventMerger.java
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.index.event.mapper;
+
+import java.util.Set;
+
+import javax.enterprise.context.ApplicationScoped;
+
+import org.kie.kogito.event.process.ProcessInstanceDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceStateDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceStateEventBody;
+import org.kie.kogito.index.model.ProcessDefinition;
+import org.kie.kogito.index.model.ProcessInstance;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static com.google.common.base.Strings.isNullOrEmpty;
+import static org.kie.kogito.index.DateTimeUtils.toZonedDateTime;
+
+@ApplicationScoped
+public class ProcessInstanceStateDataEventMerger implements ProcessInstanceEventMerger {
+ private static final Logger LOGGER = LoggerFactory.getLogger(ProcessInstanceStateDataEventMerger.class);
+
+ @Override
+ public boolean accept(Object event) {
+ return event instanceof ProcessInstanceStateDataEvent;
+ }
+
+ @Override
+ public ProcessInstance merge(ProcessInstance pi, ProcessInstanceDataEvent> data) {
+ pi = getOrNew(pi, data);
+ ProcessInstanceStateDataEvent event = (ProcessInstanceStateDataEvent) data;
+ LOGGER.debug("Value before merging: {}", pi);
+ pi.setId(event.getData().getProcessInstanceId());
+ pi.setVersion(event.getData().getProcessVersion());
+ pi.setProcessId(event.getData().getProcessId());
+ pi.setProcessName(event.getData().getProcessName());
+ pi.setRootProcessInstanceId(event.getData().getRootProcessInstanceId());
+ pi.setRootProcessId(event.getData().getRootProcessId());
+ pi.setParentProcessInstanceId(event.getData().getParentInstanceId());
+ pi.setRoles(event.getData().getRoles());
+ pi.setState(event.getData().getState());
+ if (event.getData().getEventType() == null || event.getData().getEventType() == ProcessInstanceStateEventBody.EVENT_TYPE_STARTED) {
+ pi.setStart(toZonedDateTime(event.getData().getEventDate()));
+ pi.setCreatedBy(event.getData().getEventUser());
+ } else if (event.getData().getEventType() == ProcessInstanceStateEventBody.EVENT_TYPE_STARTED) {
+ pi.setEnd(toZonedDateTime(event.getData().getEventDate()));
+ }
+ pi.setBusinessKey(event.getData().getBusinessKey());
+ pi.setAddons(isNullOrEmpty(event.getKogitoAddons()) ? null : Set.of(event.getKogitoAddons().split(",")));
+ pi.setEndpoint(event.getSource() == null ? null : event.getSource().toString());
+ pi.setLastUpdate(toZonedDateTime(event.getTime()));
+ pi.setDefinition(definitions(event));
+ pi.setUpdatedBy(event.getData().getEventUser());
+ LOGGER.debug("Value after merging: {}", pi);
+ return pi;
+ }
+
+ private ProcessDefinition definitions(ProcessInstanceStateDataEvent event) {
+ LOGGER.debug("Value before merging: {}", event);
+ ProcessDefinition pd = new ProcessDefinition();
+ pd.setId(event.getData().getProcessId());
+ pd.setName(event.getData().getProcessName());
+ pd.setVersion(event.getData().getProcessVersion());
+ pd.setAddons(isNullOrEmpty(event.getKogitoAddons()) ? null : Set.of(event.getKogitoAddons().split(",")));
+ pd.setRoles(event.getData().getRoles());
+ pd.setType(event.getKogitoProcessType());
+ pd.setEndpoint(event.getSource() == null ? null : event.getSource().toString());
+ LOGGER.debug("Value after merging: {}", pd);
+ return pd;
+
+ }
+
+}
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessInstanceVariableDataEventMerger.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessInstanceVariableDataEventMerger.java
new file mode 100644
index 0000000000..92a2c5e79a
--- /dev/null
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/ProcessInstanceVariableDataEventMerger.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.index.event.mapper;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.enterprise.context.ApplicationScoped;
+
+import org.kie.kogito.event.process.ProcessInstanceDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceVariableDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceVariableEventBody;
+import org.kie.kogito.index.json.JsonUtils;
+import org.kie.kogito.index.model.ProcessInstance;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+@ApplicationScoped
+public class ProcessInstanceVariableDataEventMerger implements ProcessInstanceEventMerger {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(ProcessInstanceVariableDataEventMerger.class);
+
+ @Override
+ public boolean accept(Object event) {
+ return event instanceof ProcessInstanceVariableDataEvent;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public ProcessInstance merge(ProcessInstance pi, ProcessInstanceDataEvent> data) {
+ pi = getOrNew(pi, data);
+ ProcessInstanceVariableDataEvent event = (ProcessInstanceVariableDataEvent) data;
+ try {
+ ProcessInstanceVariableEventBody body = event.getData();
+ ObjectMapper mapper = JsonUtils.getObjectMapper();
+
+ Map variables = null;
+ if (pi.getVariables() == null) {
+ variables = new HashMap<>();
+ } else {
+ variables = new HashMap<>(mapper.treeToValue(pi.getVariables(), HashMap.class));
+ }
+ variables.put(body.getVariableName(), body.getVariableValue());
+ pi.setVariables(mapper.valueToTree(variables));
+ } catch (JsonProcessingException e) {
+ LOGGER.error("error during unmarshalling variable instance", e);
+ } catch (IllegalArgumentException e) {
+ LOGGER.error("error during merging variable instance event", e);
+ }
+ return pi;
+ }
+}
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/UserTaskInstanceAssignmentDataEventMerger.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/UserTaskInstanceAssignmentDataEventMerger.java
new file mode 100644
index 0000000000..870a1d418c
--- /dev/null
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/UserTaskInstanceAssignmentDataEventMerger.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.index.event.mapper;
+
+import java.util.HashSet;
+
+import javax.enterprise.context.ApplicationScoped;
+
+import org.kie.kogito.event.usertask.UserTaskInstanceAssignmentDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceAssignmentEventBody;
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
+import org.kie.kogito.index.model.UserTaskInstance;
+
+@ApplicationScoped
+public class UserTaskInstanceAssignmentDataEventMerger implements UserTaskInstanceEventMerger {
+
+ @Override
+ public boolean accept(Object event) {
+ return event instanceof UserTaskInstanceAssignmentDataEvent;
+ }
+
+ @Override
+ public UserTaskInstance merge(UserTaskInstance userTaskInstance, UserTaskInstanceDataEvent> data) {
+ UserTaskInstanceAssignmentDataEvent event = (UserTaskInstanceAssignmentDataEvent) data;
+ UserTaskInstanceAssignmentEventBody body = event.getData();
+
+ switch (body.getAssignmentType()) {
+ case "USER_OWNERS":
+ userTaskInstance.setPotentialUsers(new HashSet<>(body.getUsers()));
+ break;
+ case "USER_GROUPS":
+ userTaskInstance.setPotentialGroups(new HashSet<>(body.getUsers()));
+ break;
+ case "USERS_EXCLUDED":
+ userTaskInstance.setExcludedUsers(new HashSet<>(body.getUsers()));
+ break;
+ case "ADMIN_GROUPS":
+ userTaskInstance.setAdminGroups(new HashSet<>(body.getUsers()));
+ break;
+ case "ADMIN_USERS":
+ userTaskInstance.setAdminUsers(new HashSet<>(body.getUsers()));
+ break;
+ }
+ return userTaskInstance;
+ }
+
+}
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/UserTaskInstanceAttachmentDataEventMerger.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/UserTaskInstanceAttachmentDataEventMerger.java
new file mode 100644
index 0000000000..32875bf17f
--- /dev/null
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/UserTaskInstanceAttachmentDataEventMerger.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.index.event.mapper;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+import javax.enterprise.context.ApplicationScoped;
+
+import org.kie.kogito.event.usertask.UserTaskInstanceAttachmentDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceAttachmentEventBody;
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
+import org.kie.kogito.index.DateTimeUtils;
+import org.kie.kogito.index.model.Attachment;
+import org.kie.kogito.index.model.UserTaskInstance;
+
+@ApplicationScoped
+public class UserTaskInstanceAttachmentDataEventMerger implements UserTaskInstanceEventMerger {
+
+ @Override
+ public boolean accept(Object event) {
+ return event instanceof UserTaskInstanceAttachmentDataEvent;
+ }
+
+ @Override
+ public UserTaskInstance merge(UserTaskInstance userTaskInstance, UserTaskInstanceDataEvent> data) {
+ UserTaskInstanceAttachmentDataEvent event = (UserTaskInstanceAttachmentDataEvent) data;
+ UserTaskInstanceAttachmentEventBody body = event.getData();
+
+ List attachments = Optional.ofNullable(userTaskInstance.getAttachments()).orElse(new ArrayList<>());
+ userTaskInstance.setAttachments(attachments);
+
+ switch (body.getEventType()) {
+ case UserTaskInstanceAttachmentEventBody.EVENT_TYPE_ADDED:
+ case UserTaskInstanceAttachmentEventBody.EVENT_TYPE_CHANGE:
+ Optional found = attachments.stream().filter(e -> e.getId().equals(body.getAttachmentId())).findAny();
+ Attachment attachment;
+ if (found.isEmpty()) {
+ attachment = new Attachment();
+ attachments.add(attachment);
+ } else {
+ attachment = found.get();
+ }
+ attachment.setId(body.getAttachmentId());
+ attachment.setName(body.getAttachmentName());
+ attachment.setContent(body.getAttachmentURI().toString());
+ attachment.setUpdatedBy(body.getEventUser() != null ? body.getEventUser() : "unknown");
+ attachment.setUpdatedAt(DateTimeUtils.toZonedDateTime(body.getEventDate()));
+
+ break;
+ case UserTaskInstanceAttachmentEventBody.EVENT_TYPE_DELETED:
+ attachments.removeIf(e -> e.getId().equals(body.getAttachmentId()));
+ break;
+ }
+ return userTaskInstance;
+ }
+
+}
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/UserTaskInstanceCommentDataEventMerger.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/UserTaskInstanceCommentDataEventMerger.java
new file mode 100644
index 0000000000..2d732ebfe6
--- /dev/null
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/UserTaskInstanceCommentDataEventMerger.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.index.event.mapper;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+import javax.enterprise.context.ApplicationScoped;
+
+import org.kie.kogito.event.usertask.UserTaskInstanceCommentDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceCommentEventBody;
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
+import org.kie.kogito.index.DateTimeUtils;
+import org.kie.kogito.index.model.Comment;
+import org.kie.kogito.index.model.UserTaskInstance;
+
+@ApplicationScoped
+public class UserTaskInstanceCommentDataEventMerger implements UserTaskInstanceEventMerger {
+
+ @Override
+ public boolean accept(Object event) {
+ return event instanceof UserTaskInstanceCommentDataEvent;
+ }
+
+ @Override
+ public UserTaskInstance merge(UserTaskInstance userTaskInstance, UserTaskInstanceDataEvent> data) {
+ UserTaskInstanceCommentDataEvent event = (UserTaskInstanceCommentDataEvent) data;
+ UserTaskInstanceCommentEventBody body = event.getData();
+ List comments = Optional.ofNullable(userTaskInstance.getComments()).orElse(new ArrayList<>());
+ userTaskInstance.setComments(comments);
+
+ switch (body.getEventType()) {
+ case UserTaskInstanceCommentEventBody.EVENT_TYPE_ADDED:
+ case UserTaskInstanceCommentEventBody.EVENT_TYPE_CHANGE:
+ Optional found = comments.stream().filter(e -> e.getId().equals(body.getCommentId())).findAny();
+ Comment comment;
+ if (found.isEmpty()) {
+ comment = new Comment();
+ comments.add(comment);
+ } else {
+ comment = found.get();
+ }
+ comment.setId(body.getCommentId());
+ comment.setContent(body.getCommentContent());
+ comment.setUpdatedBy(body.getEventUser() != null ? body.getEventUser() : "unknown");
+ comment.setUpdatedAt(DateTimeUtils.toZonedDateTime(body.getEventDate()));
+
+ break;
+ case UserTaskInstanceCommentEventBody.EVENT_TYPE_DELETED:
+ comments.removeIf(e -> e.getId().equals(body.getCommentId()));
+ break;
+ }
+ return userTaskInstance;
+ }
+
+}
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/UserTaskInstanceDeadlineDataEventMerger.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/UserTaskInstanceDeadlineDataEventMerger.java
new file mode 100644
index 0000000000..4699e3ba66
--- /dev/null
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/UserTaskInstanceDeadlineDataEventMerger.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.index.event.mapper;
+
+import javax.enterprise.context.ApplicationScoped;
+
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceDeadlineDataEvent;
+import org.kie.kogito.index.model.UserTaskInstance;
+
+@ApplicationScoped
+public class UserTaskInstanceDeadlineDataEventMerger implements UserTaskInstanceEventMerger {
+
+ @Override
+ public boolean accept(Object event) {
+ return event instanceof UserTaskInstanceDeadlineDataEvent;
+ }
+
+ @Override
+ public UserTaskInstance merge(UserTaskInstance userTaskInstance, UserTaskInstanceDataEvent> data) {
+ // do nothing
+ return userTaskInstance;
+ }
+
+}
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/UserTaskInstanceEventMerger.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/UserTaskInstanceEventMerger.java
new file mode 100644
index 0000000000..62d86b6f71
--- /dev/null
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/UserTaskInstanceEventMerger.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.index.event.mapper;
+
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
+import org.kie.kogito.index.model.UserTaskInstance;
+
+public interface UserTaskInstanceEventMerger extends Merger, UserTaskInstance> {
+
+}
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/UserTaskInstanceStateEventMerger.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/UserTaskInstanceStateEventMerger.java
new file mode 100644
index 0000000000..77ba60c808
--- /dev/null
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/UserTaskInstanceStateEventMerger.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.index.event.mapper;
+
+import java.net.URI;
+
+import javax.enterprise.context.ApplicationScoped;
+
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceStateDataEvent;
+import org.kie.kogito.index.model.UserTaskInstance;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.net.UrlEscapers;
+
+import static java.lang.String.format;
+import static org.kie.kogito.index.DateTimeUtils.toZonedDateTime;
+
+@ApplicationScoped
+public class UserTaskInstanceStateEventMerger implements UserTaskInstanceEventMerger {
+ private static final Logger LOGGER = LoggerFactory.getLogger(UserTaskInstanceStateEventMerger.class);
+
+ @Override
+ public boolean accept(Object event) {
+ return event instanceof UserTaskInstanceStateDataEvent;
+ }
+
+ @Override
+ public UserTaskInstance merge(UserTaskInstance task, UserTaskInstanceDataEvent> data) {
+ UserTaskInstanceStateDataEvent event = (UserTaskInstanceStateDataEvent) data;
+ LOGGER.debug("value before merging: {}", task);
+ task.setId(event.getData().getUserTaskInstanceId());
+ task.setProcessInstanceId(event.getData().getProcessInstanceId());
+ task.setProcessId(event.getKogitoProcessId());
+ task.setRootProcessId(event.getKogitoRootProcessId());
+ task.setRootProcessInstanceId(event.getKogitoRootProcessInstanceId());
+ task.setName(event.getData().getUserTaskName());
+ task.setDescription(event.getData().getUserTaskDescription());
+ task.setState(event.getData().getState());
+ task.setPriority(event.getData().getUserTaskPriority());
+ if (event.getData().getEventType() == null || event.getData().getEventType() == 1) {
+ task.setStarted(toZonedDateTime(event.getData().getEventDate()));
+ } else if (event.getData().getEventType() == 2) {
+ task.setCompleted(toZonedDateTime(event.getData().getEventDate()));
+ }
+
+ task.setActualOwner(event.getData().getActualOwner());
+ task.setEndpoint(
+ event.getSource() == null ? null : getEndpoint(event.getSource(), event.getData().getProcessInstanceId(), event.getData().getUserTaskName(), event.getData().getUserTaskInstanceId()));
+ task.setLastUpdate(toZonedDateTime(event.getData().getEventDate()));
+ task.setReferenceName(event.getData().getUserTaskReferenceName());
+ LOGGER.debug("value after merging: {}", task);
+ return task;
+ }
+
+ public String getEndpoint(URI source, String pId, String taskName, String taskId) {
+ String name = UrlEscapers.urlPathSegmentEscaper().escape(taskName);
+ return source.toString() + format("/%s/%s/%s", pId, name, taskId);
+ }
+
+}
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/UserTaskInstanceVariableDataEventMerger.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/UserTaskInstanceVariableDataEventMerger.java
new file mode 100644
index 0000000000..9f256184b3
--- /dev/null
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/event/mapper/UserTaskInstanceVariableDataEventMerger.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.index.event.mapper;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.enterprise.context.ApplicationScoped;
+
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceVariableDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceVariableEventBody;
+import org.kie.kogito.index.json.JsonUtils;
+import org.kie.kogito.index.model.UserTaskInstance;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+@ApplicationScoped
+public class UserTaskInstanceVariableDataEventMerger implements UserTaskInstanceEventMerger {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(ProcessInstanceVariableDataEventMerger.class);
+
+ @Override
+ public boolean accept(Object event) {
+ return event instanceof UserTaskInstanceVariableDataEvent;
+ }
+
+ @Override
+ public UserTaskInstance merge(UserTaskInstance userTaskInstance, UserTaskInstanceDataEvent> data) {
+ UserTaskInstanceVariableDataEvent event = (UserTaskInstanceVariableDataEvent) data;
+ try {
+ UserTaskInstanceVariableEventBody body = event.getData();
+ ObjectMapper mapper = JsonUtils.getObjectMapper();
+ switch (body.getVariableType()) {
+ case "INPUT":
+ Map inVars = toMap(mapper, userTaskInstance.getInputs());
+ inVars.put(body.getVariableName(), body.getVariableValue());
+ userTaskInstance.setInputs(mapper.valueToTree(inVars));
+ break;
+ case "OUTPUT":
+ Map outVars = toMap(mapper, userTaskInstance.getOutputs());
+ outVars.put(body.getVariableName(), body.getVariableValue());
+ userTaskInstance.setOutputs(mapper.valueToTree(outVars));
+ }
+
+ } catch (JsonProcessingException e) {
+ LOGGER.error("error during unmarshalling variable instance", e);
+ } catch (IllegalArgumentException e) {
+ LOGGER.error("error during merging variable instance event", e);
+ }
+ return userTaskInstance;
+ }
+
+ @SuppressWarnings("unchecked")
+ private Map toMap(ObjectMapper mapper, ObjectNode node) throws JsonProcessingException, IllegalArgumentException {
+
+ Map variables = null;
+ if (node == null) {
+ variables = new HashMap<>();
+ } else {
+ variables = new HashMap<>(mapper.treeToValue(node, HashMap.class));
+
+ }
+ return variables;
+ }
+
+}
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/DataIndexParsingException.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/DataIndexParsingException.java
index 601b0e4279..8b4677aef7 100644
--- a/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/DataIndexParsingException.java
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/DataIndexParsingException.java
@@ -1,22 +1,27 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.json;
public class DataIndexParsingException extends RuntimeException {
+ private static final long serialVersionUID = 2205334685545385623L;
+
public DataIndexParsingException(String message, Throwable cause) {
super(message, cause);
}
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/JsonProcessInstanceDataEventDeserializer.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/JsonProcessInstanceDataEventDeserializer.java
new file mode 100644
index 0000000000..e60b3e4681
--- /dev/null
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/JsonProcessInstanceDataEventDeserializer.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.index.json;
+
+import java.io.IOException;
+
+import org.kie.kogito.event.process.ProcessInstanceDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceErrorDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceNodeDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceSLADataEvent;
+import org.kie.kogito.event.process.ProcessInstanceStateDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceVariableDataEvent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
+
+public class JsonProcessInstanceDataEventDeserializer extends StdDeserializer> {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(JsonProcessInstanceDataEventDeserializer.class);
+
+ private static final long serialVersionUID = 6152014726577574241L;
+
+ public JsonProcessInstanceDataEventDeserializer() {
+ this(null);
+ }
+
+ public JsonProcessInstanceDataEventDeserializer(Class> vc) {
+ super(vc);
+ }
+
+ @Override
+ public ProcessInstanceDataEvent> deserialize(JsonParser jp, DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+ JsonNode node = jp.getCodec().readTree(jp);
+ LOGGER.debug("Deserialize process instance data event: {}", node);
+ String type = node.get("type").asText();
+
+ switch (type) {
+ case "ProcessInstanceErrorDataEvent":
+ return (ProcessInstanceDataEvent>) jp.getCodec().treeToValue(node, ProcessInstanceErrorDataEvent.class);
+ case "ProcessInstanceNodeDataEvent":
+ return (ProcessInstanceDataEvent>) jp.getCodec().treeToValue(node, ProcessInstanceNodeDataEvent.class);
+ case "ProcessInstanceSLADataEvent":
+ return (ProcessInstanceDataEvent>) jp.getCodec().treeToValue(node, ProcessInstanceSLADataEvent.class);
+ case "ProcessInstanceStateDataEvent":
+ return (ProcessInstanceDataEvent>) jp.getCodec().treeToValue(node, ProcessInstanceStateDataEvent.class);
+ case "ProcessInstanceVariableDataEvent":
+ return (ProcessInstanceDataEvent>) jp.getCodec().treeToValue(node, ProcessInstanceVariableDataEvent.class);
+ default:
+ LOGGER.warn("Unknown type {} in json data {}", type, node);
+ return (ProcessInstanceDataEvent>) jp.getCodec().treeToValue(node, ProcessInstanceDataEvent.class);
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/JsonUserTaskInstanceDataEventDeserializer.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/JsonUserTaskInstanceDataEventDeserializer.java
new file mode 100644
index 0000000000..7aa0437f55
--- /dev/null
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/JsonUserTaskInstanceDataEventDeserializer.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.index.json;
+
+import java.io.IOException;
+
+import org.kie.kogito.event.usertask.UserTaskInstanceAssignmentDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceAttachmentDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceCommentDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceDeadlineDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceStateDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceVariableDataEvent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
+
+public class JsonUserTaskInstanceDataEventDeserializer extends StdDeserializer> {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(JsonUserTaskInstanceDataEventDeserializer.class);
+
+ private static final long serialVersionUID = -6626663191296012306L;
+
+ public JsonUserTaskInstanceDataEventDeserializer() {
+ this(null);
+ }
+
+ public JsonUserTaskInstanceDataEventDeserializer(Class> vc) {
+ super(vc);
+ }
+
+ @Override
+ public UserTaskInstanceDataEvent> deserialize(JsonParser jp, DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+ JsonNode node = jp.getCodec().readTree(jp);
+ LOGGER.debug("Deserialize user task instance data event: {}", node);
+ String type = node.get("type").asText();
+
+ switch (type) {
+ case "UserTaskInstanceAssignmentDataEvent":
+ return (UserTaskInstanceDataEvent>) jp.getCodec().treeToValue(node, UserTaskInstanceAssignmentDataEvent.class);
+ case "UserTaskInstanceAttachmentDataEvent":
+ return (UserTaskInstanceDataEvent>) jp.getCodec().treeToValue(node, UserTaskInstanceAttachmentDataEvent.class);
+ case "UserTaskInstanceCommentDataEvent":
+ return (UserTaskInstanceDataEvent>) jp.getCodec().treeToValue(node, UserTaskInstanceCommentDataEvent.class);
+ case "UserTaskInstanceDeadlineDataEvent":
+ return (UserTaskInstanceDataEvent>) jp.getCodec().treeToValue(node, UserTaskInstanceDeadlineDataEvent.class);
+ case "UserTaskInstanceStateDataEvent":
+ return (UserTaskInstanceDataEvent>) jp.getCodec().treeToValue(node, UserTaskInstanceStateDataEvent.class);
+ case "UserTaskInstanceVariableDataEvent":
+ return (UserTaskInstanceDataEvent>) jp.getCodec().treeToValue(node, UserTaskInstanceVariableDataEvent.class);
+ default:
+ LOGGER.warn("Unknown type {} in json data {}", type, node);
+ return (UserTaskInstanceDataEvent>) jp.getCodec().treeToValue(node, UserTaskInstanceDataEvent.class);
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/JsonUtils.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/JsonUtils.java
index c267f820d3..c1d6a4c8c0 100644
--- a/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/JsonUtils.java
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/JsonUtils.java
@@ -1,22 +1,29 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.json;
+import org.kie.kogito.event.process.ProcessInstanceDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
+
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import io.cloudevents.jackson.JsonFormat;
@@ -36,6 +43,11 @@ public static ObjectMapper configure(ObjectMapper objectMapper) {
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
objectMapper.registerModule(JsonFormat.getCloudEventJacksonModule());
objectMapper.registerModule(new JavaTimeModule());
+
+ SimpleModule module = new SimpleModule("Kogito Cloud Events");
+ module.addDeserializer(ProcessInstanceDataEvent.class, new JsonProcessInstanceDataEventDeserializer());
+ module.addDeserializer(UserTaskInstanceDataEvent.class, new JsonUserTaskInstanceDataEventDeserializer());
+ objectMapper.registerModule(module);
return objectMapper;
}
}
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/ObjectMapperProducer.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/ObjectMapperProducer.java
index 998101ea6c..cbe2a79ae2 100644
--- a/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/ObjectMapperProducer.java
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/json/ObjectMapperProducer.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.json;
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/service/DataIndexServiceException.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/service/DataIndexServiceException.java
index 4539cf88c5..20a57eaf95 100644
--- a/data-index/data-index-common/src/main/java/org/kie/kogito/index/service/DataIndexServiceException.java
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/service/DataIndexServiceException.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service;
diff --git a/data-index/data-index-common/src/main/java/org/kie/kogito/index/service/IndexingService.java b/data-index/data-index-common/src/main/java/org/kie/kogito/index/service/IndexingService.java
index 828a5adbc5..cafcab8789 100644
--- a/data-index/data-index-common/src/main/java/org/kie/kogito/index/service/IndexingService.java
+++ b/data-index/data-index-common/src/main/java/org/kie/kogito/index/service/IndexingService.java
@@ -1,27 +1,43 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.ConcurrentModificationException;
+import java.util.Iterator;
import java.util.List;
+import java.util.Map;
+import java.util.Optional;
import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Instance;
import javax.inject.Inject;
+import org.eclipse.microprofile.faulttolerance.Retry;
+import org.kie.kogito.event.process.ProcessDefinitionDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
+import org.kie.kogito.index.event.mapper.ProcessDefinitionEventMerger;
+import org.kie.kogito.index.event.mapper.ProcessInstanceEventMerger;
+import org.kie.kogito.index.event.mapper.UserTaskInstanceEventMerger;
import org.kie.kogito.index.model.Job;
-import org.kie.kogito.index.model.NodeInstance;
import org.kie.kogito.index.model.ProcessDefinition;
import org.kie.kogito.index.model.ProcessInstance;
import org.kie.kogito.index.model.UserTaskInstance;
@@ -34,7 +50,6 @@
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
-import static java.util.stream.Collectors.toList;
import static org.kie.kogito.index.json.JsonUtils.getObjectMapper;
import static org.kie.kogito.index.storage.Constants.ID;
import static org.kie.kogito.index.storage.Constants.KOGITO_DOMAIN_ATTRIBUTE;
@@ -51,100 +66,235 @@ public class IndexingService {
@Inject
DataIndexStorageService manager;
- public void indexProcessInstance(ProcessInstance pi) {
- ProcessInstance previousPI = manager.getProcessInstancesCache().get(pi.getId());
- if (previousPI != null) {
- List nodes = previousPI.getNodes().stream().filter(n -> !pi.getNodes().contains(n)).collect(toList());
- pi.getNodes().addAll(nodes);
+ @Inject
+ Instance processInstanceMergers;
+
+ @Inject
+ Instance userTaskInstanceMergers;
+
+ @Inject
+ ProcessDefinitionEventMerger processDefinitionEventMerger;
+
+ //retry in case of rare but possible race condition during the insert for the first registry
+ @Retry(maxRetries = 3, delay = 300, jitter = 100, retryOn = ConcurrentModificationException.class)
+ public void indexProcessInstanceEvent(ProcessInstanceDataEvent> event) {
+ handleProcessInstanceEvent(event);
+ }
+
+ private ProcessInstance handleProcessInstanceEvent(ProcessInstanceDataEvent> event) {
+ Optional found = Optional.ofNullable(manager.getProcessInstancesCache().get(event.getKogitoProcessInstanceId()));
+ ProcessInstance pi;
+ if (found.isEmpty()) {
+ pi = new ProcessInstance();
+ pi.setId(event.getKogitoProcessInstanceId());
+ pi.setProcessId(event.getKogitoProcessId());
+ pi.setMilestones(new ArrayList<>());
+ pi.setNodes(new ArrayList<>());
} else {
- pi.setCreatedBy(pi.getUpdatedBy());
- }
- ProcessDefinition definition = pi.getDefinition();
- if (!manager.getProcessDefinitionsCache().containsKey(definition.getKey())) {
- manager.getProcessDefinitionsCache().put(definition.getKey(), definition);
+ pi = found.get();
+
}
+ processInstanceMergers.stream().filter(e -> e.accept(event)).findAny().ifPresent(e -> e.merge(pi, event));
+
manager.getProcessInstancesCache().put(pi.getId(), pi);
+
+ LOGGER.debug("Stored Process Instance: {}", pi);
+
+ return pi;
}
- public void indexJob(Job job) {
- manager.getJobsCache().put(job.getId(), job);
+ //retry in case of rare but possible race condition during the insert for the first registry
+ @Retry(maxRetries = 3, delay = 300, jitter = 100, retryOn = ConcurrentModificationException.class)
+ public void indexProcessDefinition(ProcessDefinitionDataEvent definitionDataEvent) {
+ if (!processDefinitionEventMerger.accept(definitionDataEvent)) {
+ return;
+ }
+ ProcessDefinition current = manager.getProcessDefinitionsCache().get(ProcessDefinition.toKey(definitionDataEvent.getKogitoProcessId(), definitionDataEvent.getData().getVersion()));
+ ProcessDefinition definition = processDefinitionEventMerger.merge(current, definitionDataEvent);
+ manager.getProcessDefinitionsCache().put(definition.getKey(), definition);
}
- public void indexUserTaskInstance(UserTaskInstance ut) {
+ //retry in case of rare but possible race condition during the insert for the first registry
+ @Retry(maxRetries = 3, delay = 300, jitter = 100, retryOn = ConcurrentModificationException.class)
+ public void indexUserTaskInstanceEvent(UserTaskInstanceDataEvent event) {
+ Optional found = Optional.ofNullable(manager.getUserTaskInstancesCache().get(event.getKogitoUserTaskInstanceId()));
+ UserTaskInstance ut;
+ if (found.isEmpty()) {
+ ut = new UserTaskInstance();
+ ut.setId(event.getKogitoUserTaskInstanceId());
+ ut.setAttachments(new ArrayList<>());
+ ut.setComments(new ArrayList<>());
+ } else {
+ ut = found.get();
+ }
+
+ userTaskInstanceMergers.stream().filter(e -> e.accept(event)).findAny().ifPresent(e -> e.merge(ut, event));
+ LOGGER.debug("Stored User Task Instance: {}", ut);
+
manager.getUserTaskInstancesCache().put(ut.getId(), ut);
}
- public void indexModel(ObjectNode json) {
- String processId = json.remove(PROCESS_ID).asText();
+ public void indexJob(Job job) {
+ manager.getJobsCache().put(job.getId(), job);
+ }
+
+ public void indexModel(ObjectNode updateData) {
+ String processId = updateData.remove(PROCESS_ID).asText();
Storage cache = manager.getDomainModelCache(processId);
+
if (cache == null) {
- // Unknown process type, ignore
LOGGER.debug("Ignoring Kogito cloud event for unknown process: {}", processId);
return;
}
- String processInstanceId = json.get(ID).asText();
+ String processInstanceId = updateData.get(ID).asText();
String type = cache.getRootType();
- ObjectNode model = cache.get(processInstanceId);
- ObjectNode builder = getObjectMapper().createObjectNode();
- builder.put("_type", type);
- if (model == null) {
- builder.setAll(json);
- } else {
- copyAllEventData(json, processInstanceId, model, builder);
- ObjectNode kogito = indexKogitoDomain((ObjectNode) json.get(KOGITO_DOMAIN_ATTRIBUTE), (ObjectNode) model.get(KOGITO_DOMAIN_ATTRIBUTE));
- builder.set(KOGITO_DOMAIN_ATTRIBUTE, kogito);
+ ObjectNode persistedModel = Optional.ofNullable(cache.get(processInstanceId)).orElse(getObjectMapper().createObjectNode());
+
+ LOGGER.debug("About to update model \n{}\n with data {}", persistedModel, updateData);
+ ObjectNode newModel = merge(processId, type, processInstanceId, persistedModel, updateData);
+
+ LOGGER.debug("Merged model\n{}\n for {} and id {}", newModel, processId, processInstanceId);
+ cache.put(processInstanceId, newModel);
+ }
+
+ private ObjectNode merge(String processId, String type, String processInstanceId, ObjectNode persistedModel, ObjectNode updateData) {
+ ObjectNode newModel = getObjectMapper().createObjectNode();
+ newModel.put("_type", type);
+ newModel.setAll(persistedModel);
+ newModel.put(ID, processInstanceId);
+ // copy variables
+ copyFieldsExcept(newModel, updateData, ID, PROCESS_ID, KOGITO_DOMAIN_ATTRIBUTE);
+
+ // now merge metadata
+ mergeMetadata(newModel, updateData);
+
+ return newModel;
+ }
+
+ private void mergeMetadata(ObjectNode newModel, ObjectNode updateData) {
+ if (!updateData.has(KOGITO_DOMAIN_ATTRIBUTE)) {
+ // nothing to merge
+ return;
}
- cache.put(processInstanceId, builder);
+
+ if (!newModel.has(KOGITO_DOMAIN_ATTRIBUTE)) {
+ newModel.set(KOGITO_DOMAIN_ATTRIBUTE, updateData.get(KOGITO_DOMAIN_ATTRIBUTE));
+ return;
+ }
+
+ mergeProcessInstance((ObjectNode) newModel.get(KOGITO_DOMAIN_ATTRIBUTE), (ObjectNode) updateData.get(KOGITO_DOMAIN_ATTRIBUTE));
+ mergeUserTaskInstance((ObjectNode) newModel.get(KOGITO_DOMAIN_ATTRIBUTE), (ObjectNode) updateData.get(KOGITO_DOMAIN_ATTRIBUTE));
+
}
- private void copyAllEventData(ObjectNode json, String processInstanceId, ObjectNode model, ObjectNode builder) {
- ArrayNode indexPIArray = (ArrayNode) json.get(KOGITO_DOMAIN_ATTRIBUTE).get(PROCESS_INSTANCES_DOMAIN_ATTRIBUTE);
- if (indexPIArray == null) {
- builder.setAll(model);
- } else {
- JsonNode id = indexPIArray.get(0).get(ID);
- if (!processInstanceId.equals(id.asText())) {
- //For sub-process merge with current values
- builder.setAll(model);
+ private void copyFieldsExcept(ObjectNode newModel, ObjectNode updateData, String... exceptions) {
+ List nonVars = Arrays.asList(exceptions);
+ Iterator> iterator = updateData.fields();
+ while (iterator.hasNext()) {
+ Map.Entry element = iterator.next();
+ JsonNode node = element.getValue();
+ String key = element.getKey();
+ if (!nonVars.contains(key)) {
+ newModel.set(key, node);
}
- builder.setAll(json);
}
}
- private ObjectNode indexKogitoDomain(ObjectNode kogitoEvent, ObjectNode kogitoCache) {
- ObjectNode kogitoBuilder = getObjectMapper().createObjectNode();
- kogitoBuilder.set(LAST_UPDATE, kogitoEvent.get(LAST_UPDATE));
+ private void mergeUserTaskInstance(ObjectNode newModel, ObjectNode updateData) {
+ if (!updateData.has(USER_TASK_INSTANCES_DOMAIN_ATTRIBUTE)) {
+ return;
+ }
- ArrayNode indexPIArray = (ArrayNode) kogitoEvent.get(PROCESS_INSTANCES_DOMAIN_ATTRIBUTE);
- if (indexPIArray != null) {
- kogitoBuilder.set(PROCESS_INSTANCES_DOMAIN_ATTRIBUTE, copyToArray(kogitoCache.get(PROCESS_INSTANCES_DOMAIN_ATTRIBUTE), indexPIArray));
- kogitoBuilder.set(USER_TASK_INSTANCES_DOMAIN_ATTRIBUTE, kogitoCache.get(USER_TASK_INSTANCES_DOMAIN_ATTRIBUTE));
+ if (!newModel.has(USER_TASK_INSTANCES_DOMAIN_ATTRIBUTE)) {
+ newModel.set(USER_TASK_INSTANCES_DOMAIN_ATTRIBUTE, updateData.get(USER_TASK_INSTANCES_DOMAIN_ATTRIBUTE));
+ return;
}
+ newModel.set(LAST_UPDATE, updateData.get(LAST_UPDATE));
+
+ ArrayNode currentUserTaskModel = (ArrayNode) newModel.get(USER_TASK_INSTANCES_DOMAIN_ATTRIBUTE);
+ ArrayNode updateUserTasks = (ArrayNode) updateData.get(USER_TASK_INSTANCES_DOMAIN_ATTRIBUTE);
- ArrayNode indexTIArray = (ArrayNode) kogitoEvent.get(USER_TASK_INSTANCES_DOMAIN_ATTRIBUTE);
- if (indexTIArray != null) {
- kogitoBuilder.set(USER_TASK_INSTANCES_DOMAIN_ATTRIBUTE, copyToArray(kogitoCache.get(USER_TASK_INSTANCES_DOMAIN_ATTRIBUTE), indexTIArray));
- kogitoBuilder.set(PROCESS_INSTANCES_DOMAIN_ATTRIBUTE, kogitoCache.get(PROCESS_INSTANCES_DOMAIN_ATTRIBUTE));
+ ArrayNode newArrayNode = getObjectMapper().createArrayNode();
+ newArrayNode.addAll(currentUserTaskModel);
+ for (int i = 0; i < updateUserTasks.size(); i++) {
+ String indexId = updateUserTasks.get(i).get(ID).asText();
+ boolean found = false;
+ for (int j = 0; j < currentUserTaskModel.size(); j++) {
+ String currentIndexId = currentUserTaskModel.get(j).get(ID).asText();
+ if (indexId.equals(currentIndexId)) {
+ ObjectNode currentNode = (ObjectNode) newArrayNode.get(j);
+ ObjectNode updateNode = ((ObjectNode) updateUserTasks.get(i));
+ copyFieldsExcept(currentNode, updateNode, "comments", "attachments");
+ mergeFieldArray("comments", currentNode, updateNode);
+ mergeFieldArray("attachments", currentNode, updateNode);
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ newArrayNode.add(updateUserTasks.get(i));
+ }
}
- return kogitoBuilder;
+ newModel.set(USER_TASK_INSTANCES_DOMAIN_ATTRIBUTE, newArrayNode);
+ return;
}
- private ArrayNode copyToArray(JsonNode arrayCache, ArrayNode arrayEvent) {
- if (arrayCache == null || arrayCache.isNull()) {
- return getObjectMapper().createArrayNode().add(arrayEvent.get(0));
+ private void mergeFieldArray(String field, ObjectNode newModel, ObjectNode updateData) {
+ if (!updateData.has(field) || (updateData.has(field) && updateData.get(field).isNull())) {
+ return;
}
- ArrayNode arrayNode = (ArrayNode) arrayCache;
- String indexId = arrayEvent.get(0).get(ID).asText();
- for (int i = 0; i < arrayCache.size(); i++) {
- if (indexId.equals(arrayCache.get(i).get(ID).asText())) {
- arrayNode.set(i, arrayEvent.get(0));
- return arrayNode;
+
+ if (!newModel.has(field) || (newModel.has(field) && newModel.get(field).isNull())) {
+ newModel.set(field, updateData.get(field));
+ return;
+ }
+
+ newModel.set(field, mergeArray((ArrayNode) newModel.get(field), (ArrayNode) updateData.get(field)));
+
+ }
+
+ private ObjectNode mergeProcessInstance(ObjectNode newModel, ObjectNode updateData) {
+ if (!updateData.has(PROCESS_INSTANCES_DOMAIN_ATTRIBUTE)) {
+ return newModel;
+ }
+
+ if (!newModel.has(PROCESS_INSTANCES_DOMAIN_ATTRIBUTE)) {
+ newModel.set(PROCESS_INSTANCES_DOMAIN_ATTRIBUTE, updateData.get(PROCESS_INSTANCES_DOMAIN_ATTRIBUTE));
+ return newModel;
+ }
+
+ newModel.set(PROCESS_INSTANCES_DOMAIN_ATTRIBUTE, mergeArray((ArrayNode) newModel.get(PROCESS_INSTANCES_DOMAIN_ATTRIBUTE), (ArrayNode) updateData.get(PROCESS_INSTANCES_DOMAIN_ATTRIBUTE)));
+ return newModel;
+ }
+
+ private ArrayNode mergeArray(ArrayNode newModel, ArrayNode updateData) {
+ ArrayNode newArrayNode = getObjectMapper().createArrayNode();
+ newArrayNode.addAll(newModel);
+ for (int i = 0; i < updateData.size(); i++) {
+ String indexId = updateData.get(i).get(ID).asText();
+ boolean found = false;
+ for (int j = 0; j < newModel.size(); j++) {
+ String currentIndexId = newModel.get(j).get(ID).asText();
+ if (indexId.equals(currentIndexId)) {
+ ((ObjectNode) newArrayNode.get(j)).setAll((ObjectNode) updateData.get(i));
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ newArrayNode.add(updateData.get(i));
+ }
+ }
+
+ Iterator iterator = newArrayNode.iterator();
+ while (iterator.hasNext()) {
+ if (iterator.next().has("remove")) {
+ iterator.remove();
}
}
- arrayNode.add(arrayEvent.get(0));
- return arrayNode;
+ return newArrayNode;
}
}
diff --git a/data-index/data-index-common/src/main/resources/META-INF/beans.xml b/data-index/data-index-common/src/main/resources/META-INF/beans.xml
index e69de29bb2..a0eb9fbf8c 100644
--- a/data-index/data-index-common/src/main/resources/META-INF/beans.xml
+++ b/data-index/data-index-common/src/main/resources/META-INF/beans.xml
@@ -0,0 +1,20 @@
+
diff --git a/data-index/data-index-common/src/test/java/org/kie/kogito/index/event/DataEventDeserializerTest.java b/data-index/data-index-common/src/test/java/org/kie/kogito/index/event/DataEventDeserializerTest.java
new file mode 100644
index 0000000000..03f4625fc4
--- /dev/null
+++ b/data-index/data-index-common/src/test/java/org/kie/kogito/index/event/DataEventDeserializerTest.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.index.event;
+
+import java.io.IOException;
+import java.util.HashMap;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestInstance;
+import org.junit.jupiter.api.TestInstance.Lifecycle;
+import org.kie.kogito.event.process.ProcessInstanceDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceStateDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceStateEventBody;
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceStateDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceStateEventBody;
+import org.kie.kogito.index.json.JsonUtils;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+@TestInstance(Lifecycle.PER_CLASS)
+public class DataEventDeserializerTest {
+
+ private ObjectMapper mapper;
+
+ @BeforeAll
+
+ public void beforeAll() {
+ mapper = new ObjectMapper();
+ JsonUtils.configure(mapper);
+ }
+
+ @Test
+ public void testProcessInstanceDataEvent() throws IOException {
+ ProcessInstanceStateDataEvent dataEvent = new ProcessInstanceStateDataEvent("source", "addons", "identity", new HashMap<>(), new ProcessInstanceStateEventBody());
+
+ String jsonValue = mapper.writeValueAsString(dataEvent);
+ ProcessInstanceDataEvent> readDataEvent = mapper.readValue(jsonValue.getBytes(), ProcessInstanceDataEvent.class);
+ Assertions.assertEquals(readDataEvent, dataEvent);
+
+ }
+
+ @Test
+ public void testUserTaskInstanceDataEvent() throws IOException {
+ UserTaskInstanceStateDataEvent dataEvent = new UserTaskInstanceStateDataEvent("source", "addons", "identity", new HashMap<>(), new UserTaskInstanceStateEventBody());
+
+ String jsonValue = mapper.writeValueAsString(dataEvent);
+ UserTaskInstanceDataEvent> readDataEvent = mapper.readValue(jsonValue.getBytes(), UserTaskInstanceDataEvent.class);
+ Assertions.assertEquals(readDataEvent, dataEvent);
+
+ }
+
+}
diff --git a/data-index/data-index-common/src/test/java/org/kie/kogito/index/event/UserTaskInstanceEventMapperTest.java b/data-index/data-index-common/src/test/java/org/kie/kogito/index/event/UserTaskInstanceEventMapperTest.java
index 58de275f31..d60fd2a974 100644
--- a/data-index/data-index-common/src/test/java/org/kie/kogito/index/event/UserTaskInstanceEventMapperTest.java
+++ b/data-index/data-index-common/src/test/java/org/kie/kogito/index/event/UserTaskInstanceEventMapperTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.event;
import java.net.URI;
@@ -23,13 +25,14 @@
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
+import org.kie.kogito.index.event.mapper.UserTaskInstanceStateEventMerger;
import static java.lang.String.format;
import static org.assertj.core.api.Assertions.assertThat;
class UserTaskInstanceEventMapperTest {
- private UserTaskInstanceEventMapper mapper = new UserTaskInstanceEventMapper();
+ private UserTaskInstanceStateEventMerger mapper = new UserTaskInstanceStateEventMerger();
private static Stream provideEndpoint() {
String pId = UUID.randomUUID().toString();
diff --git a/data-index/data-index-common/src/test/java/org/kie/kogito/index/event/mapper/ProcessInstanceNodeDataEventMergerTest.java b/data-index/data-index-common/src/test/java/org/kie/kogito/index/event/mapper/ProcessInstanceNodeDataEventMergerTest.java
new file mode 100644
index 0000000000..331376590c
--- /dev/null
+++ b/data-index/data-index-common/src/test/java/org/kie/kogito/index/event/mapper/ProcessInstanceNodeDataEventMergerTest.java
@@ -0,0 +1,115 @@
+package org.kie.kogito.index.event.mapper;
+
+import java.time.ZonedDateTime;
+import java.util.Date;
+import java.util.HashMap;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestInstance;
+import org.kie.kogito.event.process.ProcessInstanceNodeDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceNodeEventBody;
+import org.kie.kogito.index.model.NodeInstance;
+import org.kie.kogito.index.model.ProcessInstance;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.kie.kogito.event.process.ProcessInstanceNodeEventBody.EVENT_TYPE_ENTER;
+import static org.kie.kogito.event.process.ProcessInstanceNodeEventBody.EVENT_TYPE_EXIT;
+import static org.kie.kogito.index.DateTimeUtils.toZonedDateTime;
+
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
+public class ProcessInstanceNodeDataEventMergerTest {
+
+ private static final String HIRING_PROCESS_ID = "hiring";
+ private static final String PROCESS_INSTANCE_ID = "7b8ea46e-ffe7-4fdd-8cf5-72a3f0353947";
+
+ private static final String START_NODE_INSTANCE_ID = "35d525eb-868a-4056-91cc-dbc3804d157c";
+ private static final String START = "Start";
+ private static final String START_NODE_DEFINITION_ID = "_1639F738-45F3-4CD6-A80E-CCEBAA605D56";
+ private static final String START_NODE_TYPE = "StartNode";
+
+ private static final String ACTION_NODE_INSTANCE_ID = "08ee9c9c-cf67-47e5-a7e6-901a6f556c0a";
+ private static final String ACTION_NODE = "New Hiring";
+ private static final String ACTION_NODE_DEFINITION_ID = "_5BDBE48C-CC83-46A9-9D56-F846F8FC1045";
+ private static final String ACTION_NODE_TYPE = "ActionNode";
+
+ private static final String BOUNDARY_EVENT_NODE_INSTANCE_ID = "f22510d2-e0e5-460a-901e-494cda3dea26";
+ private static final String BOUNDARY_EVENT_NODE_NODE = "BoundaryEvent";
+ private static final String BOUNDARY_EVENT_NODE_NODE_DEFINITION_ID = "_116F3C54-A10E-4952-9E08-1CACE74CED0B";
+ private static final String BOUNDARY_EVENT_NODE_NODE_TYPE = "BoundaryEventNode";
+
+ private ProcessInstanceNodeDataEventMerger merger;
+ private ProcessInstance pi;
+
+ @BeforeEach
+ public void setup() {
+ merger = new ProcessInstanceNodeDataEventMerger();
+ pi = new ProcessInstance();
+ pi.setProcessId(HIRING_PROCESS_ID);
+ pi.setProcessName(HIRING_PROCESS_ID);
+ pi.setId(PROCESS_INSTANCE_ID);
+ pi.setVersion("1.0");
+ pi.setStart(ZonedDateTime.now());
+ pi.setState(1);
+ }
+
+ @Test
+ public void testMergeProcessInstanceNodeDataEvents() {
+ ProcessInstanceNodeDataEvent startNodeEnter = buildNodeEvent(START_NODE_INSTANCE_ID, START, START_NODE_DEFINITION_ID, START_NODE_TYPE, EVENT_TYPE_ENTER);
+
+ merger.merge(pi, startNodeEnter);
+
+ ProcessInstanceNodeDataEvent startNodeExit = buildNodeEvent(START_NODE_INSTANCE_ID, START, START_NODE_DEFINITION_ID, START_NODE_TYPE, EVENT_TYPE_EXIT);
+
+ merger.merge(pi, startNodeExit);
+
+ ProcessInstanceNodeDataEvent actionNodeEnter = buildNodeEvent(ACTION_NODE_INSTANCE_ID, ACTION_NODE, ACTION_NODE_DEFINITION_ID, ACTION_NODE_TYPE, EVENT_TYPE_ENTER);
+
+ merger.merge(pi, actionNodeEnter);
+
+ ProcessInstanceNodeDataEvent actionNodeExit = buildNodeEvent(ACTION_NODE_INSTANCE_ID, ACTION_NODE, ACTION_NODE_DEFINITION_ID, ACTION_NODE_TYPE, EVENT_TYPE_EXIT);
+
+ merger.merge(pi, actionNodeExit);
+
+ assertThat(pi.getNodes()).hasSize(2);
+
+ verifyNode(pi.getNodes().get(0), startNodeEnter.getData(), startNodeEnter.getData().getEventDate(), startNodeExit.getData().getEventDate());
+ verifyNode(pi.getNodes().get(1), actionNodeEnter.getData(), actionNodeEnter.getData().getEventDate(), actionNodeExit.getData().getEventDate());
+ }
+
+ @Test
+ public void testMergeBoundaryNodeExitEvent() {
+ ProcessInstanceNodeDataEvent boundaryEvent =
+ buildNodeEvent(BOUNDARY_EVENT_NODE_INSTANCE_ID, BOUNDARY_EVENT_NODE_NODE, BOUNDARY_EVENT_NODE_NODE_DEFINITION_ID, BOUNDARY_EVENT_NODE_NODE_TYPE, EVENT_TYPE_EXIT);
+
+ merger.merge(pi, boundaryEvent);
+
+ assertThat(pi.getNodes()).hasSize(1);
+
+ verifyNode(pi.getNodes().get(0), boundaryEvent.getData(), boundaryEvent.getData().getEventDate(), boundaryEvent.getData().getEventDate());
+ }
+
+ private void verifyNode(NodeInstance nodeInstance, ProcessInstanceNodeEventBody eventBody, Date enter, Date exit) {
+ assertThat(nodeInstance)
+ .hasFieldOrPropertyWithValue("id", eventBody.getNodeInstanceId())
+ .hasFieldOrPropertyWithValue("nodeId", eventBody.getNodeDefinitionId())
+ .hasFieldOrPropertyWithValue("definitionId", eventBody.getNodeDefinitionId())
+ .hasFieldOrPropertyWithValue("name", eventBody.getNodeName())
+ .hasFieldOrPropertyWithValue("type", eventBody.getNodeType())
+ .hasFieldOrPropertyWithValue("enter", toZonedDateTime(enter))
+ .hasFieldOrPropertyWithValue("exit", toZonedDateTime(exit));
+ }
+
+ private ProcessInstanceNodeDataEvent buildNodeEvent(String nodeInstanceId, String nodeName, String nodeDefinitionId, String nodeType, Integer eventType) {
+ return new ProcessInstanceNodeDataEvent(HIRING_PROCESS_ID, "", "", new HashMap<>(), ProcessInstanceNodeEventBody.create()
+ .processId(HIRING_PROCESS_ID)
+ .processInstanceId(PROCESS_INSTANCE_ID)
+ .nodeInstanceId(nodeInstanceId)
+ .nodeName(nodeName)
+ .nodeDefinitionId(nodeDefinitionId)
+ .nodeType(nodeType)
+ .eventDate(new Date())
+ .eventType(eventType)
+ .build());
+ }
+}
diff --git a/data-index/data-index-graphql/pom.xml b/data-index/data-index-graphql/pom.xml
index 797ebdaf95..21cb9eeb0b 100644
--- a/data-index/data-index-graphql/pom.xml
+++ b/data-index/data-index-graphql/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/AbstractGraphQLSchemaManager.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/AbstractGraphQLSchemaManager.java
index d41fbae9d9..e6a97e630e 100644
--- a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/AbstractGraphQLSchemaManager.java
+++ b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/AbstractGraphQLSchemaManager.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.graphql;
@@ -140,6 +143,9 @@ public ProcessDefinition getProcessDefinition(DataFetchingEnvironment env) {
protected String getServiceUrl(String endpoint, String processId) {
LOGGER.debug("Process endpoint {}", endpoint);
+ if (endpoint == null) {
+ return null;
+ }
if (endpoint.startsWith("/")) {
LOGGER.warn("Process '{}' endpoint '{}', does not contain full URL, please review the kogito.service.url system property to point the public URL for this runtime.",
processId, endpoint);
@@ -154,7 +160,7 @@ protected String getServiceUrl(String endpoint, String processId) {
}
private String getContext(String processId) {
- return processId.contains(".") ? processId.substring(processId.lastIndexOf('.') + 1) : processId;
+ return processId != null && processId.contains(".") ? processId.substring(processId.lastIndexOf('.') + 1) : processId;
}
protected Collection getChildProcessInstancesValues(DataFetchingEnvironment env) {
diff --git a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/DateTimeCoercing.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/DateTimeCoercing.java
index cc56352263..3b72407932 100644
--- a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/DateTimeCoercing.java
+++ b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/DateTimeCoercing.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.graphql;
import graphql.schema.Coercing;
diff --git a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/DefaultDateTimeCoercing.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/DefaultDateTimeCoercing.java
index 6db75dc9bc..b1c09be8c6 100644
--- a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/DefaultDateTimeCoercing.java
+++ b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/DefaultDateTimeCoercing.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.graphql;
import java.time.DateTimeException;
diff --git a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLInstrumentation.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLInstrumentation.java
index 9c23020dd5..d1d427515d 100644
--- a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLInstrumentation.java
+++ b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLInstrumentation.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.graphql;
diff --git a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLObjectTypeMapper.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLObjectTypeMapper.java
index b981b756e5..947cdfdb88 100644
--- a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLObjectTypeMapper.java
+++ b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLObjectTypeMapper.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.graphql;
diff --git a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLProducer.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLProducer.java
index b375c98529..baaf75cbbb 100644
--- a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLProducer.java
+++ b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLProducer.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.graphql;
diff --git a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLScalarTypeProducer.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLScalarTypeProducer.java
index abcdc85250..3d4ef5377c 100644
--- a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLScalarTypeProducer.java
+++ b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLScalarTypeProducer.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.graphql;
diff --git a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLSchemaManager.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLSchemaManager.java
index a471621913..76c203df9e 100644
--- a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLSchemaManager.java
+++ b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/GraphQLSchemaManager.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.graphql;
import java.util.function.Consumer;
diff --git a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/JsonPropertyDataFetcher.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/JsonPropertyDataFetcher.java
index fb27c8c1dd..ff21c10852 100644
--- a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/JsonPropertyDataFetcher.java
+++ b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/JsonPropertyDataFetcher.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.graphql;
diff --git a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/OracleDateTimeCoercing.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/OracleDateTimeCoercing.java
index 10e1e44da2..c8dad32013 100644
--- a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/OracleDateTimeCoercing.java
+++ b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/OracleDateTimeCoercing.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.graphql;
import java.time.ZonedDateTime;
diff --git a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/PostgreSqlDateTimeCoercing.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/PostgreSqlDateTimeCoercing.java
index 2fa0e148d0..4c12f8458a 100644
--- a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/PostgreSqlDateTimeCoercing.java
+++ b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/PostgreSqlDateTimeCoercing.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.graphql;
import java.time.ZonedDateTime;
diff --git a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/AbstractInputObjectTypeMapper.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/AbstractInputObjectTypeMapper.java
index 7f4a641787..9543079a6a 100644
--- a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/AbstractInputObjectTypeMapper.java
+++ b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/AbstractInputObjectTypeMapper.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.graphql.query;
diff --git a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLInputObjectTypeMapper.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLInputObjectTypeMapper.java
index dad768a9f2..92d08f4dbd 100644
--- a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLInputObjectTypeMapper.java
+++ b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLInputObjectTypeMapper.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.graphql.query;
diff --git a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLOrderByTypeMapper.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLOrderByTypeMapper.java
index 958781afe1..924093f319 100644
--- a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLOrderByTypeMapper.java
+++ b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLOrderByTypeMapper.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.graphql.query;
diff --git a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryMapper.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryMapper.java
index fab5af3471..20a333d5b0 100644
--- a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryMapper.java
+++ b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryMapper.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.graphql.query;
diff --git a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryOrderByParser.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryOrderByParser.java
index edefa837a5..b9fc2ee3aa 100644
--- a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryOrderByParser.java
+++ b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryOrderByParser.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.graphql.query;
diff --git a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryParser.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryParser.java
index 6b5ef5bfd3..cb4f020107 100644
--- a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryParser.java
+++ b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryParser.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.graphql.query;
diff --git a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryParserRegistry.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryParserRegistry.java
index 6e201e8e74..77d3faaacb 100644
--- a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryParserRegistry.java
+++ b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/graphql/query/GraphQLQueryParserRegistry.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.graphql.query;
diff --git a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/vertx/BlockingGraphqlRouterProducer.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/vertx/BlockingGraphqlRouterProducer.java
index 3008c56ae5..762a69d7bd 100644
--- a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/vertx/BlockingGraphqlRouterProducer.java
+++ b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/vertx/BlockingGraphqlRouterProducer.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.vertx;
diff --git a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/vertx/ReactiveGraphqlRouterProducer.java b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/vertx/ReactiveGraphqlRouterProducer.java
index f4c030201d..6707ec9107 100644
--- a/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/vertx/ReactiveGraphqlRouterProducer.java
+++ b/data-index/data-index-graphql/src/main/java/org/kie/kogito/index/vertx/ReactiveGraphqlRouterProducer.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.vertx;
diff --git a/data-index/data-index-graphql/src/main/resources/META-INF/beans.xml b/data-index/data-index-graphql/src/main/resources/META-INF/beans.xml
index e69de29bb2..a0eb9fbf8c 100644
--- a/data-index/data-index-graphql/src/main/resources/META-INF/beans.xml
+++ b/data-index/data-index-graphql/src/main/resources/META-INF/beans.xml
@@ -0,0 +1,20 @@
+
diff --git a/data-index/data-index-graphql/src/main/resources/basic.schema.graphqls b/data-index/data-index-graphql/src/main/resources/basic.schema.graphqls
index 74d90e2545..4e6f30b764 100644
--- a/data-index/data-index-graphql/src/main/resources/basic.schema.graphqls
+++ b/data-index/data-index-graphql/src/main/resources/basic.schema.graphqls
@@ -44,8 +44,11 @@ type ProcessDefinition {
addons: [String!]
roles: [String!]
type: String
- endpoint: String!
+ endpoint: String
serviceUrl: String
+ description: String
+ annotations: [String]
+ metadata: JSON
}
input ProcessDefinitionOrderBy {
@@ -72,13 +75,13 @@ type ProcessInstance {
rootProcessInstanceId: String
rootProcessId: String
roles: [String!]
- state: ProcessInstanceState!
+ state: ProcessInstanceState
endpoint: String!
serviceUrl: String
- nodes: [NodeInstance!]!
+ nodes: [NodeInstance!]
milestones: [Milestone!]
variables: JSON
- start: DateTime!
+ start: DateTime
end: DateTime
parentProcessInstance: ProcessInstance
childProcessInstances: [ProcessInstance!]
@@ -345,15 +348,15 @@ type UserTaskInstance {
name: String
priority: String
processInstanceId: String!
- processId: String!
+ processId: String
rootProcessInstanceId: String
rootProcessId: String
- state: String!
+ state: String
actualOwner: String
adminGroups: [String!]
adminUsers: [String!]
completed: DateTime
- started: DateTime!
+ started: DateTime
excludedUsers: [String!]
potentialGroups: [String!]
potentialUsers: [String!]
diff --git a/data-index/data-index-graphql/src/test/java/org/kie/kogito/index/graphql/DateTimeScalarTypeProducerTest.java b/data-index/data-index-graphql/src/test/java/org/kie/kogito/index/graphql/DateTimeScalarTypeProducerTest.java
index eefece2bcc..224e45fce3 100644
--- a/data-index/data-index-graphql/src/test/java/org/kie/kogito/index/graphql/DateTimeScalarTypeProducerTest.java
+++ b/data-index/data-index-graphql/src/test/java/org/kie/kogito/index/graphql/DateTimeScalarTypeProducerTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.graphql;
import org.junit.jupiter.api.Test;
diff --git a/data-index/data-index-graphql/src/test/java/org/kie/kogito/index/graphql/DefaultDateTimeCoercingTest.java b/data-index/data-index-graphql/src/test/java/org/kie/kogito/index/graphql/DefaultDateTimeCoercingTest.java
index fa26faa8c7..46aa657512 100644
--- a/data-index/data-index-graphql/src/test/java/org/kie/kogito/index/graphql/DefaultDateTimeCoercingTest.java
+++ b/data-index/data-index-graphql/src/test/java/org/kie/kogito/index/graphql/DefaultDateTimeCoercingTest.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.graphql;
diff --git a/data-index/data-index-graphql/src/test/java/org/kie/kogito/index/graphql/JsonPropertyDataFetcherTest.java b/data-index/data-index-graphql/src/test/java/org/kie/kogito/index/graphql/JsonPropertyDataFetcherTest.java
index 623f19abbb..c1840a4c5c 100644
--- a/data-index/data-index-graphql/src/test/java/org/kie/kogito/index/graphql/JsonPropertyDataFetcherTest.java
+++ b/data-index/data-index-graphql/src/test/java/org/kie/kogito/index/graphql/JsonPropertyDataFetcherTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.graphql;
import java.util.List;
diff --git a/data-index/data-index-graphql/src/test/java/org/kie/kogito/index/graphql/query/GraphQLQueryOrderParserTest.java b/data-index/data-index-graphql/src/test/java/org/kie/kogito/index/graphql/query/GraphQLQueryOrderParserTest.java
index 7b5850d485..438f12852b 100644
--- a/data-index/data-index-graphql/src/test/java/org/kie/kogito/index/graphql/query/GraphQLQueryOrderParserTest.java
+++ b/data-index/data-index-graphql/src/test/java/org/kie/kogito/index/graphql/query/GraphQLQueryOrderParserTest.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.graphql.query;
diff --git a/data-index/data-index-service/data-index-service-common/pom.xml b/data-index/data-index-service/data-index-service-common/pom.xml
index 4dfc464462..af7ac6a134 100644
--- a/data-index/data-index-service/data-index-service-common/pom.xml
+++ b/data-index/data-index-service/data-index-service-common/pom.xml
@@ -1,4 +1,24 @@
+
@@ -13,6 +33,12 @@
Kogito Apps :: Data Index Service Common
+
+ org.kie.kogito
+ data-index-test-utils
+ test
+
+
org.kie.kogito
data-index-storage-api
@@ -69,7 +95,10 @@
io.quarkus
quarkus-rest-client-reactive
-
+
+ io.cloudevents
+ cloudevents-http-vertx
+
io.quarkiverse.reactivemessaging.http
quarkus-reactive-messaging-http
@@ -87,11 +116,7 @@
quarkus-smallrye-health
-
- org.kie.kogito
- data-index-test-utils
- test
-
+
io.quarkus
quarkus-junit5
diff --git a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/api/KogitoRuntimeClientImpl.java b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/api/KogitoRuntimeClientImpl.java
index 4ac42ab22c..ebaf891adc 100644
--- a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/api/KogitoRuntimeClientImpl.java
+++ b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/api/KogitoRuntimeClientImpl.java
@@ -1,35 +1,32 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service.api;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import javax.enterprise.context.ApplicationScoped;
-import javax.inject.Inject;
import javax.ws.rs.core.MediaType;
-import org.eclipse.microprofile.config.inject.ConfigProperty;
import org.kie.kogito.index.api.KogitoRuntimeClient;
-import org.kie.kogito.index.model.Job;
+import org.kie.kogito.index.api.KogitoRuntimeCommonClient;
import org.kie.kogito.index.model.Node;
import org.kie.kogito.index.model.ProcessInstance;
import org.kie.kogito.index.model.UserTaskInstance;
@@ -37,21 +34,17 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import io.quarkus.security.credential.TokenCredential;
-import io.quarkus.security.identity.SecurityIdentity;
import io.vertx.core.AsyncResult;
-import io.vertx.core.Vertx;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.json.JsonObject;
import io.vertx.ext.web.client.HttpRequest;
import io.vertx.ext.web.client.HttpResponse;
import io.vertx.ext.web.client.WebClient;
-import io.vertx.ext.web.client.WebClientOptions;
import static java.lang.String.format;
@ApplicationScoped
-public class KogitoRuntimeClientImpl implements KogitoRuntimeClient {
+class KogitoRuntimeClientImpl extends KogitoRuntimeCommonClient implements KogitoRuntimeClient {
public static final String ABORT_PROCESS_INSTANCE_PATH = "/management/processes/%s/instances/%s";
public static final String RETRY_PROCESS_INSTANCE_PATH = "/management/processes/%s/instances/%s/retrigger";
@@ -64,9 +57,6 @@ public class KogitoRuntimeClientImpl implements KogitoRuntimeClient {
public static final String RETRIGGER_NODE_INSTANCE_PATH = "/management/processes/%s/instances/%s/nodeInstances/%s"; // nodeInstance Id
public static final String CANCEL_NODE_INSTANCE_PATH = "/management/processes/%s/instances/%s/nodeInstances/%s"; // nodeInstance Id
- public static final String CANCEL_JOB_PATH = "/%s";
- public static final String RESCHEDULE_JOB_PATH = "/%s";
-
public static final String GET_TASK_SCHEMA_PATH = "/%s/%s/%s/%s/schema";
public static final String UPDATE_USER_TASK_INSTANCE_PATH = "/management/processes/%s/instances/%s/tasks/%s";
@@ -79,39 +69,6 @@ public class KogitoRuntimeClientImpl implements KogitoRuntimeClient {
public static final String DELETE_USER_TASK_INSTANCE_ATTACHMENT_PATH = "/%s/%s/%s/%s/attachments/%s";
private static final Logger LOGGER = LoggerFactory.getLogger(KogitoRuntimeClientImpl.class);
- private Vertx vertx;
- private SecurityIdentity identity;
- protected Map serviceWebClientMap = new HashMap<>();
-
- @ConfigProperty(name = "kogito.dataindex.gateway.url")
- protected Optional gatewayTargetUrl;
-
- @Inject
- public KogitoRuntimeClientImpl(Vertx vertx, SecurityIdentity identity) {
- this.vertx = vertx;
- this.identity = identity;
- }
-
- protected WebClient getWebClient(String runtimeServiceUrl) {
- if (runtimeServiceUrl == null) {
- throw new DataIndexServiceException("Runtime service URL not defined, please review the kogito.service.url system property to point the public URL for this runtime.");
- } else {
- return serviceWebClientMap.computeIfAbsent(runtimeServiceUrl, url -> WebClient.create(vertx, getWebClientToURLOptions(runtimeServiceUrl)));
- }
- }
-
- protected WebClientOptions getWebClientToURLOptions(String targetHttpURL) {
- try {
- URL dataIndexURL = new URL(targetHttpURL);
- return new WebClientOptions()
- .setDefaultHost(gatewayTargetUrl.orElse(dataIndexURL.getHost()))
- .setDefaultPort((dataIndexURL.getPort() != -1 ? dataIndexURL.getPort() : dataIndexURL.getDefaultPort()))
- .setSsl(dataIndexURL.getProtocol().compareToIgnoreCase("https") == 0);
- } catch (MalformedURLException ex) {
- LOGGER.error("Invalid runtime service URL: " + targetHttpURL, ex);
- return null;
- }
- }
@Override
public CompletableFuture abortProcessInstance(String serviceURL, ProcessInstance processInstance) {
@@ -160,37 +117,21 @@ public CompletableFuture> getProcessDefinitionNodes(String serviceURL
public CompletableFuture triggerNodeInstance(String serviceURL, ProcessInstance processInstance, String nodeDefinitionId) {
String requestURI = format(TRIGGER_NODE_INSTANCE_PATH, processInstance.getProcessId(), processInstance.getId(), nodeDefinitionId);
return sendPostClientRequest(getWebClient(serviceURL), requestURI,
- "Trigger Node " + nodeDefinitionId +
- "from ProcessInstance with id: " + processInstance.getId());
+ "Trigger Node " + nodeDefinitionId + FROM_PROCESS_INSTANCE_WITH_ID + processInstance.getId());
}
@Override
public CompletableFuture retriggerNodeInstance(String serviceURL, ProcessInstance processInstance, String nodeInstanceId) {
String requestURI = format(RETRIGGER_NODE_INSTANCE_PATH, processInstance.getProcessId(), processInstance.getId(), nodeInstanceId);
return sendPostClientRequest(getWebClient(serviceURL), requestURI,
- "Retrigger NodeInstance " + nodeInstanceId +
- "from ProcessInstance with id: " + processInstance.getId());
+ "Retrigger NodeInstance " + nodeInstanceId + FROM_PROCESS_INSTANCE_WITH_ID + processInstance.getId());
}
@Override
public CompletableFuture cancelNodeInstance(String serviceURL, ProcessInstance processInstance, String nodeInstanceId) {
String requestURI = format(CANCEL_NODE_INSTANCE_PATH, processInstance.getProcessId(), processInstance.getId(), nodeInstanceId);
return sendDeleteClientRequest(getWebClient(serviceURL), requestURI,
- "Cancel NodeInstance " + nodeInstanceId +
- "from ProcessInstance with id: " + processInstance.getId());
- }
-
- @Override
- public CompletableFuture cancelJob(String serviceURL, Job job) {
- String requestURI = format(CANCEL_JOB_PATH, job.getId());
- return sendDeleteClientRequest(getWebClient(serviceURL), requestURI, "CANCEL Job with id: " + job.getId());
- }
-
- @Override
- public CompletableFuture rescheduleJob(String serviceURL, Job job, String newJobData) {
- String requestURI = format(RESCHEDULE_JOB_PATH, job.getId());
- return sendJSONPutClientRequest(getWebClient(serviceURL), requestURI,
- "RESCHEDULED JOB with id: " + job.getId(), newJobData);
+ "Cancel NodeInstance " + nodeInstanceId + FROM_PROCESS_INSTANCE_WITH_ID + processInstance.getId());
}
@Override
@@ -277,40 +218,28 @@ private String getUserGroupsURIParameter(String user, List groups) {
return builder.toString();
}
- protected CompletableFuture sendDeleteClientRequest(WebClient webClient, String requestURI, String logMessage) {
- CompletableFuture future = new CompletableFuture<>();
- webClient.delete(requestURI)
- .putHeader("Authorization", getAuthHeader())
- .send(res -> asyncHttpResponseTreatment(res, future, logMessage));
- return future;
- }
-
protected CompletableFuture sendPostWithBodyClientRequest(WebClient webClient, String requestURI, String logMessage, String body, String contentType) {
CompletableFuture future = new CompletableFuture<>();
+
HttpRequest request = webClient.post(requestURI)
.putHeader("Authorization", getAuthHeader())
.putHeader("Content-Type", contentType);
if (MediaType.APPLICATION_JSON.equals(contentType)) {
+ LOGGER.debug("Sending Json Body: {} POST to URI {}", body, requestURI);
request.sendJson(new JsonObject(body), res -> asyncHttpResponseTreatment(res, future, logMessage));
} else {
+ LOGGER.debug("Sending Buffer(Body): {} POST to URI {}", body, requestURI);
request.sendBuffer(Buffer.buffer(body), res -> asyncHttpResponseTreatment(res, future, logMessage));
}
return future;
}
- private void asyncHttpResponseTreatment(AsyncResult> res, CompletableFuture future, String logMessage) {
- if (res.succeeded() && ((res.result().statusCode() == 200 || res.result().statusCode() == 201))) {
- future.complete(res.result().bodyAsString() != null ? res.result().bodyAsString() : "Successfully performed: " + logMessage);
- } else {
- future.completeExceptionally(new DataIndexServiceException(getErrorMessage(logMessage, res.result())));
- }
- }
-
protected CompletableFuture sendPostClientRequest(WebClient webClient, String requestURI, String logMessage) {
CompletableFuture future = new CompletableFuture<>();
webClient.post(requestURI)
.putHeader("Authorization", getAuthHeader())
.send(res -> asyncHttpResponseTreatment(res, future, logMessage));
+ LOGGER.debug("Sending post to URI {}", requestURI);
return future;
}
@@ -324,27 +253,22 @@ protected CompletableFuture sendPutClientRequest(WebClient webClient, String req
.putHeader("Authorization", getAuthHeader())
.putHeader("Content-Type", contentType);
if (MediaType.APPLICATION_JSON.equals(contentType)) {
+ LOGGER.debug("Sending Json Body: {} PUT to URI {}", body, requestURI);
request.sendJson(new JsonObject(body), res -> asyncHttpResponseTreatment(res, future, logMessage));
} else {
+ LOGGER.debug("Sending Buffer(Body): {} PUT to URI {}", body, requestURI);
request.sendBuffer(Buffer.buffer(body), res -> asyncHttpResponseTreatment(res, future, logMessage));
}
return future;
}
- protected CompletableFuture sendPatchClientRequest(WebClient webClient, String requestURI, String logMessage, JsonObject jsonBody) {
- CompletableFuture future = new CompletableFuture<>();
- webClient.patch(requestURI)
- .putHeader("Authorization", getAuthHeader())
- .sendJson(jsonBody, res -> asyncHttpResponseTreatment(res, future, logMessage));
- return future;
- }
-
protected CompletableFuture sendGetClientRequest(WebClient webClient, String requestURI, String logMessage, Class type) {
CompletableFuture future = new CompletableFuture<>();
webClient.get(requestURI)
.putHeader("Authorization", getAuthHeader())
.send(res -> send(logMessage, type, future, res));
+ LOGGER.debug("Sending GET to URI {}", requestURI);
return future;
}
@@ -362,20 +286,4 @@ protected void send(String logMessage, Class type, CompletableFuture future, Asy
}
}
- private String getErrorMessage(String logMessage, HttpResponse result) {
- String errorMessage = "FAILED: " + logMessage;
- if (result != null) {
- errorMessage += " errorCode:" + result.statusCode() +
- " errorStatus:" + result.statusMessage() +
- " errorMessage:" + (result.body() != null ? result.body().toString() : "-");
- }
- return errorMessage;
- }
-
- protected String getAuthHeader() {
- if (identity != null && identity.getCredential(TokenCredential.class) != null) {
- return "Bearer " + identity.getCredential(TokenCredential.class).getToken();
- }
- return "";
- }
}
diff --git a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/auth/MultiTenantResolver.java b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/auth/MultiTenantResolver.java
index c27bf657c4..b6cd7a7550 100644
--- a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/auth/MultiTenantResolver.java
+++ b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/auth/MultiTenantResolver.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.auth;
import javax.enterprise.context.ApplicationScoped;
diff --git a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/graphql/GraphQLProtoSchemaMapper.java b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/graphql/GraphQLProtoSchemaMapper.java
index 25ee8cade1..5d20283f9f 100644
--- a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/graphql/GraphQLProtoSchemaMapper.java
+++ b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/graphql/GraphQLProtoSchemaMapper.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service.graphql;
diff --git a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/graphql/GraphQLSchemaManagerImpl.java b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/graphql/GraphQLSchemaManagerImpl.java
index d0e389e084..9a5aec6710 100644
--- a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/graphql/GraphQLSchemaManagerImpl.java
+++ b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/graphql/GraphQLSchemaManagerImpl.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service.graphql;
diff --git a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/json/ProcessInstanceMetaMapper.java b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/json/ProcessInstanceMetaMapper.java
index 3caa719024..bc1e5c3c41 100644
--- a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/json/ProcessInstanceMetaMapper.java
+++ b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/json/ProcessInstanceMetaMapper.java
@@ -1,23 +1,32 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service.json;
+import java.util.Collections;
+import java.util.Map;
import java.util.function.Function;
import org.kie.kogito.event.process.ProcessInstanceDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceStateDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceVariableDataEvent;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -30,56 +39,80 @@
import static org.kie.kogito.index.storage.Constants.PROCESS_INSTANCES_DOMAIN_ATTRIBUTE;
import static org.kie.kogito.index.storage.Constants.PROCESS_NAME;
-public class ProcessInstanceMetaMapper implements Function {
+public class ProcessInstanceMetaMapper implements Function, ObjectNode> {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(ProcessInstanceMetaMapper.class);
@Override
- public ObjectNode apply(ProcessInstanceDataEvent event) {
+ public ObjectNode apply(ProcessInstanceDataEvent> event) {
if (event == null) {
return null;
- } else {
- ObjectNode json = getObjectMapper().createObjectNode();
- json.put(ID, isNullOrEmpty(event.getData().getRootInstanceId()) ? event.getData().getId() : event.getData().getRootInstanceId());
- json.put(PROCESS_ID, isNullOrEmpty(event.getData().getRootProcessId()) ? event.getData().getProcessId() : event.getData().getRootProcessId());
- ObjectNode kogito = getObjectMapper().createObjectNode();
- kogito.put(LAST_UPDATE, event.getTime() == null ? null : event.getTime().toInstant().toEpochMilli());
- kogito.withArray(PROCESS_INSTANCES_DOMAIN_ATTRIBUTE).add(getProcessJson(event));
- json.set(KOGITO_DOMAIN_ATTRIBUTE, kogito);
- json.setAll((ObjectNode) getObjectMapper().valueToTree(event.getData().getVariables()));
- return json;
}
+
+ ObjectNode json = getObjectMapper().createObjectNode();
+ json.put(ID, isNullOrEmpty(event.getKogitoRootProcessInstanceId()) ? event.getKogitoProcessInstanceId() : event.getKogitoRootProcessInstanceId());
+ json.put(PROCESS_ID, isNullOrEmpty(event.getKogitoRootProcessId()) ? event.getKogitoProcessId() : event.getKogitoRootProcessId());
+ ObjectNode kogito = getObjectMapper().createObjectNode();
+ kogito.withArray(PROCESS_INSTANCES_DOMAIN_ATTRIBUTE).add(getProcessJson(event));
+ kogito.put(LAST_UPDATE, event.getTime() == null ? null : event.getTime().toInstant().toEpochMilli());
+ json.set(KOGITO_DOMAIN_ATTRIBUTE, kogito);
+
+ if (event instanceof ProcessInstanceVariableDataEvent) {
+ ProcessInstanceVariableDataEvent vars = (ProcessInstanceVariableDataEvent) event;
+ String name = vars.getData().getVariableName();
+ Object value = vars.getData().getVariableValue();
+ Map newVars = Collections.singletonMap(name, value);
+ LOGGER.debug("Setting domain variable name {} with value {}", name, value);
+ json.putAll((ObjectNode) getObjectMapper().valueToTree(newVars));
+
+ }
+ return json;
+
}
- private ObjectNode getProcessJson(ProcessInstanceDataEvent event) {
+ private ObjectNode getProcessJson(ProcessInstanceDataEvent> event) {
ObjectNode json = getObjectMapper().createObjectNode();
- json.put(ID, event.getData().getId());
- json.put(PROCESS_ID, event.getData().getProcessId());
- json.put(PROCESS_NAME, event.getData().getProcessName());
- if (!isNullOrEmpty(event.getData().getRootInstanceId())) {
- json.put("rootProcessInstanceId", event.getData().getRootInstanceId());
+ json.put(ID, event.getKogitoProcessInstanceId());
+ json.put(PROCESS_ID, event.getKogitoProcessId());
+ json.put(LAST_UPDATE, event.getTime() == null ? null : event.getTime().toInstant().toEpochMilli());
+
+ if (!isNullOrEmpty(event.getKogitoRootProcessInstanceId())) {
+ json.put("rootProcessInstanceId", event.getKogitoRootProcessInstanceId());
}
- if (!isNullOrEmpty(event.getData().getParentInstanceId())) {
- json.put("parentProcessInstanceId", event.getData().getParentInstanceId());
+ if (!isNullOrEmpty(event.getKogitoParentProcessInstanceId())) {
+ json.put("parentProcessInstanceId", event.getKogitoParentProcessInstanceId());
}
- if (!isNullOrEmpty(event.getData().getRootProcessId())) {
- json.put("rootProcessId", event.getData().getRootProcessId());
+ if (!isNullOrEmpty(event.getKogitoRootProcessId())) {
+ json.put("rootProcessId", event.getKogitoRootProcessId());
}
- json.put("state", event.getData().getState());
+
if (event.getSource() != null) {
json.put("endpoint", event.getSource().toString());
}
- if (event.getData().getStartDate() != null) {
- json.put("start", event.getData().getStartDate().toInstant().toEpochMilli());
- }
- if (event.getData().getEndDate() != null) {
- json.put("end", event.getData().getEndDate().toInstant().toEpochMilli());
- }
- json.put(LAST_UPDATE, event.getTime() == null ? null : event.getTime().toInstant().toEpochMilli());
- if (!isNullOrEmpty(event.getData().getBusinessKey())) {
- json.put("businessKey", event.getData().getBusinessKey());
- }
- if (!isNullOrEmpty(event.getData().getIdentity())) {
- json.put("updatedBy", event.getData().getIdentity());
+
+ if (event instanceof ProcessInstanceStateDataEvent) {
+ ProcessInstanceStateDataEvent state = (ProcessInstanceStateDataEvent) event;
+
+ json.put("state", state.getData().getState());
+ json.put(PROCESS_NAME, state.getData().getProcessName());
+ if (!isNullOrEmpty(state.getData().getBusinessKey())) {
+ json.put("businessKey", state.getData().getBusinessKey());
+ }
+ if (state.getData().getEventType() != null && state.getData().getEventType() == 1) {
+ json.put("start", state.getData().getEventDate().toInstant().toEpochMilli());
+ if (!isNullOrEmpty(state.getData().getEventUser())) {
+ json.put("createdBy", state.getData().getEventUser());
+ }
+ }
+ if (state.getData().getEventType() != null && state.getData().getEventType() == 2) {
+ json.put("end", state.getData().getEventDate().toInstant().toEpochMilli());
+ }
+
+ if (!isNullOrEmpty(state.getData().getEventUser())) {
+ json.put("updatedBy", state.getData().getEventUser());
+ }
}
+
return json;
}
}
diff --git a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/json/UserTaskInstanceMetaMapper.java b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/json/UserTaskInstanceMetaMapper.java
index 9a783cafaa..ec8abe1ace 100644
--- a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/json/UserTaskInstanceMetaMapper.java
+++ b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/json/UserTaskInstanceMetaMapper.java
@@ -1,24 +1,38 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service.json;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
import java.util.Set;
import java.util.function.Function;
-import org.kie.kogito.event.process.UserTaskInstanceDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceAssignmentDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceAssignmentEventBody;
+import org.kie.kogito.event.usertask.UserTaskInstanceAttachmentDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceAttachmentEventBody;
+import org.kie.kogito.event.usertask.UserTaskInstanceCommentDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceCommentEventBody;
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceStateDataEvent;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -31,17 +45,17 @@
import static org.kie.kogito.index.storage.Constants.PROCESS_ID;
import static org.kie.kogito.index.storage.Constants.USER_TASK_INSTANCES_DOMAIN_ATTRIBUTE;
-public class UserTaskInstanceMetaMapper implements Function {
+public class UserTaskInstanceMetaMapper implements Function, ObjectNode> {
@Override
- public ObjectNode apply(UserTaskInstanceDataEvent event) {
+ public ObjectNode apply(UserTaskInstanceDataEvent> event) {
if (event == null) {
return null;
}
ObjectNode json = getObjectMapper().createObjectNode();
- json.put(ID, isNullOrEmpty(event.getData().getRootProcessInstanceId()) ? event.getData().getProcessInstanceId() : event.getData().getRootProcessInstanceId());
- json.put(PROCESS_ID, isNullOrEmpty(event.getData().getRootProcessId()) ? event.getData().getProcessId() : event.getData().getRootProcessId());
+ json.put(ID, isNullOrEmpty(event.getKogitoRootProcessInstanceId()) ? event.getKogitoProcessInstanceId() : event.getKogitoRootProcessInstanceId());
+ json.put(PROCESS_ID, isNullOrEmpty(event.getKogitoRootProcessId()) ? event.getKogitoProcessId() : event.getKogitoRootProcessId());
ObjectNode kogito = getObjectMapper().createObjectNode();
kogito.put(LAST_UPDATE, event.getTime() == null ? null : event.getTime().toInstant().toEpochMilli());
kogito.withArray(USER_TASK_INSTANCES_DOMAIN_ATTRIBUTE).add(getUserTaskJson(event));
@@ -49,35 +63,88 @@ public ObjectNode apply(UserTaskInstanceDataEvent event) {
return json;
}
- private ObjectNode getUserTaskJson(UserTaskInstanceDataEvent event) {
+ private ObjectNode getUserTaskJson(UserTaskInstanceDataEvent> event) {
ObjectNode json = getObjectMapper().createObjectNode();
- json.put(ID, event.getData().getId());
- json.put("processInstanceId", event.getData().getProcessInstanceId());
- json.put("state", event.getData().getState());
- if (!isNullOrEmpty(event.getData().getTaskDescription())) {
- json.put("description", event.getData().getTaskDescription());
- }
- if (!isNullOrEmpty(event.getData().getTaskName())) {
- json.put("name", event.getData().getTaskName());
- }
- if (!isNullOrEmpty(event.getData().getTaskPriority())) {
- json.put("priority", event.getData().getTaskPriority());
- }
- if (!isNullOrEmpty(event.getData().getActualOwner())) {
- json.put("actualOwner", event.getData().getActualOwner());
- }
- mapArray("adminUsers", event.getData().getAdminUsers(), json);
- mapArray("adminGroups", event.getData().getAdminGroups(), json);
- mapArray("excludedUsers", event.getData().getExcludedUsers(), json);
- mapArray("potentialGroups", event.getData().getPotentialGroups(), json);
- mapArray("potentialUsers", event.getData().getPotentialUsers(), json);
- if (event.getData().getCompleteDate() != null) {
- json.put("completed", event.getData().getCompleteDate().toInstant().toEpochMilli());
- }
- if (event.getData().getStartDate() != null) {
- json.put("started", event.getData().getStartDate().toInstant().toEpochMilli());
- }
+ json.put(ID, event.getKogitoUserTaskInstanceId());
+ json.put("processInstanceId", event.getKogitoProcessInstanceId());
+ json.put("state", event.getKogitoUserTaskInstanceState());
json.put(LAST_UPDATE, event.getTime() == null ? null : event.getTime().toInstant().toEpochMilli());
+
+ if (event instanceof UserTaskInstanceStateDataEvent) {
+
+ UserTaskInstanceStateDataEvent data = (UserTaskInstanceStateDataEvent) event;
+ json.put("actualOwner", data.getData().getActualOwner());
+
+ if (!isNullOrEmpty(data.getData().getUserTaskDescription())) {
+ json.put("description", data.getData().getUserTaskDescription());
+ }
+ if (!isNullOrEmpty(data.getData().getUserTaskName())) {
+ json.put("name", data.getData().getUserTaskName());
+ }
+ if (!isNullOrEmpty(data.getData().getUserTaskPriority())) {
+ json.put("priority", data.getData().getUserTaskPriority());
+ }
+
+ if (data.getData().getState() != null && data.getData().getState().equals("Completed")) {
+ json.put("completed", data.getData().getEventDate().toInstant().toEpochMilli());
+ }
+ List events = List.of("Ready", "InProgress");
+ if (data.getData().getState() != null && events.contains(data.getData().getState())) {
+ json.put("started", data.getData().getEventDate().toInstant().toEpochMilli());
+ }
+ } else if (event instanceof UserTaskInstanceAssignmentDataEvent) {
+ UserTaskInstanceAssignmentDataEvent data = (UserTaskInstanceAssignmentDataEvent) event;
+ UserTaskInstanceAssignmentEventBody body = data.getData();
+ switch (body.getAssignmentType()) {
+ case "USER_OWNERS":
+ mapArray("potentialUsers", new HashSet<>(body.getUsers()), json);
+ break;
+ case "USER_GROUPS":
+ mapArray("potentialGroups", new HashSet<>(body.getUsers()), json);
+ break;
+ case "USERS_EXCLUDED":
+ mapArray("excludedUsers", new HashSet<>(body.getUsers()), json);
+ break;
+ case "ADMIN_GROUPS":
+ mapArray("adminUsers", new HashSet<>(body.getUsers()), json);
+ break;
+ case "ADMIN_USERS":
+ mapArray("adminGroups", new HashSet<>(body.getUsers()), json);
+ break;
+ }
+
+ } else if (event instanceof UserTaskInstanceAttachmentDataEvent) {
+ UserTaskInstanceAttachmentDataEvent data = (UserTaskInstanceAttachmentDataEvent) event;
+ UserTaskInstanceAttachmentEventBody body = data.getData();
+ Map attachment = new HashMap<>();
+ attachment.put("id", body.getAttachmentId());
+ attachment.put("name", body.getAttachmentName());
+ attachment.put("content", body.getAttachmentURI() != null ? body.getAttachmentURI().toString() : "");
+ attachment.put("updatedBy", body.getEventUser());
+ attachment.put("updatedAt", body.getEventDate());
+
+ if (body.getEventType() == UserTaskInstanceAttachmentEventBody.EVENT_TYPE_DELETED) {
+ attachment.put("remove", true);
+ }
+
+ ArrayNode arrayNode = json.withArray("attachments");
+ arrayNode.add(getObjectMapper().valueToTree(attachment));
+
+ } else if (event instanceof UserTaskInstanceCommentDataEvent) {
+ UserTaskInstanceCommentDataEvent data = (UserTaskInstanceCommentDataEvent) event;
+ UserTaskInstanceCommentEventBody body = data.getData();
+ Map comment = new HashMap<>();
+ comment.put("id", body.getCommentId());
+ comment.put("content", body.getCommentContent());
+ comment.put("updatedBy", body.getEventUser());
+ comment.put("updatedAt", body.getEventDate());
+ if (body.getEventType() == UserTaskInstanceCommentEventBody.EVENT_TYPE_DELETED) {
+ comment.put("remove", true);
+ }
+ ArrayNode arrayNode = json.withArray("comments");
+ arrayNode.add(getObjectMapper().valueToTree(comment));
+ }
+
return json;
}
diff --git a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/BlockingMessagingEventConsumer.java b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/BlockingMessagingEventConsumer.java
index ab2c229609..074534277c 100644
--- a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/BlockingMessagingEventConsumer.java
+++ b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/BlockingMessagingEventConsumer.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service.messaging;
@@ -22,11 +25,10 @@
import org.eclipse.microprofile.reactive.messaging.Incoming;
import org.kie.kogito.event.DataEvent;
+import org.kie.kogito.event.process.ProcessDefinitionDataEvent;
import org.kie.kogito.event.process.ProcessInstanceDataEvent;
-import org.kie.kogito.event.process.UserTaskInstanceDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
import org.kie.kogito.index.event.KogitoJobCloudEvent;
-import org.kie.kogito.index.event.ProcessInstanceEventMapper;
-import org.kie.kogito.index.event.UserTaskInstanceEventMapper;
import org.kie.kogito.index.service.IndexingService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -34,8 +36,10 @@
import io.quarkus.arc.properties.IfBuildProperty;
import io.smallrye.reactive.messaging.annotations.Blocking;
+import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.*;
import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.KOGITO_JOBS_EVENTS;
import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.KOGITO_PROCESSINSTANCES_EVENTS;
+import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.KOGITO_PROCESS_DEFINITIONS_EVENTS;
import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.KOGITO_USERTASKINSTANCES_EVENTS;
@ApplicationScoped
@@ -45,7 +49,7 @@ public class BlockingMessagingEventConsumer {
private static final Logger LOGGER = LoggerFactory.getLogger(BlockingMessagingEventConsumer.class);
@Inject
- Event eventPublisher;
+ Event> eventPublisher;
@Inject
IndexingService indexingService;
@@ -53,18 +57,18 @@ public class BlockingMessagingEventConsumer {
@Incoming(KOGITO_PROCESSINSTANCES_EVENTS)
@Blocking
@Transactional
- public void onProcessInstanceEvent(ProcessInstanceDataEvent event) {
+ public void onProcessInstanceEvent(ProcessInstanceDataEvent> event) {
LOGGER.debug("Process instance consumer received ProcessInstanceDataEvent: \n{}", event);
- indexingService.indexProcessInstance(new ProcessInstanceEventMapper().apply(event));
+ indexingService.indexProcessInstanceEvent(event);
eventPublisher.fire(event);
}
@Incoming(KOGITO_USERTASKINSTANCES_EVENTS)
@Blocking
@Transactional
- public void onUserTaskInstanceEvent(UserTaskInstanceDataEvent event) {
+ public void onUserTaskInstanceEvent(UserTaskInstanceDataEvent> event) {
LOGGER.debug("Task instance received UserTaskInstanceDataEvent \n{}", event);
- indexingService.indexUserTaskInstance(new UserTaskInstanceEventMapper().apply(event));
+ indexingService.indexUserTaskInstanceEvent(event);
eventPublisher.fire(event);
}
@@ -76,4 +80,11 @@ public void onJobEvent(KogitoJobCloudEvent event) {
indexingService.indexJob(event.getData());
}
+ @Incoming(KOGITO_PROCESS_DEFINITIONS_EVENTS)
+ @Blocking
+ @Transactional
+ public void onProcessDefinitionDataEvent(ProcessDefinitionDataEvent event) {
+ LOGGER.debug("Job received KogitoJobCloudEvent \n{}", event);
+ indexingService.indexProcessDefinition(event);
+ }
}
diff --git a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/DomainEventConsumer.java b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/DomainEventConsumer.java
index 16be6bcffe..39bfb2574b 100644
--- a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/DomainEventConsumer.java
+++ b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/DomainEventConsumer.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.messaging;
import javax.enterprise.context.ApplicationScoped;
@@ -23,7 +25,7 @@
import org.eclipse.microprofile.config.inject.ConfigProperty;
import org.kie.kogito.event.DataEvent;
import org.kie.kogito.event.process.ProcessInstanceDataEvent;
-import org.kie.kogito.event.process.UserTaskInstanceDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
import org.kie.kogito.index.service.IndexingService;
import org.kie.kogito.index.service.json.ProcessInstanceMetaMapper;
import org.kie.kogito.index.service.json.UserTaskInstanceMetaMapper;
@@ -48,7 +50,7 @@ public class DomainEventConsumer {
@Inject
IndexingService indexingService;
- public void onDomainEvent(@Observes DataEvent event) {
+ public void onDomainEvent(@Observes DataEvent> event) {
if (!indexDomain) {
return;
}
@@ -57,12 +59,12 @@ public void onDomainEvent(@Observes DataEvent event) {
indexingService.indexModel(getDomainData(event));
}
- private ObjectNode getDomainData(DataEvent event) {
+ private ObjectNode getDomainData(DataEvent> event) {
if (event instanceof ProcessInstanceDataEvent) {
- return new ProcessInstanceMetaMapper().apply((ProcessInstanceDataEvent) event);
+ return new ProcessInstanceMetaMapper().apply((ProcessInstanceDataEvent>) event);
}
if (event instanceof UserTaskInstanceDataEvent) {
- return new UserTaskInstanceMetaMapper().apply((UserTaskInstanceDataEvent) event);
+ return new UserTaskInstanceMetaMapper().apply((UserTaskInstanceDataEvent>) event);
}
throw new IllegalArgumentException(
format("Unknown message type: '%s' for event class: '%s'", event.getType(), event.getClass().getName()));
diff --git a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/KogitoIndexEventConverter.java b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/KogitoIndexEventConverter.java
index e75147bab8..54c2895b7a 100644
--- a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/KogitoIndexEventConverter.java
+++ b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/KogitoIndexEventConverter.java
@@ -1,31 +1,59 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service.messaging;
import java.io.IOException;
import java.lang.reflect.Type;
+import java.util.function.Supplier;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import org.eclipse.microprofile.reactive.messaging.Message;
+import org.kie.kogito.event.AbstractDataEvent;
+import org.kie.kogito.event.DataEvent;
+import org.kie.kogito.event.process.ProcessDefinitionDataEvent;
+import org.kie.kogito.event.process.ProcessDefinitionEventBody;
import org.kie.kogito.event.process.ProcessInstanceDataEvent;
-import org.kie.kogito.event.process.ProcessInstanceEventBody;
-import org.kie.kogito.event.process.UserTaskInstanceDataEvent;
-import org.kie.kogito.event.process.UserTaskInstanceEventBody;
+import org.kie.kogito.event.process.ProcessInstanceErrorDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceErrorEventBody;
+import org.kie.kogito.event.process.ProcessInstanceNodeDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceNodeEventBody;
+import org.kie.kogito.event.process.ProcessInstanceSLADataEvent;
+import org.kie.kogito.event.process.ProcessInstanceSLAEventBody;
+import org.kie.kogito.event.process.ProcessInstanceStateDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceStateEventBody;
+import org.kie.kogito.event.process.ProcessInstanceVariableDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceVariableEventBody;
+import org.kie.kogito.event.usertask.UserTaskInstanceAssignmentDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceAssignmentEventBody;
+import org.kie.kogito.event.usertask.UserTaskInstanceAttachmentDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceAttachmentEventBody;
+import org.kie.kogito.event.usertask.UserTaskInstanceCommentDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceCommentEventBody;
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceDeadlineDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceDeadlineEventBody;
+import org.kie.kogito.event.usertask.UserTaskInstanceStateDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceStateEventBody;
+import org.kie.kogito.event.usertask.UserTaskInstanceVariableDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceVariableEventBody;
import org.kie.kogito.index.event.KogitoJobCloudEvent;
import org.kie.kogito.index.model.Job;
import org.kie.kogito.index.service.DataIndexServiceException;
@@ -34,7 +62,12 @@
import com.fasterxml.jackson.databind.ObjectMapper;
+import io.cloudevents.CloudEvent;
+import io.cloudevents.core.message.MessageReader;
+import io.cloudevents.http.vertx.VertxMessageFactory;
+import io.quarkus.reactivemessaging.http.runtime.IncomingHttpMetadata;
import io.smallrye.reactive.messaging.MessageConverter;
+import io.vertx.core.MultiMap;
import io.vertx.core.buffer.Buffer;
/**
@@ -56,6 +89,7 @@ public boolean canConvert(Message> message, Type type) {
private boolean isIndexable(Type type) {
return type == ProcessInstanceDataEvent.class
+ || type == ProcessDefinitionDataEvent.class
|| type == UserTaskInstanceDataEvent.class
|| type == KogitoJobCloudEvent.class;
}
@@ -63,34 +97,119 @@ private boolean isIndexable(Type type) {
@Override
public Message> convert(Message> message, Type type) {
try {
+ // quarkus-http connector case, let Vertx manage binary and structured mode.
+ IncomingHttpMetadata httpMetadata = message.getMetadata(IncomingHttpMetadata.class)
+ .orElseThrow(() -> new IllegalStateException("No IncomingHttpMetadata metadata was found current message."));
+ CloudEvent cloudEvent;
+ MultiMap httpHeaders = httpMetadata.getHeaders();
+ Buffer buffer = (Buffer) message.getPayload();
+ MessageReader messageReader = VertxMessageFactory.createReader(httpHeaders, buffer);
+ cloudEvent = messageReader.toEvent();
+
if (type.getTypeName().equals(ProcessInstanceDataEvent.class.getTypeName())) {
- ProcessInstanceDataEvent processInstanceDataEvent = objectMapper.readValue(message.getPayload().toString(), ProcessInstanceDataEvent.class);
- if (processInstanceDataEvent.getData() == null) {
- processInstanceDataEvent.setData(objectMapper.readValue(message.getPayload().toString(), ProcessInstanceEventBody.class));
- }
- return message.withPayload(processInstanceDataEvent);
+ return message.withPayload(buildProcessInstanceDataEventVariant(cloudEvent));
} else if (type.getTypeName().equals(KogitoJobCloudEvent.class.getTypeName())) {
- KogitoJobCloudEvent event = objectMapper.readValue(message.getPayload().toString(), KogitoJobCloudEvent.class);
- if (event.getData() == null) {
- event.setData(objectMapper.readValue(message.getPayload().toString(), Job.class));
- }
- return message.withPayload(event);
+ return message.withPayload(buildKogitoJobCloudEvent(cloudEvent));
} else if (type.getTypeName().equals(UserTaskInstanceDataEvent.class.getTypeName())) {
- UserTaskInstanceDataEvent userTaskInstanceDataEvent = objectMapper.readValue(message.getPayload().toString(), UserTaskInstanceDataEvent.class);
- if (userTaskInstanceDataEvent.getData() == null) {
- userTaskInstanceDataEvent.setData(objectMapper.readValue(message.getPayload().toString(), UserTaskInstanceEventBody.class));
- }
- return message.withPayload(userTaskInstanceDataEvent);
+ return message.withPayload(buildUserTaskInstanceDataEvent(cloudEvent));
+ } else if (type.getTypeName().equals(ProcessDefinitionDataEvent.class.getTypeName())) {
+ return message.withPayload(buildProcessDefinitionEvent(cloudEvent));
}
- return message;
+ // never happens, see isIndexable.
+ throw new IllegalArgumentException("Unknown event type: " + type);
} catch (IOException e) {
LOGGER.error("Error converting message payload to " + type.getTypeName(), e);
throw new DataIndexServiceException("Error converting message payload:\n" + message.getPayload() + " \n to" + type.getTypeName(), e);
}
}
+ private ProcessDefinitionDataEvent buildProcessDefinitionEvent(CloudEvent cloudEvent) throws IOException {
+ ProcessDefinitionDataEvent event = new ProcessDefinitionDataEvent();
+ applyCloudEventAttributes(cloudEvent, event);
+ if (cloudEvent.getData() != null) {
+ event.setData(objectMapper.readValue(cloudEvent.getData().toBytes(), ProcessDefinitionEventBody.class));
+ }
+ return event;
+ }
+
@Inject
public void setObjectMapper(ObjectMapper objectMapper) {
this.objectMapper = objectMapper;
}
+
+ private DataEvent> buildProcessInstanceDataEventVariant(CloudEvent cloudEvent) throws IOException {
+ switch (cloudEvent.getType()) {
+ case "ProcessInstanceErrorDataEvent":
+ return buildDataEvent(cloudEvent, objectMapper, ProcessInstanceErrorDataEvent::new, ProcessInstanceErrorEventBody.class);
+ case "ProcessInstanceNodeDataEvent":
+ return buildDataEvent(cloudEvent, objectMapper, ProcessInstanceNodeDataEvent::new, ProcessInstanceNodeEventBody.class);
+ case "ProcessInstanceSLADataEvent":
+ return buildDataEvent(cloudEvent, objectMapper, ProcessInstanceSLADataEvent::new, ProcessInstanceSLAEventBody.class);
+ case "ProcessInstanceStateDataEvent":
+ return buildDataEvent(cloudEvent, objectMapper, ProcessInstanceStateDataEvent::new, ProcessInstanceStateEventBody.class);
+ case "ProcessInstanceVariableDataEvent":
+ return buildDataEvent(cloudEvent, objectMapper, ProcessInstanceVariableDataEvent::new, ProcessInstanceVariableEventBody.class);
+ default:
+ throw new IllegalArgumentException("Unknown ProcessInstanceDataEvent variant: " + cloudEvent.getType());
+ }
+ }
+
+ private DataEvent> buildUserTaskInstanceDataEvent(CloudEvent cloudEvent) throws IOException {
+ switch (cloudEvent.getType()) {
+ case "UserTaskInstanceAssignmentDataEvent":
+ return buildDataEvent(cloudEvent, objectMapper, UserTaskInstanceAssignmentDataEvent::new, UserTaskInstanceAssignmentEventBody.class);
+ case "UserTaskInstanceAttachmentDataEvent":
+ return buildDataEvent(cloudEvent, objectMapper, UserTaskInstanceAttachmentDataEvent::new, UserTaskInstanceAttachmentEventBody.class);
+ case "UserTaskInstanceCommentDataEvent":
+ return buildDataEvent(cloudEvent, objectMapper, UserTaskInstanceCommentDataEvent::new, UserTaskInstanceCommentEventBody.class);
+ case "UserTaskInstanceDeadlineDataEvent":
+ return buildDataEvent(cloudEvent, objectMapper, UserTaskInstanceDeadlineDataEvent::new, UserTaskInstanceDeadlineEventBody.class);
+ case "UserTaskInstanceStateDataEvent":
+ return buildDataEvent(cloudEvent, objectMapper, UserTaskInstanceStateDataEvent::new, UserTaskInstanceStateEventBody.class);
+ case "UserTaskInstanceVariableDataEvent":
+ return buildDataEvent(cloudEvent, objectMapper, UserTaskInstanceVariableDataEvent::new, UserTaskInstanceVariableEventBody.class);
+ default:
+ throw new IllegalArgumentException("Unknown UserTaskInstanceDataEvent variant: " + cloudEvent.getType());
+ }
+ }
+
+ private KogitoJobCloudEvent buildKogitoJobCloudEvent(CloudEvent cloudEvent) throws IOException {
+ KogitoJobCloudEvent jobCloudEvent = new KogitoJobCloudEvent();
+ jobCloudEvent.setId(cloudEvent.getId());
+ jobCloudEvent.setType(cloudEvent.getType());
+ jobCloudEvent.setSource(cloudEvent.getSource());
+ jobCloudEvent.setContentType(cloudEvent.getDataContentType());
+ jobCloudEvent.setSchemaURL(cloudEvent.getDataSchema());
+ jobCloudEvent.setSubject(cloudEvent.getSubject());
+ jobCloudEvent.setTime(cloudEvent.getTime() != null ? cloudEvent.getTime().toZonedDateTime() : null);
+ if (cloudEvent.getData() != null) {
+ jobCloudEvent.setData(objectMapper.readValue(cloudEvent.getData().toBytes(), Job.class));
+ }
+ return jobCloudEvent;
+ }
+
+ private static , T> E buildDataEvent(CloudEvent cloudEvent, ObjectMapper objectMapper, Supplier supplier, Class clazz) throws IOException {
+ E dataEvent = supplier.get();
+ applyCloudEventAttributes(cloudEvent, dataEvent);
+ applyExtensions(cloudEvent, dataEvent);
+ if (cloudEvent.getData() != null) {
+ dataEvent.setData(objectMapper.readValue(cloudEvent.getData().toBytes(), clazz));
+ }
+ return dataEvent;
+ }
+
+ private static void applyCloudEventAttributes(CloudEvent cloudEvent, AbstractDataEvent> dataEvent) {
+ dataEvent.setSpecVersion(cloudEvent.getSpecVersion());
+ dataEvent.setId(cloudEvent.getId());
+ dataEvent.setType(cloudEvent.getType());
+ dataEvent.setSource(cloudEvent.getSource());
+ dataEvent.setDataContentType(cloudEvent.getDataContentType());
+ dataEvent.setDataSchema(cloudEvent.getDataSchema());
+ dataEvent.setSubject(cloudEvent.getSubject());
+ dataEvent.setTime(cloudEvent.getTime());
+ }
+
+ private static void applyExtensions(CloudEvent cloudEvent, AbstractDataEvent> dataEvent) {
+ cloudEvent.getExtensionNames().forEach(extensionName -> dataEvent.addExtensionAttribute(extensionName, cloudEvent.getExtension(extensionName)));
+ }
}
diff --git a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/ProcessInstanceDataEventDeserializer.java b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/ProcessInstanceDataEventDeserializer.java
new file mode 100644
index 0000000000..760691473d
--- /dev/null
+++ b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/ProcessInstanceDataEventDeserializer.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.index.service.messaging;
+
+import org.apache.kafka.common.serialization.Deserializer;
+import org.kie.kogito.event.process.ProcessInstanceDataEvent;
+import org.kie.kogito.index.json.JsonUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+
+public class ProcessInstanceDataEventDeserializer implements Deserializer> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(ProcessInstanceDataEventDeserializer.class);
+
+ @Override
+ public ProcessInstanceDataEvent> deserialize(String topic, byte[] data) {
+ try {
+ return JsonUtils.getObjectMapper().readValue(new String(data), ProcessInstanceDataEvent.class);
+ } catch (JsonProcessingException e) {
+ LOGGER.error("not possible to deserialize ProcessInstanceDataEvent data {}", new String(data), e);
+ throw new IllegalArgumentException("not possible to deserialize data");
+ }
+
+ }
+
+}
diff --git a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/ReactiveMessagingEventConsumer.java b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/ReactiveMessagingEventConsumer.java
index c86ff60364..55271b7fa8 100644
--- a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/ReactiveMessagingEventConsumer.java
+++ b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/ReactiveMessagingEventConsumer.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service.messaging;
@@ -21,11 +24,10 @@
import org.eclipse.microprofile.reactive.messaging.Incoming;
import org.kie.kogito.event.DataEvent;
+import org.kie.kogito.event.process.ProcessDefinitionDataEvent;
import org.kie.kogito.event.process.ProcessInstanceDataEvent;
-import org.kie.kogito.event.process.UserTaskInstanceDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
import org.kie.kogito.index.event.KogitoJobCloudEvent;
-import org.kie.kogito.index.event.ProcessInstanceEventMapper;
-import org.kie.kogito.index.event.UserTaskInstanceEventMapper;
import org.kie.kogito.index.service.IndexingService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -40,6 +42,7 @@ public class ReactiveMessagingEventConsumer {
private static final Logger LOGGER = LoggerFactory.getLogger(ReactiveMessagingEventConsumer.class);
public static final String KOGITO_PROCESSINSTANCES_EVENTS = "kogito-processinstances-events";
+ public static final String KOGITO_PROCESS_DEFINITIONS_EVENTS = "kogito-processdefinitions-events";
public static final String KOGITO_USERTASKINSTANCES_EVENTS = "kogito-usertaskinstances-events";
public static final String KOGITO_JOBS_EVENTS = "kogito-jobs-events";
@@ -47,25 +50,25 @@ public class ReactiveMessagingEventConsumer {
IndexingService indexingService;
@Inject
- Event eventPublisher;
+ Event> eventPublisher;
@Incoming(KOGITO_PROCESSINSTANCES_EVENTS)
- public Uni onProcessInstanceEvent(ProcessInstanceDataEvent event) {
+ public Uni onProcessInstanceEvent(ProcessInstanceDataEvent> event) {
LOGGER.debug("Process instance consumer received ProcessInstanceDataEvent: \n{}", event);
return Uni.createFrom().item(event)
- .invoke(e -> indexingService.indexProcessInstance(new ProcessInstanceEventMapper().apply(e)))
- .invoke(e -> eventPublisher.fire(e))
+ .invoke(indexingService::indexProcessInstanceEvent)
+ .invoke(eventPublisher::fire)
.onFailure()
.invoke(t -> LOGGER.error("Error processing process instance ProcessInstanceDataEvent: {}", t.getMessage(), t))
.onItem().ignore().andContinueWithNull();
}
@Incoming(KOGITO_USERTASKINSTANCES_EVENTS)
- public Uni onUserTaskInstanceEvent(UserTaskInstanceDataEvent event) {
+ public Uni onUserTaskInstanceEvent(UserTaskInstanceDataEvent> event) {
LOGGER.debug("Task instance received UserTaskInstanceDataEvent \n{}", event);
return Uni.createFrom().item(event)
- .invoke(e -> indexingService.indexUserTaskInstance(new UserTaskInstanceEventMapper().apply(e)))
- .invoke(e -> eventPublisher.fire(e))
+ .invoke(indexingService::indexUserTaskInstanceEvent)
+ .invoke(eventPublisher::fire)
.onFailure()
.invoke(t -> LOGGER.error("Error processing task instance UserTaskInstanceDataEvent: {}", t.getMessage(), t))
.onItem().ignore().andContinueWithNull();
@@ -80,4 +83,12 @@ public Uni onJobEvent(KogitoJobCloudEvent event) {
.onItem().ignore().andContinueWithNull();
}
+ @Incoming(KOGITO_PROCESS_DEFINITIONS_EVENTS)
+ public Uni onProcessDefinitionDataEvent(ProcessDefinitionDataEvent event) {
+ LOGGER.debug("Process Definition received ProcessDefinitionDataEvent \n{}", event);
+ return Uni.createFrom().item(event)
+ .onItem().invoke(indexingService::indexProcessDefinition)
+ .onFailure().invoke(t -> LOGGER.error("Error processing ProcessDefinitionDataEvent: {}", t.getMessage(), t))
+ .onItem().ignore().andContinueWithNull();
+ }
}
diff --git a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/UserTaskInstanceDataEventDeserializer.java b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/UserTaskInstanceDataEventDeserializer.java
new file mode 100644
index 0000000000..a385707507
--- /dev/null
+++ b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/messaging/UserTaskInstanceDataEventDeserializer.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.index.service.messaging;
+
+import org.apache.kafka.common.serialization.Deserializer;
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
+import org.kie.kogito.index.json.JsonUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+
+public class UserTaskInstanceDataEventDeserializer implements Deserializer> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(UserTaskInstanceDataEventDeserializer.class);
+
+ @Override
+ public UserTaskInstanceDataEvent> deserialize(String topic, byte[] data) {
+ try {
+ return JsonUtils.getObjectMapper().readValue(new String(data), UserTaskInstanceDataEvent.class);
+ } catch (JsonProcessingException e) {
+ LOGGER.error("not possible to deserialize UserTaskInstanceDataEvent data {}", new String(data), e);
+ throw new IllegalArgumentException("not possible to deserialize data");
+ }
+
+ }
+
+}
diff --git a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/vertx/VertxRouterSetup.java b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/vertx/VertxRouterSetup.java
index a1cff2facf..a18e6a8bf2 100644
--- a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/vertx/VertxRouterSetup.java
+++ b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/vertx/VertxRouterSetup.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service.vertx;
diff --git a/data-index/data-index-service/data-index-service-common/src/main/resources/META-INF/beans.xml b/data-index/data-index-service/data-index-service-common/src/main/resources/META-INF/beans.xml
index e69de29bb2..a0eb9fbf8c 100644
--- a/data-index/data-index-service/data-index-service-common/src/main/resources/META-INF/beans.xml
+++ b/data-index/data-index-service/data-index-service-common/src/main/resources/META-INF/beans.xml
@@ -0,0 +1,20 @@
+
diff --git a/data-index/data-index-service/data-index-service-common/src/main/resources/META-INF/microprofile-config.properties b/data-index/data-index-service/data-index-service-common/src/main/resources/META-INF/microprofile-config.properties
index bce555b749..15ec93572e 100644
--- a/data-index/data-index-service/data-index-service-common/src/main/resources/META-INF/microprofile-config.properties
+++ b/data-index/data-index-service/data-index-service-common/src/main/resources/META-INF/microprofile-config.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Quarkus
quarkus.log.level=INFO
quarkus.log.console.enable=true
@@ -44,13 +63,19 @@ kogito.data-index.vertx-graphql.ui.tenant=web-app-tenant
mp.messaging.incoming.kogito-processinstances-events.connector=quarkus-http
mp.messaging.incoming.kogito-processinstances-events.path=/processes
+mp.messaging.incoming.kogito-processdefinitions-events.connector=quarkus-http
+mp.messaging.incoming.kogito-processdefinitions-events.path=/definitions
mp.messaging.incoming.kogito-usertaskinstances-events.connector=quarkus-http
mp.messaging.incoming.kogito-usertaskinstances-events.path=/tasks
mp.messaging.incoming.kogito-jobs-events.connector=quarkus-http
mp.messaging.incoming.kogito-jobs-events.path=/jobs
%kafka-events-support.mp.messaging.incoming.kogito-processinstances-events.connector=smallrye-kafka
+%kafka-events-support.mp.messaging.incoming.kogito-processinstances-events.value.deserializer=org.kie.kogito.index.service.messaging.ProcessInstanceDataEventDeserializer
+%kafka-events-support.mp.messaging.incoming.kogito-processdefinitions-events.connector=smallrye-kafka
+
%kafka-events-support.mp.messaging.incoming.kogito-usertaskinstances-events.connector=smallrye-kafka
+%kafka-events-support.mp.messaging.incoming.kogito-usertaskinstances-events.value.deserializer=org.kie.kogito.index.service.messaging.UserTaskInstanceDataEventDeserializer
%kafka-events-support.mp.messaging.incoming.kogito-jobs-events.connector=smallrye-kafka
%kafka-events-support.quarkus.kafka.bootstrap-servers=localhost:9092
%kafka-events-support.kafka.bootstrap.servers=localhost:9092
@@ -61,6 +86,12 @@ mp.messaging.incoming.kogito-processinstances-events.enable.auto.commit=false
mp.messaging.incoming.kogito-processinstances-events.auto.offset.reset=earliest
mp.messaging.incoming.kogito-processinstances-events.isolation.level=read_committed
+mp.messaging.incoming.kogito-processdefinitions-events.topic=kogito-processdefinitions-events
+mp.messaging.incoming.kogito-processdefinitions-events.group.id=kogito-data-index-process-definitions
+mp.messaging.incoming.kogito-processdefinitions-events.enable.auto.commit=false
+mp.messaging.incoming.kogito-processdefinitions-events.auto.offset.reset=earliest
+mp.messaging.incoming.kogito-processdefinitions-events.isolation.level=read_committed
+
mp.messaging.incoming.kogito-usertaskinstances-events.topic=kogito-usertaskinstances-events
mp.messaging.incoming.kogito-usertaskinstances-events.group.id=kogito-data-index-usertaskinstances
mp.messaging.incoming.kogito-usertaskinstances-events.enable.auto.commit=false
@@ -74,5 +105,6 @@ mp.messaging.incoming.kogito-jobs-events.auto.offset.reset=earliest
mp.messaging.incoming.kogito-jobs-events.isolation.level=read_committed
%http-events-support.mp.messaging.incoming.kogito-processinstances-events.connector=quarkus-http
+%http-events-support.mp.messaging.incoming.kogito-processdefinitions-events.connector=quarkus-http
%http-events-support.mp.messaging.incoming.kogito-usertaskinstances-events.connector=quarkus-http
%http-events-support.mp.messaging.incoming.kogito-jobs-events.connector=quarkus-http
\ No newline at end of file
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/AbstractDomainIndexingServiceIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/AbstractDomainIndexingServiceIT.java
index c0ae3af80e..8ef52ccc61 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/AbstractDomainIndexingServiceIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/AbstractDomainIndexingServiceIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service;
@@ -24,11 +27,12 @@
import javax.inject.Inject;
-import org.apache.groovy.util.Maps;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
-import org.kie.kogito.event.process.ProcessInstanceDataEvent;
-import org.kie.kogito.event.process.UserTaskInstanceDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceErrorDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceStateDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceStateDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceStateEventBody;
import org.kie.kogito.index.test.TestUtils;
import org.kie.kogito.persistence.protobuf.ProtobufService;
@@ -38,26 +42,22 @@
import static java.util.Arrays.asList;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
-import static org.hamcrest.CoreMatchers.anyOf;
+import static org.awaitility.Awaitility.await;
+import static org.hamcrest.CoreMatchers.anything;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.isA;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.kie.kogito.index.DateTimeUtils.formatDateTime;
-import static org.kie.kogito.index.DateTimeUtils.formatOffsetDateTime;
import static org.kie.kogito.index.model.ProcessInstanceState.ACTIVE;
import static org.kie.kogito.index.model.ProcessInstanceState.COMPLETED;
-import static org.kie.kogito.index.model.ProcessInstanceState.ERROR;
import static org.kie.kogito.index.service.GraphQLUtils.getDealsByTaskId;
-import static org.kie.kogito.index.service.GraphQLUtils.getDealsByTaskIdNoActualOwner;
import static org.kie.kogito.index.service.GraphQLUtils.getProcessInstanceById;
-import static org.kie.kogito.index.service.GraphQLUtils.getProcessInstanceByIdAndErrorNode;
import static org.kie.kogito.index.service.GraphQLUtils.getProcessInstanceByIdAndState;
import static org.kie.kogito.index.service.GraphQLUtils.getProcessInstanceByParentProcessInstanceId;
import static org.kie.kogito.index.service.GraphQLUtils.getTravelsByProcessInstanceId;
import static org.kie.kogito.index.service.GraphQLUtils.getTravelsByUserTaskId;
import static org.kie.kogito.index.service.GraphQLUtils.getUserTaskInstanceById;
-import static org.kie.kogito.index.service.GraphQLUtils.getUserTaskInstanceByIdAndActualOwner;
-import static org.kie.kogito.index.service.GraphQLUtils.getUserTaskInstanceByIdNoActualOwner;
+import static org.kie.kogito.index.test.TestUtils.deriveProcessVariableCloudEvent;
import static org.kie.kogito.index.test.TestUtils.getProcessCloudEvent;
import static org.kie.kogito.index.test.TestUtils.getProcessInstanceVariablesMap;
import static org.kie.kogito.index.test.TestUtils.getUserTaskCloudEvent;
@@ -176,9 +176,13 @@ void testAddProtoFile() throws Exception {
.when().post("/graphql")
.then().log().ifValidationFails().statusCode(200).body("data.Travels", isA(Collection.class));
- ProcessInstanceDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+ ProcessInstanceStateDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
indexProcessCloudEvent(startEvent);
+ for (Map.Entry entry : getProcessInstanceVariablesMap().entrySet()) {
+ indexProcessCloudEvent(deriveProcessVariableCloudEvent(startEvent, entry.getKey(), entry.getValue()));
+ }
+
validateProcessInstance(getProcessInstanceByIdAndState(processInstanceId, ACTIVE), startEvent);
given().contentType(ContentType.JSON)
@@ -187,7 +191,7 @@ void testAddProtoFile() throws Exception {
.then().log().ifValidationFails().statusCode(200)
.body("data.Travels[0].id", is(processInstanceId))
.body("data.Travels[0].__typename", is("Travels"))
- .body("data.Travels[0].metadata.lastUpdate", is(formatOffsetDateTime(startEvent.getTime())))
+ .body("data.Travels[0].metadata.lastUpdate", anything())
.body("data.Travels[0].metadata.processInstances.size()", is(1))
.body("data.Travels[0].metadata.processInstances[0].id", is(processInstanceId))
.body("data.Travels[0].metadata.processInstances[0].processId", is(processId))
@@ -195,21 +199,24 @@ void testAddProtoFile() throws Exception {
.body("data.Travels[0].metadata.processInstances[0].rootProcessId", is(nullValue()))
.body("data.Travels[0].metadata.processInstances[0].rootProcessInstanceId", is(nullValue()))
.body("data.Travels[0].metadata.processInstances[0].parentProcessInstanceId", is(nullValue()))
- .body("data.Travels[0].metadata.processInstances[0].start", is(formatDateTime(startEvent.getData().getStartDate())))
+ .body("data.Travels[0].metadata.processInstances[0].start", is(formatDateTime(startEvent.getData().getEventDate())))
.body("data.Travels[0].metadata.processInstances[0].end", is(nullValue()))
- .body("data.Travels[0].metadata.processInstances[0].lastUpdate", is(formatOffsetDateTime(startEvent.getTime())))
+ .body("data.Travels[0].metadata.processInstances[0].lastUpdate", anything())
.body("data.Travels[0].metadata.processInstances[0].endpoint", is(startEvent.getSource().toString()))
.body("data.Travels[0].metadata.processInstances[0].serviceUrl", is("http://localhost:8080"))
.body("data.Travels[0].traveller.firstName", is("Maciej"))
.body("data.Travels[0].hotel.name", is("Meriton"))
.body("data.Travels[0].flight.flightNumber", is("MX555"));
- ProcessInstanceDataEvent subProcessStartEvent = getProcessCloudEvent(subProcessId, subProcessInstanceId, ACTIVE,
+ ProcessInstanceStateDataEvent subProcessStartEvent = getProcessCloudEvent(subProcessId, subProcessInstanceId, ACTIVE,
processInstanceId, processId, processInstanceId, "currentUser");
+ indexProcessCloudEvent(subProcessStartEvent);
+
Map travellerMap = new HashMap<>();
travellerMap.put("firstName", "Maciej");
travellerMap.put("email", "mail@mail.com");
travellerMap.put("nationality", "Polish");
+
Map location1Map = new HashMap<>();
location1Map.put("street", "street1");
location1Map.put("city", "city1");
@@ -224,8 +231,8 @@ void testAddProtoFile() throws Exception {
travellerMap.put("locations", asList(location1Map, location2Map));
travellerMap.put("aliases", asList("alias1", "alias2"));
- subProcessStartEvent.getData().update().variables(Maps.of("traveller", travellerMap));
- indexProcessCloudEvent(subProcessStartEvent);
+
+ indexProcessCloudEvent(deriveProcessVariableCloudEvent(subProcessStartEvent, "traveller", travellerMap));
validateProcessInstance(getProcessInstanceByIdAndState(subProcessInstanceId, ACTIVE), subProcessStartEvent);
validateProcessInstance(getProcessInstanceByIdAndState(processInstanceId, ACTIVE), startEvent, subProcessInstanceId);
@@ -236,7 +243,7 @@ void testAddProtoFile() throws Exception {
.then().log().ifValidationFails().statusCode(200)
.body("data.Travels[0].id", is(processInstanceId))
.body("data.Travels[0].__typename", is("Travels"))
- .body("data.Travels[0].metadata.lastUpdate", is(formatOffsetDateTime(subProcessStartEvent.getTime())))
+ .body("data.Travels[0].metadata.lastUpdate", anything())
.body("data.Travels[0].metadata.processInstances.size()", is(2))
.body("data.Travels[0].metadata.processInstances[0].id", is(processInstanceId))
.body("data.Travels[0].metadata.processInstances[0].processId", is(processId))
@@ -244,9 +251,9 @@ void testAddProtoFile() throws Exception {
.body("data.Travels[0].metadata.processInstances[0].rootProcessId", is(nullValue()))
.body("data.Travels[0].metadata.processInstances[0].rootProcessInstanceId", is(nullValue()))
.body("data.Travels[0].metadata.processInstances[0].parentProcessInstanceId", is(nullValue()))
- .body("data.Travels[0].metadata.processInstances[0].start", is(formatDateTime(startEvent.getData().getStartDate())))
+ .body("data.Travels[0].metadata.processInstances[0].start", is(formatDateTime(startEvent.getData().getEventDate())))
.body("data.Travels[0].metadata.processInstances[0].end", is(nullValue()))
- .body("data.Travels[0].metadata.processInstances[0].lastUpdate", is(formatOffsetDateTime(startEvent.getTime())))
+ .body("data.Travels[0].metadata.processInstances[0].lastUpdate", anything())
.body("data.Travels[0].metadata.processInstances[0].endpoint", is(startEvent.getSource().toString()))
.body("data.Travels[0].metadata.processInstances[0].serviceUrl", is("http://localhost:8080"))
.body("data.Travels[0].metadata.processInstances[1].id", is(subProcessInstanceId))
@@ -255,7 +262,7 @@ void testAddProtoFile() throws Exception {
.body("data.Travels[0].metadata.processInstances[1].rootProcessId", is(processId))
.body("data.Travels[0].metadata.processInstances[1].rootProcessInstanceId", is(processInstanceId))
.body("data.Travels[0].metadata.processInstances[1].parentProcessInstanceId", is(processInstanceId))
- .body("data.Travels[0].metadata.processInstances[1].start", is(formatDateTime(subProcessStartEvent.getData().getStartDate())))
+ .body("data.Travels[0].metadata.processInstances[1].start", is(formatDateTime(subProcessStartEvent.getData().getEventDate())))
.body("data.Travels[0].metadata.processInstances[1].end", is(nullValue()))
.body("data.Travels[0].traveller.firstName", is("Maciej"))
.body("data.Travels[0].traveller.email", is("mail@mail.com"))
@@ -271,12 +278,13 @@ void testAddProtoFile() throws Exception {
.body("data.Travels[0].flight.arrival", is("2019-08-20T22:12:57.34Z"))
.body("data.Travels[0].flight.departure", is("2019-08-20T07:12:57.34Z"));
- ProcessInstanceDataEvent endEvent = getProcessCloudEvent(processId, processInstanceId, COMPLETED, null, null, null, "currentUser");
+ ProcessInstanceStateDataEvent endEvent = getProcessCloudEvent(processId, processInstanceId, COMPLETED, null, null, null, "currentUser");
+
indexProcessCloudEvent(endEvent);
validateProcessInstance(getProcessInstanceByIdAndState(processInstanceId, COMPLETED), endEvent, subProcessInstanceId);
- UserTaskInstanceDataEvent firstUserTaskEvent = getUserTaskCloudEvent(firstTaskId, subProcessId, subProcessInstanceId,
+ UserTaskInstanceStateDataEvent firstUserTaskEvent = getUserTaskCloudEvent(firstTaskId, subProcessId, subProcessInstanceId,
processInstanceId, processId, state);
indexUserTaskCloudEvent(firstUserTaskEvent);
@@ -289,7 +297,7 @@ void testAddProtoFile() throws Exception {
.then().log().ifValidationFails().statusCode(200)
.body("data.Travels[0].id", is(processInstanceId))
.body("data.Travels[0].__typename", is("Travels"))
- .body("data.Travels[0].metadata.lastUpdate", is(formatOffsetDateTime(firstUserTaskEvent.getTime())))
+ .body("data.Travels[0].metadata.lastUpdate", anything())
.body("data.Travels[0].metadata.userTasks.size()", is(1))
.body("data.Travels[0].metadata.userTasks[0].id", is(firstTaskId))
.body("data.Travels[0].metadata.userTasks[0].processInstanceId", is(subProcessInstanceId))
@@ -297,7 +305,7 @@ void testAddProtoFile() throws Exception {
.body("data.Travels[0].metadata.userTasks[0].name", is("TaskName"))
.body("data.Travels[0].metadata.userTasks[0].priority", is("High"))
.body("data.Travels[0].metadata.userTasks[0].actualOwner", is("kogito"))
- .body("data.Travels[0].metadata.userTasks[0].lastUpdate", is(formatOffsetDateTime(firstUserTaskEvent.getTime())))
+ .body("data.Travels[0].metadata.userTasks[0].lastUpdate", anything())
.body("data.Travels[0].metadata.processInstances.size()", is(2))
.body("data.Travels[0].metadata.processInstances[0].id", is(processInstanceId))
.body("data.Travels[0].metadata.processInstances[0].processId", is(processId))
@@ -305,27 +313,22 @@ void testAddProtoFile() throws Exception {
.body("data.Travels[0].metadata.processInstances[0].rootProcessId", is(nullValue()))
.body("data.Travels[0].metadata.processInstances[0].rootProcessInstanceId", is(nullValue()))
.body("data.Travels[0].metadata.processInstances[0].parentProcessInstanceId", is(nullValue()))
- .body("data.Travels[0].metadata.processInstances[0].start", is(formatDateTime(endEvent.getData().getStartDate())))
- .body("data.Travels[0].metadata.processInstances[0].end", is(formatDateTime(endEvent.getData().getEndDate())))
- .body("data.Travels[0].metadata.processInstances[0].lastUpdate", is(formatOffsetDateTime(endEvent.getTime())))
+ .body("data.Travels[0].metadata.processInstances[0].start", anything())
+ .body("data.Travels[0].metadata.processInstances[0].end", anything())
+ .body("data.Travels[0].metadata.processInstances[0].lastUpdate", anything())
.body("data.Travels[0].metadata.processInstances[1].id", is(subProcessInstanceId))
.body("data.Travels[0].metadata.processInstances[1].processId", is(subProcessId))
.body("data.Travels[0].metadata.processInstances[1].processName", is(subProcessStartEvent.getData().getProcessName()))
.body("data.Travels[0].metadata.processInstances[1].rootProcessId", is(processId))
.body("data.Travels[0].metadata.processInstances[1].rootProcessInstanceId", is(processInstanceId))
.body("data.Travels[0].metadata.processInstances[1].parentProcessInstanceId", is(processInstanceId))
- .body("data.Travels[0].metadata.processInstances[1].start", is(formatDateTime(subProcessStartEvent.getData().getStartDate())))
+ .body("data.Travels[0].metadata.processInstances[1].start", is(formatDateTime(subProcessStartEvent.getData().getEventDate())))
.body("data.Travels[0].metadata.processInstances[1].end", is(nullValue()))
.body("data.Travels[0].metadata.processInstances[1].endpoint", is(subProcessStartEvent.getSource().toString()))
.body("data.Travels[0].metadata.processInstances[1].serviceUrl", is("http://localhost:8080"))
- .body("data.Travels[0].metadata.processInstances[1].lastUpdate", is(formatOffsetDateTime(subProcessStartEvent.getTime())))
- .body("data.Travels[0].traveller.firstName", is("Maciej"))
- .body("data.Travels[0].hotel.name", is("Meriton"))
- .body("data.Travels[0].flight.flightNumber", is("MX555"))
- .body("data.Travels[0].flight.arrival", is("2019-08-20T22:12:57.34Z"))
- .body("data.Travels[0].flight.departure", is("2019-08-20T07:12:57.34Z"));
+ .body("data.Travels[0].metadata.processInstances[1].lastUpdate", anything());
- UserTaskInstanceDataEvent secondUserTaskEvent = getUserTaskCloudEvent(secondTaskId, processId, processInstanceId, null,
+ UserTaskInstanceStateDataEvent secondUserTaskEvent = getUserTaskCloudEvent(secondTaskId, processId, processInstanceId, null,
null, state);
indexUserTaskCloudEvent(secondUserTaskEvent);
@@ -338,7 +341,7 @@ void testAddProtoFile() throws Exception {
.then().log().ifValidationFails().statusCode(200)
.body("data.Travels[0].id", is(processInstanceId))
.body("data.Travels[0].__typename", is("Travels"))
- .body("data.Travels[0].metadata.lastUpdate", is(formatOffsetDateTime(secondUserTaskEvent.getTime())))
+ .body("data.Travels[0].metadata.lastUpdate", anything())
.body("data.Travels[0].metadata.userTasks.size()", is(2))
.body("data.Travels[0].metadata.userTasks[0].id", is(firstTaskId))
.body("data.Travels[0].metadata.userTasks[0].processInstanceId", is(subProcessInstanceId))
@@ -346,14 +349,14 @@ void testAddProtoFile() throws Exception {
.body("data.Travels[0].metadata.userTasks[0].name", is("TaskName"))
.body("data.Travels[0].metadata.userTasks[0].priority", is("High"))
.body("data.Travels[0].metadata.userTasks[0].actualOwner", is("kogito"))
- .body("data.Travels[0].metadata.userTasks[0].lastUpdate", is(formatOffsetDateTime(firstUserTaskEvent.getTime())))
+ .body("data.Travels[0].metadata.userTasks[0].lastUpdate", anything())
.body("data.Travels[0].metadata.userTasks[1].id", is(secondTaskId))
.body("data.Travels[0].metadata.userTasks[1].processInstanceId", is(processInstanceId))
.body("data.Travels[0].metadata.userTasks[1].description", is("TaskDescription"))
.body("data.Travels[0].metadata.userTasks[1].name", is("TaskName"))
.body("data.Travels[0].metadata.userTasks[1].priority", is("High"))
.body("data.Travels[0].metadata.userTasks[1].actualOwner", is("kogito"))
- .body("data.Travels[0].metadata.userTasks[1].lastUpdate", is(formatOffsetDateTime(secondUserTaskEvent.getTime())))
+ .body("data.Travels[0].metadata.userTasks[1].lastUpdate", anything())
.body("data.Travels[0].metadata.processInstances.size()", is(2))
.body("data.Travels[0].metadata.processInstances[0].id", is(processInstanceId))
.body("data.Travels[0].metadata.processInstances[0].processId", is(processId))
@@ -361,9 +364,9 @@ void testAddProtoFile() throws Exception {
.body("data.Travels[0].metadata.processInstances[0].rootProcessId", is(nullValue()))
.body("data.Travels[0].metadata.processInstances[0].rootProcessInstanceId", is(nullValue()))
.body("data.Travels[0].metadata.processInstances[0].parentProcessInstanceId", is(nullValue()))
- .body("data.Travels[0].metadata.processInstances[0].start", is(formatDateTime(endEvent.getData().getStartDate())))
- .body("data.Travels[0].metadata.processInstances[0].end", is(formatDateTime(endEvent.getData().getEndDate())))
- .body("data.Travels[0].metadata.processInstances[0].lastUpdate", is(formatOffsetDateTime(endEvent.getTime())))
+ .body("data.Travels[0].metadata.processInstances[0].start", anything())
+ .body("data.Travels[0].metadata.processInstances[0].end", anything())
+ .body("data.Travels[0].metadata.processInstances[0].lastUpdate", anything())
.body("data.Travels[0].metadata.processInstances[0].endpoint", is(endEvent.getSource().toString()))
.body("data.Travels[0].metadata.processInstances[0].serviceUrl", is("http://localhost:8080"))
.body("data.Travels[0].metadata.processInstances[1].id", is(subProcessInstanceId))
@@ -372,8 +375,8 @@ void testAddProtoFile() throws Exception {
.body("data.Travels[0].metadata.processInstances[1].rootProcessId", is(processId))
.body("data.Travels[0].metadata.processInstances[1].rootProcessInstanceId", is(processInstanceId))
.body("data.Travels[0].metadata.processInstances[1].parentProcessInstanceId", is(processInstanceId))
- .body("data.Travels[0].metadata.processInstances[1].start", is(formatDateTime(subProcessStartEvent.getData().getStartDate())))
- .body("data.Travels[0].metadata.processInstances[1].lastUpdate", is(formatOffsetDateTime(subProcessStartEvent.getTime())))
+ .body("data.Travels[0].metadata.processInstances[1].start", anything())
+ .body("data.Travels[0].metadata.processInstances[1].lastUpdate", anything())
.body("data.Travels[0].metadata.processInstances[1].end", is(nullValue()))
.body("data.Travels[0].metadata.processInstances[1].endpoint", is(subProcessStartEvent.getSource().toString()))
.body("data.Travels[0].metadata.processInstances[1].serviceUrl", is("http://localhost:8080"))
@@ -397,7 +400,7 @@ void testIndexingDomainUsingUserTaskEventFirst() throws Exception {
.when().post("/graphql")
.then().log().ifValidationFails().statusCode(200).body("data.Travels", isA(Collection.class));
- UserTaskInstanceDataEvent userTaskEvent = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, state);
+ UserTaskInstanceStateDataEvent userTaskEvent = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, state);
indexUserTaskCloudEvent(userTaskEvent);
given().contentType(ContentType.JSON)
@@ -406,21 +409,19 @@ void testIndexingDomainUsingUserTaskEventFirst() throws Exception {
.then().log().ifValidationFails().statusCode(200)
.body("data.Travels[0].id", is(processInstanceId))
.body("data.Travels[0].__typename", is("Travels"))
- .body("data.Travels[0].flight", is(nullValue()))
- .body("data.Travels[0].hotel", is(nullValue()))
- .body("data.Travels[0].traveller", is(nullValue()))
- .body("data.Travels[0].metadata.lastUpdate", is(formatOffsetDateTime(userTaskEvent.getTime())))
+ .body("data.Travels[0].metadata.lastUpdate", anything())
.body("data.Travels[0].metadata.userTasks.size()", is(1))
.body("data.Travels[0].metadata.userTasks[0].id", is(taskId))
.body("data.Travels[0].metadata.userTasks[0].processInstanceId", is(processInstanceId))
- .body("data.Travels[0].metadata.userTasks[0].description", is(userTaskEvent.getData().getTaskDescription()))
- .body("data.Travels[0].metadata.userTasks[0].name", is(userTaskEvent.getData().getTaskName()))
- .body("data.Travels[0].metadata.userTasks[0].priority", is(userTaskEvent.getData().getTaskPriority()))
+ .body("data.Travels[0].metadata.userTasks[0].description", is(userTaskEvent.getData().getUserTaskDescription()))
+ .body("data.Travels[0].metadata.userTasks[0].name", is(userTaskEvent.getData().getUserTaskName()))
+ .body("data.Travels[0].metadata.userTasks[0].priority", is(userTaskEvent.getData().getUserTaskPriority()))
.body("data.Travels[0].metadata.userTasks[0].actualOwner", is(userTaskEvent.getData().getActualOwner()))
- .body("data.Travels[0].metadata.userTasks[0].lastUpdate", is(formatOffsetDateTime(userTaskEvent.getTime())))
+ .body("data.Travels[0].metadata.userTasks[0].lastUpdate", anything())
.body("data.Travels[0].metadata.processInstances", is(nullValue()));
- ProcessInstanceDataEvent processEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+ ProcessInstanceStateDataEvent processEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+
indexProcessCloudEvent(processEvent);
given().contentType(ContentType.JSON)
@@ -429,18 +430,15 @@ void testIndexingDomainUsingUserTaskEventFirst() throws Exception {
.then().log().ifValidationFails().statusCode(200)
.body("data.Travels[0].id", is(processInstanceId))
.body("data.Travels[0].__typename", is("Travels"))
- .body("data.Travels[0].flight.flightNumber", is("MX555"))
- .body("data.Travels[0].hotel.name", is("Meriton"))
- .body("data.Travels[0].traveller.firstName", is("Maciej"))
- .body("data.Travels[0].metadata.lastUpdate", is(formatOffsetDateTime(processEvent.getTime())))
+ .body("data.Travels[0].metadata.lastUpdate", anything())
.body("data.Travels[0].metadata.userTasks.size()", is(1))
.body("data.Travels[0].metadata.userTasks[0].id", is(taskId))
.body("data.Travels[0].metadata.userTasks[0].processInstanceId", is(processInstanceId))
- .body("data.Travels[0].metadata.userTasks[0].description", is(userTaskEvent.getData().getTaskDescription()))
- .body("data.Travels[0].metadata.userTasks[0].name", is(userTaskEvent.getData().getTaskName()))
- .body("data.Travels[0].metadata.userTasks[0].priority", is(userTaskEvent.getData().getTaskPriority()))
+ .body("data.Travels[0].metadata.userTasks[0].description", is(userTaskEvent.getData().getUserTaskDescription()))
+ .body("data.Travels[0].metadata.userTasks[0].name", is(userTaskEvent.getData().getUserTaskName()))
+ .body("data.Travels[0].metadata.userTasks[0].priority", is(userTaskEvent.getData().getUserTaskPriority()))
.body("data.Travels[0].metadata.userTasks[0].actualOwner", is(userTaskEvent.getData().getActualOwner()))
- .body("data.Travels[0].metadata.userTasks[0].lastUpdate", is(formatOffsetDateTime(userTaskEvent.getTime())))
+ .body("data.Travels[0].metadata.userTasks[0].lastUpdate", anything())
.body("data.Travels[0].metadata.processInstances.size()", is(1))
.body("data.Travels[0].metadata.processInstances[0].id", is(processInstanceId))
.body("data.Travels[0].metadata.processInstances[0].processId", is(processId))
@@ -448,7 +446,7 @@ void testIndexingDomainUsingUserTaskEventFirst() throws Exception {
.body("data.Travels[0].metadata.processInstances[0].rootProcessId", is(nullValue()))
.body("data.Travels[0].metadata.processInstances[0].rootProcessInstanceId", is(nullValue()))
.body("data.Travels[0].metadata.processInstances[0].parentProcessInstanceId", is(nullValue()))
- .body("data.Travels[0].metadata.processInstances[0].lastUpdate", is(formatOffsetDateTime(processEvent.getTime())))
+ .body("data.Travels[0].metadata.processInstances[0].lastUpdate", anything())
.body("data.Travels[0].metadata.processInstances[0].endpoint", is(processEvent.getSource().toString()))
.body("data.Travels[0].metadata.processInstances[0].serviceUrl", is("http://localhost:8080"));
}
@@ -466,7 +464,8 @@ void testIndexingDomainUsingProcessEventFirst() throws Exception {
.when().post("/graphql")
.then().log().ifValidationFails().statusCode(200).body("data.Travels", isA(Collection.class));
- ProcessInstanceDataEvent processEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+ ProcessInstanceStateDataEvent processEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+
indexProcessCloudEvent(processEvent);
given().contentType(ContentType.JSON)
@@ -474,10 +473,7 @@ void testIndexingDomainUsingProcessEventFirst() throws Exception {
.when().post("/graphql")
.then().log().ifValidationFails().statusCode(200)
.body("data.Travels[0].id", is(processInstanceId))
- .body("data.Travels[0].flight.flightNumber", is("MX555"))
- .body("data.Travels[0].hotel.name", is("Meriton"))
- .body("data.Travels[0].traveller.firstName", is("Maciej"))
- .body("data.Travels[0].metadata.lastUpdate", is(formatOffsetDateTime(processEvent.getTime())))
+ .body("data.Travels[0].metadata.lastUpdate", anything())
.body("data.Travels[0].metadata.userTasks", is(nullValue()))
.body("data.Travels[0].metadata.processInstances.size()", is(1))
.body("data.Travels[0].metadata.processInstances[0].id", is(processInstanceId))
@@ -486,11 +482,11 @@ void testIndexingDomainUsingProcessEventFirst() throws Exception {
.body("data.Travels[0].metadata.processInstances[0].rootProcessId", is(nullValue()))
.body("data.Travels[0].metadata.processInstances[0].rootProcessInstanceId", is(nullValue()))
.body("data.Travels[0].metadata.processInstances[0].parentProcessInstanceId", is(nullValue()))
- .body("data.Travels[0].metadata.processInstances[0].lastUpdate", is(formatOffsetDateTime(processEvent.getTime())))
+ .body("data.Travels[0].metadata.processInstances[0].lastUpdate", anything())
.body("data.Travels[0].metadata.processInstances[0].endpoint", is(processEvent.getSource().toString()))
.body("data.Travels[0].metadata.processInstances[0].serviceUrl", is("http://localhost:8080"));
- UserTaskInstanceDataEvent userTaskEvent = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, state);
+ UserTaskInstanceStateDataEvent userTaskEvent = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, state);
indexUserTaskCloudEvent(userTaskEvent);
given().contentType(ContentType.JSON)
@@ -498,18 +494,15 @@ void testIndexingDomainUsingProcessEventFirst() throws Exception {
.when().post("/graphql")
.then().log().ifValidationFails().statusCode(200)
.body("data.Travels[0].id", is(processInstanceId))
- .body("data.Travels[0].flight.flightNumber", is("MX555"))
- .body("data.Travels[0].hotel.name", is("Meriton"))
- .body("data.Travels[0].traveller.firstName", is("Maciej"))
- .body("data.Travels[0].metadata.lastUpdate", is(formatOffsetDateTime(userTaskEvent.getTime())))
+ .body("data.Travels[0].metadata.lastUpdate", anything())
.body("data.Travels[0].metadata.userTasks.size()", is(1))
.body("data.Travels[0].metadata.userTasks[0].id", is(taskId))
.body("data.Travels[0].metadata.userTasks[0].processInstanceId", is(processInstanceId))
- .body("data.Travels[0].metadata.userTasks[0].description", is(userTaskEvent.getData().getTaskDescription()))
- .body("data.Travels[0].metadata.userTasks[0].name", is(userTaskEvent.getData().getTaskName()))
- .body("data.Travels[0].metadata.userTasks[0].priority", is(userTaskEvent.getData().getTaskPriority()))
+ .body("data.Travels[0].metadata.userTasks[0].description", is(userTaskEvent.getData().getUserTaskDescription()))
+ .body("data.Travels[0].metadata.userTasks[0].name", is(userTaskEvent.getData().getUserTaskName()))
+ .body("data.Travels[0].metadata.userTasks[0].priority", is(userTaskEvent.getData().getUserTaskPriority()))
.body("data.Travels[0].metadata.userTasks[0].actualOwner", is(userTaskEvent.getData().getActualOwner()))
- .body("data.Travels[0].metadata.userTasks[0].lastUpdate", is(formatOffsetDateTime(userTaskEvent.getTime())))
+ .body("data.Travels[0].metadata.userTasks[0].lastUpdate", anything())
.body("data.Travels[0].metadata.processInstances.size()", is(1))
.body("data.Travels[0].metadata.processInstances[0].id", is(processInstanceId))
.body("data.Travels[0].metadata.processInstances[0].processId", is(processId))
@@ -517,7 +510,7 @@ void testIndexingDomainUsingProcessEventFirst() throws Exception {
.body("data.Travels[0].metadata.processInstances[0].rootProcessId", is(nullValue()))
.body("data.Travels[0].metadata.processInstances[0].rootProcessInstanceId", is(nullValue()))
.body("data.Travels[0].metadata.processInstances[0].parentProcessInstanceId", is(nullValue()))
- .body("data.Travels[0].metadata.processInstances[0].lastUpdate", is(formatOffsetDateTime(processEvent.getTime())))
+ .body("data.Travels[0].metadata.processInstances[0].lastUpdate", anything())
.body("data.Travels[0].metadata.processInstances[0].endpoint", is(processEvent.getSource().toString()))
.body("data.Travels[0].metadata.processInstances[0].serviceUrl", is("http://localhost:8080"));
}
@@ -535,8 +528,12 @@ void testIndexingDomainParallelEvents() throws Exception {
.when().post("/graphql")
.then().log().ifValidationFails().statusCode(200).body("data.Travels", isA(Collection.class));
- ProcessInstanceDataEvent processEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
- UserTaskInstanceDataEvent userTaskEvent = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, state);
+ ProcessInstanceStateDataEvent processEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+ UserTaskInstanceStateDataEvent userTaskEvent = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, state);
+
+ for (Map.Entry entry : getProcessInstanceVariablesMap().entrySet()) {
+ indexProcessCloudEvent(deriveProcessVariableCloudEvent(processEvent, entry.getKey(), entry.getValue()));
+ }
CompletableFuture.allOf(
CompletableFuture.runAsync(() -> indexProcessCloudEvent(processEvent)),
@@ -551,15 +548,15 @@ void testIndexingDomainParallelEvents() throws Exception {
.body("data.Travels[0].flight.flightNumber", is("MX555"))
.body("data.Travels[0].hotel.name", is("Meriton"))
.body("data.Travels[0].traveller.firstName", is("Maciej"))
- .body("data.Travels[0].metadata.lastUpdate", anyOf(asList(is(formatOffsetDateTime(userTaskEvent.getTime())), is((formatOffsetDateTime(processEvent.getTime()))))))
+ .body("data.Travels[0].metadata.lastUpdate", anything())
.body("data.Travels[0].metadata.userTasks.size()", is(1))
.body("data.Travels[0].metadata.userTasks[0].id", is(taskId))
.body("data.Travels[0].metadata.userTasks[0].processInstanceId", is(processInstanceId))
- .body("data.Travels[0].metadata.userTasks[0].description", is(userTaskEvent.getData().getTaskDescription()))
- .body("data.Travels[0].metadata.userTasks[0].name", is(userTaskEvent.getData().getTaskName()))
- .body("data.Travels[0].metadata.userTasks[0].priority", is(userTaskEvent.getData().getTaskPriority()))
+ .body("data.Travels[0].metadata.userTasks[0].description", is(userTaskEvent.getData().getUserTaskDescription()))
+ .body("data.Travels[0].metadata.userTasks[0].name", is(userTaskEvent.getData().getUserTaskName()))
+ .body("data.Travels[0].metadata.userTasks[0].priority", is(userTaskEvent.getData().getUserTaskPriority()))
.body("data.Travels[0].metadata.userTasks[0].actualOwner", is(userTaskEvent.getData().getActualOwner()))
- .body("data.Travels[0].metadata.userTasks[0].lastUpdate", is(formatOffsetDateTime(userTaskEvent.getTime())))
+ .body("data.Travels[0].metadata.userTasks[0].lastUpdate", anything())
.body("data.Travels[0].metadata.processInstances.size()", is(1))
.body("data.Travels[0].metadata.processInstances[0].id", is(processInstanceId))
.body("data.Travels[0].metadata.processInstances[0].processId", is(processId))
@@ -567,7 +564,7 @@ void testIndexingDomainParallelEvents() throws Exception {
.body("data.Travels[0].metadata.processInstances[0].rootProcessId", is(nullValue()))
.body("data.Travels[0].metadata.processInstances[0].rootProcessInstanceId", is(nullValue()))
.body("data.Travels[0].metadata.processInstances[0].parentProcessInstanceId", is(nullValue()))
- .body("data.Travels[0].metadata.processInstances[0].lastUpdate", is(formatOffsetDateTime(processEvent.getTime())))
+ .body("data.Travels[0].metadata.processInstances[0].lastUpdate", anything())
.body("data.Travels[0].metadata.processInstances[0].endpoint", is(processEvent.getSource().toString()))
.body("data.Travels[0].metadata.processInstances[0].serviceUrl", is("http://localhost:8080"));
}
@@ -585,9 +582,14 @@ void testProcessInstanceDomainIndex() throws Exception {
.when().post("/graphql")
.then().log().ifValidationFails().statusCode(200).body("data.Travels", isA(Collection.class));
- ProcessInstanceDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+ ProcessInstanceStateDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+
indexProcessCloudEvent(startEvent);
+ for (Map.Entry entry : getProcessInstanceVariablesMap().entrySet()) {
+ indexProcessCloudEvent(deriveProcessVariableCloudEvent(startEvent, entry.getKey(), entry.getValue()));
+ }
+
validateProcessInstance(getProcessInstanceById(processInstanceId), startEvent);
given().contentType(ContentType.JSON)
@@ -595,7 +597,7 @@ void testProcessInstanceDomainIndex() throws Exception {
.when().post("/graphql")
.then().log().ifValidationFails().statusCode(200)
.body("data.Travels[0].id", is(processInstanceId))
- .body("data.Travels[0].metadata.lastUpdate", is(formatOffsetDateTime(startEvent.getTime())))
+ .body("data.Travels[0].metadata.lastUpdate", anything())
.body("data.Travels[0].metadata.processInstances.size()", is(1))
.body("data.Travels[0].metadata.processInstances[0].id", is(processInstanceId))
.body("data.Travels[0].metadata.processInstances[0].processId", is(processId))
@@ -604,8 +606,8 @@ void testProcessInstanceDomainIndex() throws Exception {
.body("data.Travels[0].metadata.processInstances[0].rootProcessInstanceId", is(nullValue()))
.body("data.Travels[0].metadata.processInstances[0].parentProcessInstanceId", is(nullValue()))
.body("data.Travels[0].metadata.processInstances[0].state", is(ACTIVE.name()))
- .body("data.Travels[0].metadata.processInstances[0].start", is(formatDateTime(startEvent.getData().getStartDate())))
- .body("data.Travels[0].metadata.processInstances[0].lastUpdate", is(formatOffsetDateTime(startEvent.getTime())))
+ .body("data.Travels[0].metadata.processInstances[0].start", is(formatDateTime(startEvent.getData().getEventDate())))
+ .body("data.Travels[0].metadata.processInstances[0].lastUpdate", anything())
.body("data.Travels[0].metadata.processInstances[0].end", is(nullValue()))
.body("data.Travels[0].metadata.processInstances[0].endpoint", is(startEvent.getSource().toString()))
.body("data.Travels[0].metadata.processInstances[0].serviceUrl", is("http://localhost:8080"))
@@ -613,12 +615,15 @@ void testProcessInstanceDomainIndex() throws Exception {
.body("data.Travels[0].hotel.name", is("Meriton"))
.body("data.Travels[0].traveller.firstName", is("Maciej"));
- ProcessInstanceDataEvent endEvent = getProcessCloudEvent(processId, processInstanceId, COMPLETED, null, null, null, "currentUser");
- endEvent.getData().update().endDate(new Date());
+ ProcessInstanceStateDataEvent endEvent = getProcessCloudEvent(processId, processInstanceId, COMPLETED, null, null, null, "currentUser");
+
Map variablesMap = getProcessInstanceVariablesMap();
((Map) variablesMap.get("hotel")).put("name", "Ibis");
((Map) variablesMap.get("flight")).put("flightNumber", "QF444");
- endEvent.getData().update().variables(variablesMap);
+
+ for (Map.Entry entry : variablesMap.entrySet()) {
+ indexProcessCloudEvent(deriveProcessVariableCloudEvent(startEvent, entry.getKey(), entry.getValue()));
+ }
indexProcessCloudEvent(endEvent);
@@ -629,7 +634,7 @@ void testProcessInstanceDomainIndex() throws Exception {
.when().post("/graphql")
.then().log().ifValidationFails().statusCode(200)
.body("data.Travels[0].id", is(processInstanceId))
- .body("data.Travels[0].metadata.lastUpdate", is(formatOffsetDateTime(endEvent.getTime())))
+ .body("data.Travels[0].metadata.lastUpdate", anything())
.body("data.Travels[0].metadata.processInstances.size()", is(1))
.body("data.Travels[0].metadata.processInstances[0].id", is(processInstanceId))
.body("data.Travels[0].metadata.processInstances[0].processId", is(processId))
@@ -638,27 +643,34 @@ void testProcessInstanceDomainIndex() throws Exception {
.body("data.Travels[0].metadata.processInstances[0].rootProcessInstanceId", is(nullValue()))
.body("data.Travels[0].metadata.processInstances[0].parentProcessInstanceId", is(nullValue()))
.body("data.Travels[0].metadata.processInstances[0].state", is(COMPLETED.name()))
- .body("data.Travels[0].metadata.processInstances[0].start", is(formatDateTime(endEvent.getData().getStartDate())))
- .body("data.Travels[0].metadata.processInstances[0].end", is(formatDateTime(endEvent.getData().getEndDate())))
+ .body("data.Travels[0].metadata.processInstances[0].start", anything())
+ .body("data.Travels[0].metadata.processInstances[0].end", anything())
.body("data.Travels[0].metadata.processInstances[0].endpoint", is(endEvent.getSource().toString()))
.body("data.Travels[0].metadata.processInstances[0].serviceUrl", is("http://localhost:8080"))
.body("data.Travels[0].flight.flightNumber", is("QF444"))
.body("data.Travels[0].hotel.name", is("Ibis"))
.body("data.Travels[0].traveller.firstName", is("Maciej"));
- ProcessInstanceDataEvent event = getProcessCloudEvent(subProcessId, subProcessInstanceId, ACTIVE, processInstanceId,
+ ProcessInstanceStateDataEvent event = getProcessCloudEvent(subProcessId, subProcessInstanceId, ACTIVE, processInstanceId,
processId, processInstanceId, "currentUser");
+
indexProcessCloudEvent(event);
validateProcessInstance(getProcessInstanceByParentProcessInstanceId(processInstanceId), event);
- ProcessInstanceDataEvent errorEvent = getProcessCloudEvent(subProcessId, subProcessInstanceId, ERROR, processInstanceId,
- processId, processInstanceId, "currentUser");
+ ProcessInstanceErrorDataEvent errorEvent = TestUtils.deriveErrorProcessCloudEvent(event, "error", "nodeDefintionId", "nodeInstanceId");
+
indexProcessCloudEvent(errorEvent);
- validateProcessInstance(
- getProcessInstanceByIdAndErrorNode(subProcessInstanceId, errorEvent.getData().getError().getNodeDefinitionId()),
- errorEvent);
+ await()
+ .atMost(timeout)
+ .untilAsserted(() -> given().contentType(ContentType.JSON).body(getProcessInstanceById(event.getKogitoProcessInstanceId()))
+ .when().post("/graphql")
+ .then().log().ifValidationFails().statusCode(200)
+ .body("data.ProcessInstances[0].id", is(event.getData().getProcessInstanceId()))
+ .body("data.ProcessInstances[0].error.message", errorEvent.getData().getErrorMessage() == null ? is(nullValue()) : is(errorEvent.getData().getErrorMessage()))
+ .body("data.ProcessInstances[0].error.nodeDefinitionId",
+ errorEvent.getData().getNodeDefinitionId() == null ? is(nullValue()) : is(errorEvent.getData().getNodeDefinitionId())));
}
@Test
@@ -674,7 +686,9 @@ void testUserTaskInstanceDomainIndex() throws Exception {
.when().post("/graphql")
.then().log().ifValidationFails().statusCode(200).body("data.Deals", isA(Collection.class));
- UserTaskInstanceDataEvent event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, state);
+ UserTaskInstanceStateDataEvent event;
+
+ event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, state);
indexUserTaskCloudEvent(event);
validateUserTaskInstance(getUserTaskInstanceById(taskId), event);
@@ -685,7 +699,6 @@ void testUserTaskInstanceDomainIndex() throws Exception {
.then().log().ifValidationFails().statusCode(200)
.body("data.Deals[0].id", is(processInstanceId))
.body("data.Deals[0].__typename", is("Deals"))
- .body("data.Deals[0].metadata.lastUpdate", is(formatOffsetDateTime(event.getTime())))
.body("data.Deals[0].metadata.userTasks.size()", is(1))
.body("data.Deals[0].metadata.userTasks[0].id", is(taskId))
.body("data.Deals[0].metadata.userTasks[0].description", is("TaskDescription"))
@@ -693,60 +706,25 @@ void testUserTaskInstanceDomainIndex() throws Exception {
.body("data.Deals[0].metadata.userTasks[0].name", is("TaskName"))
.body("data.Deals[0].metadata.userTasks[0].priority", is("High"))
.body("data.Deals[0].metadata.userTasks[0].actualOwner", is("kogito"))
- .body("data.Deals[0].metadata.userTasks[0].started", is(formatDateTime(event.getData().getStartDate())))
- .body("data.Deals[0].metadata.userTasks[0].completed", is(formatDateTime(event.getData().getCompleteDate())))
- .body("data.Deals[0].metadata.userTasks[0].lastUpdate", is(formatOffsetDateTime(event.getTime())));
-
- event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, state);
- event.getData().update().completeDate(new Date());
- event.getData().update().taskPriority("Low");
- event.getData().update().actualOwner("admin");
- event.getData().update().state("Completed");
+ .body("data.Deals[0].metadata.userTasks[0].started", is(formatDateTime(event.getData().getEventDate())))
+ .body("data.Deals[0].metadata.userTasks[0].lastUpdate", anything());
+
+ event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, state, "kogito", 2);
+ UserTaskInstanceStateEventBody body = UserTaskInstanceStateEventBody.create()
+ .eventType(2)
+ .userTaskInstanceId(taskId)
+ .state("Completed")
+ .userTaskName("TaskName")
+ .userTaskDescription("TaskDescription")
+ .userTaskPriority("Low")
+ .actualOwner("admin")
+ .eventDate(new Date())
+ .processInstanceId(processInstanceId)
+ .build();
+ event.setData(body);
indexUserTaskCloudEvent(event);
- validateUserTaskInstance(getUserTaskInstanceByIdAndActualOwner(taskId, "admin"), event);
-
- given().contentType(ContentType.JSON)
- .body(getDealsByTaskId(taskId))
- .when().post("/graphql")
- .then().log().ifValidationFails().statusCode(200)
- .body("data.Deals[0].id", is(processInstanceId))
- .body("data.Deals[0].__typename", is("Deals"))
- .body("data.Deals[0].metadata.lastUpdate", is(formatOffsetDateTime(event.getTime())))
- .body("data.Deals[0].metadata.userTasks.size()", is(1))
- .body("data.Deals[0].metadata.userTasks[0].id", is(taskId))
- .body("data.Deals[0].metadata.userTasks[0].description", is("TaskDescription"))
- .body("data.Deals[0].metadata.userTasks[0].state", is("Completed"))
- .body("data.Deals[0].metadata.userTasks[0].name", is("TaskName"))
- .body("data.Deals[0].metadata.userTasks[0].priority", is("Low"))
- .body("data.Deals[0].metadata.userTasks[0].actualOwner", is("admin"))
- .body("data.Deals[0].metadata.userTasks[0].started", is(formatDateTime(event.getData().getStartDate())))
- .body("data.Deals[0].metadata.userTasks[0].completed", is(formatDateTime(event.getData().getCompleteDate())))
- .body("data.Deals[0].metadata.userTasks[0].lastUpdate", is(formatOffsetDateTime(event.getTime())));
-
- event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, state, null);
- indexUserTaskCloudEvent(event);
-
- validateUserTaskInstance(getUserTaskInstanceByIdNoActualOwner(taskId), event);
-
- given().contentType(ContentType.JSON)
- .body(getDealsByTaskIdNoActualOwner(taskId))
- .when().post("/graphql")
- .then().log().ifValidationFails().statusCode(200)
- .body("data.Deals[0].id", is(processInstanceId))
- .body("data.Deals[0].__typename", is("Deals"))
- .body("data.Deals[0].metadata.lastUpdate", is(formatOffsetDateTime(event.getTime())))
- .body("data.Deals[0].metadata.userTasks.size()", is(1))
- .body("data.Deals[0].metadata.userTasks[0].id", is(taskId))
- .body("data.Deals[0].metadata.userTasks[0].description", is("TaskDescription"))
- .body("data.Deals[0].metadata.userTasks[0].state", is("InProgress"))
- .body("data.Deals[0].metadata.userTasks[0].name", is("TaskName"))
- .body("data.Deals[0].metadata.userTasks[0].priority", is("High"))
- .body("data.Deals[0].metadata.userTasks[0].actualOwner", nullValue())
- .body("data.Deals[0].metadata.userTasks[0].started", is(formatDateTime(event.getData().getStartDate())))
- .body("data.Deals[0].metadata.userTasks[0].completed", is(formatDateTime(event.getData().getCompleteDate())))
- .body("data.Deals[0].metadata.userTasks[0].lastUpdate", is(formatOffsetDateTime(event.getTime())));
}
private String getProtoBufferFileWithoutModelType() {
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/AbstractIndexingIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/AbstractIndexingIT.java
index b40ae732dc..9eed26044c 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/AbstractIndexingIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/AbstractIndexingIT.java
@@ -1,31 +1,36 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service;
import javax.enterprise.inject.Any;
import javax.inject.Inject;
+import org.kie.kogito.event.process.ProcessDefinitionDataEvent;
import org.kie.kogito.event.process.ProcessInstanceDataEvent;
-import org.kie.kogito.event.process.UserTaskInstanceDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
import org.kie.kogito.index.event.KogitoJobCloudEvent;
import io.smallrye.reactive.messaging.providers.connectors.InMemoryConnector;
import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.KOGITO_JOBS_EVENTS;
import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.KOGITO_PROCESSINSTANCES_EVENTS;
+import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.KOGITO_PROCESS_DEFINITIONS_EVENTS;
import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.KOGITO_USERTASKINSTANCES_EVENTS;
public abstract class AbstractIndexingIT {
@@ -34,11 +39,15 @@ public abstract class AbstractIndexingIT {
@Any
public InMemoryConnector connector;
- protected void indexProcessCloudEvent(ProcessInstanceDataEvent event) {
+ protected void indexProcessCloudEvent(ProcessDefinitionDataEvent event) {
+ connector.source(KOGITO_PROCESS_DEFINITIONS_EVENTS).send(event);
+ }
+
+ protected void indexProcessCloudEvent(ProcessInstanceDataEvent> event) {
connector.source(KOGITO_PROCESSINSTANCES_EVENTS).send(event);
}
- protected void indexUserTaskCloudEvent(UserTaskInstanceDataEvent event) {
+ protected void indexUserTaskCloudEvent(UserTaskInstanceDataEvent> event) {
connector.source(KOGITO_USERTASKINSTANCES_EVENTS).send(event);
}
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/AbstractIndexingServiceIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/AbstractIndexingServiceIT.java
index 29f212218b..acceac7a11 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/AbstractIndexingServiceIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/AbstractIndexingServiceIT.java
@@ -1,27 +1,32 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service;
import java.time.Duration;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Date;
import java.util.List;
-import java.util.Map;
import java.util.UUID;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.ScheduledThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
import java.util.stream.IntStream;
import javax.inject.Inject;
@@ -30,11 +35,15 @@
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
+import org.kie.kogito.event.process.ProcessDefinitionDataEvent;
import org.kie.kogito.event.process.ProcessInstanceDataEvent;
-import org.kie.kogito.event.process.UserTaskInstanceDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceErrorDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceStateDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceStateDataEvent;
import org.kie.kogito.index.event.KogitoJobCloudEvent;
-import org.kie.kogito.index.model.MilestoneStatus;
+import org.kie.kogito.index.model.ProcessInstanceState;
import org.kie.kogito.index.storage.DataIndexStorageService;
+import org.kie.kogito.index.test.TestUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -44,27 +53,26 @@
import static io.restassured.RestAssured.given;
import static io.restassured.config.EncoderConfig.encoderConfig;
import static org.awaitility.Awaitility.await;
+import static org.hamcrest.CoreMatchers.anything;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.isA;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.emptyOrNullString;
+import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasItems;
import static org.kie.kogito.index.DateTimeUtils.formatDateTime;
-import static org.kie.kogito.index.DateTimeUtils.formatOffsetDateTime;
import static org.kie.kogito.index.DateTimeUtils.formatZonedDateTime;
import static org.kie.kogito.index.model.ProcessInstanceState.ACTIVE;
import static org.kie.kogito.index.model.ProcessInstanceState.COMPLETED;
-import static org.kie.kogito.index.model.ProcessInstanceState.ERROR;
+import static org.kie.kogito.index.model.ProcessInstanceState.PENDING;
import static org.kie.kogito.index.service.GraphQLUtils.getJobById;
import static org.kie.kogito.index.service.GraphQLUtils.getProcessDefinitionByIdAndVersion;
import static org.kie.kogito.index.service.GraphQLUtils.getProcessInstanceByBusinessKey;
import static org.kie.kogito.index.service.GraphQLUtils.getProcessInstanceByCreatedBy;
import static org.kie.kogito.index.service.GraphQLUtils.getProcessInstanceById;
import static org.kie.kogito.index.service.GraphQLUtils.getProcessInstanceByIdAndAddon;
-import static org.kie.kogito.index.service.GraphQLUtils.getProcessInstanceByIdAndErrorNode;
-import static org.kie.kogito.index.service.GraphQLUtils.getProcessInstanceByIdAndMilestoneName;
-import static org.kie.kogito.index.service.GraphQLUtils.getProcessInstanceByIdAndMilestoneStatus;
import static org.kie.kogito.index.service.GraphQLUtils.getProcessInstanceByIdAndNullParentProcessInstanceId;
import static org.kie.kogito.index.service.GraphQLUtils.getProcessInstanceByIdAndNullRootProcessInstanceId;
import static org.kie.kogito.index.service.GraphQLUtils.getProcessInstanceByIdAndParentProcessInstanceId;
@@ -77,20 +85,19 @@
import static org.kie.kogito.index.service.GraphQLUtils.getUserTaskInstanceById;
import static org.kie.kogito.index.service.GraphQLUtils.getUserTaskInstanceByIdAndActualOwner;
import static org.kie.kogito.index.service.GraphQLUtils.getUserTaskInstanceByIdAndCompleted;
-import static org.kie.kogito.index.service.GraphQLUtils.getUserTaskInstanceByIdAndPotentialGroups;
-import static org.kie.kogito.index.service.GraphQLUtils.getUserTaskInstanceByIdAndPotentialUsers;
import static org.kie.kogito.index.service.GraphQLUtils.getUserTaskInstanceByIdAndProcessId;
import static org.kie.kogito.index.service.GraphQLUtils.getUserTaskInstanceByIdAndStarted;
import static org.kie.kogito.index.service.GraphQLUtils.getUserTaskInstanceByIdAndState;
import static org.kie.kogito.index.service.GraphQLUtils.getUserTaskInstanceByIdNoActualOwner;
import static org.kie.kogito.index.test.TestUtils.getJobCloudEvent;
import static org.kie.kogito.index.test.TestUtils.getProcessCloudEvent;
-import static org.kie.kogito.index.test.TestUtils.getProcessInstanceVariablesMap;
+import static org.kie.kogito.index.test.TestUtils.getProcessDefinitionDataEvent;
import static org.kie.kogito.index.test.TestUtils.getUserTaskCloudEvent;
public abstract class AbstractIndexingServiceIT extends AbstractIndexingIT {
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractIndexingServiceIT.class);
+ public static final String CURRENT_USER = "currentUser";
Duration timeout = Duration.ofSeconds(30);
@@ -132,67 +139,52 @@ void testDefaultGraphqlTypes() {
.then().log().ifValidationFails().statusCode(200).body("data.Jobs", isA(Collection.class));
}
- protected void validateProcessDefinition(String query, ProcessInstanceDataEvent event) {
+ protected void validateProcessDefinition(String query, ProcessDefinitionDataEvent event) {
LOGGER.debug("GraphQL query: {}", query);
await()
.atMost(timeout)
.untilAsserted(() -> given().contentType(ContentType.JSON).body(query)
.when().post("/graphql")
.then().log().ifValidationFails().statusCode(200)
- .body("data.ProcessDefinitions[0].id", is(event.getData().getProcessId()))
- .body("data.ProcessDefinitions[0].name", is(event.getData().getProcessName()))
+ .body("data.ProcessDefinitions[0].id", is(event.getData().getId()))
+ .body("data.ProcessDefinitions[0].name", is(event.getData().getName()))
.body("data.ProcessDefinitions[0].version", is(event.getData().getVersion()))
- .body("data.ProcessDefinitions[0].type", is(event.getData().getProcessType()))
- .body("data.ProcessDefinitions[0].addons", event.getKogitoAddons() == null ? is(nullValue()) : hasItems(event.getKogitoAddons().split(",")))
- .body("data.ProcessDefinitions[0].roles", event.getData().getRoles() == null ? is(nullValue()) : hasItems(event.getData().getRoles().toArray())));
+ .body("data.ProcessDefinitions[0].type", is(event.getData().getType()))
+ .body("data.ProcessDefinitions[0].description", is(event.getData().getDescription()))
+ .body("data.ProcessDefinitions[0].annotations", containsInAnyOrder(event.getData().getAnnotations().toArray()))
+ .body("data.ProcessDefinitions[0].metadata", equalTo(event.getData().getMetadata()))
+ .body("data.ProcessDefinitions[0].addons", containsInAnyOrder(event.getData().getAddons().toArray()))
+ .body("data.ProcessDefinitions[0].roles", containsInAnyOrder(event.getData().getRoles().toArray())));
}
- protected void validateProcessInstance(String query, ProcessInstanceDataEvent event, String childProcessInstanceId) {
+ protected void validateProcessInstance(String query, ProcessInstanceStateDataEvent event, String childProcessInstanceId) {
LOGGER.debug("GraphQL query: {}", query);
await()
.atMost(timeout)
.untilAsserted(() -> given().contentType(ContentType.JSON).body(query)
.when().post("/graphql")
.then().log().ifValidationFails().statusCode(200)
- .body("data.ProcessInstances[0].id", is(event.getData().getId()))
+ .body("data.ProcessInstances[0].id", is(event.getData().getProcessInstanceId()))
.body("data.ProcessInstances[0].processId", is(event.getData().getProcessId()))
.body("data.ProcessInstances[0].processName", is(event.getData().getProcessName()))
- .body("data.ProcessInstances[0].version", is(event.getData().getVersion()))
+ .body("data.ProcessInstances[0].version", is(event.getData().getProcessVersion()))
+ .body("data.ProcessInstances[0].state", is(ProcessInstanceState.fromStatus(event.getData().getState()).name()))
.body("data.ProcessInstances[0].rootProcessId", is(event.getData().getRootProcessId()))
- .body("data.ProcessInstances[0].rootProcessInstanceId", is(event.getData().getRootInstanceId()))
+ .body("data.ProcessInstances[0].rootProcessInstanceId", is(event.getData().getRootProcessInstanceId()))
.body("data.ProcessInstances[0].parentProcessInstanceId", is(event.getData().getParentInstanceId()))
.body("data.ProcessInstances[0].parentProcessInstance.id", event.getData().getParentInstanceId() == null ? is(nullValue()) : is(event.getData().getParentInstanceId()))
.body("data.ProcessInstances[0].parentProcessInstance.processName", event.getData().getParentInstanceId() == null ? is(nullValue()) : is(not(emptyOrNullString())))
- .body("data.ProcessInstances[0].start", is(formatDateTime(event.getData().getStartDate())))
- .body("data.ProcessInstances[0].end", event.getData().getEndDate() == null ? is(nullValue()) : is(formatDateTime(event.getData().getEndDate())))
+ .body("data.ProcessInstances[0].start", anything())
.body("data.ProcessInstances[0].childProcessInstances[0].id", childProcessInstanceId == null ? is(nullValue()) : is(childProcessInstanceId))
.body("data.ProcessInstances[0].childProcessInstances[0].processName", childProcessInstanceId == null ? is(nullValue()) : is(not(emptyOrNullString())))
.body("data.ProcessInstances[0].endpoint", is(event.getSource().toString()))
.body("data.ProcessInstances[0].serviceUrl", event.getSource().toString().equals("/" + event.getData().getProcessId()) ? is(nullValue()) : is("http://localhost:8080"))
.body("data.ProcessInstances[0].addons", event.getKogitoAddons() == null ? is(nullValue()) : hasItems(event.getKogitoAddons().split(",")))
- .body("data.ProcessInstances[0].error.message", event.getData().getError() == null ? is(nullValue()) : is(event.getData().getError().getErrorMessage()))
- .body("data.ProcessInstances[0].error.nodeDefinitionId", event.getData().getError() == null ? is(nullValue()) : is(event.getData().getError().getNodeDefinitionId()))
- .body("data.ProcessInstances[0].lastUpdate", is(formatOffsetDateTime(event.getTime())))
- .body("data.ProcessInstances[0].nodes.size()", is(event.getData().getNodeInstances().size()))
- .body("data.ProcessInstances[0].nodes[0].id", is(event.getData().getNodeInstances().stream().findFirst().get().getId()))
- .body("data.ProcessInstances[0].nodes[0].name", is(event.getData().getNodeInstances().stream().findFirst().get().getNodeName()))
- .body("data.ProcessInstances[0].nodes[0].nodeId", is(event.getData().getNodeInstances().stream().findFirst().get().getNodeId()))
- .body("data.ProcessInstances[0].nodes[0].type", is(event.getData().getNodeInstances().stream().findFirst().get().getNodeType()))
- .body("data.ProcessInstances[0].nodes[0].definitionId", is(event.getData().getNodeInstances().stream().findFirst().get().getNodeDefinitionId()))
- .body("data.ProcessInstances[0].nodes[0].enter", is(formatDateTime(event.getData().getNodeInstances().stream().findFirst().get().getTriggerTime())))
- .body("data.ProcessInstances[0].nodes[0].exit",
- event.getData().getNodeInstances().stream().findFirst().get().getLeaveTime() == null ? is(nullValue())
- : is(formatDateTime(event.getData().getNodeInstances().stream().findFirst().get().getLeaveTime())))
- .body("data.ProcessInstances[0].milestones.size()", is(event.getData().getMilestones().size()))
- .body("data.ProcessInstances[0].milestones[0].id", is(event.getData().getMilestones().stream().findFirst().get().getId()))
- .body("data.ProcessInstances[0].milestones[0].name", is(event.getData().getMilestones().stream().findFirst().get().getName()))
- .body("data.ProcessInstances[0].milestones[0].status", is(event.getData().getMilestones().stream().findFirst().get().getStatus()))
- .body("data.ProcessInstances[0].definition.id", is(event.getData().getProcessId()))
- .body("data.ProcessInstances[0].definition.version", is(event.getData().getVersion()))
- .body("data.ProcessInstances[0].definition.name", is(event.getData().getProcessName())));
+ .body("data.ProcessInstances[0].lastUpdate", anything()));
+
}
- protected void validateProcessInstance(String query, ProcessInstanceDataEvent event) {
+ protected void validateProcessInstance(String query, ProcessInstanceStateDataEvent event) {
validateProcessInstance(query, event, null);
}
@@ -203,7 +195,9 @@ void testProcessInstancePagination() {
IntStream.range(0, 100).forEach(i -> {
String pId = UUID.randomUUID().toString();
- ProcessInstanceDataEvent startEvent = getProcessCloudEvent(processId, pId, ACTIVE, null, null, null, "currentUser");
+
+ ProcessInstanceDataEvent> startEvent = getProcessCloudEvent(processId, pId, ACTIVE, null, null, null, CURRENT_USER);
+
indexProcessCloudEvent(startEvent);
pIds.add(pId);
await()
@@ -240,7 +234,7 @@ void testUserTaskInstancePagination() {
IntStream.range(0, 100).forEach(i -> {
String taskId = UUID.randomUUID().toString();
- UserTaskInstanceDataEvent event = getUserTaskCloudEvent(taskId, processId, UUID.randomUUID().toString(), null, null, "InProgress");
+ UserTaskInstanceStateDataEvent event = getUserTaskCloudEvent(taskId, processId, UUID.randomUUID().toString(), null, null, "InProgress");
indexUserTaskCloudEvent(event);
taskIds.add(taskId);
await()
@@ -289,6 +283,42 @@ void testUserTaskInstancePagination() {
.body("data.UserTaskInstances[99].id", is(taskIds.get(99))));
}
+ @Test
+ void testConcurrentProcessInstanceIndex() throws Exception {
+ String processId = "travels";
+ ExecutorService executorService = new ScheduledThreadPoolExecutor(8);
+ int max_instance_events = 10;
+ List> futures = new ArrayList<>();
+ String processInstanceId = UUID.randomUUID().toString();
+ //indexing multiple events in parallel to the same process instance id
+ for (int i = 0; i < max_instance_events; i++) {
+ addFutureEvent(futures, processId, processInstanceId, ACTIVE, executorService, false);
+ addFutureEvent(futures, processId, processInstanceId, PENDING, executorService, false);
+ addFutureEvent(futures, processId, processInstanceId, ACTIVE, executorService, false);
+ addFutureEvent(futures, processId, processInstanceId, COMPLETED, executorService, false);
+ }
+ //delay the last event to assert later the state
+ addFutureEvent(futures, processId, processInstanceId, COMPLETED, executorService, true);
+ //wait for all futures to complete
+ CompletableFuture.allOf(futures.toArray(CompletableFuture[]::new)).get(20, TimeUnit.SECONDS);
+ ProcessInstanceStateDataEvent event = getProcessCloudEvent(processId, processInstanceId, COMPLETED, null, null, null, CURRENT_USER);
+ validateProcessInstance(getProcessInstanceById(processInstanceId), event);
+ }
+
+ private void addFutureEvent(List> futures, String processId, String processInstanceId, ProcessInstanceState state, ExecutorService executorService, boolean delay) {
+ futures.add(CompletableFuture.runAsync(() -> {
+ if (delay) {
+ try {
+ Thread.sleep(500);
+ } catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ ProcessInstanceStateDataEvent event = getProcessCloudEvent(processId, processInstanceId, state, null, null, null, CURRENT_USER);
+ indexProcessCloudEvent(event);
+ }, executorService));
+ }
+
@Test
void testProcessInstanceIndex() throws Exception {
String processId = "travels";
@@ -296,38 +326,33 @@ void testProcessInstanceIndex() throws Exception {
String subProcessId = processId + "_sub";
String subProcessInstanceId = UUID.randomUUID().toString();
- ProcessInstanceDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+ ProcessDefinitionDataEvent definitionDataEvent = getProcessDefinitionDataEvent(processId);
+ indexProcessCloudEvent(definitionDataEvent);
+ validateProcessDefinition(getProcessDefinitionByIdAndVersion(processId, definitionDataEvent.getData().getVersion()), definitionDataEvent);
+
+ ProcessInstanceStateDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, CURRENT_USER);
indexProcessCloudEvent(startEvent);
- validateProcessDefinition(getProcessDefinitionByIdAndVersion(startEvent.getKogitoProcessId(), startEvent.getData().getVersion()), startEvent);
validateProcessInstance(getProcessInstanceById(processInstanceId), startEvent);
validateProcessInstance(getProcessInstanceByIdAndState(processInstanceId, ACTIVE), startEvent);
validateProcessInstance(getProcessInstanceByIdAndProcessId(processInstanceId, processId), startEvent);
validateProcessInstance(
- getProcessInstanceByIdAndStart(processInstanceId, formatDateTime(startEvent.getData().getStartDate())),
+ getProcessInstanceByIdAndStart(processInstanceId, formatDateTime(startEvent.getData().getEventDate())),
startEvent);
validateProcessInstance(getProcessInstanceByIdAndAddon(processInstanceId, "process-management"), startEvent);
- validateProcessInstance(getProcessInstanceByIdAndMilestoneName(processInstanceId, "SimpleMilestone"), startEvent);
- validateProcessInstance(getProcessInstanceByIdAndMilestoneStatus(processInstanceId, MilestoneStatus.AVAILABLE.name()),
- startEvent);
validateProcessInstance(getProcessInstanceByBusinessKey(startEvent.getData().getBusinessKey()), startEvent);
- validateProcessInstance(getProcessInstanceByCreatedBy(startEvent.getData().getIdentity()), startEvent);
- validateProcessInstance(getProcessInstanceByUpdatedBy(startEvent.getData().getIdentity()), startEvent);
-
- ProcessInstanceDataEvent endEvent = getProcessCloudEvent(processId, processInstanceId, COMPLETED, null, null, null, "currentUser");
- endEvent.getData().update().endDate(new Date());
- Map variablesMap = getProcessInstanceVariablesMap();
- ((Map) variablesMap.get("hotel")).put("name", "Ibis");
- ((Map) variablesMap.get("flight")).put("flightNumber", "QF444");
- endEvent.getData().update().variables(variablesMap);
- endEvent.getData().getMilestones().stream().findFirst().get().update().status(MilestoneStatus.COMPLETED.name());
+ validateProcessInstance(getProcessInstanceByCreatedBy(startEvent.getData().getEventUser()), startEvent);
+ validateProcessInstance(getProcessInstanceByUpdatedBy(startEvent.getData().getEventUser()), startEvent);
+
+ ProcessInstanceStateDataEvent endEvent = getProcessCloudEvent(processId, processInstanceId, COMPLETED, null, null, null, CURRENT_USER);
+
indexProcessCloudEvent(endEvent);
validateProcessInstance(getProcessInstanceByIdAndState(processInstanceId, COMPLETED), endEvent);
- validateProcessInstance(getProcessInstanceByIdAndMilestoneStatus(processInstanceId, MilestoneStatus.COMPLETED.name()), endEvent);
- ProcessInstanceDataEvent event = getProcessCloudEvent(subProcessId, subProcessInstanceId, ACTIVE, processInstanceId,
- processId, processInstanceId, "currentUser");
+ ProcessInstanceStateDataEvent event = getProcessCloudEvent(subProcessId, subProcessInstanceId, ACTIVE, processInstanceId,
+ processId, processInstanceId, CURRENT_USER);
+
indexProcessCloudEvent(event);
validateProcessInstance(getProcessInstanceByParentProcessInstanceId(processInstanceId), event);
@@ -340,13 +365,19 @@ void testProcessInstanceIndex() throws Exception {
validateProcessInstance(getProcessInstanceByIdAndParentProcessInstanceId(subProcessInstanceId, processInstanceId),
event);
- ProcessInstanceDataEvent errorEvent = getProcessCloudEvent(subProcessId, subProcessInstanceId, ERROR, processInstanceId,
- processId, processInstanceId, "currentUser");
+ ProcessInstanceErrorDataEvent errorEvent = TestUtils.deriveErrorProcessCloudEvent(event, "error", "nodeDefintionId", "nodeInstanceId");
+
indexProcessCloudEvent(errorEvent);
- validateProcessInstance(
- getProcessInstanceByIdAndErrorNode(subProcessInstanceId, errorEvent.getData().getError().getNodeDefinitionId()),
- errorEvent);
+ await()
+ .atMost(timeout)
+ .untilAsserted(() -> given().contentType(ContentType.JSON).body(getProcessInstanceById(event.getKogitoProcessInstanceId()))
+ .when().post("/graphql")
+ .then().log().ifValidationFails().statusCode(200)
+ .body("data.ProcessInstances[0].id", is(event.getData().getProcessInstanceId()))
+ .body("data.ProcessInstances[0].error.message", errorEvent.getData().getErrorMessage() == null ? is(nullValue()) : is(errorEvent.getData().getErrorMessage()))
+ .body("data.ProcessInstances[0].error.nodeDefinitionId",
+ errorEvent.getData().getNodeDefinitionId() == null ? is(nullValue()) : is(errorEvent.getData().getNodeDefinitionId())));
}
@Test
@@ -356,36 +387,37 @@ void testUserTaskInstanceIndex() throws Exception {
String processId = "deals";
String processInstanceId = UUID.randomUUID().toString();
- UserTaskInstanceDataEvent event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, state);
+ UserTaskInstanceStateDataEvent event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, state);
indexUserTaskCloudEvent(event);
validateUserTaskInstance(getUserTaskInstanceById(taskId), event);
validateUserTaskInstance(getUserTaskInstanceByIdAndActualOwner(taskId, "kogito"), event);
validateUserTaskInstance(getUserTaskInstanceByIdAndProcessId(taskId, processId), event);
- validateUserTaskInstance(
- getUserTaskInstanceByIdAndPotentialGroups(taskId, new ArrayList<>(event.getData().getPotentialGroups())),
- event);
- validateUserTaskInstance(
- getUserTaskInstanceByIdAndPotentialUsers(taskId, new ArrayList<>(event.getData().getPotentialUsers())), event);
+
validateUserTaskInstance(getUserTaskInstanceByIdAndState(taskId, event.getData().getState()), event);
- validateUserTaskInstance(getUserTaskInstanceByIdAndStarted(taskId, formatDateTime(event.getData().getStartDate())),
+ validateUserTaskInstance(getUserTaskInstanceByIdAndStarted(taskId, formatDateTime(event.getData().getEventDate())),
event);
- validateUserTaskInstance(
- getUserTaskInstanceByIdAndCompleted(taskId, formatDateTime(event.getData().getCompleteDate())), event);
- event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, state);
- event.getData().update().completeDate(new Date());
- event.getData().update().taskPriority("Low");
- event.getData().update().actualOwner("admin");
- event.getData().update().state("Completed");
+ state = "Completed";
+ event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, state, "kogito", 2);
+ indexUserTaskCloudEvent(event);
+
+ validateUserTaskInstance(
+ getUserTaskInstanceByIdAndCompleted(taskId, formatDateTime(event.getData().getEventDate())), event);
+ event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, state, "admin", 2);
indexUserTaskCloudEvent(event);
validateUserTaskInstance(getUserTaskInstanceByIdAndActualOwner(taskId, "admin"), event);
- event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, state, null);
+ event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, state, null, 2);
+ LOGGER.info("event {}", event);
indexUserTaskCloudEvent(event);
+ LOGGER.info("value {}", given().contentType(ContentType.JSON).body(getUserTaskInstanceById(taskId))
+ .when().post("/graphql")
+ .then().statusCode(200).extract().asString());
+
validateUserTaskInstance(getUserTaskInstanceByIdNoActualOwner(taskId), event);
}
@@ -428,29 +460,24 @@ protected void validateJob(String query, KogitoJobCloudEvent event) {
.body("data.Jobs[0].endpoint", is(event.getData().getEndpoint())));
}
- protected void validateUserTaskInstance(String query, UserTaskInstanceDataEvent event) {
+ protected void validateUserTaskInstance(String query, UserTaskInstanceStateDataEvent event) {
LOGGER.debug("GraphQL query: {}", query);
await()
.atMost(timeout)
.untilAsserted(() -> given().contentType(ContentType.JSON).body(query)
.when().post("/graphql")
.then().log().ifValidationFails().statusCode(200)
- .body("data.UserTaskInstances[0].id", is(event.getData().getId()))
- .body("data.UserTaskInstances[0].processId", is(event.getData().getProcessId()))
- .body("data.UserTaskInstances[0].rootProcessId", is(event.getData().getRootProcessId()))
- .body("data.UserTaskInstances[0].rootProcessInstanceId", is(event.getData().getRootProcessInstanceId()))
- .body("data.UserTaskInstances[0].description", is(event.getData().getTaskDescription()))
- .body("data.UserTaskInstances[0].name", is(event.getData().getTaskName()))
- .body("data.UserTaskInstances[0].priority", is(event.getData().getTaskPriority()))
- .body("data.UserTaskInstances[0].actualOwner", is(event.getData().getActualOwner()))
- .body("data.UserTaskInstances[0].excludedUsers", hasItems(event.getData().getExcludedUsers().toArray()))
- .body("data.UserTaskInstances[0].potentialUsers", hasItems(event.getData().getPotentialUsers().toArray()))
- .body("data.UserTaskInstances[0].potentialGroups", hasItems(event.getData().getPotentialGroups().toArray()))
- .body("data.UserTaskInstances[0].started", is(formatDateTime(event.getData().getStartDate())))
- .body("data.UserTaskInstances[0].completed", is(formatDateTime(event.getData().getCompleteDate())))
- .body("data.UserTaskInstances[0].lastUpdate", is(formatOffsetDateTime(event.getTime())))
+ .body("data.UserTaskInstances[0].id", is(event.getData().getUserTaskInstanceId()))
+ .body("data.UserTaskInstances[0].processInstanceId", is(event.getData().getProcessInstanceId()))
+ .body("data.UserTaskInstances[0].description", is(event.getData().getUserTaskDescription()))
+ .body("data.UserTaskInstances[0].name", is(event.getData().getUserTaskName()))
+ .body("data.UserTaskInstances[0].priority", is(event.getData().getUserTaskPriority()))
+ .body("data.UserTaskInstances[0].actualOwner", event.getData().getActualOwner() != null ? is(event.getData().getActualOwner()) : anything())
+ .body("data.UserTaskInstances[0].started", anything())
+ .body("data.UserTaskInstances[0].lastUpdate", anything())
.body("data.UserTaskInstances[0].endpoint",
- is(event.getSource().toString() + "/" + event.getData().getProcessInstanceId() + "/" + event.getData().getTaskName() + "/" + event.getData().getId())));
+ is(event.getSource().toString() + "/" + event.getData().getProcessInstanceId() + "/" + event.getData().getUserTaskName() + "/"
+ + event.getData().getUserTaskInstanceId())));
}
}
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/AbstractKeycloakIntegrationIndexingServiceIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/AbstractKeycloakIntegrationIndexingServiceIT.java
index 4ebc700660..f2fcd37cd0 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/AbstractKeycloakIntegrationIndexingServiceIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/AbstractKeycloakIntegrationIndexingServiceIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service;
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/GraphQLUtils.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/GraphQLUtils.java
index eb7eb4c0dd..5109b4e112 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/GraphQLUtils.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/GraphQLUtils.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service;
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/api/KogitoRuntimeClientTest.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/api/KogitoRuntimeClientTest.java
index 8510d63950..62fbd15702 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/api/KogitoRuntimeClientTest.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/api/KogitoRuntimeClientTest.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service.api;
@@ -26,6 +29,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
+import org.kie.kogito.index.api.KogitoRuntimeCommonClient;
import org.kie.kogito.index.model.Job;
import org.kie.kogito.index.model.ProcessInstance;
import org.kie.kogito.index.model.UserTaskInstance;
@@ -105,9 +109,11 @@ public class KogitoRuntimeClientTest {
@BeforeEach
public void setup() {
- client = spy(new KogitoRuntimeClientImpl(vertx, identityMock));
- client.gatewayTargetUrl = Optional.empty();
- client.serviceWebClientMap.put(SERVICE_URL, webClientMock);
+ client = spy(new KogitoRuntimeClientImpl());
+ client.setGatewayTargetUrl(Optional.empty());
+ client.addServiceWebClient(SERVICE_URL, webClientMock);
+ client.setVertx(vertx);
+ client.setIdentity(identityMock);
}
@Test
@@ -232,15 +238,14 @@ public void testCancelNodeInstance() {
}
@Test
- public void testCancelJob() {
+ protected void testCancelJobRest() {
setupIdentityMock();
when(webClientMock.delete(anyString())).thenReturn(httpRequestMock);
-
Job job = createJob(JOB_ID, PROCESS_INSTANCE_ID, "SCHEDULED");
client.cancelJob(SERVICE_URL, job);
verify(client).sendDeleteClientRequest(webClientMock,
- format(CANCEL_JOB_PATH, job.getId()),
+ format(KogitoRuntimeCommonClient.CANCEL_JOB_PATH, job.getId()),
"CANCEL Job with id: " + JOB_ID);
ArgumentCaptor handlerCaptor = ArgumentCaptor.forClass(Handler.class);
verify(httpRequestMock).send(handlerCaptor.capture());
@@ -248,21 +253,28 @@ public void testCancelJob() {
}
@Test
- public void testRescheduleJob() {
- String newJobData = "{ }";
+ protected void testRescheduleWithoutJobServiceInstance() {
+ String newJobData = "{\"expirationTime\": \"2023-08-27T04:35:54.631Z\",\"retries\": 2}";
setupIdentityMock();
- when(webClientMock.put(anyString())).thenReturn(httpRequestMock);
- when(httpRequestMock.putHeader(eq("Content-Type"), anyString())).thenReturn(httpRequestMock);
+ when(webClientMock.patch(anyString())).thenReturn(httpRequestMock);
Job job = createJob(JOB_ID, PROCESS_INSTANCE_ID, "SCHEDULED");
client.rescheduleJob(SERVICE_URL, job, newJobData);
- verify(client).sendJSONPutClientRequest(webClientMock,
- format(RESCHEDULE_JOB_PATH, JOB_ID),
- "RESCHEDULED JOB with id: " + job.getId(), newJobData);
+ ArgumentCaptor jsonCaptor = ArgumentCaptor.forClass(JsonObject.class);
+
+ verify(client).sendPatchClientRequest(eq(webClientMock),
+ eq(format(KogitoRuntimeCommonClient.RESCHEDULE_JOB_PATH, JOB_ID)),
+ eq("RESCHEDULED JOB with id: " + job.getId()),
+ jsonCaptor.capture());
+
+ assertThat(jsonCaptor.getValue().getString("expirationTime")).isEqualTo("2023-08-27T04:35:54.631Z");
+ assertThat(jsonCaptor.getValue().getString("retries")).isEqualTo("2");
+
ArgumentCaptor handlerCaptor = ArgumentCaptor.forClass(Handler.class);
JsonObject jsonOject = new JsonObject(newJobData);
verify(httpRequestMock).sendJson(eq(jsonOject), handlerCaptor.capture());
+ verify(httpRequestMock).putHeader("Authorization", "Bearer " + AUTHORIZED_TOKEN);
checkResponseHandling(handlerCaptor.getValue());
}
@@ -576,7 +588,7 @@ public void testMalformedURL() {
@Test
void testOverrideURL() {
String host = "host.testcontainers.internal";
- client.gatewayTargetUrl = Optional.of(host);
+ client.setGatewayTargetUrl(Optional.of(host));
WebClientOptions webClientOptions = client.getWebClientToURLOptions("http://service.com");
assertThat(webClientOptions.getDefaultHost()).isEqualTo(host);
}
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/auth/MultiTenantResolverTest.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/auth/MultiTenantResolverTest.java
index 8d1d9b2dda..6b541c241b 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/auth/MultiTenantResolverTest.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/auth/MultiTenantResolverTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.auth;
import org.junit.jupiter.api.BeforeEach;
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/cache/AbstractQueryIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/cache/AbstractQueryIT.java
index 563ed1b6fd..8fc93d4bf2 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/cache/AbstractQueryIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/cache/AbstractQueryIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service.cache;
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/cache/AbstractStorageIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/cache/AbstractStorageIT.java
index 482a87f692..f38c8a9b3e 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/cache/AbstractStorageIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/cache/AbstractStorageIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service.cache;
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/AbstractWebSocketSubscriptionIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/AbstractWebSocketSubscriptionIT.java
index 3b46cc2381..a577e98587 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/AbstractWebSocketSubscriptionIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/AbstractWebSocketSubscriptionIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service.graphql;
@@ -27,7 +30,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.kie.kogito.event.process.ProcessInstanceDataEvent;
-import org.kie.kogito.event.process.UserTaskInstanceDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
import org.kie.kogito.index.event.KogitoJobCloudEvent;
import org.kie.kogito.index.model.ProcessInstanceState;
import org.kie.kogito.index.service.AbstractIndexingIT;
@@ -149,7 +152,8 @@ private void assertDomainSubscription(String processId, String processInstanceId
.when().post("/graphql")
.then().log().ifValidationFails().statusCode(200).body("data.Travels", isA(Collection.class));
- ProcessInstanceDataEvent event = getProcessCloudEvent(processId, processInstanceId, state, null, null, null, "currentUser");
+ ProcessInstanceDataEvent> event = getProcessCloudEvent(processId, processInstanceId, state, null, null, null, "currentUser");
+
indexProcessCloudEvent(event);
JsonObject json = cf.get(1, TimeUnit.MINUTES);
@@ -157,8 +161,7 @@ private void assertDomainSubscription(String processId, String processInstanceId
assertThatJson(json.toString()).and(
a -> a.node("type").isEqualTo("data"),
a -> a.node("payload.data." + subscriptionName + ".id").isEqualTo(processInstanceId),
- a -> a.node("payload.data." + subscriptionName + ".metadata.processInstances[0].state").isEqualTo(state.name()),
- a -> a.node("payload.data." + subscriptionName + ".traveller.firstName").isEqualTo("Maciej"));
+ a -> a.node("payload.data." + subscriptionName + ".metadata.processInstances[0].state").isEqualTo(state.name()));
}
private void assertProcessInstanceSubscription(String processId, String processInstanceId, ProcessInstanceState state, String subscription, String subscriptionName) throws Exception {
@@ -168,7 +171,8 @@ private void assertProcessInstanceSubscription(String processId, String processI
.when().post("/graphql")
.then().log().ifValidationFails().statusCode(200).body("data.Travels", isA(Collection.class));
- ProcessInstanceDataEvent event = getProcessCloudEvent(processId, processInstanceId, state, null, null, null, "currentUser");
+ ProcessInstanceDataEvent> event = getProcessCloudEvent(processId, processInstanceId, state, null, null, null, "currentUser");
+
indexProcessCloudEvent(event);
JsonObject json = cf.get(1, TimeUnit.MINUTES);
@@ -187,7 +191,7 @@ private void assertUserTaskInstanceSubscription(String taskId, String processId,
.when().post("/graphql")
.then().log().ifValidationFails().statusCode(200).body("data.Deals", isA(Collection.class));
- UserTaskInstanceDataEvent event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, state);
+ UserTaskInstanceDataEvent> event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, state);
indexUserTaskCloudEvent(event);
JsonObject json = cf.get(1, TimeUnit.MINUTES);
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/GraphQLSchemaManagerTest.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/GraphQLSchemaManagerTest.java
index b8c5f792e6..8801502eb1 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/GraphQLSchemaManagerTest.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/GraphQLSchemaManagerTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.graphql;
import org.junit.jupiter.api.Test;
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/query/AbstractGraphQLQueryOrderByIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/query/AbstractGraphQLQueryOrderByIT.java
index 710dccaad2..0dfd09e618 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/query/AbstractGraphQLQueryOrderByIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/query/AbstractGraphQLQueryOrderByIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service.graphql.query;
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/query/AbstractGraphQLRuntimesQueriesIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/query/AbstractGraphQLRuntimesQueriesIT.java
index 5121ae0a48..f9dc10f1e6 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/query/AbstractGraphQLRuntimesQueriesIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/query/AbstractGraphQLRuntimesQueriesIT.java
@@ -1,20 +1,24 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service.graphql.query;
+import java.net.URI;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@@ -25,9 +29,12 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
-import org.kie.kogito.event.process.ProcessInstanceDataEvent;
-import org.kie.kogito.event.process.UserTaskInstanceDataEvent;
-import org.kie.kogito.event.process.UserTaskInstanceEventBody;
+import org.kie.kogito.event.process.ProcessInstanceStateDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceAttachmentDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceAttachmentEventBody;
+import org.kie.kogito.event.usertask.UserTaskInstanceCommentDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceCommentEventBody;
+import org.kie.kogito.event.usertask.UserTaskInstanceStateDataEvent;
import org.kie.kogito.index.api.KogitoRuntimeClient;
import org.kie.kogito.index.event.KogitoJobCloudEvent;
import org.kie.kogito.index.model.UserTaskInstance;
@@ -46,9 +53,9 @@
import static org.kie.kogito.index.test.TestUtils.getJobCloudEvent;
import static org.kie.kogito.index.test.TestUtils.getProcessCloudEvent;
import static org.kie.kogito.index.test.TestUtils.getProcessInstance;
-import static org.kie.kogito.index.test.TestUtils.getTaskAttachment;
-import static org.kie.kogito.index.test.TestUtils.getTaskComment;
+import static org.kie.kogito.index.test.TestUtils.getUserTaskAttachmentEvent;
import static org.kie.kogito.index.test.TestUtils.getUserTaskCloudEvent;
+import static org.kie.kogito.index.test.TestUtils.getUserTaskCommentEvent;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
@@ -78,7 +85,9 @@ public void setup() throws Exception {
@Test
void testProcessInstanceAbort() {
String processInstanceId = UUID.randomUUID().toString();
- ProcessInstanceDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+
+ ProcessInstanceStateDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+
indexProcessCloudEvent(startEvent);
checkOkResponse("{ \"query\" : \"mutation{ ProcessInstanceAbort ( id: \\\"" + processInstanceId + "\\\")}\"}");
@@ -90,7 +99,9 @@ void testProcessInstanceAbort() {
@Test
void testProcessInstanceRetry() {
String processInstanceId = UUID.randomUUID().toString();
- ProcessInstanceDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+
+ ProcessInstanceStateDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+
indexProcessCloudEvent(startEvent);
checkOkResponse("{ \"query\" : \"mutation{ ProcessInstanceRetry ( id: \\\"" + processInstanceId + "\\\")}\"}");
@@ -102,7 +113,9 @@ void testProcessInstanceRetry() {
@Test
void testProcessInstanceSkip() {
String processInstanceId = UUID.randomUUID().toString();
- ProcessInstanceDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+
+ ProcessInstanceStateDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+
indexProcessCloudEvent(startEvent);
checkOkResponse("{ \"query\" : \"mutation{ ProcessInstanceSkip ( id: \\\"" + processInstanceId + "\\\")}\"}");
@@ -116,7 +129,8 @@ void testProcessInstanceUpdateVariables() {
String variablesUpdated = "variablesUpdated";
String processInstanceId = UUID.randomUUID().toString();
- ProcessInstanceDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+ ProcessInstanceStateDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+
indexProcessCloudEvent(startEvent);
checkOkResponse("{ \"query\" : \"mutation{ ProcessInstanceUpdateVariables ( id: \\\"" + processInstanceId + "\\\", variables: \\\"" + variablesUpdated + "\\\")}\"}");
@@ -128,7 +142,9 @@ void testProcessInstanceUpdateVariables() {
@Test
void testProcessDefinitionNodes() {
String processInstanceId = UUID.randomUUID().toString();
- ProcessInstanceDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+
+ ProcessInstanceStateDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+
indexProcessCloudEvent(startEvent);
checkOkResponse("{ \"query\" : \"query { ProcessInstances (where: { id: {equal: \\\"" + processInstanceId + "\\\"}}) { nodeDefinitions { id }} }\" }");
@@ -138,7 +154,9 @@ void testProcessDefinitionNodes() {
@Test
void testProcessInstanceDiagram() {
String processInstanceId = UUID.randomUUID().toString();
- ProcessInstanceDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+
+ ProcessInstanceStateDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+
indexProcessCloudEvent(startEvent);
checkOkResponse("{ \"query\" : \"query { ProcessInstances (where: { id: {equal: \\\"" + processInstanceId + "\\\"}}) {diagram} }\" }");
@@ -150,7 +168,9 @@ void testProcessInstanceDiagram() {
@Test
void testProcessDefinitionSource() {
String processInstanceId = UUID.randomUUID().toString();
- ProcessInstanceDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+
+ ProcessInstanceStateDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+
indexProcessCloudEvent(startEvent);
checkOkResponse("{ \"query\" : \"query { ProcessInstances (where: { id: {equal: \\\"" + processInstanceId + "\\\"}}) {source} }\" }");
@@ -162,7 +182,9 @@ void testProcessDefinitionSource() {
void testNodeInstanceTrigger() {
String nodeId = "nodeIdToTrigger";
String processInstanceId = UUID.randomUUID().toString();
- ProcessInstanceDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+
+ ProcessInstanceStateDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+
indexProcessCloudEvent(startEvent);
checkOkResponse("{ \"query\" : \"mutation{ NodeInstanceTrigger ( id: \\\"" + processInstanceId + "\\\", nodeId: \\\"" + nodeId + "\\\")}\"}");
@@ -175,7 +197,9 @@ void testNodeInstanceTrigger() {
void testNodeInstanceRetrigger() {
String nodeInstanceId = "nodeInstanceIdToRetrigger";
String processInstanceId = UUID.randomUUID().toString();
- ProcessInstanceDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+
+ ProcessInstanceStateDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+
indexProcessCloudEvent(startEvent);
checkOkResponse("{ \"query\" : \"mutation{ NodeInstanceRetrigger ( id: \\\"" + processInstanceId + "\\\", nodeInstanceId: \\\"" + nodeInstanceId + "\\\")}\"}");
@@ -188,7 +212,9 @@ void testNodeInstanceRetrigger() {
void testNodeInstanceCancel() {
String nodeInstanceId = "nodeInstanceIdToCancel";
String processInstanceId = UUID.randomUUID().toString();
- ProcessInstanceDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+
+ ProcessInstanceStateDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+
indexProcessCloudEvent(startEvent);
checkOkResponse("{ \"query\" : \"mutation{ NodeInstanceCancel ( id: \\\"" + processInstanceId + "\\\", nodeInstanceId: \\\"" + nodeInstanceId + "\\\")}\"}");
@@ -232,8 +258,8 @@ void testGetTaskSchema() {
String processInstanceId = UUID.randomUUID().toString();
String taskId = UUID.randomUUID().toString();
- UserTaskInstanceDataEvent event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null,
- null, "InProgress", user);
+ UserTaskInstanceStateDataEvent event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null,
+ null, "InProgress", user, 1);
indexUserTaskCloudEvent(event);
checkOkResponse("{ \"query\" : \"{UserTaskInstances (where: {id: {equal:\\\"" + taskId + "\\\" }}){ " +
@@ -253,8 +279,8 @@ void testUpdateUserTaskInstance() {
String taskId = UUID.randomUUID().toString();
String newDescription = "NewDescription";
- UserTaskInstanceDataEvent event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null,
- null, "InProgress", user);
+ UserTaskInstanceStateDataEvent event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null,
+ null, "InProgress", user, 1);
indexUserTaskCloudEvent(event);
checkOkResponse("{ \"query\" : \"mutation { UserTaskInstanceUpdate ( " +
@@ -279,10 +305,16 @@ void testCreateTaskComment() {
String taskId = UUID.randomUUID().toString();
String comment = "Comment to add";
- UserTaskInstanceDataEvent event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null,
- null, "InProgress", user);
+ UserTaskInstanceStateDataEvent event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null,
+ null, "InProgress", user, 1);
indexUserTaskCloudEvent(event);
+
+ UserTaskInstanceCommentDataEvent commmentEvent = getUserTaskCommentEvent(taskId, processId, processInstanceId, null,
+ null, "InProgress", user, UUID.randomUUID().toString(), comment, UserTaskInstanceCommentEventBody.EVENT_TYPE_ADDED);
+
+ indexUserTaskCloudEvent(commmentEvent);
+
checkOkResponse("{ \"query\" : \"mutation{ UserTaskInstanceCommentCreate(" +
"taskId: \\\"" + taskId + "\\\", " +
"user: \\\"" + user + "\\\", " +
@@ -305,11 +337,16 @@ void testUpdateUserTaskInstanceComment() {
String commentId = UUID.randomUUID().toString();
String commentContent = "commentContent";
- UserTaskInstanceDataEvent event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null,
- null, "InProgress", user);
- UserTaskInstanceEventBody userTaskInstance = event.getData();
- userTaskInstance.setComments(List.of(getTaskComment(commentId, null, null)));
+ UserTaskInstanceStateDataEvent event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null,
+ null, "InProgress", user, 1);
+
indexUserTaskCloudEvent(event);
+
+ UserTaskInstanceCommentDataEvent commmentEvent = getUserTaskCommentEvent(taskId, processId, processInstanceId, null,
+ null, "InProgress", user, commentId, commentContent, UserTaskInstanceCommentEventBody.EVENT_TYPE_ADDED);
+
+ indexUserTaskCloudEvent(commmentEvent);
+
checkOkResponse("{ \"query\" : \"mutation { UserTaskInstanceCommentUpdate ( " +
"user: \\\"" + user + "\\\", " +
"groups: [\\\"managers\\\", \\\"users\\\", \\\"IT\\\"]," +
@@ -330,10 +367,16 @@ void testDeleteUserTaskInstanceComment() {
String taskId = UUID.randomUUID().toString();
String commentId = UUID.randomUUID().toString();
- UserTaskInstanceDataEvent event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null,
- null, "InProgress", user);
- UserTaskInstanceEventBody userTaskInstance = event.getData();
- userTaskInstance.setComments(List.of(getTaskComment(commentId, null, null)));
+ UserTaskInstanceStateDataEvent event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null,
+ null, "InProgress", user, 1);
+
+ indexUserTaskCloudEvent(event);
+
+ UserTaskInstanceCommentDataEvent commmentEvent = getUserTaskCommentEvent(taskId, processId, processInstanceId, null,
+ null, "InProgress", user, commentId, "my content", UserTaskInstanceCommentEventBody.EVENT_TYPE_ADDED);
+
+ indexUserTaskCloudEvent(commmentEvent);
+
indexUserTaskCloudEvent(event);
checkOkResponse("{ \"query\" : \"mutation { UserTaskInstanceCommentDelete ( " +
"user: \\\"" + user + "\\\", " +
@@ -352,13 +395,20 @@ void testDeleteUserTaskInstanceComment() {
void testCreateTaskAttachment() {
String processInstanceId = UUID.randomUUID().toString();
String taskId = UUID.randomUUID().toString();
+ String attachmentId = UUID.randomUUID().toString();
String attachmentName = "attachment name";
- String attachmentUri = "https://drive.google.com/file/d/1Z_Lipg2jzY9TNewTaskAttachmentUri";
+ URI attachmentUri = URI.create("https://drive.google.com/file/d/1Z_Lipg2jzY9TNewTaskAttachmentUri");
- UserTaskInstanceDataEvent event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null,
- null, "InProgress", user);
+ UserTaskInstanceStateDataEvent event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null,
+ null, "InProgress", user, 1);
indexUserTaskCloudEvent(event);
+
+ UserTaskInstanceAttachmentDataEvent attachmentEvent = getUserTaskAttachmentEvent(taskId, processId, processInstanceId, null,
+ null, "InProgress", user, attachmentId, attachmentUri, attachmentName, UserTaskInstanceAttachmentEventBody.EVENT_TYPE_ADDED);
+
+ indexUserTaskCloudEvent(attachmentEvent);
+
checkOkResponse("{ \"query\" : \"mutation{ UserTaskInstanceAttachmentCreate(" +
"taskId: \\\"" + taskId + "\\\", " +
"user: \\\"" + user + "\\\", " +
@@ -372,7 +422,7 @@ void testCreateTaskAttachment() {
userTaskInstanceCaptor.capture(),
eq(user), eq(groups),
eq(attachmentName),
- eq(attachmentUri));
+ eq(attachmentUri.toString()));
assertUserTaskInstance(userTaskInstanceCaptor.getValue(), taskId, processId, processInstanceId, user);
}
@@ -382,13 +432,18 @@ void testUpdateUserTaskInstanceAttachment() {
String taskId = UUID.randomUUID().toString();
String attachmentId = UUID.randomUUID().toString();
String attachmentName = "attachmentName";
- String attachmentUri = "attachmentUri";
+ URI attachmentUri = URI.create("http://localhost:8080");
+
+ UserTaskInstanceStateDataEvent event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null,
+ null, "InProgress", user, 1);
- UserTaskInstanceDataEvent event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null,
- null, "InProgress", user);
- UserTaskInstanceEventBody userTaskInstance = event.getData();
- userTaskInstance.setAttachments(List.of(getTaskAttachment(attachmentId, null, null, null)));
indexUserTaskCloudEvent(event);
+
+ UserTaskInstanceAttachmentDataEvent attachmentEvent = getUserTaskAttachmentEvent(taskId, processId, processInstanceId, null,
+ null, "InProgress", user, attachmentId, attachmentUri, attachmentName, UserTaskInstanceAttachmentEventBody.EVENT_TYPE_ADDED);
+
+ indexUserTaskCloudEvent(attachmentEvent);
+
checkOkResponse("{ \"query\" : \"mutation { UserTaskInstanceAttachmentUpdate ( " +
"user: \\\"" + user + "\\\", " +
"groups: [\\\"managers\\\", \\\"users\\\", \\\"IT\\\"]," +
@@ -400,7 +455,7 @@ void testUpdateUserTaskInstanceAttachment() {
verify(dataIndexApiClient).updateUserTaskInstanceAttachment(eq("http://localhost:8080"),
userTaskInstanceCaptor.capture(),
- eq(user), eq(groups), eq(attachmentId), eq(attachmentName), eq(attachmentUri));
+ eq(user), eq(groups), eq(attachmentId), eq(attachmentName), eq(attachmentUri.toString()));
assertUserTaskInstance(userTaskInstanceCaptor.getValue(), taskId, processId, processInstanceId, user);
}
@@ -409,12 +464,19 @@ void testDeleteUserTaskInstanceAttachment() {
String processInstanceId = UUID.randomUUID().toString();
String taskId = UUID.randomUUID().toString();
String attachmentId = UUID.randomUUID().toString();
+ String attachmentName = "attachmentName";
+ URI attachmentUri = URI.create("http://localhost:8080");
+
+ UserTaskInstanceStateDataEvent event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null,
+ null, "InProgress", user, 1);
- UserTaskInstanceDataEvent event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null,
- null, "InProgress", user);
- UserTaskInstanceEventBody userTaskInstance = event.getData();
- userTaskInstance.setAttachments(List.of(getTaskAttachment(attachmentId, null, null, null)));
indexUserTaskCloudEvent(event);
+
+ UserTaskInstanceAttachmentDataEvent attachmentEvent = getUserTaskAttachmentEvent(taskId, processId, processInstanceId, null,
+ null, "InProgress", user, attachmentId, attachmentUri, attachmentName, UserTaskInstanceAttachmentEventBody.EVENT_TYPE_ADDED);
+
+ indexUserTaskCloudEvent(attachmentEvent);
+
checkOkResponse("{ \"query\" : \"mutation { UserTaskInstanceAttachmentDelete ( " +
"user: \\\"" + user + "\\\", " +
"groups: [\\\"managers\\\", \\\"users\\\", \\\"IT\\\"]," +
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/query/GraphQLQueryMapperTest.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/query/GraphQLQueryMapperTest.java
index 9afc3a976c..ebcca023fd 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/query/GraphQLQueryMapperTest.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/graphql/query/GraphQLQueryMapperTest.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service.graphql.query;
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/json/ProcessInstanceMetaMapperTest.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/json/ProcessInstanceMetaMapperTest.java
index 0899cf7680..bbf559eaa2 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/json/ProcessInstanceMetaMapperTest.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/json/ProcessInstanceMetaMapperTest.java
@@ -1,24 +1,27 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service.json;
import java.util.UUID;
import org.junit.jupiter.api.Test;
-import org.kie.kogito.event.process.ProcessInstanceDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceStateDataEvent;
import org.kie.kogito.index.model.ProcessInstanceState;
import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -38,15 +41,15 @@ public void testProcessInstanceMapper() {
String processInstanceId = UUID.randomUUID().toString();
String rootProcessInstanceId = UUID.randomUUID().toString();
String piPrefix = KOGITO_DOMAIN_ATTRIBUTE + "." + PROCESS_INSTANCES_DOMAIN_ATTRIBUTE;
- ProcessInstanceDataEvent event = getProcessCloudEvent(processId, processInstanceId, ProcessInstanceState.COMPLETED, rootProcessInstanceId, rootProcessId, rootProcessInstanceId, "currentUser");
+
+ ProcessInstanceStateDataEvent event =
+ getProcessCloudEvent(processId, processInstanceId, ProcessInstanceState.ACTIVE, rootProcessInstanceId, rootProcessId, rootProcessInstanceId, "currentUser");
+
ObjectNode json = new ProcessInstanceMetaMapper().apply(event);
assertThat(json).isNotNull();
assertThatJson(json.toString()).and(
a -> a.node("id").isEqualTo(rootProcessInstanceId),
a -> a.node("processId").isEqualTo(rootProcessId),
- a -> a.node("traveller.firstName").isEqualTo("Maciej"),
- a -> a.node("hotel.name").isEqualTo("Meriton"),
- a -> a.node("flight.flightNumber").isEqualTo("MX555"),
a -> a.node(KOGITO_DOMAIN_ATTRIBUTE).isNotNull(),
a -> a.node(KOGITO_DOMAIN_ATTRIBUTE + ".lastUpdate").isEqualTo(event.getTime().toInstant().toEpochMilli()),
a -> a.node(piPrefix).isArray().hasSize(1),
@@ -55,11 +58,11 @@ public void testProcessInstanceMapper() {
a -> a.node(piPrefix + "[0].rootProcessInstanceId").isEqualTo(rootProcessInstanceId),
a -> a.node(piPrefix + "[0].parentProcessInstanceId").isEqualTo(rootProcessInstanceId),
a -> a.node(piPrefix + "[0].rootProcessId").isEqualTo(rootProcessId),
- a -> a.node(piPrefix + "[0].state").isEqualTo(ProcessInstanceState.COMPLETED.ordinal()),
+ a -> a.node(piPrefix + "[0].state").isEqualTo(ProcessInstanceState.ACTIVE.ordinal()),
a -> a.node(piPrefix + "[0].endpoint").isEqualTo(event.getSource().toString()),
- a -> a.node(piPrefix + "[0].start").isEqualTo(event.getData().getStartDate().toInstant().toEpochMilli()),
- a -> a.node(piPrefix + "[0].end").isEqualTo(event.getData().getEndDate().toInstant().toEpochMilli()),
- a -> a.node(piPrefix + "[0].updatedBy").isEqualTo(event.getData().getIdentity().toString()),
+ a -> a.node(piPrefix + "[0].updatedBy").isEqualTo(event.getData().getEventUser().toString()),
+ a -> a.node(piPrefix + "[0].start").isEqualTo(event.getData().getEventDate().toInstant().toEpochMilli()),
+ a -> a.node(piPrefix + "[0].end").isAbsent(),
a -> a.node(piPrefix + "[0].lastUpdate").isEqualTo(event.getTime().toInstant().toEpochMilli()));
}
@@ -70,16 +73,16 @@ public void testProcessInstanceMapperWithBusinessKey() {
String processInstanceId = UUID.randomUUID().toString();
String rootProcessInstanceId = UUID.randomUUID().toString();
String piPrefix = KOGITO_DOMAIN_ATTRIBUTE + "." + PROCESS_INSTANCES_DOMAIN_ATTRIBUTE;
- ProcessInstanceDataEvent event = getProcessCloudEvent(processId, processInstanceId, ProcessInstanceState.COMPLETED, rootProcessInstanceId, rootProcessId, rootProcessInstanceId, "currentUser");
+
+ ProcessInstanceStateDataEvent event =
+ getProcessCloudEvent(processId, processInstanceId, ProcessInstanceState.ACTIVE, rootProcessInstanceId, rootProcessId, rootProcessInstanceId, "currentUser");
+
event.getData().update().businessKey("custom-key");
ObjectNode json = new ProcessInstanceMetaMapper().apply(event);
assertThat(json).isNotNull();
assertThatJson(json.toString()).and(
a -> a.node("id").isEqualTo(rootProcessInstanceId),
a -> a.node("processId").isEqualTo(rootProcessId),
- a -> a.node("traveller.firstName").isEqualTo("Maciej"),
- a -> a.node("hotel.name").isEqualTo("Meriton"),
- a -> a.node("flight.flightNumber").isEqualTo("MX555"),
a -> a.node(KOGITO_DOMAIN_ATTRIBUTE).isNotNull(),
a -> a.node(KOGITO_DOMAIN_ATTRIBUTE + ".lastUpdate").isEqualTo(event.getTime().toInstant().toEpochMilli()),
a -> a.node(piPrefix).isArray().hasSize(1),
@@ -88,12 +91,12 @@ public void testProcessInstanceMapperWithBusinessKey() {
a -> a.node(piPrefix + "[0].rootProcessInstanceId").isEqualTo(rootProcessInstanceId),
a -> a.node(piPrefix + "[0].parentProcessInstanceId").isEqualTo(rootProcessInstanceId),
a -> a.node(piPrefix + "[0].rootProcessId").isEqualTo(rootProcessId),
- a -> a.node(piPrefix + "[0].state").isEqualTo(ProcessInstanceState.COMPLETED.ordinal()),
+ a -> a.node(piPrefix + "[0].state").isEqualTo(ProcessInstanceState.ACTIVE.ordinal()),
a -> a.node(piPrefix + "[0].endpoint").isEqualTo(event.getSource().toString()),
- a -> a.node(piPrefix + "[0].start").isEqualTo(event.getData().getStartDate().toInstant().toEpochMilli()),
- a -> a.node(piPrefix + "[0].end").isEqualTo(event.getData().getEndDate().toInstant().toEpochMilli()),
+ a -> a.node(piPrefix + "[0].start").isEqualTo(event.getData().getEventDate().toInstant().toEpochMilli()),
+ a -> a.node(piPrefix + "[0].end").isAbsent(),
a -> a.node(piPrefix + "[0].lastUpdate").isEqualTo(event.getTime().toInstant().toEpochMilli()),
a -> a.node(piPrefix + "[0].businessKey").isEqualTo(event.getData().getBusinessKey()),
- a -> a.node(piPrefix + "[0].updatedBy").isEqualTo(event.getData().getIdentity().toString()));
+ a -> a.node(piPrefix + "[0].updatedBy").isEqualTo(event.getData().getEventUser().toString()));
}
}
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/json/UserTaskInstanceMetaMapperTest.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/json/UserTaskInstanceMetaMapperTest.java
index 6ccc6ecd0d..2af8e5269a 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/json/UserTaskInstanceMetaMapperTest.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/json/UserTaskInstanceMetaMapperTest.java
@@ -1,24 +1,27 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service.json;
import java.util.UUID;
import org.junit.jupiter.api.Test;
-import org.kie.kogito.event.process.UserTaskInstanceDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceStateDataEvent;
import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -38,7 +41,7 @@ public void testUserTaskInstanceMapper() {
String processInstanceId = UUID.randomUUID().toString();
String rootProcessInstanceId = UUID.randomUUID().toString();
String utPrefix = KOGITO_DOMAIN_ATTRIBUTE + "." + USER_TASK_INSTANCES_DOMAIN_ATTRIBUTE;
- UserTaskInstanceDataEvent event = getUserTaskCloudEvent(taskId, processId, processInstanceId, rootProcessInstanceId, rootProcessId, "InProgress");
+ UserTaskInstanceStateDataEvent event = getUserTaskCloudEvent(taskId, processId, processInstanceId, rootProcessInstanceId, rootProcessId, "InProgress");
ObjectNode json = new UserTaskInstanceMetaMapper().apply(event);
assertThat(json).isNotNull();
assertThatJson(json.toString()).and(
@@ -50,17 +53,12 @@ public void testUserTaskInstanceMapper() {
a -> a.node(utPrefix + "[0].id").isEqualTo(taskId),
a -> a.node(utPrefix + "[0].processInstanceId").isEqualTo(processInstanceId),
a -> a.node(utPrefix + "[0].state").isEqualTo(event.getData().getState()),
- a -> a.node(utPrefix + "[0].description").isEqualTo(event.getData().getTaskDescription()),
- a -> a.node(utPrefix + "[0].name").isEqualTo(event.getData().getTaskName()),
- a -> a.node(utPrefix + "[0].priority").isEqualTo(event.getData().getTaskPriority()),
+ a -> a.node(utPrefix + "[0].description").isEqualTo(event.getData().getUserTaskDescription()),
+ a -> a.node(utPrefix + "[0].name").isEqualTo(event.getData().getUserTaskName()),
+ a -> a.node(utPrefix + "[0].priority").isEqualTo(event.getData().getUserTaskPriority()),
a -> a.node(utPrefix + "[0].actualOwner").isEqualTo(event.getData().getActualOwner()),
- a -> a.node(utPrefix + "[0].adminUsers[0]").isEqualTo(event.getData().getAdminUsers().stream().findFirst().get()),
- a -> a.node(utPrefix + "[0].adminGroups[0]").isEqualTo(event.getData().getAdminGroups().stream().findFirst().get()),
- a -> a.node(utPrefix + "[0].excludedUsers[0]").isEqualTo(event.getData().getExcludedUsers().stream().findFirst().get()),
- a -> a.node(utPrefix + "[0].potentialGroups[0]").isEqualTo(event.getData().getPotentialGroups().stream().findFirst().get()),
- a -> a.node(utPrefix + "[0].potentialUsers[0]").isEqualTo(event.getData().getPotentialUsers().stream().findFirst().get()),
- a -> a.node(utPrefix + "[0].started").isEqualTo(event.getData().getStartDate().toInstant().toEpochMilli()),
- a -> a.node(utPrefix + "[0].completed").isEqualTo(event.getData().getCompleteDate().toInstant().toEpochMilli()),
+ a -> a.node(utPrefix + "[0].started").isEqualTo(event.getData().getEventDate().toInstant().toEpochMilli()),
+ a -> a.node(utPrefix + "[0].completed").isAbsent(),
a -> a.node(utPrefix + "[0].lastUpdate").isEqualTo(event.getTime().toInstant().toEpochMilli()));
}
}
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractDomainMessagingConsumerIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractDomainMessagingConsumerIT.java
index 62d5e7816c..06bbe2dbb2 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractDomainMessagingConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractDomainMessagingConsumerIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.messaging;
import java.time.Duration;
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractDomainMessagingHttpConsumerIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractDomainMessagingHttpConsumerIT.java
index 6c5f27e9cf..3dde99da47 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractDomainMessagingHttpConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractDomainMessagingHttpConsumerIT.java
@@ -1,26 +1,28 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.messaging;
import javax.enterprise.inject.Any;
import javax.inject.Inject;
import org.kie.kogito.event.process.ProcessInstanceDataEvent;
-import org.kie.kogito.event.process.UserTaskInstanceDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
import org.kie.kogito.index.model.ProcessInstanceState;
import io.smallrye.reactive.messaging.providers.connectors.InMemoryConnector;
@@ -37,13 +39,13 @@ public abstract class AbstractDomainMessagingHttpConsumerIT extends AbstractDoma
public InMemoryConnector connector;
protected void sendUserTaskInstanceEvent() throws Exception {
- UserTaskInstanceDataEvent event = getUserTaskCloudEvent("45fae435-b098-4f27-97cf-a0c107072e8b", "travels",
+ UserTaskInstanceDataEvent> event = getUserTaskCloudEvent("45fae435-b098-4f27-97cf-a0c107072e8b", "travels",
"2308e23d-9998-47e9-a772-a078cf5b891b", null, null, "Completed");
connector.source(KOGITO_USERTASKINSTANCES_EVENTS).send(event);
}
protected void sendProcessInstanceEvent() throws Exception {
- ProcessInstanceDataEvent event = getProcessCloudEvent("travels", "2308e23d-9998-47e9-a772-a078cf5b891b",
+ ProcessInstanceDataEvent> event = getProcessCloudEvent("travels", "2308e23d-9998-47e9-a772-a078cf5b891b",
ProcessInstanceState.ACTIVE, null,
null, null, "currentUser");
connector.source(KOGITO_PROCESSINSTANCES_EVENTS).send(event);
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractDomainMessagingKafkaConsumerIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractDomainMessagingKafkaConsumerIT.java
index e31296898c..82fadc8a52 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractDomainMessagingKafkaConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractDomainMessagingKafkaConsumerIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.messaging;
import org.eclipse.microprofile.config.inject.ConfigProperty;
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingConsumerIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingConsumerIT.java
index d9a6e57619..d462d88949 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingConsumerIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.messaging;
import java.time.Duration;
@@ -23,6 +25,7 @@
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
import org.kie.kogito.index.storage.DataIndexStorageService;
import io.restassured.http.ContentType;
@@ -31,6 +34,7 @@
import static org.awaitility.Awaitility.await;
import static org.hamcrest.CoreMatchers.is;
+@Timeout(10000)
public abstract class AbstractMessagingConsumerIT {
Duration timeout = Duration.ofSeconds(30);
@@ -70,6 +74,22 @@ void testProcessInstanceEvent() throws Exception {
.body("data.ProcessInstances[0].id", is(processInstanceId)));
}
+ @Test
+ void testProcessDefinitionEvent() throws Exception {
+ sendProcessDefinitionEvent();
+
+ String id = "jsongreet";
+
+ await()
+ .atMost(timeout)
+ .untilAsserted(
+ () -> given().contentType(ContentType.JSON).body("{ \"query\" : \"{ ProcessDefinitions { id } }\" }")
+ .when().post("/graphql")
+ .then().log().ifValidationFails().statusCode(200)
+ .body("data.ProcessDefinitions.size()", is(1))
+ .body("data.ProcessDefinitions[0].id", is(id)));
+ }
+
@Test
void testUserTaskInstanceEvent() throws Exception {
sendUserTaskInstanceEvent();
@@ -105,6 +125,8 @@ void testJobEvent() throws Exception {
protected abstract void sendProcessInstanceEvent() throws Exception;
+ protected abstract void sendProcessDefinitionEvent() throws Exception;
+
protected abstract void sendJobEvent() throws Exception;
}
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingHttpConsumerIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingHttpConsumerIT.java
index 62212149ea..1f1a4aed39 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingHttpConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingHttpConsumerIT.java
@@ -1,33 +1,43 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.messaging;
import javax.enterprise.inject.Any;
import javax.inject.Inject;
+import org.kie.kogito.event.process.ProcessDefinitionDataEvent;
import org.kie.kogito.event.process.ProcessInstanceDataEvent;
-import org.kie.kogito.event.process.UserTaskInstanceDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
import org.kie.kogito.index.event.KogitoJobCloudEvent;
+import org.kie.kogito.index.json.JsonUtils;
import org.kie.kogito.index.model.ProcessInstanceState;
import io.smallrye.reactive.messaging.providers.connectors.InMemoryConnector;
-import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.*;
-import static org.kie.kogito.index.test.TestUtils.*;
+import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.KOGITO_JOBS_EVENTS;
+import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.KOGITO_PROCESSINSTANCES_EVENTS;
+import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.KOGITO_PROCESS_DEFINITIONS_EVENTS;
+import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.KOGITO_USERTASKINSTANCES_EVENTS;
+import static org.kie.kogito.index.test.TestUtils.getJobCloudEvent;
+import static org.kie.kogito.index.test.TestUtils.getProcessCloudEvent;
+import static org.kie.kogito.index.test.TestUtils.getUserTaskCloudEvent;
+import static org.kie.kogito.index.test.TestUtils.readFileContent;
public abstract class AbstractMessagingHttpConsumerIT extends AbstractMessagingConsumerIT {
@@ -36,18 +46,23 @@ public abstract class AbstractMessagingHttpConsumerIT extends AbstractMessagingC
public InMemoryConnector connector;
protected void sendUserTaskInstanceEvent() throws Exception {
- UserTaskInstanceDataEvent event = getUserTaskCloudEvent("45fae435-b098-4f27-97cf-a0c107072e8b", "travels",
+ UserTaskInstanceDataEvent> event = getUserTaskCloudEvent("45fae435-b098-4f27-97cf-a0c107072e8b", "travels",
"2308e23d-9998-47e9-a772-a078cf5b891b", null, null, "Completed");
connector.source(KOGITO_USERTASKINSTANCES_EVENTS).send(event);
}
protected void sendProcessInstanceEvent() throws Exception {
- ProcessInstanceDataEvent event = getProcessCloudEvent("travels", "2308e23d-9998-47e9-a772-a078cf5b891b",
+ ProcessInstanceDataEvent> event = getProcessCloudEvent("travels", "2308e23d-9998-47e9-a772-a078cf5b891b",
ProcessInstanceState.ACTIVE, null,
null, null, "currentUser");
connector.source(KOGITO_PROCESSINSTANCES_EVENTS).send(event);
}
+ protected void sendProcessDefinitionEvent() throws Exception {
+ ProcessDefinitionDataEvent event = JsonUtils.getObjectMapper().readValue(readFileContent("process_definition_event.json"), ProcessDefinitionDataEvent.class);
+ connector.source(KOGITO_PROCESS_DEFINITIONS_EVENTS).send(event);
+ }
+
protected void sendJobEvent() throws Exception {
KogitoJobCloudEvent event = getJobCloudEvent("8350b8b6-c5d9-432d-a339-a9fc85f642d4_0", "travels",
"7c1d9b38-b462-47c5-8bf2-d9154f54957b", null, null, "SCHEDULED");
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingKafkaConsumerIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingKafkaConsumerIT.java
index 4307b94db2..d398caf2e2 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingKafkaConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingKafkaConsumerIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.messaging;
import org.eclipse.microprofile.config.inject.ConfigProperty;
@@ -22,6 +24,10 @@
import org.kie.kogito.test.quarkus.kafka.KafkaTestClient;
import org.kie.kogito.testcontainers.quarkus.KafkaQuarkusTestResource;
+import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.KOGITO_JOBS_EVENTS;
+import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.KOGITO_PROCESSINSTANCES_EVENTS;
+import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.KOGITO_PROCESS_DEFINITIONS_EVENTS;
+import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.KOGITO_USERTASKINSTANCES_EVENTS;
import static org.kie.kogito.index.test.TestUtils.readFileContent;
public abstract class AbstractMessagingKafkaConsumerIT extends AbstractMessagingConsumerIT {
@@ -46,15 +52,19 @@ void close() {
}
protected void sendUserTaskInstanceEvent() throws Exception {
- send("user_task_instance_event.json", "kogito-usertaskinstances-events");
+ send("user_task_instance_event.json", KOGITO_USERTASKINSTANCES_EVENTS);
}
protected void sendProcessInstanceEvent() throws Exception {
- send("process_instance_event.json", "kogito-processinstances-events");
+ send("process_instance_event.json", KOGITO_PROCESSINSTANCES_EVENTS);
+ }
+
+ protected void sendProcessDefinitionEvent() throws Exception {
+ send("process_definition_event.json", KOGITO_PROCESS_DEFINITIONS_EVENTS);
}
protected void sendJobEvent() throws Exception {
- send("job_event.json", "kogito-jobs-events");
+ send("job_event.json", KOGITO_JOBS_EVENTS);
}
private void send(String file, String topic) throws Exception {
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingLoadKafkaIT.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingLoadKafkaIT.java
index dcab0f098f..fd97ba148a 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingLoadKafkaIT.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/AbstractMessagingLoadKafkaIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.messaging;
import java.time.Duration;
@@ -30,7 +32,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.kie.kogito.event.process.ProcessInstanceDataEvent;
-import org.kie.kogito.event.process.UserTaskInstanceDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
import org.kie.kogito.index.model.ProcessInstanceState;
import org.kie.kogito.persistence.protobuf.ProtobufService;
import org.kie.kogito.test.quarkus.kafka.KafkaTestClient;
@@ -107,17 +109,18 @@ void testMessagingEvents() {
String processInstanceId = UUID.randomUUID().toString();
String taskId = UUID.randomUUID().toString();
- ProcessInstanceDataEvent startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
+ ProcessInstanceDataEvent> startEvent = getProcessCloudEvent(processId, processInstanceId, ACTIVE, null, null, null, "currentUser");
sendProcessInstanceEvent(client, startEvent);
- UserTaskInstanceDataEvent userTaskEvent = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, "InProgress");
+ UserTaskInstanceDataEvent> userTaskEvent = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, "InProgress");
sendUserTaskEvent(client, userTaskEvent);
userTaskEvent = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, "Completed");
sendUserTaskEvent(client, userTaskEvent);
- ProcessInstanceDataEvent endEvent = getProcessCloudEvent(processId, processInstanceId, COMPLETED, null, null, null, "currentUser");
+ ProcessInstanceDataEvent> endEvent = getProcessCloudEvent(processId, processInstanceId, COMPLETED, null, null, null, "currentUser");
+
sendProcessInstanceEvent(client, endEvent);
return processInstanceId;
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/DomainEventConsumerTest.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/DomainEventConsumerTest.java
index 4f3385b0cc..7e303d96cf 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/DomainEventConsumerTest.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/DomainEventConsumerTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.messaging;
import java.util.UUID;
@@ -22,7 +24,9 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.kie.kogito.event.process.ProcessInstanceDataEvent;
-import org.kie.kogito.event.process.UserTaskInstanceDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceStateDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceStateDataEvent;
import org.kie.kogito.index.model.ProcessInstanceState;
import org.kie.kogito.index.service.IndexingService;
import org.mockito.ArgumentCaptor;
@@ -58,7 +62,7 @@ public void setup() {
@Test
public void testOnUserTaskInstanceDomainEventMappingException() {
- UserTaskInstanceDataEvent event = mock(UserTaskInstanceDataEvent.class);
+ UserTaskInstanceStateDataEvent event = mock(UserTaskInstanceStateDataEvent.class);
assertThatExceptionOfType(NullPointerException.class).isThrownBy(() -> consumer.onDomainEvent(event));
@@ -73,7 +77,7 @@ public void testOnUserTaskInstanceDomainEventIndexingException() {
String processId = "travels";
String processInstanceId = UUID.randomUUID().toString();
- UserTaskInstanceDataEvent event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, "InProgress");
+ UserTaskInstanceDataEvent> event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, "InProgress");
assertThatExceptionOfType(RuntimeException.class).isThrownBy(() -> consumer.onDomainEvent(event));
verify(service).indexModel(any());
@@ -85,7 +89,7 @@ public void testOnUserTaskInstanceEvent() {
String processId = "travels";
String processInstanceId = UUID.randomUUID().toString();
- UserTaskInstanceDataEvent event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, "InProgress");
+ UserTaskInstanceDataEvent> event = getUserTaskCloudEvent(taskId, processId, processInstanceId, null, null, "InProgress");
consumer.onDomainEvent(event);
@@ -100,7 +104,7 @@ public void testOnUserTaskInstanceEvent() {
@Test
public void testOnProcessInstanceDomainEventMappingException() {
- ProcessInstanceDataEvent event = mock(ProcessInstanceDataEvent.class);
+ ProcessInstanceStateDataEvent event = mock(ProcessInstanceStateDataEvent.class);
assertThatExceptionOfType(NullPointerException.class).isThrownBy(() -> consumer.onDomainEvent(event));
@@ -114,7 +118,7 @@ public void testOnProcessInstanceDomainEventIndexingException() {
String processId = "travels";
String processInstanceId = UUID.randomUUID().toString();
- ProcessInstanceDataEvent event = getProcessCloudEvent(processId, processInstanceId, ProcessInstanceState.ACTIVE, null,
+ ProcessInstanceDataEvent> event = getProcessCloudEvent(processId, processInstanceId, ProcessInstanceState.ACTIVE, null,
null, null, "currentUser");
assertThatExceptionOfType(RuntimeException.class).isThrownBy(() -> consumer.onDomainEvent(event));
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/KogitoIndexEventConverterTest.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/KogitoIndexEventConverterTest.java
index 174ea1cbfa..064c4f2113 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/KogitoIndexEventConverterTest.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/KogitoIndexEventConverterTest.java
@@ -1,44 +1,73 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.messaging;
+import java.io.IOException;
+import java.net.URI;
+import java.time.OffsetDateTime;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import javax.ws.rs.core.HttpHeaders;
+
import org.eclipse.microprofile.reactive.messaging.Message;
import org.eclipse.microprofile.reactive.messaging.Metadata;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
+import org.kie.kogito.event.process.NodeDefinition;
+import org.kie.kogito.event.process.ProcessDefinitionDataEvent;
import org.kie.kogito.event.process.ProcessInstanceDataEvent;
-import org.kie.kogito.event.process.UserTaskInstanceDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceStateDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceStateDataEvent;
import org.kie.kogito.index.event.KogitoJobCloudEvent;
-import org.kie.kogito.index.event.ProcessInstanceEventMapper;
-import org.kie.kogito.index.event.UserTaskInstanceEventMapper;
+import org.kie.kogito.index.event.mapper.ProcessDefinitionDataEventMerger;
+import org.kie.kogito.index.event.mapper.ProcessInstanceStateDataEventMerger;
+import org.kie.kogito.index.event.mapper.UserTaskInstanceStateEventMerger;
+import org.kie.kogito.index.json.JsonUtils;
import org.kie.kogito.index.json.ObjectMapperProducer;
import org.kie.kogito.index.model.Job;
+import org.kie.kogito.index.model.Node;
+import org.kie.kogito.index.model.ProcessDefinition;
import org.kie.kogito.index.model.ProcessInstance;
import org.kie.kogito.index.model.UserTaskInstance;
+import org.kie.kogito.jackson.utils.ObjectMapperFactory;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import com.fasterxml.jackson.databind.ObjectMapper;
+import io.cloudevents.SpecVersion;
import io.quarkus.reactivemessaging.http.runtime.IncomingHttpMetadata;
import io.vertx.core.MultiMap;
import io.vertx.core.buffer.Buffer;
+import static io.cloudevents.core.v1.CloudEventV1.DATACONTENTTYPE;
+import static io.cloudevents.core.v1.CloudEventV1.DATASCHEMA;
+import static io.cloudevents.core.v1.CloudEventV1.ID;
+import static io.cloudevents.core.v1.CloudEventV1.SOURCE;
+import static io.cloudevents.core.v1.CloudEventV1.SPECVERSION;
+import static io.cloudevents.core.v1.CloudEventV1.SUBJECT;
+import static io.cloudevents.core.v1.CloudEventV1.TIME;
+import static io.cloudevents.core.v1.CloudEventV1.TYPE;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.kie.kogito.index.test.TestUtils.readFileContent;
@@ -47,24 +76,33 @@
@ExtendWith(MockitoExtension.class)
class KogitoIndexEventConverterTest {
- private static final String BINARY_PROCESS_INSTANCE_CLOUD_EVENT_DATA = "process_instance_event.json";
- private static final String BINARY_PROCESS_INSTANCE_CLOUD_EVENT_BODY_DATA = "binary_process_instance_event_data.json";
- private static final String BINARY_USER_TASK_INSTANCE_CLOUD_EVENT_DATA = "binary_user_task_instance_event_data.json";
+ private static final String PROCESS_INSTANCE_STATE_EVENT_TYPE = "ProcessInstanceStateDataEvent";
+ private static final String USER_TASK_INSTANCE_STATE_EVENT_TYPE = "UserTaskInstanceStateDataEvent";
+ private static final String JOB_EVENT_TYPE = "JobEvent";
+ private static final String EVENT_ID = "ID";
+ private static final URI EVENT_SOURCE = URI.create("http://localhost:8080/travels");
+ private static final OffsetDateTime EVENT_TIME = OffsetDateTime.parse("2022-03-18T15:33:05.608395+10:00");
+ private static final URI EVENT_DATA_SCHEMA = URI.create("http://my_event_data_schema/my_schema.json");
+ private static final String EVENT_DATA_CONTENT_TYPE = "application/json; charset=utf-8";
+ private static final String EVENT_SUBJECT = "SUBJECT";
+ private static final String STRUCTURED_PROCESS_INSTANCE_CLOUD_EVENT = "process_instance_event.json";
+ private static final String BINARY_PROCESS_INSTANCE_CLOUD_EVENT_DATA = "binary_process_instance_event_data.json";
+ private static final String BINARY_USER_TASK_INSTANCE_CLOUD_EVENT_DATA = "binary_user_task_instance_state_event_data.json";
private static final String BINARY_KOGITO_JOB_CLOUD_EVENT_DATA = "binary_job_event_data.json";
- @Mock
- IncomingHttpMetadata httpMetadata;
+ private static final String STRUCTURED_PROCESS_DEFINITION_CLOUD_EVENT = "process_definition_event.json";
+ private static final String BINARY_PROCESS_DEFINITION_CLOUD_EVENT = "binary_process_definition_event.json";
+ @Mock
+ private IncomingHttpMetadata httpMetadata;
private MultiMap headers;
-
private KogitoIndexEventConverter converter;
- private ObjectMapper objectMapper;
@BeforeEach
void setUp() {
headers = MultiMap.caseInsensitiveMultiMap();
lenient().doReturn(headers).when(httpMetadata).getHeaders();
converter = new KogitoIndexEventConverter();
- objectMapper = new ObjectMapper();
+ ObjectMapper objectMapper = JsonUtils.getObjectMapper();
new ObjectMapperProducer().customize(objectMapper);
converter.setObjectMapper(objectMapper);
}
@@ -80,94 +118,277 @@ void canConvertBufferPayload() {
@Test
void canConvertNotBufferPayload() {
- assertThat(converter.canConvert(Message.of(new ProcessInstanceDataEvent(), Metadata.of(httpMetadata)),
+ assertThat(converter.canConvert(Message.of(new ProcessInstanceDataEvent<>(), Metadata.of(httpMetadata)),
ProcessInstanceDataEvent.class)).isFalse();
- assertThat(converter.canConvert(Message.of(new UserTaskInstanceDataEvent(), Metadata.of(httpMetadata)),
+ assertThat(converter.canConvert(Message.of(new UserTaskInstanceDataEvent<>(), Metadata.of(httpMetadata)),
UserTaskInstanceDataEvent.class)).isFalse();
assertThat(converter.canConvert(Message.of(KogitoJobCloudEvent.builder().build(), Metadata.of(httpMetadata)),
KogitoJobCloudEvent.class)).isFalse();
}
@Test
- void convertBinaryCloudProcessInstanceEventBody() throws Exception {
- Buffer buffer = Buffer.buffer(readFileContent(BINARY_PROCESS_INSTANCE_CLOUD_EVENT_BODY_DATA));
+ void convertBinaryProcessDefinitionDataEvent() throws Exception {
+ Buffer buffer = Buffer.buffer(readFileContent(BINARY_PROCESS_DEFINITION_CLOUD_EVENT));
+ Message> message = Message.of(buffer, Metadata.of(httpMetadata));
+ // set ce-xxx headers for the binary format.
+ headers.add(ceHeader(SPECVERSION), SpecVersion.V1.toString());
+ headers.add(ceHeader(ID), EVENT_ID);
+ headers.add(ceHeader(SOURCE), EVENT_SOURCE.toString());
+ headers.add(ceHeader(TYPE), ProcessDefinitionDataEvent.PROCESS_DEFINITION_EVENT);
+ headers.add(ceHeader(TIME), EVENT_TIME.toString());
+ headers.add(ceHeader(DATASCHEMA), EVENT_DATA_SCHEMA.toString());
+ headers.add(ceHeader(DATACONTENTTYPE), EVENT_DATA_CONTENT_TYPE);
+ headers.add(ceHeader(SUBJECT), EVENT_SUBJECT);
+
+ Message> result = converter.convert(message, ProcessDefinitionDataEvent.class);
+ assertThat(result.getPayload()).isInstanceOf(ProcessDefinitionDataEvent.class);
+ ProcessDefinitionDataEvent cloudEvent = (ProcessDefinitionDataEvent) result.getPayload();
+
+ assertThat(cloudEvent.getId()).isEqualTo(EVENT_ID);
+ assertThat(cloudEvent.getSpecVersion().toString()).isEqualTo(SpecVersion.V1.toString());
+ assertThat(cloudEvent.getSource().toString()).isEqualTo(EVENT_SOURCE.toString());
+ assertThat(cloudEvent.getType()).isEqualTo(ProcessDefinitionDataEvent.PROCESS_DEFINITION_EVENT);
+ assertThat(cloudEvent.getTime()).isEqualTo(EVENT_TIME);
+ assertThat(cloudEvent.getDataSchema()).isEqualTo(EVENT_DATA_SCHEMA);
+ assertThat(cloudEvent.getDataContentType()).isEqualTo(EVENT_DATA_CONTENT_TYPE);
+ assertThat(cloudEvent.getSubject()).isEqualTo(EVENT_SUBJECT);
+
+ assertProcessDefinitionWithEvent(cloudEvent);
+ }
+
+ private static Map getMetadata() {
+ return ProcessDefinitionDataEventMerger.toStringMap(
+ Map.of("Description", "JSON based greeting workflow",
+ "annotations", getAnnotations(),
+ "Tags", getAnnotations()));
+ }
+
+ private List getNodes() {
+ try {
+ List nodes = ObjectMapperFactory.get()
+ .readerForListOf(NodeDefinition.class)
+ .readValue(readFileContent("nodes_definitions.json"));
+ return nodes.stream().map(definition -> {
+ Node node = new Node();
+ node.setId(definition.getId());
+ node.setName(definition.getName());
+ node.setUniqueId(definition.getUniqueId());
+ node.setType(definition.getType());
+ node.setMetadata(ProcessDefinitionDataEventMerger.toStringMap(definition.getMetadata()));
+ return node;
+ }).collect(Collectors.toList());
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ private static List getAnnotations() {
+ return List.of("test1", "test2", "test3");
+ }
+
+ @Test
+ void convertStructuredProcessDefinitionDataEvent() throws Exception {
+ Buffer buffer = Buffer.buffer(readFileContent(STRUCTURED_PROCESS_DEFINITION_CLOUD_EVENT));
+ Message> message = Message.of(buffer, Metadata.of(httpMetadata));
+
+ // set ce header for the structured format.
+ headers.add(HttpHeaders.CONTENT_TYPE, "application/cloudevents+json");
+
+ Message> result = converter.convert(message, ProcessDefinitionDataEvent.class);
+ assertThat(result.getPayload()).isInstanceOf(ProcessDefinitionDataEvent.class);
+ ProcessDefinitionDataEvent cloudEvent = (ProcessDefinitionDataEvent) result.getPayload();
+
+ assertThat(cloudEvent.getId()).isEqualTo("717af02d-645a-4b27-8058-b67ff1fa8edb");
+ assertThat(cloudEvent.getSpecVersion().toString()).isEqualTo(SpecVersion.V1.toString());
+ assertThat(cloudEvent.getSource().toString()).isEqualTo("http://localhost:8080/jsongreet");
+ assertThat(cloudEvent.getType()).isEqualTo(ProcessDefinitionDataEvent.PROCESS_DEFINITION_EVENT);
+ assertThat(cloudEvent.getTime()).isEqualTo("2023-10-19T10:18:01.540311-03:00");
+
+ assertProcessDefinitionWithEvent(cloudEvent);
+ }
+
+ private void assertProcessDefinitionWithEvent(ProcessDefinitionDataEvent cloudEvent) {
+ ProcessDefinition definition = new ProcessDefinitionDataEventMerger().merge(null, cloudEvent);
+ assertThat(definition.getId()).isEqualTo("jsongreet");
+ assertThat(definition.getVersion()).isEqualTo("1.0");
+ assertThat(definition.getName()).isEqualTo("Greeting workflow");
+ assertThat(definition.getDescription()).isEqualTo("JSON based greeting workflow");
+ assertThat(definition.getEndpoint()).isEqualTo("http://localhost:8080/jsongreet");
+ assertThat(definition.getAnnotations()).containsAll(getAnnotations());
+ assertThat(definition.getNodes()).containsAll(getNodes());
+ assertThat(definition.getMetadata().entrySet()).containsAll(getMetadata().entrySet());
+ assertThat(definition.getType()).isEqualTo("ProcessDefinitionEvent");
+ assertThat(definition.getSource()).isNull();
+ }
+
+ @Test
+ void convertBinaryProcessInstanceDataEvent() throws Exception {
+ Buffer buffer = Buffer.buffer(readFileContent(BINARY_PROCESS_INSTANCE_CLOUD_EVENT_DATA));
Message> message = Message.of(buffer, Metadata.of(httpMetadata));
+
+ // set ce-xxx headers for the binary format.
+ headers.add(ceHeader(SPECVERSION), SpecVersion.V1.toString());
+ headers.add(ceHeader(ID), EVENT_ID);
+ headers.add(ceHeader(SOURCE), EVENT_SOURCE.toString());
+ headers.add(ceHeader(TYPE), PROCESS_INSTANCE_STATE_EVENT_TYPE);
+ headers.add(ceHeader(TIME), EVENT_TIME.toString());
+ headers.add(ceHeader(DATASCHEMA), EVENT_DATA_SCHEMA.toString());
+ headers.add(ceHeader(DATACONTENTTYPE), EVENT_DATA_CONTENT_TYPE);
+ headers.add(ceHeader(SUBJECT), EVENT_SUBJECT);
+
Message> result = converter.convert(message, ProcessInstanceDataEvent.class);
assertThat(result.getPayload()).isInstanceOf(ProcessInstanceDataEvent.class);
- ProcessInstanceDataEvent cloudEvent = (ProcessInstanceDataEvent) result.getPayload();
+ ProcessInstanceStateDataEvent cloudEvent = (ProcessInstanceStateDataEvent) result.getPayload();
+
+ assertThat(cloudEvent.getId()).isEqualTo(EVENT_ID);
+ assertThat(cloudEvent.getSpecVersion().toString()).isEqualTo(SpecVersion.V1.toString());
+ assertThat(cloudEvent.getSource().toString()).isEqualTo(EVENT_SOURCE.toString());
+ assertThat(cloudEvent.getType()).isEqualTo(PROCESS_INSTANCE_STATE_EVENT_TYPE);
+ assertThat(cloudEvent.getTime()).isEqualTo(EVENT_TIME);
+ assertThat(cloudEvent.getDataSchema()).isEqualTo(EVENT_DATA_SCHEMA);
+ assertThat(cloudEvent.getDataContentType()).isEqualTo(EVENT_DATA_CONTENT_TYPE);
+ assertThat(cloudEvent.getSubject()).isEqualTo(EVENT_SUBJECT);
- ProcessInstance pi = new ProcessInstanceEventMapper().apply(cloudEvent);
+ ProcessInstance pi = new ProcessInstance();
+ new ProcessInstanceStateDataEventMerger().merge(pi, cloudEvent);
assertThat(pi.getId()).isEqualTo("5f8b1a48-4d37-4bd2-a1a6-9b8f6097cfdd");
+ assertThat(pi.getVersion()).isEqualTo("1.0");
assertThat(pi.getProcessId()).isEqualTo("subscription_flow");
- assertThat(pi.getProcessName()).isEqualTo("workflow");
- assertThat(pi.getVariables()).hasSize(1);
- assertThat(pi.getNodes()).hasSize(14);
+ assertThat(pi.getProcessName()).isEqualTo("subscription workflow");
+
+ assertThat(pi.getRootProcessInstanceId()).isEqualTo("root_process_instance_id");
+ assertThat(pi.getRootProcessId()).isEqualTo("root_process_id");
+ assertThat(pi.getParentProcessInstanceId()).isEqualTo("parent_instance_id");
+
+ assertThat(pi.getRoles()).containsExactly("admin", "user");
assertThat(pi.getState()).isEqualTo(1);
- assertThat(pi.getStart()).isEqualTo("2023-05-24T10:41:14.911Z");
assertThat(pi.getEnd()).isNull();
- assertThat(pi.getMilestones()).isEmpty();
+ assertThat(pi.getBusinessKey()).isEqualTo("business_key");
}
@Test
- void convertBinaryCloudProcessInstanceEvent() throws Exception {
- Buffer buffer = Buffer.buffer(readFileContent(BINARY_PROCESS_INSTANCE_CLOUD_EVENT_DATA));
+ void convertStructuredProcessInstanceDataEvent() throws Exception {
+ Buffer buffer = Buffer.buffer(readFileContent(STRUCTURED_PROCESS_INSTANCE_CLOUD_EVENT));
Message> message = Message.of(buffer, Metadata.of(httpMetadata));
+
+ // set ce header for the structured format.
+ headers.add(HttpHeaders.CONTENT_TYPE, "application/cloudevents+json");
+
Message> result = converter.convert(message, ProcessInstanceDataEvent.class);
assertThat(result.getPayload()).isInstanceOf(ProcessInstanceDataEvent.class);
- ProcessInstanceDataEvent cloudEvent = (ProcessInstanceDataEvent) result.getPayload();
+ ProcessInstanceDataEvent> cloudEvent = (ProcessInstanceDataEvent>) result.getPayload();
+
+ assertThat(cloudEvent.getId()).isEqualTo("867ff7b4-2e49-49b3-882a-76f65a2c4124");
+ assertThat(cloudEvent.getSpecVersion().toString()).isEqualTo(SpecVersion.V1.toString());
+ assertThat(cloudEvent.getSource().toString()).isEqualTo(EVENT_SOURCE.toString());
+ assertThat(cloudEvent.getType()).isEqualTo(PROCESS_INSTANCE_STATE_EVENT_TYPE);
+ assertThat(cloudEvent.getTime()).isEqualTo(EVENT_TIME);
- ProcessInstance pi = new ProcessInstanceEventMapper().apply(cloudEvent);
+ ProcessInstance pi = new ProcessInstance();
+ new ProcessInstanceStateDataEventMerger().merge(pi, cloudEvent);
assertThat(pi.getId()).isEqualTo("2308e23d-9998-47e9-a772-a078cf5b891b");
+ assertThat(pi.getVersion()).isEqualTo("1.0");
assertThat(pi.getProcessId()).isEqualTo("travels");
assertThat(pi.getProcessName()).isEqualTo("travels");
- assertThat(pi.getVariables()).hasSize(3);
- assertThat(pi.getNodes()).hasSize(5);
assertThat(pi.getState()).isEqualTo(1);
+ assertThat(pi.getBusinessKey()).isEqualTo("F7RTPS");
assertThat(pi.getStart()).isEqualTo("2022-03-18T05:32:21.887Z");
assertThat(pi.getEnd()).isNull();
- assertThat(pi.getMilestones()).isEmpty();
}
@Test
- void convertBinaryCloudKogitoJobEvent() throws Exception {
+ void convertBinaryKogitoJobCloudEvent() throws Exception {
Buffer buffer = Buffer.buffer(readFileContent(BINARY_KOGITO_JOB_CLOUD_EVENT_DATA));
Message> message = Message.of(buffer, Metadata.of(httpMetadata));
+
+ // set ce-xxx headers for the binary format.
+ headers.add(ceHeader(SPECVERSION), SpecVersion.V1.toString());
+ headers.add(ceHeader(ID), EVENT_ID);
+ headers.add(ceHeader(SOURCE), EVENT_SOURCE.toString());
+ headers.add(ceHeader(TYPE), JOB_EVENT_TYPE);
+ headers.add(ceHeader(TIME), EVENT_TIME.toString());
+ headers.add(ceHeader(DATASCHEMA), EVENT_DATA_SCHEMA.toString());
+ headers.add(ceHeader(DATACONTENTTYPE), EVENT_DATA_CONTENT_TYPE);
+ headers.add(ceHeader(SUBJECT), EVENT_SUBJECT);
+
Message> result = converter.convert(message, KogitoJobCloudEvent.class);
assertThat(result.getPayload()).isInstanceOf(KogitoJobCloudEvent.class);
KogitoJobCloudEvent cloudEvent = (KogitoJobCloudEvent) result.getPayload();
+ assertThat(cloudEvent.getId()).isEqualTo(EVENT_ID);
+ assertThat(cloudEvent.getSpecVersion()).isEqualTo(SpecVersion.V1.toString());
+ assertThat(cloudEvent.getSource().toString()).isEqualTo(EVENT_SOURCE.toString());
+ assertThat(cloudEvent.getType()).isEqualTo(JOB_EVENT_TYPE);
+ assertThat(cloudEvent.getTime()).isEqualTo(EVENT_TIME.toZonedDateTime());
+ assertThat(cloudEvent.getSchemaURL()).isEqualTo(EVENT_DATA_SCHEMA);
+ assertThat(cloudEvent.getContentType()).isEqualTo(EVENT_DATA_CONTENT_TYPE);
+ assertThat(cloudEvent.getSubject()).isEqualTo(EVENT_SUBJECT);
+
Job job = cloudEvent.getData();
assertThat(job.getId()).isEqualTo("8350b8b6-c5d9-432d-a339-a9fc85f642d4_0");
assertThat(job.getProcessId()).isEqualTo("timerscycle");
assertThat(job.getProcessInstanceId()).isEqualTo("7c1d9b38-b462-47c5-8bf2-d9154f54957b");
- assertThat(job.getRepeatInterval()).isEqualTo(1000l);
+ assertThat(job.getRootProcessId()).isEqualTo("root_process_id");
+ assertThat(job.getRootProcessInstanceId()).isEqualTo("root_process_instance_id");
+ assertThat(job.getNodeInstanceId()).isEqualTo("node_instance_id");
+ assertThat(job.getRepeatInterval()).isEqualTo(1000);
assertThat(job.getCallbackEndpoint())
.isEqualTo("http://localhost:8080/management/jobs/timerscycle/instances/7c1d9b38-b462-47c5-8bf2-d9154f54957b/timers/8350b8b6-c5d9-432d-a339-a9fc85f642d4_0");
- assertThat(job.getScheduledId()).isEqualTo("0");
+ assertThat(job.getScheduledId()).isEqualTo("1234");
assertThat(job.getStatus()).isEqualTo("SCHEDULED");
-
+ assertThat(job.getRepeatInterval()).isEqualTo(1000);
+ assertThat(job.getRepeatLimit()).isEqualTo(2147483647);
+ assertThat(job.getRetries()).isEqualTo(0);
+ assertThat(job.getExecutionCounter()).isEqualTo(0);
}
@Test
- void convertBinaryCloudUserTaskInstanceEvent() throws Exception {
+ void convertBinaryUserTaskInstanceDataEvent() throws Exception {
Buffer buffer = Buffer.buffer(readFileContent(BINARY_USER_TASK_INSTANCE_CLOUD_EVENT_DATA));
Message> message = Message.of(buffer, Metadata.of(httpMetadata));
+
+ // set ce-xxx headers for the binary format.
+ headers.add(ceHeader(SPECVERSION), SpecVersion.V1.toString());
+ headers.add(ceHeader(ID), EVENT_ID);
+ headers.add(ceHeader(SOURCE), EVENT_SOURCE.toString());
+ headers.add(ceHeader(TYPE), USER_TASK_INSTANCE_STATE_EVENT_TYPE);
+ headers.add(ceHeader(TIME), EVENT_TIME.toString());
+ headers.add(ceHeader(DATASCHEMA), EVENT_DATA_SCHEMA.toString());
+ headers.add(ceHeader(DATACONTENTTYPE), EVENT_DATA_CONTENT_TYPE);
+ headers.add(ceHeader(SUBJECT), EVENT_SUBJECT);
+
Message> result = converter.convert(message, UserTaskInstanceDataEvent.class);
- assertThat(result.getPayload()).isInstanceOf(UserTaskInstanceDataEvent.class);
- UserTaskInstanceDataEvent cloudEvent = (UserTaskInstanceDataEvent) result.getPayload();
+ assertThat(result.getPayload()).isInstanceOf(UserTaskInstanceStateDataEvent.class);
+ UserTaskInstanceStateDataEvent cloudEvent = (UserTaskInstanceStateDataEvent) result.getPayload();
- UserTaskInstance userTaskInstance = new UserTaskInstanceEventMapper().apply(cloudEvent);
- assertThat(userTaskInstance.getId()).isEqualTo("45fae435-b098-4f27-97cf-a0c107072e8b");
+ assertThat(cloudEvent.getId()).isEqualTo(EVENT_ID);
+ assertThat(cloudEvent.getSpecVersion()).isEqualTo(SpecVersion.V1);
+ assertThat(cloudEvent.getSource().toString()).isEqualTo(EVENT_SOURCE.toString());
+ assertThat(cloudEvent.getType()).isEqualTo(USER_TASK_INSTANCE_STATE_EVENT_TYPE);
+ assertThat(cloudEvent.getTime()).isEqualTo(EVENT_TIME);
+ assertThat(cloudEvent.getDataSchema()).isEqualTo(EVENT_DATA_SCHEMA);
+ assertThat(cloudEvent.getDataContentType()).isEqualTo(EVENT_DATA_CONTENT_TYPE);
+ assertThat(cloudEvent.getSubject()).isEqualTo(EVENT_SUBJECT);
- assertThat(userTaskInstance.getInputs().size()).isEqualTo(6);
+ UserTaskInstance userTaskInstance = new UserTaskInstance();
+ new UserTaskInstanceStateEventMerger().merge(userTaskInstance, cloudEvent);
+ assertThat(userTaskInstance.getId()).isEqualTo("45fae435-b098-4f27-97cf-a0c107072e8b");
+ assertThat(userTaskInstance.getProcessInstanceId()).isEqualTo("67fb3435-b098-4f27-97cf-a0c107072e8b");
assertThat(userTaskInstance.getName()).isEqualTo("VisaApplication");
+ assertThat(userTaskInstance.getDescription()).isEqualTo("This task is for applying to a visa");
+ assertThat(userTaskInstance.getReferenceName()).isEqualTo("Apply for visa");
+ assertThat(userTaskInstance.getPriority()).isEqualTo("1");
assertThat(userTaskInstance.getState()).isEqualTo("Completed");
}
@Test
- void convertFailureBinaryUnexpectedBufferContent() throws Exception {
+ void convertFailureBinaryUnexpectedBufferContent() {
Buffer buffer = Buffer.buffer("unexpected Content");
Message> message = Message.of(buffer, Metadata.of(httpMetadata));
assertThatExceptionOfType(RuntimeException.class).isThrownBy(() -> converter.convert(message, ProcessInstanceDataEvent.class));
}
+
+ private static String ceHeader(String name) {
+ return "ce-" + name;
+ }
}
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/ReactiveMessagingEventConsumerTest.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/ReactiveMessagingEventConsumerTest.java
index 7fc8e7dd61..3669c0550c 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/ReactiveMessagingEventConsumerTest.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/messaging/ReactiveMessagingEventConsumerTest.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service.messaging;
@@ -23,7 +26,7 @@
import org.junit.jupiter.api.extension.ExtendWith;
import org.kie.kogito.event.DataEvent;
import org.kie.kogito.event.process.ProcessInstanceDataEvent;
-import org.kie.kogito.event.process.UserTaskInstanceDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
import org.kie.kogito.index.event.KogitoJobCloudEvent;
import org.kie.kogito.index.model.ProcessInstanceState;
import org.kie.kogito.index.service.IndexingService;
@@ -67,7 +70,7 @@ public void testOnProcessInstanceEvent() {
.withSubscriber(UniAssertSubscriber.create());
future.awaitItem().assertCompleted();
- verify(service).indexProcessInstance(any());
+ verify(service).indexProcessInstanceEvent(any());
verify(eventPublisher).fire(event);
}
@@ -84,33 +87,33 @@ public void testOnUserTaskInstanceEvent() {
.withSubscriber(UniAssertSubscriber.create());
future.awaitItem().assertCompleted();
- verify(service).indexUserTaskInstance(any());
+ verify(service).indexUserTaskInstanceEvent(any());
verify(eventPublisher).fire(event);
}
@Test
public void testOnProcessInstanceEventException() {
ProcessInstanceDataEvent event = mock(ProcessInstanceDataEvent.class);
- doThrow(new RuntimeException("")).when(service).indexProcessInstance(any());
+ doThrow(new RuntimeException("")).when(service).indexProcessInstanceEvent(any());
UniAssertSubscriber future = consumer.onProcessInstanceEvent(event).subscribe()
.withSubscriber(UniAssertSubscriber.create());
future.awaitFailure().assertFailedWith(RuntimeException.class, "");
- verify(service).indexProcessInstance(any());
+ verify(service).indexProcessInstanceEvent(any());
verify(eventPublisher, never()).fire(event);
}
@Test
public void testOnUserTaskInstanceEventException() {
UserTaskInstanceDataEvent event = mock(UserTaskInstanceDataEvent.class);
- doThrow(new RuntimeException("")).when(service).indexUserTaskInstance(any());
+ doThrow(new RuntimeException("")).when(service).indexUserTaskInstanceEvent(any());
UniAssertSubscriber future = consumer.onUserTaskInstanceEvent(event).subscribe()
.withSubscriber(UniAssertSubscriber.create());
future.awaitFailure().assertFailedWith(RuntimeException.class, "");
- verify(service).indexUserTaskInstance(any());
+ verify(service).indexUserTaskInstanceEvent(any());
verify(eventPublisher, never()).fire(event);
}
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/test/InMemoryMessagingTestResource.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/test/InMemoryMessagingTestResource.java
index 8ba74733fa..f23cffea36 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/test/InMemoryMessagingTestResource.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/test/InMemoryMessagingTestResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.test;
import java.util.HashMap;
@@ -25,6 +27,7 @@
import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.KOGITO_JOBS_EVENTS;
import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.KOGITO_PROCESSINSTANCES_EVENTS;
+import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.KOGITO_PROCESS_DEFINITIONS_EVENTS;
import static org.kie.kogito.index.service.messaging.ReactiveMessagingEventConsumer.KOGITO_USERTASKINSTANCES_EVENTS;
public class InMemoryMessagingTestResource implements QuarkusTestResourceLifecycleManager {
@@ -32,7 +35,7 @@ public class InMemoryMessagingTestResource implements QuarkusTestResourceLifecyc
@Override
public Map start() {
Map env = new HashMap<>();
- Stream.of(KOGITO_PROCESSINSTANCES_EVENTS, KOGITO_USERTASKINSTANCES_EVENTS, KOGITO_JOBS_EVENTS)
+ Stream.of(KOGITO_PROCESSINSTANCES_EVENTS, KOGITO_PROCESS_DEFINITIONS_EVENTS, KOGITO_USERTASKINSTANCES_EVENTS, KOGITO_JOBS_EVENTS)
.forEach(s -> env.putAll(switchIncomingChannel(s)));
return env;
}
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/vertx/VertxRouterSetupTest.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/vertx/VertxRouterSetupTest.java
index 0c9549aba4..a880f33bec 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/vertx/VertxRouterSetupTest.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/vertx/VertxRouterSetupTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.vertx;
import java.util.function.Function;
diff --git a/data-index/data-index-service/data-index-service-common/src/test/resources/META-INF/beans.xml b/data-index/data-index-service/data-index-service-common/src/test/resources/META-INF/beans.xml
index e69de29bb2..a0eb9fbf8c 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/resources/META-INF/beans.xml
+++ b/data-index/data-index-service/data-index-service-common/src/test/resources/META-INF/beans.xml
@@ -0,0 +1,20 @@
+
diff --git a/data-index/data-index-service/data-index-service-common/src/test/resources/binary_job_event_data.json b/data-index/data-index-service/data-index-service-common/src/test/resources/binary_job_event_data.json
index 849b1f9005..eb75e357ee 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/resources/binary_job_event_data.json
+++ b/data-index/data-index-service/data-index-service-common/src/test/resources/binary_job_event_data.json
@@ -4,16 +4,15 @@
"priority": 0,
"callbackEndpoint": "http://localhost:8080/management/jobs/timerscycle/instances/7c1d9b38-b462-47c5-8bf2-d9154f54957b/timers/8350b8b6-c5d9-432d-a339-a9fc85f642d4_0",
"processInstanceId": "7c1d9b38-b462-47c5-8bf2-d9154f54957b",
- "rootProcessInstanceId": null,
+ "rootProcessInstanceId": "root_process_instance_id",
"processId": "timerscycle",
- "rootProcessId": null,
+ "rootProcessId": "root_process_id",
+ "nodeInstanceId": "node_instance_id",
"repeatInterval": 1000,
"repeatLimit": 2147483647,
- "scheduledId": "0",
+ "scheduledId": "1234",
"retries": 0,
"status": "SCHEDULED",
"lastUpdate": "2020-01-16T20:40:58.206Z",
- "executionCounter": 0,
- "executionResponse": null,
- "nodeInstanceId": "54e66e2f-2acd-4d47-b8e6-991cb6372ad8"
+ "executionCounter": 0
}
\ No newline at end of file
diff --git a/data-index/data-index-service/data-index-service-common/src/test/resources/binary_process_definition_event.json b/data-index/data-index-service/data-index-service-common/src/test/resources/binary_process_definition_event.json
new file mode 100644
index 0000000000..2a4515d015
--- /dev/null
+++ b/data-index/data-index-service/data-index-service-common/src/test/resources/binary_process_definition_event.json
@@ -0,0 +1,154 @@
+{
+ "id": "jsongreet",
+ "name": "Greeting workflow",
+ "description": "JSON based greeting workflow",
+ "version": "1.0",
+ "type": "ProcessDefinitionEvent",
+ "roles": null,
+ "addons": [
+ "source-files",
+ "cloudevents"
+ ],
+ "annotations": [
+ "test1",
+ "test2",
+ "test3"
+ ],
+ "endpoint": "http://localhost:8080/jsongreet",
+ "source": null,
+ "metadata": {
+ "Description": "JSON based greeting workflow",
+ "annotations": [
+ "test1",
+ "test2",
+ "test3"
+ ],
+ "Tags": [
+ "test1",
+ "test2",
+ "test3"
+ ]
+ },
+ "nodes": [
+ {
+ "id": "1",
+ "name": "Start",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-12",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-12",
+ "state": "ChooseOnLanguage"
+ }
+ },
+ {
+ "id": "2",
+ "name": "End",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-13",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-13",
+ "state": "GreetPerson"
+ }
+ },
+ {
+ "id": "3",
+ "name": "ChooseOnLanguage",
+ "type": "INTERNAL",
+ "uniqueId": "3",
+ "metadata": {
+ "UniqueId": "3",
+ "Variable": "workflowdata",
+ "state": "ChooseOnLanguage",
+ "Default": "3_12"
+ }
+ },
+ {
+ "id": "4",
+ "name": "GreetInEnglish",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-15",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-15",
+ "state": "GreetInEnglish"
+ }
+ },
+ {
+ "id": "5",
+ "name": "GreetInSpanish",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-16",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-16",
+ "state": "GreetInSpanish"
+ }
+ },
+ {
+ "id": "6",
+ "name": "GreetPerson",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-17",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-17",
+ "state": "GreetPerson"
+ }
+ },
+ {
+ "id": "7",
+ "name": "EmbeddedStart",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-18",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-18"
+ }
+ },
+ {
+ "id": "9",
+ "name": "greetFunction",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-19",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-19",
+ "action": "greetAction",
+ "state": "GreetPerson"
+ }
+ },
+ {
+ "id": "10",
+ "name": "Script",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-20",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-20"
+ }
+ },
+ {
+ "id": "11",
+ "name": "EmbeddedEnd",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-21",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-21"
+ }
+ },
+ {
+ "id": "12",
+ "name": "Join-GreetInEnglish",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-22",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-22",
+ "state": "GreetInEnglish"
+ }
+ },
+ {
+ "id": "13",
+ "name": "Join-GreetPerson",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-23",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-23",
+ "state": "GreetPerson"
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/data-index/data-index-service/data-index-service-common/src/test/resources/binary_process_instance_event_data.json b/data-index/data-index-service/data-index-service-common/src/test/resources/binary_process_instance_event_data.json
index 23d60bf577..ecfc27f4ca 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/resources/binary_process_instance_event_data.json
+++ b/data-index/data-index-service/data-index-service-common/src/test/resources/binary_process_instance_event_data.json
@@ -1,154 +1,16 @@
{
- "id": "5f8b1a48-4d37-4bd2-a1a6-9b8f6097cfdd",
- "version": "1.0",
- "parentInstanceId": null,
- "rootInstanceId": null,
+ "eventDate" : 1698332756677,
+ "eventUser" : "admin",
+ "eventType" : 1,
"processId": "subscription_flow",
+ "processVersion": "1.0",
"processType": null,
- "rootProcessId": null,
- "processName": "workflow",
- "startDate": "2023-05-24T10:41:14.911+00:00",
- "endDate": null,
- "state": 1,
- "businessKey": null,
- "nodeInstances": [
- {
- "id": "f9c80fd0-ce2c-47fc-98b5-c0a0bae6d135",
- "nodeId": "12",
- "nodeDefinitionId": "_jbpm-unique-10",
- "nodeName": "SubscribeAndWaitForConfirmation",
- "nodeType": "CompositeContextNode",
- "triggerTime": "2023-05-24T10:41:18.072+00:00",
- "leaveTime": null
- },
- {
- "id": "e97058a4-4696-4370-92a1-fd5e0e5bf6dd",
- "nodeId": "18",
- "nodeDefinitionId": "_jbpm-unique-14",
- "nodeName": "ConfirmSubscriptionEvent",
- "nodeType": "EventNode",
- "triggerTime": "2023-05-24T10:41:18.177+00:00",
- "leaveTime": null
- },
- {
- "id": "595f9a28-3a26-4b81-851d-ac5f545f8648",
- "nodeId": "22",
- "nodeDefinitionId": "22",
- "nodeName": "TimerNode_22",
- "nodeType": "TimerNode",
- "triggerTime": "2023-05-24T10:41:18.178+00:00",
- "leaveTime": null
- },
- {
- "id": "aaabaf9b-011d-4e92-b4a5-fcc7f52a41e0",
- "nodeId": "20",
- "nodeDefinitionId": "20",
- "nodeName": "EventSplit_20",
- "nodeType": "Split",
- "triggerTime": "2023-05-24T10:41:18.175+00:00",
- "leaveTime": null
- },
- {
- "id": "c194555f-5972-4dc4-b3d7-de871ddc7aee",
- "nodeId": "16",
- "nodeDefinitionId": "_jbpm-unique-13",
- "nodeName": "Script",
- "nodeType": "ActionNode",
- "triggerTime": "2023-05-24T10:41:18.174+00:00",
- "leaveTime": "2023-05-24T10:41:18.174+00:00"
- },
- {
- "id": "732d2190-4bee-4ba9-926f-e8f623298940",
- "nodeId": "15",
- "nodeDefinitionId": "_jbpm-unique-12",
- "nodeName": "subscribeToNewsletter",
- "nodeType": "WorkItemNode",
- "triggerTime": "2023-05-24T10:41:18.072+00:00",
- "leaveTime": "2023-05-24T10:41:18.174+00:00"
- },
- {
- "id": "24af64d1-4660-4972-8794-21b6a8ca3f4a",
- "nodeId": "13",
- "nodeDefinitionId": "_jbpm-unique-11",
- "nodeName": "EmbeddedStart",
- "nodeType": "StartNode",
- "triggerTime": "2023-05-24T10:41:18.072+00:00",
- "leaveTime": "2023-05-24T10:41:18.072+00:00"
- },
- {
- "id": "409bd8d1-27c5-4d84-83a8-af5d49723dac",
- "nodeId": "11",
- "nodeDefinitionId": "11",
- "nodeName": "ExitIfEmailExists",
- "nodeType": "Split",
- "triggerTime": "2023-05-24T10:41:18.029+00:00",
- "leaveTime": "2023-05-24T10:41:18.072+00:00"
- },
- {
- "id": "2bd100e5-156b-4ace-9d99-c50f14b8b345",
- "nodeId": "5",
- "nodeDefinitionId": "_jbpm-unique-4",
- "nodeName": "VerifyEmail",
- "nodeType": "CompositeContextNode",
- "triggerTime": "2023-05-24T10:41:14.917+00:00",
- "leaveTime": "2023-05-24T10:41:18.029+00:00"
- },
- {
- "id": "8c0fc962-5f03-41f8-8f28-c7277619fa54",
- "nodeId": "10",
- "nodeDefinitionId": "_jbpm-unique-8",
- "nodeName": "EmbeddedEnd",
- "nodeType": "EndNode",
- "triggerTime": "2023-05-24T10:41:18.028+00:00",
- "leaveTime": "2023-05-24T10:41:18.028+00:00"
- },
- {
- "id": "25f47359-aeba-46f9-a86d-e271b050c0a4",
- "nodeId": "9",
- "nodeDefinitionId": "_jbpm-unique-7",
- "nodeName": "Script",
- "nodeType": "ActionNode",
- "triggerTime": "2023-05-24T10:41:18.023+00:00",
- "leaveTime": "2023-05-24T10:41:18.028+00:00"
- },
- {
- "id": "22443d26-da1c-4fda-b2ec-b84bd2a8d949",
- "nodeId": "8",
- "nodeDefinitionId": "_jbpm-unique-6",
- "nodeName": "verifyEmail",
- "nodeType": "WorkItemNode",
- "triggerTime": "2023-05-24T10:41:14.922+00:00",
- "leaveTime": "2023-05-24T10:41:18.023+00:00"
- },
- {
- "id": "f9f6d1ab-5879-4eb3-9d52-4c66c98b87f9",
- "nodeId": "6",
- "nodeDefinitionId": "_jbpm-unique-5",
- "nodeName": "EmbeddedStart",
- "nodeType": "StartNode",
- "triggerTime": "2023-05-24T10:41:14.917+00:00",
- "leaveTime": "2023-05-24T10:41:14.922+00:00"
- },
- {
- "id": "e6befc33-dfa4-4667-89dc-5821c96861b9",
- "nodeId": "1",
- "nodeDefinitionId": "_jbpm-unique-0",
- "nodeName": "Start",
- "nodeType": "StartNode",
- "triggerTime": "2023-05-24T10:41:14.914+00:00",
- "leaveTime": "2023-05-24T10:41:14.916+00:00"
- }
- ],
- "variables": {
- "workflowdata": {
- "email": "test2@ge.com",
- "name": "test2",
- "emailExists": false,
- "id": "5f8b1a48-4d37-4bd2-a1a6-9b8f6097cfdd",
- "verified": false
- }
- },
- "error": null,
- "roles": null,
- "milestones": []
+ "processInstanceId": "5f8b1a48-4d37-4bd2-a1a6-9b8f6097cfdd",
+ "businessKey" : "business_key",
+ "processName": "subscription workflow",
+ "parentInstanceId": "parent_instance_id",
+ "rootProcessId" : "root_process_id",
+ "rootProcessInstanceId" : "root_process_instance_id",
+ "state" : 1,
+ "roles": ["admin", "user"]
}
\ No newline at end of file
diff --git a/data-index/data-index-service/data-index-service-common/src/test/resources/binary_user_task_instance_event_data.json b/data-index/data-index-service/data-index-service-common/src/test/resources/binary_user_task_instance_event_data.json
deleted file mode 100644
index 46620b51c5..0000000000
--- a/data-index/data-index-service/data-index-service-common/src/test/resources/binary_user_task_instance_event_data.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "id": "45fae435-b098-4f27-97cf-a0c107072e8b",
- "taskName": "VisaApplication",
- "taskDescription": null,
- "taskPriority": "1",
- "referenceName": "Apply for visa",
- "startDate": "2022-03-18T15:32:22.484+10:00",
- "completeDate": "2022-03-18T15:33:05.586+10:00",
- "state": "Completed",
- "actualOwner": null,
- "potentialUsers": [],
- "potentialGroups": [],
- "excludedUsers": [],
- "adminUsers": [],
- "adminGroups": [],
- "inputs": {
- "trip": {
- "city": "Brisbane",
- "country": "Australia",
- "begin": "2022-03-01T08:00:00.000+10:00",
- "end": "2022-03-31T08:00:00.000+10:00",
- "visaRequired": true
- },
- "NodeName": "Apply for visa",
- "TaskName": "VisaApplication",
- "Priority": "1",
- "Skippable": "true",
- "traveller": {
- "firstName": "Test",
- "lastName": "Test",
- "email": "test@email.com",
- "nationality": "Brazilian",
- "address": {
- "street": "",
- "city": "",
- "zipCode": "",
- "country": "Brazil"
- }
- }
- },
- "outputs": {
- "ActorId": null,
- "visaApplication": {
- "firstName": "Test",
- "lastName": "Test",
- "city": "Brisbane",
- "country": "Australia",
- "duration": 150,
- "passportNumber": "CDDCDCDS",
- "nationality": "Brazilian",
- "approved": false
- }
- },
- "comments": [],
- "attachments": [],
- "processInstanceId": "2308e23d-9998-47e9-a772-a078cf5b891b",
- "rootProcessInstanceId": "",
- "processId": "travels",
- "rootProcessId": ""
-}
\ No newline at end of file
diff --git a/data-index/data-index-service/data-index-service-common/src/test/resources/binary_user_task_instance_state_event_data.json b/data-index/data-index-service/data-index-service-common/src/test/resources/binary_user_task_instance_state_event_data.json
new file mode 100644
index 0000000000..eaae160983
--- /dev/null
+++ b/data-index/data-index-service/data-index-service-common/src/test/resources/binary_user_task_instance_state_event_data.json
@@ -0,0 +1,14 @@
+{
+ "eventDate" : 1698332756677,
+ "eventUser" : "admin",
+ "userTaskDefinitionId" : "task_123",
+ "userTaskInstanceId" : "45fae435-b098-4f27-97cf-a0c107072e8b",
+ "userTaskName": "VisaApplication",
+ "eventType": 1,
+ "userTaskDescription" : "This task is for applying to a visa",
+ "userTaskPriority": "1",
+ "userTaskReferenceName": "Apply for visa",
+ "state" : "Completed",
+ "actualOwner" : "admin",
+ "processInstanceId" : "67fb3435-b098-4f27-97cf-a0c107072e8b"
+}
\ No newline at end of file
diff --git a/data-index/data-index-service/data-index-service-common/src/test/resources/nodes_definitions.json b/data-index/data-index-service/data-index-service-common/src/test/resources/nodes_definitions.json
new file mode 100644
index 0000000000..5dca9f9ac4
--- /dev/null
+++ b/data-index/data-index-service/data-index-service-common/src/test/resources/nodes_definitions.json
@@ -0,0 +1,122 @@
+[
+ {
+ "id": "1",
+ "name": "Start",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-12",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-12",
+ "state": "ChooseOnLanguage"
+ }
+ },
+ {
+ "id": "2",
+ "name": "End",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-13",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-13",
+ "state": "GreetPerson"
+ }
+ },
+ {
+ "id": "3",
+ "name": "ChooseOnLanguage",
+ "type": "INTERNAL",
+ "uniqueId": "3",
+ "metadata": {
+ "UniqueId": "3",
+ "Variable": "workflowdata",
+ "state": "ChooseOnLanguage",
+ "Default": "3_12"
+ }
+ },
+ {
+ "id": "4",
+ "name": "GreetInEnglish",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-15",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-15",
+ "state": "GreetInEnglish"
+ }
+ },
+ {
+ "id": "5",
+ "name": "GreetInSpanish",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-16",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-16",
+ "state": "GreetInSpanish"
+ }
+ },
+ {
+ "id": "6",
+ "name": "GreetPerson",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-17",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-17",
+ "state": "GreetPerson"
+ }
+ },
+ {
+ "id": "7",
+ "name": "EmbeddedStart",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-18",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-18"
+ }
+ },
+ {
+ "id": "9",
+ "name": "greetFunction",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-19",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-19",
+ "action": "greetAction",
+ "state": "GreetPerson"
+ }
+ },
+ {
+ "id": "10",
+ "name": "Script",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-20",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-20"
+ }
+ },
+ {
+ "id": "11",
+ "name": "EmbeddedEnd",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-21",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-21"
+ }
+ },
+ {
+ "id": "12",
+ "name": "Join-GreetInEnglish",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-22",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-22",
+ "state": "GreetInEnglish"
+ }
+ },
+ {
+ "id": "13",
+ "name": "Join-GreetPerson",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-23",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-23",
+ "state": "GreetPerson"
+ }
+ }
+]
diff --git a/data-index/data-index-service/data-index-service-common/src/test/resources/process_definition_event.json b/data-index/data-index-service/data-index-service-common/src/test/resources/process_definition_event.json
new file mode 100644
index 0000000000..b76b7c1869
--- /dev/null
+++ b/data-index/data-index-service/data-index-service-common/src/test/resources/process_definition_event.json
@@ -0,0 +1,162 @@
+{
+ "id": "717af02d-645a-4b27-8058-b67ff1fa8edb",
+ "source": "http://localhost:8080/jsongreet",
+ "type": "ProcessDefinitionEvent",
+ "time": "2023-10-19T10:18:01.540311-03:00",
+ "data": {
+ "id": "jsongreet",
+ "name": "Greeting workflow",
+ "description": "JSON based greeting workflow",
+ "version": "1.0",
+ "type": "ProcessDefinitionEvent",
+ "roles": null,
+ "addons": [
+ "source-files",
+ "cloudevents"
+ ],
+ "annotations": [
+ "test2",
+ "test3",
+ "test1"
+ ],
+ "endpoint": "http://localhost:8080/jsongreet",
+ "source": null,
+ "metadata": {
+ "Description": "JSON based greeting workflow",
+ "annotations": [
+ "test1",
+ "test2",
+ "test3"
+ ],
+ "Tags": [
+ "test1",
+ "test2",
+ "test3"
+ ]
+ },
+ "nodes": [
+ {
+ "id": "1",
+ "name": "Start",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-12",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-12",
+ "state": "ChooseOnLanguage"
+ }
+ },
+ {
+ "id": "2",
+ "name": "End",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-13",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-13",
+ "state": "GreetPerson"
+ }
+ },
+ {
+ "id": "3",
+ "name": "ChooseOnLanguage",
+ "type": "INTERNAL",
+ "uniqueId": "3",
+ "metadata": {
+ "UniqueId": "3",
+ "Variable": "workflowdata",
+ "state": "ChooseOnLanguage",
+ "Default": "3_12"
+ }
+ },
+ {
+ "id": "4",
+ "name": "GreetInEnglish",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-15",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-15",
+ "state": "GreetInEnglish"
+ }
+ },
+ {
+ "id": "5",
+ "name": "GreetInSpanish",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-16",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-16",
+ "state": "GreetInSpanish"
+ }
+ },
+ {
+ "id": "6",
+ "name": "GreetPerson",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-17",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-17",
+ "state": "GreetPerson"
+ }
+ },
+ {
+ "id": "7",
+ "name": "EmbeddedStart",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-18",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-18"
+ }
+ },
+ {
+ "id": "9",
+ "name": "greetFunction",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-19",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-19",
+ "action": "greetAction",
+ "state": "GreetPerson"
+ }
+ },
+ {
+ "id": "10",
+ "name": "Script",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-20",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-20"
+ }
+ },
+ {
+ "id": "11",
+ "name": "EmbeddedEnd",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-21",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-21"
+ }
+ },
+ {
+ "id": "12",
+ "name": "Join-GreetInEnglish",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-22",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-22",
+ "state": "GreetInEnglish"
+ }
+ },
+ {
+ "id": "13",
+ "name": "Join-GreetPerson",
+ "type": "INTERNAL",
+ "uniqueId": "_jbpm-unique-23",
+ "metadata": {
+ "UniqueId": "_jbpm-unique-23",
+ "state": "GreetPerson"
+ }
+ }
+ ]
+ },
+ "specversion": "1.0",
+ "kogitoprocid": "jsongreet"
+}
\ No newline at end of file
diff --git a/data-index/data-index-service/data-index-service-common/src/test/resources/process_instance_event.json b/data-index/data-index-service/data-index-service-common/src/test/resources/process_instance_event.json
index daf703b4f9..8b91918159 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/resources/process_instance_event.json
+++ b/data-index/data-index-service/data-index-service-common/src/test/resources/process_instance_event.json
@@ -1,105 +1,23 @@
{
"id": "867ff7b4-2e49-49b3-882a-76f65a2c4124",
"source": "http://localhost:8080/travels",
- "type": "ProcessInstanceEvent",
+ "type": "ProcessInstanceStateDataEvent",
"time": "2022-03-18T15:33:05.608395+10:00",
"data": {
- "id": "2308e23d-9998-47e9-a772-a078cf5b891b",
+ "processInstanceId": "2308e23d-9998-47e9-a772-a078cf5b891b",
"parentInstanceId": "",
- "rootInstanceId": "",
+ "rootProcessInstanceId": "",
"processId": "travels",
- "version": "1.0",
+ "processVersion": "1.0",
"rootProcessId": "",
"processName": "travels",
- "startDate": "2022-03-18T15:32:21.887+10:00",
- "endDate": null,
+ "eventDate": "2022-03-18T15:32:21.887+10:00",
"state": 1,
- "businessKey": "F7RTPS",
- "nodeInstances": [
- {
- "id": "2b407977-cab4-41ec-b1e6-c34076d9381a",
- "nodeId": "3",
- "nodeDefinitionId": "_E611283E-30B0-46B9-8305-768A002C7518",
- "nodeName": "visasrejected",
- "nodeType": "EventNode",
- "triggerTime": "2022-03-18T15:33:05.597+10:00",
- "leaveTime": null
- },
- {
- "id": "808f4f5e-6473-448e-aac6-ee1017610c1f",
- "nodeId": "4",
- "nodeDefinitionId": "_7F75E8BD-3032-47EC-814F-66B197CA99C5",
- "nodeName": "visasapproved",
- "nodeType": "EventNode",
- "triggerTime": "2022-03-18T15:33:05.597+10:00",
- "leaveTime": null
- },
- {
- "id": "2c644506-a5c6-475e-8098-26980d08f796",
- "nodeId": "13",
- "nodeDefinitionId": "_A8C9F331-8433-411D-91DB-B2060D4F8D14",
- "nodeName": "wait for visa decision",
- "nodeType": "Split",
- "triggerTime": "2022-03-18T15:33:05.595+10:00",
- "leaveTime": null
- },
- {
- "id": "99e2e499-f997-4528-b1fc-2531470a057a",
- "nodeId": "1",
- "nodeDefinitionId": "_BDA56801-1155-4AF2-94D4-7DAADED2E3C0",
- "nodeName": "Send visa application",
- "nodeType": "ActionNode",
- "triggerTime": "2022-03-18T15:33:05.588+10:00",
- "leaveTime": "2022-03-18T15:33:05.595+10:00"
- },
- {
- "id": "18f6b068-b7bf-4307-a3f9-be5606b726ca",
- "nodeId": "6",
- "nodeDefinitionId": "_24FBB8D6-EF2D-4DCC-846D-D8C5E21849D2",
- "nodeName": "Apply for visa",
- "nodeType": "HumanTaskNode",
- "triggerTime": "2022-03-18T15:32:22.481+10:00",
- "leaveTime": "2022-03-18T15:33:05.588+10:00"
- }
- ],
- "variables": {
- "trip": {
- "city": "Brisbane",
- "country": "Australia",
- "begin": "2022-03-01T08:00:00.000+10:00",
- "end": "2022-03-31T08:00:00.000+10:00",
- "visaRequired": true
- },
- "visaApplication": {
- "firstName": "Test",
- "lastName": "Test",
- "city": "Brisbane",
- "country": "Australia",
- "duration": 150,
- "passportNumber": "CDDCDCDS",
- "nationality": "Brazilian",
- "approved": false
- },
- "traveller": {
- "firstName": "Test",
- "lastName": "Test",
- "email": "test@email.com",
- "nationality": "Brazilian",
- "address": {
- "street": "",
- "city": "",
- "zipCode": "",
- "country": "Brazil"
- }
- }
- },
- "error": null,
- "roles": null,
- "milestones": []
+ "businessKey": "F7RTPS"
},
"specversion": "1.0",
"kogitoprocinstanceid": "2308e23d-9998-47e9-a772-a078cf5b891b",
"kogitoprocid": "travels",
"kogitoaddons": "cloudevents,process-svg,prometheus-monitoring,monitoring,infinispan-persistence,process-management",
- "kogitousertaskist": "1"
+ "kogitoprocist" : "1"
}
\ No newline at end of file
diff --git a/data-index/data-index-service/data-index-service-common/src/test/resources/user_task_instance_event.json b/data-index/data-index-service/data-index-service-common/src/test/resources/user_task_instance_event.json
index 690d9b0073..8e461d20c3 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/resources/user_task_instance_event.json
+++ b/data-index/data-index-service/data-index-service-common/src/test/resources/user_task_instance_event.json
@@ -1,67 +1,24 @@
{
"id": "7680a3b6-2c5e-4d97-9964-5602341a1965",
"source": "http://localhost:8080/travels",
- "type": "UserTaskInstanceEvent",
+ "type": "UserTaskInstanceStateDataEvent",
"time": "2022-03-18T15:33:05.608476+10:00",
"data": {
- "id": "45fae435-b098-4f27-97cf-a0c107072e8b",
- "taskName": "VisaApplication",
- "taskDescription": null,
- "taskPriority": "1",
- "referenceName": "Apply for visa",
- "startDate": "2022-03-18T15:32:22.484+10:00",
- "completeDate": "2022-03-18T15:33:05.586+10:00",
+ "eventDate": "2022-03-18T15:32:22.484+10:00",
+ "eventUser" : "my user",
+ "userTaskDefinitionId" : "123",
+ "userTaskInstanceId": "45fae435-b098-4f27-97cf-a0c107072e8b",
+
+ "userTaskName": "VisaApplication",
+ "userTaskPriority": "1",
+ "userTaskDescription": null,
+
+ "userTaskReferenceName": "Apply for visa",
+
"state": "Completed",
- "actualOwner": null,
- "potentialUsers": [],
- "potentialGroups": [],
- "excludedUsers": [],
- "adminUsers": [],
- "adminGroups": [],
- "inputs": {
- "trip": {
- "city": "Brisbane",
- "country": "Australia",
- "begin": "2022-03-01T08:00:00.000+10:00",
- "end": "2022-03-31T08:00:00.000+10:00",
- "visaRequired": true
- },
- "NodeName": "Apply for visa",
- "TaskName": "VisaApplication",
- "Priority": "1",
- "Skippable": "true",
- "traveller": {
- "firstName": "Test",
- "lastName": "Test",
- "email": "test@email.com",
- "nationality": "Brazilian",
- "address": {
- "street": "",
- "city": "",
- "zipCode": "",
- "country": "Brazil"
- }
- }
- },
- "outputs": {
- "ActorId": null,
- "visaApplication": {
- "firstName": "Test",
- "lastName": "Test",
- "city": "Brisbane",
- "country": "Australia",
- "duration": 150,
- "passportNumber": "CDDCDCDS",
- "nationality": "Brazilian",
- "approved": false
- }
- },
- "comments": [],
- "attachments": [],
- "processInstanceId": "2308e23d-9998-47e9-a772-a078cf5b891b",
- "rootProcessInstanceId": "",
- "processId": "travels",
- "rootProcessId": ""
+ "actualOwner": "henry",
+ "processInstanceId": "2308e23d-9998-47e9-a772-a078cf5b891b"
+
},
"specversion": "1.0",
"kogitoprocinstanceid": "2308e23d-9998-47e9-a772-a078cf5b891b",
diff --git a/data-index/data-index-service/data-index-service-infinispan/pom.xml b/data-index/data-index-service/data-index-service-infinispan/pom.xml
index f57a46dc84..cc39b5b9ed 100644
--- a/data-index/data-index-service/data-index-service-infinispan/pom.xml
+++ b/data-index/data-index-service/data-index-service-infinispan/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/main/docker/docker-compose.yml b/data-index/data-index-service/data-index-service-infinispan/src/main/docker/docker-compose.yml
index 95d1dc5d5e..f66d29a002 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/main/docker/docker-compose.yml
+++ b/data-index/data-index-service/data-index-service-infinispan/src/main/docker/docker-compose.yml
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
version: '2.1'
services:
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/main/resources/META-INF/hotrod-client.properties b/data-index/data-index-service/data-index-service-infinispan/src/main/resources/META-INF/hotrod-client.properties
index ed23c02c1a..03bfa85f8f 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/main/resources/META-INF/hotrod-client.properties
+++ b/data-index/data-index-service/data-index-service-infinispan/src/main/resources/META-INF/hotrod-client.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Docker 4 Mac workaround
# infinispan.client.hotrod.client_intelligence=BASIC
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/main/resources/application.properties b/data-index/data-index-service/data-index-service-infinispan/src/main/resources/application.properties
index 17020c9e8c..0023b411ce 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/main/resources/application.properties
+++ b/data-index/data-index-service/data-index-service-infinispan/src/main/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
quarkus.qute.property-not-found-strategy=default
quarkus.qute.strict-rendering=false
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/main/resources/templates/kogito-cache-default.xml b/data-index/data-index-service/data-index-service-infinispan/src/main/resources/templates/kogito-cache-default.xml
index 3d69eb35d8..8fea9fc6db 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/main/resources/templates/kogito-cache-default.xml
+++ b/data-index/data-index-service/data-index-service-infinispan/src/main/resources/templates/kogito-cache-default.xml
@@ -1,3 +1,23 @@
+
{#let template=config:property('kogito.cache.domain.template')}
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/docker/docker-compose.yml b/data-index/data-index-service/data-index-service-infinispan/src/test/docker/docker-compose.yml
index c75b517235..c1f396b628 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/docker/docker-compose.yml
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/docker/docker-compose.yml
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
version: "3"
services:
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/docker/infinispan/infinispan.xml b/data-index/data-index-service/data-index-service-infinispan/src/test/docker/infinispan/infinispan.xml
index 4d594bfc24..a466561b9f 100755
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/docker/infinispan/infinispan.xml
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/docker/infinispan/infinispan.xml
@@ -1,3 +1,23 @@
+
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/InfinispanDomainIndexingServiceIT.java b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/InfinispanDomainIndexingServiceIT.java
index d055ca5ae2..72980a8fcf 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/InfinispanDomainIndexingServiceIT.java
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/InfinispanDomainIndexingServiceIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/KeycloakInfinispanIndexingServiceIT.java b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/KeycloakInfinispanIndexingServiceIT.java
index edfc540e27..d89bb70a0f 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/KeycloakInfinispanIndexingServiceIT.java
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/KeycloakInfinispanIndexingServiceIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service;
import org.kie.kogito.index.service.test.KeycloakTestProfile;
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/cache/InfinispanQueryIT.java b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/cache/InfinispanQueryIT.java
index c4bd349d89..bfb74fe4f3 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/cache/InfinispanQueryIT.java
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/cache/InfinispanQueryIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.cache;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/cache/InfinispanStorageIT.java b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/cache/InfinispanStorageIT.java
index b3dddec7dd..7525042cce 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/cache/InfinispanStorageIT.java
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/cache/InfinispanStorageIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.cache;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/graphql/InfinispanWebSocketSubscriptionIT.java b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/graphql/InfinispanWebSocketSubscriptionIT.java
index 8f122a1111..846d525802 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/graphql/InfinispanWebSocketSubscriptionIT.java
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/graphql/InfinispanWebSocketSubscriptionIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.graphql;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/graphql/query/InfinispanGraphQLQueryOrderByIT.java b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/graphql/query/InfinispanGraphQLQueryOrderByIT.java
index 8792aa0f65..c9d9bca082 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/graphql/query/InfinispanGraphQLQueryOrderByIT.java
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/graphql/query/InfinispanGraphQLQueryOrderByIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.graphql.query;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/graphql/query/InfinispanGraphQLRuntimesQueriesIT.java b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/graphql/query/InfinispanGraphQLRuntimesQueriesIT.java
index 97d83b2b90..35c57b0ae2 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/graphql/query/InfinispanGraphQLRuntimesQueriesIT.java
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/graphql/query/InfinispanGraphQLRuntimesQueriesIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.graphql.query;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanDomainMessagingHttpConsumerIT.java b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanDomainMessagingHttpConsumerIT.java
index 90a96a20e4..d359c61815 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanDomainMessagingHttpConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanDomainMessagingHttpConsumerIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.messaging;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanDomainMessagingKafkaConsumerIT.java b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanDomainMessagingKafkaConsumerIT.java
index e3e86f4ae9..0ec9c88702 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanDomainMessagingKafkaConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanDomainMessagingKafkaConsumerIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.messaging;
import org.kie.kogito.index.service.test.KafkaMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanMessagingHttpConsumerIT.java b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanMessagingHttpConsumerIT.java
index ad21a8d150..aa5ec069ac 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanMessagingHttpConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanMessagingHttpConsumerIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.messaging;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanMessagingKafkaConsumerIT.java b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanMessagingKafkaConsumerIT.java
index cd85ef54ae..27d3117dc1 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanMessagingKafkaConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanMessagingKafkaConsumerIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.messaging;
import org.kie.kogito.index.service.test.KafkaMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanMessagingLoadKafkaIT.java b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanMessagingLoadKafkaIT.java
index 30525353bf..e88621d555 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanMessagingLoadKafkaIT.java
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/messaging/InfinispanMessagingLoadKafkaIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.messaging;
import org.junit.jupiter.api.Disabled;
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/test/InMemoryMessageTestProfile.java b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/test/InMemoryMessageTestProfile.java
index c37ad70a6d..5bb82161ce 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/test/InMemoryMessageTestProfile.java
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/test/InMemoryMessageTestProfile.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.test;
import java.util.Arrays;
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/test/KafkaMessageTestProfile.java b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/test/KafkaMessageTestProfile.java
index 6e29df10fd..5d4bccd11a 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/test/KafkaMessageTestProfile.java
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/test/KafkaMessageTestProfile.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.test;
import java.util.Arrays;
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/test/KeycloakTestProfile.java b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/test/KeycloakTestProfile.java
index 5762f9ec42..552b6258b0 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/test/KeycloakTestProfile.java
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/java/org/kie/kogito/index/service/test/KeycloakTestProfile.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.test;
import java.util.Arrays;
diff --git a/data-index/data-index-service/data-index-service-infinispan/src/test/resources/application.properties b/data-index/data-index-service/data-index-service-infinispan/src/test/resources/application.properties
index 5308248c65..8f8a8ae113 100644
--- a/data-index/data-index-service/data-index-service-infinispan/src/test/resources/application.properties
+++ b/data-index/data-index-service/data-index-service-infinispan/src/test/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Kogito
kogito.apps.persistence.type=infinispan
@@ -31,4 +50,7 @@ quarkus.oidc.auth-server-url=none
%keycloak-test.quarkus.oidc.web-app-tenant.application-type=web-app
kogito.data-index.vertx-graphql.ui.path=/graphiql
-kogito.data-index.vertx-graphql.ui.tenant=web-app-tenant
\ No newline at end of file
+kogito.data-index.vertx-graphql.ui.tenant=web-app-tenant
+
+# Not using Dev service in test, but rather org.kie.kogito.testcontainers.quarkus.KeycloakQuarkusTestResource
+quarkus.keycloak.devservices.enabled=false
\ No newline at end of file
diff --git a/data-index/data-index-service/data-index-service-inmemory/pom.xml b/data-index/data-index-service/data-index-service-inmemory/pom.xml
index 6e6d19354b..87162031c3 100644
--- a/data-index/data-index-service/data-index-service-inmemory/pom.xml
+++ b/data-index/data-index-service/data-index-service-inmemory/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/data-index/data-index-service/data-index-service-inmemory/src/assembly/image-build-zip.xml b/data-index/data-index-service/data-index-service-inmemory/src/assembly/image-build-zip.xml
index a7d7d820d2..2592d48e8a 100644
--- a/data-index/data-index-service/data-index-service-inmemory/src/assembly/image-build-zip.xml
+++ b/data-index/data-index-service/data-index-service-inmemory/src/assembly/image-build-zip.xml
@@ -1,3 +1,23 @@
+
diff --git a/data-index/data-index-service/data-index-service-inmemory/src/main/resources/application.properties b/data-index/data-index-service/data-index-service-inmemory/src/main/resources/application.properties
index e24aa7d905..b6f9abadc6 100644
--- a/data-index/data-index-service/data-index-service-inmemory/src/main/resources/application.properties
+++ b/data-index/data-index-service/data-index-service-inmemory/src/main/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
#Data Index
kogito.apps.persistence.type=postgresql
kogito.data-index.domain-indexing=false
diff --git a/data-index/data-index-service/data-index-service-inmemory/src/test/java/org/kie/kogito/index/service/InmemoryPostgreSqlIndexingServiceIT.java b/data-index/data-index-service/data-index-service-inmemory/src/test/java/org/kie/kogito/index/service/InmemoryPostgreSqlIndexingServiceIT.java
index 1997e08c91..b09e62783a 100644
--- a/data-index/data-index-service/data-index-service-inmemory/src/test/java/org/kie/kogito/index/service/InmemoryPostgreSqlIndexingServiceIT.java
+++ b/data-index/data-index-service/data-index-service-inmemory/src/test/java/org/kie/kogito/index/service/InmemoryPostgreSqlIndexingServiceIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-inmemory/src/test/java/org/kie/kogito/index/service/KeycloakInmemoryPostgreSqlIndexingServiceIT.java b/data-index/data-index-service/data-index-service-inmemory/src/test/java/org/kie/kogito/index/service/KeycloakInmemoryPostgreSqlIndexingServiceIT.java
index 63a5f9411b..dc2367c60b 100644
--- a/data-index/data-index-service/data-index-service-inmemory/src/test/java/org/kie/kogito/index/service/KeycloakInmemoryPostgreSqlIndexingServiceIT.java
+++ b/data-index/data-index-service/data-index-service-inmemory/src/test/java/org/kie/kogito/index/service/KeycloakInmemoryPostgreSqlIndexingServiceIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service;
import org.kie.kogito.index.service.test.KeycloakTestProfile;
diff --git a/data-index/data-index-service/data-index-service-inmemory/src/test/java/org/kie/kogito/index/service/test/InMemoryMessageTestProfile.java b/data-index/data-index-service/data-index-service-inmemory/src/test/java/org/kie/kogito/index/service/test/InMemoryMessageTestProfile.java
index 46e10eb7d1..97807878af 100644
--- a/data-index/data-index-service/data-index-service-inmemory/src/test/java/org/kie/kogito/index/service/test/InMemoryMessageTestProfile.java
+++ b/data-index/data-index-service/data-index-service-inmemory/src/test/java/org/kie/kogito/index/service/test/InMemoryMessageTestProfile.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.test;
import java.util.Arrays;
diff --git a/data-index/data-index-service/data-index-service-inmemory/src/test/java/org/kie/kogito/index/service/test/KeycloakTestProfile.java b/data-index/data-index-service/data-index-service-inmemory/src/test/java/org/kie/kogito/index/service/test/KeycloakTestProfile.java
index b52113e11c..4726c82e60 100644
--- a/data-index/data-index-service/data-index-service-inmemory/src/test/java/org/kie/kogito/index/service/test/KeycloakTestProfile.java
+++ b/data-index/data-index-service/data-index-service-inmemory/src/test/java/org/kie/kogito/index/service/test/KeycloakTestProfile.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.test;
import java.util.Arrays;
diff --git a/data-index/data-index-service/data-index-service-inmemory/src/test/resources/application.properties b/data-index/data-index-service/data-index-service-inmemory/src/test/resources/application.properties
index 788c4e5c0a..052692f8a3 100644
--- a/data-index/data-index-service/data-index-service-inmemory/src/test/resources/application.properties
+++ b/data-index/data-index-service/data-index-service-inmemory/src/test/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
#Data Index
kogito.apps.persistence.type=postgresql
kogito.data-index.domain-indexing=false
@@ -30,4 +49,7 @@ quarkus.oidc.auth-server-url=none
#%keycloak-test.quarkus.oidc.web-app-tenant.auth-server-url=http://localhost:8281/auth/realms/kogito
%keycloak-test.quarkus.oidc.web-app-tenant.client-id=kogito-app
%keycloak-test.quarkus.oidc.web-app-tenant.credentials.secret=secret
-%keycloak-test.quarkus.oidc.web-app-tenant.application-type=web-app
\ No newline at end of file
+%keycloak-test.quarkus.oidc.web-app-tenant.application-type=web-app
+
+# Not using Dev service in test, but rather org.kie.kogito.testcontainers.quarkus.KeycloakQuarkusTestResource
+quarkus.keycloak.devservices.enabled=false
\ No newline at end of file
diff --git a/data-index/data-index-service/data-index-service-mongodb/pom.xml b/data-index/data-index-service/data-index-service-mongodb/pom.xml
index d48156e46b..c7bbb627d8 100644
--- a/data-index/data-index-service/data-index-service-mongodb/pom.xml
+++ b/data-index/data-index-service/data-index-service-mongodb/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/data-index/data-index-service/data-index-service-mongodb/src/main/resources/application.properties b/data-index/data-index-service/data-index-service-mongodb/src/main/resources/application.properties
index 33fad8ba9c..59cd58cc24 100644
--- a/data-index/data-index-service/data-index-service-mongodb/src/main/resources/application.properties
+++ b/data-index/data-index-service/data-index-service-mongodb/src/main/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Kogito
kogito.apps.persistence.type=mongodb
kogito.apps.persistence.indexing=false
diff --git a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/KeycloakMongoIndexingServiceIT.java b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/KeycloakMongoIndexingServiceIT.java
index 0e5087cc5a..8c728460d7 100644
--- a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/KeycloakMongoIndexingServiceIT.java
+++ b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/KeycloakMongoIndexingServiceIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service;
import org.kie.kogito.index.service.test.KeycloakTestProfile;
diff --git a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/MongoDomainIndexingServiceIT.java b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/MongoDomainIndexingServiceIT.java
index f1f4a3baf0..d03507570f 100644
--- a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/MongoDomainIndexingServiceIT.java
+++ b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/MongoDomainIndexingServiceIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/cache/MongoQueryIT.java b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/cache/MongoQueryIT.java
index ac7fe3afc3..3b0a452977 100644
--- a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/cache/MongoQueryIT.java
+++ b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/cache/MongoQueryIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.cache;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/cache/MongoStorageIT.java b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/cache/MongoStorageIT.java
index b1c28dac39..8f7ea25b78 100644
--- a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/cache/MongoStorageIT.java
+++ b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/cache/MongoStorageIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.cache;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/graphql/MongoWebSocketSubscriptionIT.java b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/graphql/MongoWebSocketSubscriptionIT.java
index 14806cf8a2..b51d97376e 100644
--- a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/graphql/MongoWebSocketSubscriptionIT.java
+++ b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/graphql/MongoWebSocketSubscriptionIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.graphql;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/graphql/query/MongoGraphQLQueryOrderByIT.java b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/graphql/query/MongoGraphQLQueryOrderByIT.java
index 7f0a9af85d..c9326efeee 100644
--- a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/graphql/query/MongoGraphQLQueryOrderByIT.java
+++ b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/graphql/query/MongoGraphQLQueryOrderByIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.graphql.query;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/graphql/query/MongoGraphQLRuntimesQueriesIT.java b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/graphql/query/MongoGraphQLRuntimesQueriesIT.java
index d6efd5ef9a..5fcaac1687 100644
--- a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/graphql/query/MongoGraphQLRuntimesQueriesIT.java
+++ b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/graphql/query/MongoGraphQLRuntimesQueriesIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.graphql.query;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoDBDomainMessagingHttpConsumerIT.java b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoDBDomainMessagingHttpConsumerIT.java
index ce4acd52e0..873fe4082c 100644
--- a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoDBDomainMessagingHttpConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoDBDomainMessagingHttpConsumerIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.messaging;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoDBDomainMessagingKafkaConsumerIT.java b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoDBDomainMessagingKafkaConsumerIT.java
index 6b242dcbad..c3487ce439 100644
--- a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoDBDomainMessagingKafkaConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoDBDomainMessagingKafkaConsumerIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.messaging;
import org.kie.kogito.index.service.test.KafkaMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoDBMessagingHttpConsumerIT.java b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoDBMessagingHttpConsumerIT.java
index 47019e6654..73d8aced4c 100644
--- a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoDBMessagingHttpConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoDBMessagingHttpConsumerIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.messaging;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoDBMessagingKafkaConsumerIT.java b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoDBMessagingKafkaConsumerIT.java
index 6589612b6a..19e0ad196c 100644
--- a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoDBMessagingKafkaConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoDBMessagingKafkaConsumerIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.messaging;
import org.kie.kogito.index.service.test.KafkaMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoMessagingLoadKafkaIT.java b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoMessagingLoadKafkaIT.java
index 07a0febd17..5c7c42c38d 100644
--- a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoMessagingLoadKafkaIT.java
+++ b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/messaging/MongoMessagingLoadKafkaIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.messaging;
import org.junit.jupiter.api.Disabled;
diff --git a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/test/InMemoryMessageTestProfile.java b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/test/InMemoryMessageTestProfile.java
index 052f965e83..83a34c5b9d 100644
--- a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/test/InMemoryMessageTestProfile.java
+++ b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/test/InMemoryMessageTestProfile.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.test;
import java.util.Arrays;
diff --git a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/test/KafkaMessageTestProfile.java b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/test/KafkaMessageTestProfile.java
index 2c6206f937..c897c0455f 100644
--- a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/test/KafkaMessageTestProfile.java
+++ b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/test/KafkaMessageTestProfile.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.test;
import java.util.Arrays;
diff --git a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/test/KeycloakTestProfile.java b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/test/KeycloakTestProfile.java
index ebc49df926..40a69379bf 100644
--- a/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/test/KeycloakTestProfile.java
+++ b/data-index/data-index-service/data-index-service-mongodb/src/test/java/org/kie/kogito/index/service/test/KeycloakTestProfile.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.test;
import java.util.Arrays;
diff --git a/data-index/data-index-service/data-index-service-mongodb/src/test/resources/application.properties b/data-index/data-index-service/data-index-service-mongodb/src/test/resources/application.properties
index 52e4270dd3..68347c230c 100644
--- a/data-index/data-index-service/data-index-service-mongodb/src/test/resources/application.properties
+++ b/data-index/data-index-service/data-index-service-mongodb/src/test/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Kogito
kogito.apps.persistence.type=mongodb
@@ -39,4 +58,7 @@ quarkus.oidc.auth-server-url=none
%keycloak-test.quarkus.oidc.web-app-tenant.application-type=web-app
kogito.data-index.vertx-graphql.ui.path=/graphiql
-kogito.data-index.vertx-graphql.ui.tenant=web-app-tenant
\ No newline at end of file
+kogito.data-index.vertx-graphql.ui.tenant=web-app-tenant
+
+# Not using Dev service in test, but rather org.kie.kogito.testcontainers.quarkus.KeycloakQuarkusTestResource
+quarkus.keycloak.devservices.enabled=false
\ No newline at end of file
diff --git a/data-index/data-index-service/data-index-service-oracle/pom.xml b/data-index/data-index-service/data-index-service-oracle/pom.xml
index 3d62a9f49d..cac61c7ba6 100644
--- a/data-index/data-index-service/data-index-service-oracle/pom.xml
+++ b/data-index/data-index-service/data-index-service-oracle/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/data-index/data-index-service/data-index-service-oracle/src/main/resources/META-INF/beans.xml b/data-index/data-index-service/data-index-service-oracle/src/main/resources/META-INF/beans.xml
index e69de29bb2..a0eb9fbf8c 100644
--- a/data-index/data-index-service/data-index-service-oracle/src/main/resources/META-INF/beans.xml
+++ b/data-index/data-index-service/data-index-service-oracle/src/main/resources/META-INF/beans.xml
@@ -0,0 +1,20 @@
+
diff --git a/data-index/data-index-service/data-index-service-oracle/src/main/resources/application.properties b/data-index/data-index-service/data-index-service-oracle/src/main/resources/application.properties
index bf3355c458..71c0215028 100644
--- a/data-index/data-index-service/data-index-service-oracle/src/main/resources/application.properties
+++ b/data-index/data-index-service/data-index-service-oracle/src/main/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
#Data Index
kogito.apps.persistence.type=oracle
kogito.data-index.domain-indexing=false
diff --git a/data-index/data-index-service/data-index-service-oracle/src/test/docker/docker-compose.yml b/data-index/data-index-service/data-index-service-oracle/src/test/docker/docker-compose.yml
index 0b1acbb00b..25578f35ed 100644
--- a/data-index/data-index-service/data-index-service-oracle/src/test/docker/docker-compose.yml
+++ b/data-index/data-index-service/data-index-service-oracle/src/test/docker/docker-compose.yml
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
version: "3"
networks:
diff --git a/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/KeycloakOracleIndexingServiceIT.java b/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/KeycloakOracleIndexingServiceIT.java
index c955cf2e36..d5b17e14b8 100644
--- a/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/KeycloakOracleIndexingServiceIT.java
+++ b/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/KeycloakOracleIndexingServiceIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service;
import org.kie.kogito.index.service.test.KeycloakTestProfile;
diff --git a/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/OracleIndexingServiceIT.java b/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/OracleIndexingServiceIT.java
index c04f38c2cd..436ba483ca 100644
--- a/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/OracleIndexingServiceIT.java
+++ b/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/OracleIndexingServiceIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/graphql/OracleDateTimeCoercingTest.java b/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/graphql/OracleDateTimeCoercingTest.java
index 84339e69ef..92148ad792 100644
--- a/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/graphql/OracleDateTimeCoercingTest.java
+++ b/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/graphql/OracleDateTimeCoercingTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.graphql;
import java.time.ZonedDateTime;
diff --git a/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/messaging/OracleMessagingHttpConsumerIT.java b/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/messaging/OracleMessagingHttpConsumerIT.java
index 98c97e4a5a..1a255cf16d 100644
--- a/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/messaging/OracleMessagingHttpConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/messaging/OracleMessagingHttpConsumerIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.messaging;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/messaging/OracleMessagingKafkaConsumerIT.java b/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/messaging/OracleMessagingKafkaConsumerIT.java
index dfe19193fe..ee54c4274a 100644
--- a/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/messaging/OracleMessagingKafkaConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/messaging/OracleMessagingKafkaConsumerIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service.messaging;
diff --git a/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/messaging/OracleMessagingLoadKafkaIT.java b/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/messaging/OracleMessagingLoadKafkaIT.java
index bbb9272b17..5163def5f7 100644
--- a/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/messaging/OracleMessagingLoadKafkaIT.java
+++ b/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/messaging/OracleMessagingLoadKafkaIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.messaging;
import org.junit.jupiter.api.Disabled;
diff --git a/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/test/InMemoryMessageTestProfile.java b/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/test/InMemoryMessageTestProfile.java
index 531ca7d7eb..27bfc31fb6 100644
--- a/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/test/InMemoryMessageTestProfile.java
+++ b/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/test/InMemoryMessageTestProfile.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.test;
import java.util.Arrays;
diff --git a/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/test/KafkaMessageTestProfile.java b/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/test/KafkaMessageTestProfile.java
index d6a4ba25a7..babcab6b20 100644
--- a/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/test/KafkaMessageTestProfile.java
+++ b/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/test/KafkaMessageTestProfile.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.test;
import java.util.Arrays;
diff --git a/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/test/KeycloakTestProfile.java b/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/test/KeycloakTestProfile.java
index 83426d5471..f171568214 100644
--- a/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/test/KeycloakTestProfile.java
+++ b/data-index/data-index-service/data-index-service-oracle/src/test/java/org/kie/kogito/index/service/test/KeycloakTestProfile.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.test;
import java.util.Arrays;
diff --git a/data-index/data-index-service/data-index-service-oracle/src/test/resources/application.properties b/data-index/data-index-service/data-index-service-oracle/src/test/resources/application.properties
index 769e14f837..1e250e5239 100644
--- a/data-index/data-index-service/data-index-service-oracle/src/test/resources/application.properties
+++ b/data-index/data-index-service/data-index-service-oracle/src/test/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
#Data Index
kogito.apps.persistence.type=oracle
kogito.data-index.domain-indexing=false
@@ -39,3 +58,6 @@ quarkus.oidc.auth-server-url=none
%keycloak-test.quarkus.oidc.web-app-tenant.client-id=kogito-app
%keycloak-test.quarkus.oidc.web-app-tenant.credentials.secret=secret
%keycloak-test.quarkus.oidc.web-app-tenant.application-type=web-app
+
+# Not using Dev service in test, but rather org.kie.kogito.testcontainers.quarkus.KeycloakQuarkusTestResource
+quarkus.keycloak.devservices.enabled=false
diff --git a/data-index/data-index-service/data-index-service-postgresql/pom.xml b/data-index/data-index-service/data-index-service-postgresql/pom.xml
index 8aaa2949fd..ed9461c1da 100644
--- a/data-index/data-index-service/data-index-service-postgresql/pom.xml
+++ b/data-index/data-index-service/data-index-service-postgresql/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/data-index/data-index-service/data-index-service-postgresql/src/main/resources/META-INF/beans.xml b/data-index/data-index-service/data-index-service-postgresql/src/main/resources/META-INF/beans.xml
index e69de29bb2..a0eb9fbf8c 100644
--- a/data-index/data-index-service/data-index-service-postgresql/src/main/resources/META-INF/beans.xml
+++ b/data-index/data-index-service/data-index-service-postgresql/src/main/resources/META-INF/beans.xml
@@ -0,0 +1,20 @@
+
diff --git a/data-index/data-index-service/data-index-service-postgresql/src/main/resources/application.properties b/data-index/data-index-service/data-index-service-postgresql/src/main/resources/application.properties
index 32a1b68433..ac4d1958d9 100644
--- a/data-index/data-index-service/data-index-service-postgresql/src/main/resources/application.properties
+++ b/data-index/data-index-service/data-index-service-postgresql/src/main/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
#Data Index
kogito.apps.persistence.type=postgresql
kogito.data-index.domain-indexing=false
diff --git a/data-index/data-index-service/data-index-service-postgresql/src/test/docker/docker-compose.yml b/data-index/data-index-service/data-index-service-postgresql/src/test/docker/docker-compose.yml
index 018af6ed10..189052eee9 100644
--- a/data-index/data-index-service/data-index-service-postgresql/src/test/docker/docker-compose.yml
+++ b/data-index/data-index-service/data-index-service-postgresql/src/test/docker/docker-compose.yml
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
version: "3"
services:
diff --git a/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/KeycloakPostgreSqlIndexingServiceIT.java b/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/KeycloakPostgreSqlIndexingServiceIT.java
index c11ef47b2b..c84e1c30d6 100644
--- a/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/KeycloakPostgreSqlIndexingServiceIT.java
+++ b/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/KeycloakPostgreSqlIndexingServiceIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service;
import org.kie.kogito.index.service.test.KeycloakTestProfile;
diff --git a/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/PostgreSqlIndexingServiceIT.java b/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/PostgreSqlIndexingServiceIT.java
index b2ae9625b2..b082e48a76 100644
--- a/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/PostgreSqlIndexingServiceIT.java
+++ b/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/PostgreSqlIndexingServiceIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/graphql/PostgreSqlDateTimeCoercingTest.java b/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/graphql/PostgreSqlDateTimeCoercingTest.java
index 2f36d96316..9ac63e7352 100644
--- a/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/graphql/PostgreSqlDateTimeCoercingTest.java
+++ b/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/graphql/PostgreSqlDateTimeCoercingTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.graphql;
import java.time.ZonedDateTime;
diff --git a/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/messaging/PostgreSqlMessagingHttpConsumerIT.java b/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/messaging/PostgreSqlMessagingHttpConsumerIT.java
index 1f78d715d3..f19e310a39 100644
--- a/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/messaging/PostgreSqlMessagingHttpConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/messaging/PostgreSqlMessagingHttpConsumerIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.messaging;
import org.kie.kogito.index.service.test.InMemoryMessageTestProfile;
diff --git a/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/messaging/PostgreSqlMessagingKafkaConsumerIT.java b/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/messaging/PostgreSqlMessagingKafkaConsumerIT.java
index 4c19595f9b..ce78568bc5 100644
--- a/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/messaging/PostgreSqlMessagingKafkaConsumerIT.java
+++ b/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/messaging/PostgreSqlMessagingKafkaConsumerIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.service.messaging;
diff --git a/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/messaging/PostgreSqlMessagingLoadKafkaIT.java b/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/messaging/PostgreSqlMessagingLoadKafkaIT.java
index bbb9272b17..5163def5f7 100644
--- a/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/messaging/PostgreSqlMessagingLoadKafkaIT.java
+++ b/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/messaging/PostgreSqlMessagingLoadKafkaIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.messaging;
import org.junit.jupiter.api.Disabled;
diff --git a/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/test/InMemoryMessageTestProfile.java b/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/test/InMemoryMessageTestProfile.java
index 4625aebae3..890fe3eb08 100644
--- a/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/test/InMemoryMessageTestProfile.java
+++ b/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/test/InMemoryMessageTestProfile.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.test;
import java.util.Arrays;
diff --git a/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/test/KafkaMessageTestProfile.java b/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/test/KafkaMessageTestProfile.java
index e1a29622cc..320a6b2252 100644
--- a/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/test/KafkaMessageTestProfile.java
+++ b/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/test/KafkaMessageTestProfile.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.test;
import java.util.Arrays;
diff --git a/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/test/KeycloakTestProfile.java b/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/test/KeycloakTestProfile.java
index 7e08b40661..cd1f783ebb 100644
--- a/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/test/KeycloakTestProfile.java
+++ b/data-index/data-index-service/data-index-service-postgresql/src/test/java/org/kie/kogito/index/service/test/KeycloakTestProfile.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.service.test;
import java.util.Arrays;
diff --git a/data-index/data-index-service/data-index-service-postgresql/src/test/resources/application.properties b/data-index/data-index-service/data-index-service-postgresql/src/test/resources/application.properties
index 999595bf1c..9c9f91f716 100644
--- a/data-index/data-index-service/data-index-service-postgresql/src/test/resources/application.properties
+++ b/data-index/data-index-service/data-index-service-postgresql/src/test/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
#Data Index
kogito.apps.persistence.type=postgresql
kogito.data-index.domain-indexing=false
@@ -37,4 +56,7 @@ quarkus.oidc.auth-server-url=none
#%keycloak-test.quarkus.oidc.web-app-tenant.auth-server-url=http://localhost:8281/auth/realms/kogito
%keycloak-test.quarkus.oidc.web-app-tenant.client-id=kogito-app
%keycloak-test.quarkus.oidc.web-app-tenant.credentials.secret=secret
-%keycloak-test.quarkus.oidc.web-app-tenant.application-type=web-app
\ No newline at end of file
+%keycloak-test.quarkus.oidc.web-app-tenant.application-type=web-app
+
+# Not using Dev service in test, but rather org.kie.kogito.testcontainers.quarkus.KeycloakQuarkusTestResource
+quarkus.keycloak.devservices.enabled=false
\ No newline at end of file
diff --git a/data-index/data-index-service/pom.xml b/data-index/data-index-service/pom.xml
index 25d9f45af3..34eb698307 100644
--- a/data-index/data-index-service/pom.xml
+++ b/data-index/data-index-service/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/data-index-storage/data-index-storage-api/pom.xml b/data-index/data-index-storage/data-index-storage-api/pom.xml
index 87324bd0d8..36dd84231d 100644
--- a/data-index/data-index-storage/data-index-storage-api/pom.xml
+++ b/data-index/data-index-storage/data-index-storage-api/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/Attachment.java b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/Attachment.java
index 182de3404d..fdaf293ac2 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/Attachment.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/Attachment.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.model;
diff --git a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/Comment.java b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/Comment.java
index e3065c03f1..bf1b688a0f 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/Comment.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/Comment.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.model;
diff --git a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/Job.java b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/Job.java
index e2e0299dff..2a4bfbdccc 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/Job.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/Job.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.model;
import java.time.ZonedDateTime;
diff --git a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/KogitoMetadata.java b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/KogitoMetadata.java
index 1e158913f0..989a4cb5fe 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/KogitoMetadata.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/KogitoMetadata.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.model;
diff --git a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/Milestone.java b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/Milestone.java
index bb9c5119a0..4383eeb72a 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/Milestone.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/Milestone.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.model;
public class Milestone {
diff --git a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/MilestoneStatus.java b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/MilestoneStatus.java
index 6d002dd602..8ffed4bd59 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/MilestoneStatus.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/MilestoneStatus.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.model;
public enum MilestoneStatus {
diff --git a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/Node.java b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/Node.java
index f349f3de9c..84939239e9 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/Node.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/Node.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.model;
diff --git a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/NodeInstance.java b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/NodeInstance.java
index 00b9ed4a2e..1e22527c59 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/NodeInstance.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/NodeInstance.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.model;
diff --git a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/ProcessDefinition.java b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/ProcessDefinition.java
index 623c723ce3..200d4347f8 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/ProcessDefinition.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/ProcessDefinition.java
@@ -1,23 +1,29 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.model;
import java.util.List;
+import java.util.Map;
import java.util.Objects;
+import java.util.Optional;
import java.util.Set;
+import java.util.regex.Pattern;
public class ProcessDefinition {
@@ -29,7 +35,9 @@ public class ProcessDefinition {
private Set addons;
private String endpoint;
private String source;
-
+ private String description;
+ private Set annotations;
+ private Map metadata;
private List nodes;
public String getId() {
@@ -109,7 +117,35 @@ public String getKey() {
}
public static String toKey(String processId, String version) {
- return String.format("%s-%s", processId, version);
+ return processId + "$v:" + version;
+ }
+
+ public static String[] fromKey(String key) {
+ return Optional.ofNullable(key).map(k -> k.split(Pattern.quote("$v:"))).orElse(new String[0]);
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Set getAnnotations() {
+ return annotations;
+ }
+
+ public void setAnnotations(Set annotations) {
+ this.annotations = annotations;
+ }
+
+ public Map getMetadata() {
+ return metadata;
+ }
+
+ public void setMetadata(Map metadata) {
+ this.metadata = metadata;
}
@Override
diff --git a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/ProcessInstance.java b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/ProcessInstance.java
index a70e7335af..82618f0ed3 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/ProcessInstance.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/ProcessInstance.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.model;
@@ -82,13 +85,8 @@ public void setDefinition(ProcessDefinition definition) {
@Override
public String toString() {
- return "ProcessInstance{" +
- "variables=" + variables +
- ", nodes=" + nodes +
- ", milestones=" + milestones +
- ", definition=" + definition +
- ", addons=" + addons +
- ", error=" + error +
- "} " + super.toString();
+ return super.toString() + " -> ProcessInstance [variables=" + variables + ", nodes=" + nodes + ", milestones=" + milestones + ", addons=" + addons + ", error=" + error + ", definition="
+ + definition + "]";
}
+
}
diff --git a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/ProcessInstanceError.java b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/ProcessInstanceError.java
index 24bb9b9829..0023df32ed 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/ProcessInstanceError.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/ProcessInstanceError.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.model;
diff --git a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/ProcessInstanceMeta.java b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/ProcessInstanceMeta.java
index 9a1172a196..d211ea198d 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/ProcessInstanceMeta.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/ProcessInstanceMeta.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.model;
diff --git a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/ProcessInstanceState.java b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/ProcessInstanceState.java
index e7ca653cbd..86c33487be 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/ProcessInstanceState.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/ProcessInstanceState.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.model;
diff --git a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/UserTaskInstance.java b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/UserTaskInstance.java
index 5bf92e8305..8572edcaf8 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/UserTaskInstance.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/UserTaskInstance.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.model;
diff --git a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/UserTaskInstanceMeta.java b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/UserTaskInstanceMeta.java
index 3863a4ea9a..ec95b5858d 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/UserTaskInstanceMeta.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/model/UserTaskInstanceMeta.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.model;
@@ -103,9 +106,7 @@ public String getActualOwner() {
}
public void setActualOwner(String actualOwner) {
- if (actualOwner != null && !actualOwner.trim().isEmpty()) {
- this.actualOwner = actualOwner;
- }
+ this.actualOwner = actualOwner;
}
public Set getAdminGroups() {
diff --git a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/storage/Constants.java b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/storage/Constants.java
index 9c6bd7340e..599b63cdb4 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/storage/Constants.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/storage/Constants.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.storage;
diff --git a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/storage/DataIndexStorageService.java b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/storage/DataIndexStorageService.java
index 2bc18a3db3..6c7a3dc320 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/storage/DataIndexStorageService.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/storage/DataIndexStorageService.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.storage;
import org.kie.kogito.index.model.Job;
diff --git a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/storage/DataIndexStorageServiceImpl.java b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/storage/DataIndexStorageServiceImpl.java
index c661a01e79..58f04a1bee 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/storage/DataIndexStorageServiceImpl.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/main/java/org/kie/kogito/index/storage/DataIndexStorageServiceImpl.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.storage;
import javax.enterprise.context.ApplicationScoped;
diff --git a/data-index/data-index-storage/data-index-storage-api/src/main/resources/META-INF/beans.xml b/data-index/data-index-storage/data-index-storage-api/src/main/resources/META-INF/beans.xml
index e69de29bb2..a0eb9fbf8c 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/main/resources/META-INF/beans.xml
+++ b/data-index/data-index-storage/data-index-storage-api/src/main/resources/META-INF/beans.xml
@@ -0,0 +1,20 @@
+
diff --git a/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/QueryTestBase.java b/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/QueryTestBase.java
index b0e7c789fd..a24e56b616 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/QueryTestBase.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/QueryTestBase.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test;
import java.time.Instant;
@@ -22,7 +24,6 @@
import java.util.List;
import java.util.function.BiConsumer;
-import org.junit.jupiter.api.AfterEach;
import org.kie.kogito.persistence.api.Storage;
import org.kie.kogito.persistence.api.query.AttributeFilter;
import org.kie.kogito.persistence.api.query.AttributeSort;
@@ -35,11 +36,6 @@ protected Boolean isDateTimeAsLong() {
return true;
}
- @AfterEach
- void tearDown() {
- getStorage().clear();
- }
-
public void queryAndAssert(BiConsumer, String[]> assertConsumer, Storage storage, List> filters, List sort, Integer offset, Integer limit,
String... ids) {
assertConsumer.accept(storage.query().filter(filters).sort(sort).offset(offset).limit(limit).execute(), ids);
diff --git a/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/QueryTestUtils.java b/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/QueryTestUtils.java
index feb6f903ba..6477143d26 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/QueryTestUtils.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/QueryTestUtils.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test;
import java.util.List;
diff --git a/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/TestUtils.java b/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/TestUtils.java
index 27ac6990b8..c3af9b66b3 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/TestUtils.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/TestUtils.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test;
import java.time.Instant;
diff --git a/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/query/AbstractJobQueryIT.java b/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/query/AbstractJobQueryIT.java
index f01d73edf8..12db5fda45 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/query/AbstractJobQueryIT.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/query/AbstractJobQueryIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.query;
import java.util.UUID;
diff --git a/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/query/AbstractProcessDefinitionQueryIT.java b/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/query/AbstractProcessDefinitionQueryIT.java
index d7d9fa55fa..cfa142cc07 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/query/AbstractProcessDefinitionQueryIT.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/query/AbstractProcessDefinitionQueryIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.query;
import java.util.List;
diff --git a/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/query/AbstractProcessIdQueryIT.java b/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/query/AbstractProcessIdQueryIT.java
index 532b0627c9..dd8b57d50d 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/query/AbstractProcessIdQueryIT.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/query/AbstractProcessIdQueryIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.query;
import org.junit.jupiter.api.Test;
diff --git a/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/query/AbstractProcessInstanceQueryIT.java b/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/query/AbstractProcessInstanceQueryIT.java
index 35f37cf72c..a3cde4fc1c 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/query/AbstractProcessInstanceQueryIT.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/query/AbstractProcessInstanceQueryIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.query;
import java.util.UUID;
diff --git a/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/query/AbstractUserTaskInstanceQueryIT.java b/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/query/AbstractUserTaskInstanceQueryIT.java
index 7f17cd9e01..7623257410 100644
--- a/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/query/AbstractUserTaskInstanceQueryIT.java
+++ b/data-index/data-index-storage/data-index-storage-api/src/test/java/org/kie/kogito/index/test/query/AbstractUserTaskInstanceQueryIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.query;
import java.util.UUID;
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/pom.xml b/data-index/data-index-storage/data-index-storage-infinispan/pom.xml
index d0363f03e4..56dc3283a1 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/pom.xml
+++ b/data-index/data-index-storage/data-index-storage-infinispan/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/InfinispanCacheStartup.java b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/InfinispanCacheStartup.java
index c190c73533..b977cc090e 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/InfinispanCacheStartup.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/InfinispanCacheStartup.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.infinispan;
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/AttachmentMarshaller.java b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/AttachmentMarshaller.java
index b6f8d55e8d..22781db7c0 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/AttachmentMarshaller.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/AttachmentMarshaller.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.infinispan.protostream;
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/CommentMarshaller.java b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/CommentMarshaller.java
index f1fb353d00..51788b5366 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/CommentMarshaller.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/CommentMarshaller.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.infinispan.protostream;
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/EntryMarshaller.java b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/EntryMarshaller.java
new file mode 100644
index 0000000000..504d14aa25
--- /dev/null
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/EntryMarshaller.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.index.infinispan.protostream;
+
+import java.io.IOException;
+
+import org.infinispan.protostream.MessageMarshaller;
+import org.kie.kogito.index.model.Entry;
+import org.kie.kogito.persistence.infinispan.protostream.AbstractMarshaller;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class EntryMarshaller extends AbstractMarshaller implements MessageMarshaller {
+
+ private static final String KEY = "key";
+ private static final String VALUE = "value";
+
+ public EntryMarshaller(ObjectMapper mapper) {
+ super(mapper);
+ }
+
+ @Override
+ public Entry readFrom(ProtoStreamReader reader) throws IOException {
+ return new Entry(reader.readString(KEY), reader.readString(VALUE));
+ }
+
+ @Override
+ public void writeTo(ProtoStreamWriter writer, Entry entry) throws IOException {
+ writer.writeString(KEY, entry.getKey());
+ writer.writeString(VALUE, entry.getValue());
+ }
+
+ @Override
+ public Class extends Entry> getJavaClass() {
+ return Entry.class;
+ }
+
+ @Override
+ public String getTypeName() {
+ return getJavaClass().getName();
+ }
+}
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/JobMarshaller.java b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/JobMarshaller.java
index b4f5aa4aa5..4bc89c8b24 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/JobMarshaller.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/JobMarshaller.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.infinispan.protostream;
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/MilestoneMarshaller.java b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/MilestoneMarshaller.java
index c1d9771d71..0d12bdf59b 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/MilestoneMarshaller.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/MilestoneMarshaller.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.infinispan.protostream;
import java.io.IOException;
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/NodeInstanceMarshaller.java b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/NodeInstanceMarshaller.java
index c4be22fc37..194ad08caa 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/NodeInstanceMarshaller.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/NodeInstanceMarshaller.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.infinispan.protostream;
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/NodeMarshaller.java b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/NodeMarshaller.java
index e4d28b89c6..2b7b998c5a 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/NodeMarshaller.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/NodeMarshaller.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.infinispan.protostream;
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/NodeMetadataMarshaller.java b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/NodeMetadataMarshaller.java
index 97146a3e33..7d7e490c3d 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/NodeMetadataMarshaller.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/NodeMetadataMarshaller.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.infinispan.protostream;
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/ProcessDefinitionMarshaller.java b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/ProcessDefinitionMarshaller.java
index 1a01a0c6fa..720fdf1e02 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/ProcessDefinitionMarshaller.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/ProcessDefinitionMarshaller.java
@@ -1,25 +1,33 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.infinispan.protostream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Collectors;
import org.infinispan.protostream.MessageMarshaller;
+import org.kie.kogito.index.model.Entry;
import org.kie.kogito.index.model.Node;
import org.kie.kogito.index.model.ProcessDefinition;
import org.kie.kogito.persistence.infinispan.protostream.AbstractMarshaller;
@@ -31,11 +39,13 @@ public class ProcessDefinitionMarshaller extends AbstractMarshaller implements M
protected static final String ID = "id";
protected static final String VERSION = "version";
protected static final String NAME = "name";
+ protected static final String ANNOTATIONS = "annotations";
+ protected static final String DESCRIPTION = "description";
+ protected static final String METADATA = "metadata";
protected static final String ROLES = "roles";
protected static final String ADDONS = "addons";
protected static final String TYPE = "type";
protected static final String ENDPOINT = "endpoint";
-
protected static final String SOURCE = "source";
protected static final String NODES = "nodes";
@@ -49,6 +59,9 @@ public ProcessDefinition readFrom(ProtoStreamReader reader) throws IOException {
pd.setId(reader.readString(ID));
pd.setVersion(reader.readString(VERSION));
pd.setName(reader.readString(NAME));
+ pd.setDescription(reader.readString(DESCRIPTION));
+ pd.setAnnotations(reader.readCollection(ANNOTATIONS, new HashSet<>(), String.class));
+ pd.setMetadata(buildMetadata(reader));
pd.setRoles(reader.readCollection(ROLES, new HashSet<>(), String.class));
pd.setAddons(reader.readCollection(ADDONS, new HashSet<>(), String.class));
pd.setType(reader.readString(TYPE));
@@ -59,11 +72,20 @@ public ProcessDefinition readFrom(ProtoStreamReader reader) throws IOException {
return pd;
}
+ private static Map buildMetadata(ProtoStreamReader reader) throws IOException {
+ return Optional.ofNullable(reader.readCollection(METADATA, new HashSet<>(), Entry.class))
+ .map(entries -> entries.stream().collect(Collectors.toMap(Entry::getKey, Entry::getValue)))
+ .orElse(null);
+ }
+
@Override
public void writeTo(ProtoStreamWriter writer, ProcessDefinition pd) throws IOException {
writer.writeString(ID, pd.getId());
writer.writeString(VERSION, pd.getVersion());
writer.writeString(NAME, pd.getName());
+ writer.writeString(DESCRIPTION, pd.getDescription());
+ writer.writeCollection(ANNOTATIONS, pd.getAnnotations(), String.class);
+ writer.writeCollection(METADATA, buildMetadata(pd), Entry.class);
writer.writeCollection(ROLES, pd.getRoles(), String.class);
writer.writeCollection(ADDONS, pd.getAddons(), String.class);
writer.writeString(TYPE, pd.getType());
@@ -72,6 +94,13 @@ public void writeTo(ProtoStreamWriter writer, ProcessDefinition pd) throws IOExc
writer.writeCollection(NODES, pd.getNodes(), Node.class);
}
+ private static Set buildMetadata(ProcessDefinition pd) {
+ return Optional.ofNullable(pd.getMetadata())
+ .map(Map::entrySet)
+ .map(entries -> entries.stream().map(e -> new Entry(e.getKey(), e.getValue())).collect(Collectors.toSet()))
+ .orElse(null);
+ }
+
@Override
public Class extends ProcessDefinition> getJavaClass() {
return ProcessDefinition.class;
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/ProcessInstanceErrorMarshaller.java b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/ProcessInstanceErrorMarshaller.java
index c1f3300398..e0df969a7b 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/ProcessInstanceErrorMarshaller.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/ProcessInstanceErrorMarshaller.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.infinispan.protostream;
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/ProcessInstanceMarshaller.java b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/ProcessInstanceMarshaller.java
index 01f3cabed4..ab391703aa 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/ProcessInstanceMarshaller.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/ProcessInstanceMarshaller.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.infinispan.protostream;
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/ProtostreamProducer.java b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/ProtostreamProducer.java
index 61d309809a..09d4ba9808 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/ProtostreamProducer.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/ProtostreamProducer.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.infinispan.protostream;
@@ -49,6 +52,11 @@ MessageMarshaller nodeMarshaller() {
return new NodeMarshaller(mapper);
}
+ @Produces
+ MessageMarshaller entryMarshaller() {
+ return new EntryMarshaller(mapper);
+ }
+
@Produces
MessageMarshaller nodeMetadataMarshaller() {
return new NodeMetadataMarshaller(mapper);
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/UserTaskInstanceMarshaller.java b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/UserTaskInstanceMarshaller.java
index 70248be82d..b3ba2e74f3 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/UserTaskInstanceMarshaller.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/protostream/UserTaskInstanceMarshaller.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.infinispan.protostream;
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/schema/ProtoSchemaAcceptor.java b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/schema/ProtoSchemaAcceptor.java
index 5b3f5b2876..030bcd3085 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/schema/ProtoSchemaAcceptor.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/schema/ProtoSchemaAcceptor.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.infinispan.schema;
import java.util.Optional;
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/schema/ProtoSchemaManager.java b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/schema/ProtoSchemaManager.java
index 24b7f2ebc1..e468429a7d 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/schema/ProtoSchemaManager.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/infinispan/schema/ProtoSchemaManager.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.infinispan.schema;
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/model/Entry.java b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/model/Entry.java
new file mode 100644
index 0000000000..c13c40daac
--- /dev/null
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/model/Entry.java
@@ -0,0 +1,59 @@
+package org.kie.kogito.index.model;
+
+import java.util.Objects;
+
+public class Entry {
+
+ private String key;
+
+ private String value;
+
+ public Entry() {
+ }
+
+ public Entry(String key, String value) {
+ this.key = key;
+ this.value = value;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (!(o instanceof Entry)) {
+ return false;
+ }
+ Entry entry = (Entry) o;
+ return Objects.equals(key, entry.key) && Objects.equals(value, entry.value);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(key, value);
+ }
+
+ @Override
+ public String toString() {
+ return "Entry{" +
+ "key='" + key + '\'' +
+ ", value='" + value + '\'' +
+ '}';
+ }
+}
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/model/NodeMetadata.java b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/model/NodeMetadata.java
index 60b0b5d8ba..d4ced0c73c 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/model/NodeMetadata.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/main/java/org/kie/kogito/index/model/NodeMetadata.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.model;
public class NodeMetadata {
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/main/resources/META-INF/beans.xml b/data-index/data-index-storage/data-index-storage-infinispan/src/main/resources/META-INF/beans.xml
index e69de29bb2..a0eb9fbf8c 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/main/resources/META-INF/beans.xml
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/main/resources/META-INF/beans.xml
@@ -0,0 +1,20 @@
+
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/AttachmentMarshallerTest.java b/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/AttachmentMarshallerTest.java
index ad20ba9193..a4292660cd 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/AttachmentMarshallerTest.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/AttachmentMarshallerTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.infinispan.protostream;
import java.io.IOException;
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/CommentMarshallerTest.java b/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/CommentMarshallerTest.java
index a51d1ae266..78e96c758c 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/CommentMarshallerTest.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/CommentMarshallerTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.infinispan.protostream;
import java.io.IOException;
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/MilestoneMarshallerTest.java b/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/MilestoneMarshallerTest.java
index 0e5f8ac04a..e1e1e9bf89 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/MilestoneMarshallerTest.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/MilestoneMarshallerTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.infinispan.protostream;
import java.io.IOException;
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/ProcessDefinitionMarshallerTest.java b/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/ProcessDefinitionMarshallerTest.java
index 0bdb6be50f..e8f08da5fb 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/ProcessDefinitionMarshallerTest.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/ProcessDefinitionMarshallerTest.java
@@ -1,33 +1,41 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.infinispan.protostream;
import java.io.IOException;
import java.util.HashSet;
+import java.util.Map;
import org.infinispan.protostream.MessageMarshaller;
import org.junit.jupiter.api.Test;
+import org.kie.kogito.index.model.Entry;
import org.kie.kogito.index.model.ProcessDefinition;
import org.mockito.InOrder;
import static java.util.Collections.singleton;
+import static java.util.stream.Collectors.toSet;
import static org.assertj.core.api.Assertions.assertThat;
import static org.kie.kogito.index.infinispan.protostream.ProcessDefinitionMarshaller.ADDONS;
+import static org.kie.kogito.index.infinispan.protostream.ProcessDefinitionMarshaller.ANNOTATIONS;
+import static org.kie.kogito.index.infinispan.protostream.ProcessDefinitionMarshaller.DESCRIPTION;
import static org.kie.kogito.index.infinispan.protostream.ProcessDefinitionMarshaller.ID;
+import static org.kie.kogito.index.infinispan.protostream.ProcessDefinitionMarshaller.METADATA;
import static org.kie.kogito.index.infinispan.protostream.ProcessDefinitionMarshaller.NAME;
import static org.kie.kogito.index.infinispan.protostream.ProcessDefinitionMarshaller.ROLES;
import static org.kie.kogito.index.infinispan.protostream.ProcessDefinitionMarshaller.TYPE;
@@ -46,6 +54,9 @@ void testReadFrom() throws IOException {
when(reader.readString(ID)).thenReturn("processId");
when(reader.readString(VERSION)).thenReturn("1.0");
when(reader.readString(NAME)).thenReturn("processName");
+ when(reader.readString(DESCRIPTION)).thenReturn("descr");
+ when(reader.readCollection(eq(ANNOTATIONS), any(), eq(String.class))).thenReturn(new HashSet<>(singleton("tag1")));
+ when(reader.readCollection(eq(METADATA), any(), eq(Entry.class))).thenReturn(new HashSet<>(singleton(new Entry("key1", "value1"))));
when(reader.readCollection(eq(ROLES), any(), eq(String.class))).thenReturn(new HashSet<>(singleton("admin")));
when(reader.readCollection(eq(ADDONS), any(), eq(String.class))).thenReturn(new HashSet<>(singleton("process-management")));
when(reader.readString(TYPE)).thenReturn("processType");
@@ -58,6 +69,9 @@ void testReadFrom() throws IOException {
.hasFieldOrPropertyWithValue(ID, "processId")
.hasFieldOrPropertyWithValue(VERSION, "1.0")
.hasFieldOrPropertyWithValue(NAME, "processName")
+ .hasFieldOrPropertyWithValue(DESCRIPTION, "descr")
+ .hasFieldOrPropertyWithValue(ANNOTATIONS, singleton("tag1"))
+ .hasFieldOrPropertyWithValue(METADATA, Map.of("key1", "value1"))
.hasFieldOrPropertyWithValue(ROLES, singleton("admin"))
.hasFieldOrPropertyWithValue(ADDONS, singleton("process-management"))
.hasFieldOrPropertyWithValue(TYPE, "processType");
@@ -66,6 +80,9 @@ void testReadFrom() throws IOException {
inOrder.verify(reader).readString(ID);
inOrder.verify(reader).readString(VERSION);
inOrder.verify(reader).readString(NAME);
+ inOrder.verify(reader).readString(DESCRIPTION);
+ inOrder.verify(reader).readCollection(ANNOTATIONS, new HashSet<>(), String.class);
+ inOrder.verify(reader).readCollection(METADATA, new HashSet<>(), Entry.class);
inOrder.verify(reader).readCollection(ROLES, new HashSet<>(), String.class);
inOrder.verify(reader).readCollection(ADDONS, new HashSet<>(), String.class);
inOrder.verify(reader).readString(TYPE);
@@ -77,6 +94,9 @@ void testWriteTo() throws IOException {
pd.setId("processId");
pd.setVersion("1.0");
pd.setName("processName");
+ pd.setDescription("descr");
+ pd.setAnnotations(singleton("tag1"));
+ pd.setMetadata(Map.of("key1", "value1"));
pd.setRoles(singleton("admin"));
pd.setAddons(singleton("process-management"));
pd.setType("processType");
@@ -90,6 +110,9 @@ void testWriteTo() throws IOException {
inOrder.verify(writer).writeString(ID, pd.getId());
inOrder.verify(writer).writeString(VERSION, pd.getVersion());
inOrder.verify(writer).writeString(NAME, pd.getName());
+ inOrder.verify(writer).writeString(DESCRIPTION, pd.getDescription());
+ inOrder.verify(writer).writeCollection(ANNOTATIONS, pd.getAnnotations(), String.class);
+ inOrder.verify(writer).writeCollection(METADATA, pd.getMetadata().entrySet().stream().map(e -> new Entry(e.getKey(), e.getValue())).collect(toSet()), Entry.class);
inOrder.verify(writer).writeCollection(ROLES, pd.getRoles(), String.class);
inOrder.verify(writer).writeCollection(ADDONS, pd.getAddons(), String.class);
inOrder.verify(writer).writeString(TYPE, pd.getType());
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/ProcessInstanceMarshallerTest.java b/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/ProcessInstanceMarshallerTest.java
index 8198a00de0..8f36a2d48e 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/ProcessInstanceMarshallerTest.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/ProcessInstanceMarshallerTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.infinispan.protostream;
import java.io.IOException;
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/ProtoSchemaAcceptorTest.java b/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/ProtoSchemaAcceptorTest.java
index 3c8fc0b7b2..7a66bdf402 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/ProtoSchemaAcceptorTest.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/ProtoSchemaAcceptorTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.infinispan.protostream;
import java.util.Optional;
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/ProtoSchemaManagerTest.java b/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/ProtoSchemaManagerTest.java
index 9eb2319b7f..cb3b174a93 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/ProtoSchemaManagerTest.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/ProtoSchemaManagerTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.infinispan.protostream;
import org.infinispan.client.hotrod.RemoteCacheManager;
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/TestUtils.java b/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/TestUtils.java
index 08243794fc..b22291ec7d 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/TestUtils.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/TestUtils.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.infinispan.protostream;
diff --git a/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/UserTaskInstanceMarshallerTest.java b/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/UserTaskInstanceMarshallerTest.java
index 861242dbd3..6c19ae9b54 100644
--- a/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/UserTaskInstanceMarshallerTest.java
+++ b/data-index/data-index-storage/data-index-storage-infinispan/src/test/java/org/kie/kogito/index/infinispan/protostream/UserTaskInstanceMarshallerTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.infinispan.protostream;
import java.io.IOException;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/pom.xml b/data-index/data-index-storage/data-index-storage-mongodb/pom.xml
index ff9af4d82c..e0198e02a0 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/pom.xml
+++ b/data-index/data-index-storage/data-index-storage-mongodb/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/Constants.java b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/Constants.java
index a076d69fc7..de3ba2c602 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/Constants.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/Constants.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb;
public class Constants {
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/DomainEntityMapper.java b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/DomainEntityMapper.java
index e49ecf0592..b8ed1d4b0a 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/DomainEntityMapper.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/DomainEntityMapper.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.model;
import org.bson.Document;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/JobEntity.java b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/JobEntity.java
index e140e5f3dd..5e8794bdc3 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/JobEntity.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/JobEntity.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.model;
import java.util.Objects;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/JobEntityMapper.java b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/JobEntityMapper.java
index 734439748b..7085a0b1a3 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/JobEntityMapper.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/JobEntityMapper.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.model;
import org.kie.kogito.index.model.Job;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/ProcessDefinitionEntity.java b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/ProcessDefinitionEntity.java
index 941ef0db29..b009835ade 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/ProcessDefinitionEntity.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/ProcessDefinitionEntity.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.model;
import java.util.List;
@@ -32,8 +34,14 @@ public class ProcessDefinitionEntity {
private String version;
private String name;
+
+ private String description;
private String type;
+ private Set annotations;
+
+ private Map metadata;
+
private Set roles;
private Set addons;
@@ -124,6 +132,30 @@ public void setNodes(List nodes) {
this.nodes = nodes;
}
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Set getAnnotations() {
+ return annotations;
+ }
+
+ public void setAnnotations(Set annotations) {
+ this.annotations = annotations;
+ }
+
+ public Map getMetadata() {
+ return metadata;
+ }
+
+ public void setMetadata(Map metadata) {
+ this.metadata = metadata;
+ }
+
@Override
public boolean equals(Object o) {
if (this == o)
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/ProcessDefinitionEntityMapper.java b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/ProcessDefinitionEntityMapper.java
index 94a8016963..6dfc5573db 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/ProcessDefinitionEntityMapper.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/ProcessDefinitionEntityMapper.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.model;
import java.util.function.Function;
@@ -42,6 +44,9 @@ public ProcessDefinitionEntity mapToEntity(String key, ProcessDefinition pd) {
entity.setId(pd.getId());
entity.setVersion(pd.getVersion());
entity.setName(pd.getName());
+ entity.setDescription(pd.getDescription());
+ entity.setAnnotations(pd.getAnnotations());
+ entity.setMetadata(pd.getMetadata());
entity.setRoles(pd.getRoles());
entity.setAddons(pd.getAddons());
entity.setType(pd.getType());
@@ -61,6 +66,9 @@ public ProcessDefinition mapToModel(ProcessDefinitionEntity entity) {
pd.setId(entity.getId());
pd.setVersion(entity.getVersion());
pd.setName(entity.getName());
+ pd.setDescription(entity.getDescription());
+ pd.setAnnotations(entity.getAnnotations());
+ pd.setMetadata(entity.getMetadata());
pd.setRoles(entity.getRoles());
pd.setAddons(entity.getAddons());
pd.setType(entity.getType());
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/ProcessIdEntity.java b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/ProcessIdEntity.java
index f99d923c8c..cea6d58880 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/ProcessIdEntity.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/ProcessIdEntity.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.model;
import java.util.Objects;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/ProcessIdEntityMapper.java b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/ProcessIdEntityMapper.java
index 96417d01fa..dc6b27e8ae 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/ProcessIdEntityMapper.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/ProcessIdEntityMapper.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.model;
import org.kie.kogito.persistence.mongodb.model.MongoEntityMapper;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/ProcessInstanceEntity.java b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/ProcessInstanceEntity.java
index b2d2b53ad0..28cef62442 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/ProcessInstanceEntity.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/ProcessInstanceEntity.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.model;
import java.util.List;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/ProcessInstanceEntityMapper.java b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/ProcessInstanceEntityMapper.java
index 141871f46d..16e1f13d3c 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/ProcessInstanceEntityMapper.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/ProcessInstanceEntityMapper.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.model;
import java.util.Optional;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/UserTaskInstanceEntity.java b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/UserTaskInstanceEntity.java
index 48b4e96d4f..a027ad3843 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/UserTaskInstanceEntity.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/UserTaskInstanceEntity.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.model;
import java.util.List;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/UserTaskInstanceEntityMapper.java b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/UserTaskInstanceEntityMapper.java
index 153f044181..b7479af604 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/UserTaskInstanceEntityMapper.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/model/UserTaskInstanceEntityMapper.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.model;
import java.util.Optional;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/storage/MongoModelServiceImpl.java b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/storage/MongoModelServiceImpl.java
index aab322ab85..aae8a0de98 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/storage/MongoModelServiceImpl.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/storage/MongoModelServiceImpl.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.storage;
import java.util.Map;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/storage/ProcessIndexObserver.java b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/storage/ProcessIndexObserver.java
index 22a3c50201..821db8cb62 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/storage/ProcessIndexObserver.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/main/java/org/kie/kogito/index/mongodb/storage/ProcessIndexObserver.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.storage;
import javax.enterprise.context.ApplicationScoped;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/main/resources/META-INF/beans.xml b/data-index/data-index-storage/data-index-storage-mongodb/src/main/resources/META-INF/beans.xml
index e69de29bb2..a0eb9fbf8c 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/main/resources/META-INF/beans.xml
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/main/resources/META-INF/beans.xml
@@ -0,0 +1,20 @@
+
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/ConstantsTest.java b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/ConstantsTest.java
index 176d679b4e..aa2f72a3fb 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/ConstantsTest.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/ConstantsTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb;
import org.junit.jupiter.api.Test;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/mock/MockIndexCreateOrUpdateEventListener.java b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/mock/MockIndexCreateOrUpdateEventListener.java
index 3e5ebfe7ea..58b44ecdb0 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/mock/MockIndexCreateOrUpdateEventListener.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/mock/MockIndexCreateOrUpdateEventListener.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.mock;
import java.util.List;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/model/DomainEntityMapperTest.java b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/model/DomainEntityMapperTest.java
index 6a6fca117a..2811951998 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/model/DomainEntityMapperTest.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/model/DomainEntityMapperTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.model;
import java.util.HashMap;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/model/JobEntityMapperTest.java b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/model/JobEntityMapperTest.java
index 9600264c2f..79bb8094a8 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/model/JobEntityMapperTest.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/model/JobEntityMapperTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.model;
import java.time.ZonedDateTime;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/model/ProcessDefinitionEntityMapperTest.java b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/model/ProcessDefinitionEntityMapperTest.java
index 999bf6ac0e..e663f6936d 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/model/ProcessDefinitionEntityMapperTest.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/model/ProcessDefinitionEntityMapperTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.model;
import java.util.Set;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/model/ProcessIdEntityMapperTest.java b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/model/ProcessIdEntityMapperTest.java
index dde7c8361d..430de52f3f 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/model/ProcessIdEntityMapperTest.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/model/ProcessIdEntityMapperTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.model;
import org.junit.jupiter.api.Test;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/model/ProcessInstanceEntityMapperTest.java b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/model/ProcessInstanceEntityMapperTest.java
index 9a24a2ed4f..a36ead9e50 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/model/ProcessInstanceEntityMapperTest.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/model/ProcessInstanceEntityMapperTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.model;
import java.time.ZonedDateTime;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/model/UserTaskInstanceEntityMapperTest.java b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/model/UserTaskInstanceEntityMapperTest.java
index 2eeb1f1fe4..9340704383 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/model/UserTaskInstanceEntityMapperTest.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/model/UserTaskInstanceEntityMapperTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.model;
import java.time.ZonedDateTime;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/query/DomainQueryIT.java b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/query/DomainQueryIT.java
index 15f97f852a..d7b27ffb10 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/query/DomainQueryIT.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/query/DomainQueryIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.query;
import java.util.UUID;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/query/JobQueryIT.java b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/query/JobQueryIT.java
index 0b339b3b78..5dce2a361a 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/query/JobQueryIT.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/query/JobQueryIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.query;
import javax.inject.Inject;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/query/ProcessDefinitionQueryIT.java b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/query/ProcessDefinitionQueryIT.java
index 739e57746f..db78b84704 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/query/ProcessDefinitionQueryIT.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/query/ProcessDefinitionQueryIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.query;
import javax.inject.Inject;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/query/ProcessIdQueryIT.java b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/query/ProcessIdQueryIT.java
index 41195a849e..1c3330bb16 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/query/ProcessIdQueryIT.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/query/ProcessIdQueryIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.query;
import javax.inject.Inject;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/query/ProcessInstanceQueryIT.java b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/query/ProcessInstanceQueryIT.java
index 59bbfc5131..e6db6b9af3 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/query/ProcessInstanceQueryIT.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/query/ProcessInstanceQueryIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.query;
import javax.inject.Inject;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/query/UserTaskInstanceQueryIT.java b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/query/UserTaskInstanceQueryIT.java
index acbdb205cf..e7149a0afc 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/query/UserTaskInstanceQueryIT.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/query/UserTaskInstanceQueryIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.query;
import javax.inject.Inject;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/DomainStorageIT.java b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/DomainStorageIT.java
index e836b63f36..c31ddfc9a8 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/DomainStorageIT.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/DomainStorageIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.storage;
import java.util.UUID;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/JobStorageIT.java b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/JobStorageIT.java
index 2d621acd78..088d6ccfa9 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/JobStorageIT.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/JobStorageIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.storage;
import java.util.UUID;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/MongoModelServiceImplIT.java b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/MongoModelServiceImplIT.java
index b0f15736b6..7744351fb1 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/MongoModelServiceImplIT.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/MongoModelServiceImplIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.storage;
import javax.inject.Inject;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/ProcessDefinitionStorageIT.java b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/ProcessDefinitionStorageIT.java
index bdd558f29c..2c669e5c87 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/ProcessDefinitionStorageIT.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/ProcessDefinitionStorageIT.java
@@ -1,25 +1,28 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.storage;
import java.util.Set;
import javax.inject.Inject;
+import org.apache.commons.lang3.RandomStringUtils;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -59,7 +62,7 @@ void tearDown() {
@Test
void testCache() {
- String processId = "travels";
+ String processId = RandomStringUtils.randomAlphabetic(10);
String version = "1.0";
ProcessDefinition pdv1 = TestUtils.createProcessDefinition(processId, version, Set.of("admin", "kogito"));
ProcessDefinition pdv2 = TestUtils.createProcessDefinition(processId, version, Set.of("kogito"));
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/ProcessIdStorageIT.java b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/ProcessIdStorageIT.java
index 591a5fa507..d19db523ef 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/ProcessIdStorageIT.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/ProcessIdStorageIT.java
@@ -1,23 +1,26 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.storage;
import javax.inject.Inject;
+import org.apache.commons.lang3.RandomStringUtils;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -55,7 +58,7 @@ void tearDown() {
@Test
void testCache() {
- String processId = "travels";
+ String processId = RandomStringUtils.randomAlphabetic(10);
String type1 = "org.acme.travels.travels";
String type2 = "org.acme.travels";
testStorage(storage, processId, type1, type2);
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/ProcessIndexObserverIT.java b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/ProcessIndexObserverIT.java
index 3c91dc4711..0297346530 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/ProcessIndexObserverIT.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/ProcessIndexObserverIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.storage;
import javax.inject.Inject;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/ProcessInstanceStorageIT.java b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/ProcessInstanceStorageIT.java
index 41e635b0db..04bd7bb6c4 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/ProcessInstanceStorageIT.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/ProcessInstanceStorageIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.storage;
import java.util.UUID;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/StorageTestBase.java b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/StorageTestBase.java
index 5641e0ba61..adbeaa03a4 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/StorageTestBase.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/StorageTestBase.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.storage;
import org.kie.kogito.persistence.api.Storage;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/UserTaskInstanceStorageIT.java b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/UserTaskInstanceStorageIT.java
index b6b19973fa..3f3b95df05 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/UserTaskInstanceStorageIT.java
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/test/java/org/kie/kogito/index/mongodb/storage/UserTaskInstanceStorageIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.mongodb.storage;
import java.util.UUID;
diff --git a/data-index/data-index-storage/data-index-storage-mongodb/src/test/resources/application.properties b/data-index/data-index-storage/data-index-storage-mongodb/src/test/resources/application.properties
index 1ac6ecfb9f..ebc31394c1 100644
--- a/data-index/data-index-storage/data-index-storage-mongodb/src/test/resources/application.properties
+++ b/data-index/data-index-storage/data-index-storage-mongodb/src/test/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Quarkus
quarkus.log.console.enable=true
quarkus.log.console.level=INFO
diff --git a/data-index/data-index-storage/data-index-storage-oracle/pom.xml b/data-index/data-index-storage/data-index-storage-oracle/pom.xml
index a7156a678f..30e2c30b4c 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/pom.xml
+++ b/data-index/data-index-storage/data-index-storage-oracle/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/mapper/JobEntityMapper.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/mapper/JobEntityMapper.java
index 8bbc88baa1..7197b6b67c 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/mapper/JobEntityMapper.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/mapper/JobEntityMapper.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.mapper;
import org.kie.kogito.index.model.Job;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/mapper/ProcessDefinitionEntityMapper.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/mapper/ProcessDefinitionEntityMapper.java
index 70b13ea457..b1cb60f0cb 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/mapper/ProcessDefinitionEntityMapper.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/mapper/ProcessDefinitionEntityMapper.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.mapper;
import org.kie.kogito.index.model.ProcessDefinition;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/mapper/ProcessInstanceEntityMapper.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/mapper/ProcessInstanceEntityMapper.java
index 3e8bbfbb78..06d89a3050 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/mapper/ProcessInstanceEntityMapper.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/mapper/ProcessInstanceEntityMapper.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.mapper;
import org.kie.kogito.index.model.Milestone;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/mapper/UserTaskInstanceEntityMapper.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/mapper/UserTaskInstanceEntityMapper.java
index cabbe7a1c2..11bd8f3993 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/mapper/UserTaskInstanceEntityMapper.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/mapper/UserTaskInstanceEntityMapper.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.mapper;
import org.kie.kogito.index.model.UserTaskInstance;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/AbstractEntity.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/AbstractEntity.java
index 8573609932..3dbf23656e 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/AbstractEntity.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/AbstractEntity.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.model;
import java.io.Serializable;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/AttachmentEntity.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/AttachmentEntity.java
index 790b2d9449..81e8fb2f2d 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/AttachmentEntity.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/AttachmentEntity.java
@@ -1,25 +1,26 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.model;
import java.time.ZonedDateTime;
import java.util.Objects;
-import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ForeignKey;
import javax.persistence.Id;
@@ -27,9 +28,6 @@
import javax.persistence.ManyToOne;
import javax.persistence.Table;
-import org.hibernate.annotations.OnDelete;
-import org.hibernate.annotations.OnDeleteAction;
-
@Entity(name = "attachments")
@Table(name = "attachments")
public class AttachmentEntity extends AbstractEntity {
@@ -40,8 +38,7 @@ public class AttachmentEntity extends AbstractEntity {
private String content;
private String updatedBy;
private ZonedDateTime updatedAt;
- @ManyToOne(cascade = CascadeType.ALL, optional = false)
- @OnDelete(action = OnDeleteAction.CASCADE)
+ @ManyToOne(optional = false)
@JoinColumn(name = "taskId", foreignKey = @ForeignKey(name = "fk_attachments_tasks"))
private UserTaskInstanceEntity userTask;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/CommentEntity.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/CommentEntity.java
index 7b391f0e93..03e06e35b9 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/CommentEntity.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/CommentEntity.java
@@ -1,25 +1,26 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.model;
import java.time.ZonedDateTime;
import java.util.Objects;
-import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ForeignKey;
import javax.persistence.Id;
@@ -27,9 +28,6 @@
import javax.persistence.ManyToOne;
import javax.persistence.Table;
-import org.hibernate.annotations.OnDelete;
-import org.hibernate.annotations.OnDeleteAction;
-
@Entity(name = "comments")
@Table(name = "comments")
public class CommentEntity extends AbstractEntity {
@@ -39,8 +37,7 @@ public class CommentEntity extends AbstractEntity {
private String content;
private String updatedBy;
private ZonedDateTime updatedAt;
- @ManyToOne(cascade = CascadeType.ALL, optional = false)
- @OnDelete(action = OnDeleteAction.CASCADE)
+ @ManyToOne(optional = false)
@JoinColumn(name = "taskId", foreignKey = @ForeignKey(name = "fk_comments_tasks"))
private UserTaskInstanceEntity userTask;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/JobEntity.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/JobEntity.java
index a2071050fd..7082fa32e5 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/JobEntity.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/JobEntity.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.model;
import java.time.ZonedDateTime;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/JobEntityRepository.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/JobEntityRepository.java
index 65efa3b56e..f2ae36f771 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/JobEntityRepository.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/JobEntityRepository.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.model;
import javax.enterprise.context.ApplicationScoped;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/MilestoneEntity.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/MilestoneEntity.java
index f44999a41e..b943daa6e8 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/MilestoneEntity.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/MilestoneEntity.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.model;
import java.util.Objects;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/MilestoneEntityId.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/MilestoneEntityId.java
index becb5d9a31..f073c1b6e7 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/MilestoneEntityId.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/MilestoneEntityId.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.model;
import java.io.Serializable;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/NodeEntity.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/NodeEntity.java
index 8db9a852bb..a1807c850c 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/NodeEntity.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/NodeEntity.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.model;
import java.util.Map;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/NodeEntityId.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/NodeEntityId.java
index 8416acda4d..88993274e5 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/NodeEntityId.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/NodeEntityId.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.model;
import java.io.Serializable;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/NodeInstanceEntity.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/NodeInstanceEntity.java
index 2759fea985..57650f4e8e 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/NodeInstanceEntity.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/NodeInstanceEntity.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.model;
import java.time.ZonedDateTime;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/ProcessDefinitionEntity.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/ProcessDefinitionEntity.java
index 411986e117..9e7703b505 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/ProcessDefinitionEntity.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/ProcessDefinitionEntity.java
@@ -1,22 +1,25 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.model;
import java.util.List;
+import java.util.Map;
import java.util.Objects;
import java.util.Set;
@@ -29,6 +32,7 @@
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
+import javax.persistence.MapKeyColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
@@ -46,6 +50,7 @@ public class ProcessDefinitionEntity extends AbstractEntity {
@Id
private String version;
private String name;
+ private String description;
private String type;
private byte[] source;
@@ -65,6 +70,23 @@ public class ProcessDefinitionEntity extends AbstractEntity {
@Column(name = "addon", nullable = false)
private Set addons;
+ @ElementCollection
+ @JoinColumn(name = "id")
+ @CollectionTable(name = "definitions_annotations", joinColumns = { @JoinColumn(name = "process_id", referencedColumnName = "id"),
+ @JoinColumn(name = "process_version", referencedColumnName = "version") }, foreignKey = @ForeignKey(name = "fk_definitions_annotations"))
+ @OnDelete(action = OnDeleteAction.CASCADE)
+ @Column(name = "value")
+ private Set annotations;
+ @ElementCollection
+ @JoinColumn(name = "id")
+ @CollectionTable(name = "definitions_metadata", joinColumns = {
+ @JoinColumn(name = "process_id", referencedColumnName = "id"), @JoinColumn(name = "process_version", referencedColumnName = "version") },
+ foreignKey = @ForeignKey(name = "fk_definitions_metadata"))
+ @MapKeyColumn(name = "key")
+ @Column(name = "value")
+ @OnDelete(action = OnDeleteAction.CASCADE)
+ private Map metadata;
+
private String endpoint;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "processDefinition")
@@ -143,6 +165,30 @@ public void setNodes(List nodes) {
this.nodes = nodes;
}
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Set getAnnotations() {
+ return annotations;
+ }
+
+ public void setAnnotations(Set annotations) {
+ this.annotations = annotations;
+ }
+
+ public Map getMetadata() {
+ return metadata;
+ }
+
+ public void setMetadata(Map metadata) {
+ this.metadata = metadata;
+ }
+
@Override
public boolean equals(Object o) {
if (this == o)
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/ProcessDefinitionEntityId.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/ProcessDefinitionEntityId.java
index d8150f3a49..6e2e6575cf 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/ProcessDefinitionEntityId.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/ProcessDefinitionEntityId.java
@@ -1,24 +1,29 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.model;
import java.io.Serializable;
import java.util.Objects;
+import static org.kie.kogito.index.model.ProcessDefinition.fromKey;
+import static org.kie.kogito.index.model.ProcessDefinition.toKey;
+
public class ProcessDefinitionEntityId implements Serializable {
private String id;
@@ -29,9 +34,9 @@ public ProcessDefinitionEntityId() {
}
public ProcessDefinitionEntityId(String key) {
- String[] split = key.split("-");
- this.id = split[0];
- this.version = split[1];
+ String[] fromKey = fromKey(key);
+ this.id = fromKey[0];
+ this.version = fromKey[1];
}
public ProcessDefinitionEntityId(String id, String version) {
@@ -40,7 +45,7 @@ public ProcessDefinitionEntityId(String id, String version) {
}
public String getKey() {
- return String.format("%s-%s", id, version);
+ return toKey(id, version);
}
public String getId() {
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/ProcessDefinitionEntityRepository.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/ProcessDefinitionEntityRepository.java
index 88be8193c3..f301ca0a0f 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/ProcessDefinitionEntityRepository.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/ProcessDefinitionEntityRepository.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.model;
import javax.enterprise.context.ApplicationScoped;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/ProcessInstanceEntity.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/ProcessInstanceEntity.java
index f57178d54b..65dbfd9f43 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/ProcessInstanceEntity.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/ProcessInstanceEntity.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.model;
import java.time.ZonedDateTime;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/ProcessInstanceEntityRepository.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/ProcessInstanceEntityRepository.java
index c4873a558a..5e50438b7e 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/ProcessInstanceEntityRepository.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/ProcessInstanceEntityRepository.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.model;
import javax.enterprise.context.ApplicationScoped;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/ProcessInstanceErrorEntity.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/ProcessInstanceErrorEntity.java
index 6249bb545d..894847308c 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/ProcessInstanceErrorEntity.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/ProcessInstanceErrorEntity.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.model;
import java.util.Objects;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/UserTaskInstanceEntity.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/UserTaskInstanceEntity.java
index b14d71cff1..cad8138f3f 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/UserTaskInstanceEntity.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/UserTaskInstanceEntity.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.model;
import java.time.ZonedDateTime;
@@ -26,6 +28,7 @@
import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
+import javax.persistence.FetchType;
import javax.persistence.ForeignKey;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
@@ -95,9 +98,9 @@ public class UserTaskInstanceEntity extends AbstractEntity {
@Type(type = "jsonb")
private ObjectNode outputs;
private String endpoint;
- @OneToMany(cascade = CascadeType.ALL, mappedBy = "userTask")
+ @OneToMany(cascade = CascadeType.ALL, mappedBy = "userTask", orphanRemoval = true, fetch = FetchType.LAZY)
private List comments;
- @OneToMany(cascade = CascadeType.ALL, mappedBy = "userTask")
+ @OneToMany(cascade = CascadeType.ALL, mappedBy = "userTask", orphanRemoval = true, fetch = FetchType.LAZY)
private List attachments;
@Override
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/UserTaskInstanceEntityRepository.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/UserTaskInstanceEntityRepository.java
index ed0c35dda7..9a2659f67e 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/UserTaskInstanceEntityRepository.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/model/UserTaskInstanceEntityRepository.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.model;
import javax.enterprise.context.ApplicationScoped;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/AbstractStorage.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/AbstractStorage.java
index d365088eb6..d319ee18c1 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/AbstractStorage.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/AbstractStorage.java
@@ -1,24 +1,29 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.storage;
+import java.util.ConcurrentModificationException;
import java.util.Map;
import java.util.function.Function;
+import javax.persistence.LockModeType;
+import javax.persistence.PersistenceException;
import javax.transaction.Transactional;
import org.kie.kogito.index.oracle.model.AbstractEntity;
@@ -84,8 +89,19 @@ public V get(String key) {
@Override
@Transactional
public V put(String key, V value) {
- repository.deleteById(key);
- repository.persist(mapToEntity.apply(value));
+ //Pessimistic lock is used to lock the row to handle concurrency with an exiting registry
+ E persistedEntity = repository.findById(key, LockModeType.PESSIMISTIC_WRITE);
+ E newEntity = mapToEntity.apply(value);
+ if (persistedEntity != null) {
+ repository.getEntityManager().merge(newEntity);
+ } else {
+ try {
+ //to handle concurrency in case of a new registry persist flush and throw an exception to allow retry on the caller side
+ repository.persistAndFlush(newEntity);
+ } catch (PersistenceException e) {
+ throw new ConcurrentModificationException(e);
+ }
+ }
return value;
}
@@ -99,6 +115,7 @@ public V remove(String key) {
return value;
}
+ @Transactional
@Override
public boolean containsKey(String key) {
return repository.count("id = ?1", key) == 1;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/JobEntityStorage.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/JobEntityStorage.java
index c6e1f20bbe..877abe5f31 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/JobEntityStorage.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/JobEntityStorage.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.storage;
import javax.enterprise.context.ApplicationScoped;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/OracleQuery.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/OracleQuery.java
index 1e9d336c6f..24beb96727 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/OracleQuery.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/OracleQuery.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.oracle.storage;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/OracleStorageService.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/OracleStorageService.java
index 3af6c90b3a..af2056e276 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/OracleStorageService.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/OracleStorageService.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.oracle.storage;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/ProcessDefinitionEntityStorage.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/ProcessDefinitionEntityStorage.java
index 8904791889..48478e265f 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/ProcessDefinitionEntityStorage.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/ProcessDefinitionEntityStorage.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.storage;
import java.util.Optional;
@@ -21,6 +23,7 @@
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.persistence.EntityManager;
+import javax.persistence.LockModeType;
import org.kie.kogito.index.model.ProcessDefinition;
import org.kie.kogito.index.oracle.mapper.ProcessDefinitionEntityMapper;
@@ -66,6 +69,11 @@ public Optional findByIdOptional(String key) {
return repository.findByIdOptional(new ProcessDefinitionEntityId(key));
}
+ @Override
+ public ProcessDefinitionEntity findById(String s, LockModeType lockModeType) {
+ return repository.findById(new ProcessDefinitionEntityId(s), lockModeType);
+ }
+
@Override
public void persist(ProcessDefinitionEntity entity) {
repository.persist(entity);
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/ProcessInstanceEntityStorage.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/ProcessInstanceEntityStorage.java
index eafdce9429..587a76a753 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/ProcessInstanceEntityStorage.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/ProcessInstanceEntityStorage.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.storage;
import javax.enterprise.context.ApplicationScoped;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/UserTaskInstanceEntityStorage.java b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/UserTaskInstanceEntityStorage.java
index 9cc2f50775..50bc2ac5e9 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/UserTaskInstanceEntityStorage.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/java/org/kie/kogito/index/oracle/storage/UserTaskInstanceEntityStorage.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.storage;
import javax.enterprise.context.ApplicationScoped;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/resources/META-INF/beans.xml b/data-index/data-index-storage/data-index-storage-oracle/src/main/resources/META-INF/beans.xml
index 72a7a85a63..a0eb9fbf8c 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/main/resources/META-INF/beans.xml
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/resources/META-INF/beans.xml
@@ -1,16 +1,20 @@
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/main/resources/db/migration/V1.45.0.2__data_index_definitions_add_collums.sql b/data-index/data-index-storage/data-index-storage-oracle/src/main/resources/db/migration/V1.45.0.2__data_index_definitions_add_collums.sql
new file mode 100644
index 0000000000..d63ca07505
--- /dev/null
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/main/resources/db/migration/V1.45.0.2__data_index_definitions_add_collums.sql
@@ -0,0 +1,32 @@
+create table definitions_annotations
+(
+ value varchar2(255 char) not null,
+ process_id varchar2(255 char) not null,
+ process_version varchar2(255 char) not null,
+ primary key (value, process_id, process_version)
+);
+
+create table definitions_metadata
+(
+ process_id varchar2(255 char) not null,
+ process_version varchar2(255 char) not null,
+ value varchar2(255 char),
+ key varchar2(255 char) not null,
+ primary key (process_id, process_version, key)
+);
+
+alter table definitions_annotations
+ add constraint fk_definitions_annotations
+ foreign key (process_id, process_version)
+ references definitions
+ on delete cascade;
+
+alter table definitions_metadata
+ add constraint fk_definitions_metadata
+ foreign key (process_id, process_version)
+ references definitions
+ on delete cascade;
+
+alter table definitions
+ add (description varchar2(255 char));
+
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/mapper/JobEntityMapperIT.java b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/mapper/JobEntityMapperIT.java
index 90a12128c5..61f2659180 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/mapper/JobEntityMapperIT.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/mapper/JobEntityMapperIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.mapper;
import java.time.ZonedDateTime;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/mapper/ProcessDefinitionEntityMapperIT.java b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/mapper/ProcessDefinitionEntityMapperIT.java
index fd6dfc2186..669ad5a5d1 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/mapper/ProcessDefinitionEntityMapperIT.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/mapper/ProcessDefinitionEntityMapperIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.mapper;
import java.util.Set;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/mapper/ProcessInstanceEntityMapperIT.java b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/mapper/ProcessInstanceEntityMapperIT.java
index 0f03c13933..c521f56d7a 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/mapper/ProcessInstanceEntityMapperIT.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/mapper/ProcessInstanceEntityMapperIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.mapper;
import java.time.ZonedDateTime;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/mapper/UserTaskInstanceEntityMapperIT.java b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/mapper/UserTaskInstanceEntityMapperIT.java
index edc6e58da4..7e6cdfebc7 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/mapper/UserTaskInstanceEntityMapperIT.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/mapper/UserTaskInstanceEntityMapperIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.mapper;
import java.time.ZonedDateTime;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/query/JobEntityQueryIT.java b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/query/JobEntityQueryIT.java
index 54905e6d03..1df635219b 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/query/JobEntityQueryIT.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/query/JobEntityQueryIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.query;
import javax.inject.Inject;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/query/ProcessDefinitionEntityQueryIT.java b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/query/ProcessDefinitionEntityQueryIT.java
index 5829e42603..5da3effc8e 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/query/ProcessDefinitionEntityQueryIT.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/query/ProcessDefinitionEntityQueryIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.query;
import javax.inject.Inject;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/query/ProcessInstanceEntityQueryIT.java b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/query/ProcessInstanceEntityQueryIT.java
index c9bd0be583..e174e93610 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/query/ProcessInstanceEntityQueryIT.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/query/ProcessInstanceEntityQueryIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.query;
import javax.inject.Inject;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/query/UserTaskInstanceEntityQueryIT.java b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/query/UserTaskInstanceEntityQueryIT.java
index b357fb1305..a3ecedcce4 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/query/UserTaskInstanceEntityQueryIT.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/query/UserTaskInstanceEntityQueryIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.query;
import javax.inject.Inject;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/schema/DDLSchemaExporter.java b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/schema/DDLSchemaExporter.java
index 09123a4a6d..cdcd3cde9d 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/schema/DDLSchemaExporter.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/schema/DDLSchemaExporter.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.schema;
import java.util.EnumSet;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/storage/AbstractStorageIT.java b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/storage/AbstractStorageIT.java
index 6849bfbe98..ac493684bc 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/storage/AbstractStorageIT.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/storage/AbstractStorageIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.storage;
import org.kie.kogito.index.oracle.model.AbstractEntity;
@@ -40,22 +42,18 @@ void testStorage(String key, T value1, T value2) {
Storage cache = getStorage().getCache("cache", type);
assertThat(cache.get(key)).isNull();
assertThat(cache.containsKey(key)).isFalse();
- assertThat(getRepository().count()).isZero();
cache.put(key, value1);
assertThat(cache.get(key)).isEqualTo(value1);
assertThat(cache.containsKey(key)).isTrue();
- assertThat(getRepository().count()).isOne();
cache.put(key, value2);
assertThat(cache.get(key)).isEqualTo(value2);
assertThat(cache.containsKey(key)).isTrue();
- assertThat(getRepository().count()).isOne();
cache.remove(key);
assertThat(cache.get(key)).isNull();
assertThat(cache.containsKey(key)).isFalse();
- assertThat(getRepository().count()).isZero();
}
}
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/storage/DomainQueryTest.java b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/storage/DomainQueryTest.java
index ab4f2d6b5c..46b34dd5c4 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/storage/DomainQueryTest.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/storage/DomainQueryTest.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.oracle.storage;
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/storage/JobStorageIT.java b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/storage/JobStorageIT.java
index 61c53189c4..70ccd3e3df 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/storage/JobStorageIT.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/storage/JobStorageIT.java
@@ -1,28 +1,28 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.storage;
import java.util.UUID;
import javax.inject.Inject;
-import javax.transaction.Transactional;
import org.apache.commons.lang3.RandomStringUtils;
-import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.kie.kogito.index.model.Job;
import org.kie.kogito.index.oracle.model.JobEntity;
@@ -58,14 +58,7 @@ public StorageService getStorage() {
return storage;
}
- @BeforeEach
- @Transactional
- public void setup() {
- repository.deleteAll();
- }
-
@Test
- @Transactional
public void testJobEntity() {
String jobId = UUID.randomUUID().toString();
String processInstanceId = UUID.randomUUID().toString();
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/storage/ProcessDefinitionStorageIT.java b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/storage/ProcessDefinitionStorageIT.java
index da331e67c2..644bc7a2e4 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/storage/ProcessDefinitionStorageIT.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/storage/ProcessDefinitionStorageIT.java
@@ -1,26 +1,28 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.storage;
import java.util.Set;
import javax.inject.Inject;
-import javax.transaction.Transactional;
+import org.apache.commons.lang3.RandomStringUtils;
import org.junit.jupiter.api.Test;
import org.kie.kogito.index.model.ProcessDefinition;
import org.kie.kogito.index.oracle.model.ProcessDefinitionEntity;
@@ -57,9 +59,8 @@ public StorageService getStorage() {
}
@Test
- @Transactional
void testProcessInstanceEntity() {
- String processId = "travels";
+ String processId = RandomStringUtils.randomAlphabetic(10);
String version = "1.0";
ProcessDefinition pdv1 = TestUtils.createProcessDefinition(processId, version, Set.of("admin", "kogito"));
ProcessDefinition pdv2 = TestUtils.createProcessDefinition(processId, version, Set.of("kogito"));
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/storage/ProcessInstanceStorageIT.java b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/storage/ProcessInstanceStorageIT.java
index e5e7c260a3..52cdb10a44 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/storage/ProcessInstanceStorageIT.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/storage/ProcessInstanceStorageIT.java
@@ -1,25 +1,26 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.storage;
import java.util.UUID;
import javax.inject.Inject;
-import javax.transaction.Transactional;
import org.apache.commons.lang3.RandomStringUtils;
import org.junit.jupiter.api.Test;
@@ -59,7 +60,6 @@ public StorageService getStorage() {
}
@Test
- @Transactional
public void testProcessInstanceEntity() {
String processInstanceId = UUID.randomUUID().toString();
ProcessInstance processInstance1 = TestUtils
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/storage/UserTaskInstanceStorageIT.java b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/storage/UserTaskInstanceStorageIT.java
index 5369b898ca..bfeff81a75 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/storage/UserTaskInstanceStorageIT.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/storage/UserTaskInstanceStorageIT.java
@@ -1,25 +1,26 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.oracle.storage;
import java.util.UUID;
import javax.inject.Inject;
-import javax.transaction.Transactional;
import org.apache.commons.lang3.RandomStringUtils;
import org.junit.jupiter.api.Test;
@@ -61,7 +62,6 @@ public UserTaskInstanceEntityRepository getRepository() {
}
@Test
- @Transactional
public void testUserTaskInstanceEntity() {
String taskId = UUID.randomUUID().toString();
String processInstanceId = UUID.randomUUID().toString();
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/test/resources/application.properties b/data-index/data-index-storage/data-index-storage-oracle/src/test/resources/application.properties
index cc6b5c8d77..6dbb374445 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/test/resources/application.properties
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/test/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Kogito
kogito.apps.persistence.type=oracle
# Data source
diff --git a/data-index/data-index-storage/data-index-storage-postgresql-reporting/pom.xml b/data-index/data-index-storage/data-index-storage-postgresql-reporting/pom.xml
index aca9115555..41a93869ef 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql-reporting/pom.xml
+++ b/data-index/data-index-storage/data-index-storage-postgresql-reporting/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/data-index/data-index-storage/data-index-storage-postgresql-reporting/src/main/java/org/kie/kogito/index/postgresql/reporting/database/PostgresDataIndexDatabaseManagerImpl.java b/data-index/data-index-storage/data-index-storage-postgresql-reporting/src/main/java/org/kie/kogito/index/postgresql/reporting/database/PostgresDataIndexDatabaseManagerImpl.java
index a8b3aa7beb..bbbdd80bdd 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql-reporting/src/main/java/org/kie/kogito/index/postgresql/reporting/database/PostgresDataIndexDatabaseManagerImpl.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql-reporting/src/main/java/org/kie/kogito/index/postgresql/reporting/database/PostgresDataIndexDatabaseManagerImpl.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.postgresql.reporting.database;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql-reporting/src/main/resources/META-INF/beans.xml b/data-index/data-index-storage/data-index-storage-postgresql-reporting/src/main/resources/META-INF/beans.xml
index e99111e29b..ed166fabc6 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql-reporting/src/main/resources/META-INF/beans.xml
+++ b/data-index/data-index-storage/data-index-storage-postgresql-reporting/src/main/resources/META-INF/beans.xml
@@ -1,15 +1,21 @@
-->
diff --git a/data-index/data-index-storage/data-index-storage-postgresql-reporting/src/test/java/org/kie/kogito/index/postgresql/reporting/ProcessInstanceVariableMappingIT.java b/data-index/data-index-storage/data-index-storage-postgresql-reporting/src/test/java/org/kie/kogito/index/postgresql/reporting/ProcessInstanceVariableMappingIT.java
index e5507c04aa..2fac53c237 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql-reporting/src/test/java/org/kie/kogito/index/postgresql/reporting/ProcessInstanceVariableMappingIT.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql-reporting/src/test/java/org/kie/kogito/index/postgresql/reporting/ProcessInstanceVariableMappingIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.postgresql.reporting;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql-reporting/src/test/java/org/kie/kogito/index/postgresql/reporting/database/PostgresDataIndexDatabaseManagerImplTest.java b/data-index/data-index-storage/data-index-storage-postgresql-reporting/src/test/java/org/kie/kogito/index/postgresql/reporting/database/PostgresDataIndexDatabaseManagerImplTest.java
index e8c0baf40d..d49e0098d4 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql-reporting/src/test/java/org/kie/kogito/index/postgresql/reporting/database/PostgresDataIndexDatabaseManagerImplTest.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql-reporting/src/test/java/org/kie/kogito/index/postgresql/reporting/database/PostgresDataIndexDatabaseManagerImplTest.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.postgresql.reporting.database;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql-reporting/src/test/resources/application.properties b/data-index/data-index-storage/data-index-storage-postgresql-reporting/src/test/resources/application.properties
index 96949082b5..8ff5711746 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql-reporting/src/test/resources/application.properties
+++ b/data-index/data-index-storage/data-index-storage-postgresql-reporting/src/test/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Postgresql storage
kogito.apps.persistence.type=postgresql
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/pom.xml b/data-index/data-index-storage/data-index-storage-postgresql/pom.xml
index 411c7087ca..4f4113ad2b 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/pom.xml
+++ b/data-index/data-index-storage/data-index-storage-postgresql/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/mapper/JobEntityMapper.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/mapper/JobEntityMapper.java
index 9b2e762eb5..b864fddbe2 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/mapper/JobEntityMapper.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/mapper/JobEntityMapper.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.mapper;
import org.kie.kogito.index.model.Job;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/mapper/ProcessDefinitionEntityMapper.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/mapper/ProcessDefinitionEntityMapper.java
index ac786e4077..50a3a7fe2a 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/mapper/ProcessDefinitionEntityMapper.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/mapper/ProcessDefinitionEntityMapper.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.mapper;
import org.kie.kogito.index.model.ProcessDefinition;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/mapper/ProcessInstanceEntityMapper.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/mapper/ProcessInstanceEntityMapper.java
index ab1e2c0fe6..63a8236f7d 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/mapper/ProcessInstanceEntityMapper.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/mapper/ProcessInstanceEntityMapper.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.mapper;
import org.kie.kogito.index.model.Milestone;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/mapper/UserTaskInstanceEntityMapper.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/mapper/UserTaskInstanceEntityMapper.java
index 77d10b7992..e4fb178938 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/mapper/UserTaskInstanceEntityMapper.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/mapper/UserTaskInstanceEntityMapper.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.mapper;
import org.kie.kogito.index.model.UserTaskInstance;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/AbstractEntity.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/AbstractEntity.java
index 47462ed3ee..8605a3aae0 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/AbstractEntity.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/AbstractEntity.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.model;
import java.io.Serializable;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/AttachmentEntity.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/AttachmentEntity.java
index 765cba4f15..5a628288e1 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/AttachmentEntity.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/AttachmentEntity.java
@@ -1,25 +1,26 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.model;
import java.time.ZonedDateTime;
import java.util.Objects;
-import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ForeignKey;
import javax.persistence.Id;
@@ -27,9 +28,6 @@
import javax.persistence.ManyToOne;
import javax.persistence.Table;
-import org.hibernate.annotations.OnDelete;
-import org.hibernate.annotations.OnDeleteAction;
-
@Entity(name = "attachments")
@Table(name = "attachments")
public class AttachmentEntity extends AbstractEntity {
@@ -40,8 +38,7 @@ public class AttachmentEntity extends AbstractEntity {
private String content;
private String updatedBy;
private ZonedDateTime updatedAt;
- @ManyToOne(cascade = CascadeType.ALL, optional = false)
- @OnDelete(action = OnDeleteAction.CASCADE)
+ @ManyToOne(optional = false)
@JoinColumn(name = "taskId", foreignKey = @ForeignKey(name = "fk_attachments_tasks"))
private UserTaskInstanceEntity userTask;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/CommentEntity.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/CommentEntity.java
index 9c244e8096..cdce6fdf61 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/CommentEntity.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/CommentEntity.java
@@ -1,25 +1,26 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.model;
import java.time.ZonedDateTime;
import java.util.Objects;
-import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ForeignKey;
import javax.persistence.Id;
@@ -27,9 +28,6 @@
import javax.persistence.ManyToOne;
import javax.persistence.Table;
-import org.hibernate.annotations.OnDelete;
-import org.hibernate.annotations.OnDeleteAction;
-
@Entity(name = "comments")
@Table(name = "comments")
public class CommentEntity extends AbstractEntity {
@@ -39,8 +37,7 @@ public class CommentEntity extends AbstractEntity {
private String content;
private String updatedBy;
private ZonedDateTime updatedAt;
- @ManyToOne(cascade = CascadeType.ALL, optional = false)
- @OnDelete(action = OnDeleteAction.CASCADE)
+ @ManyToOne(optional = false)
@JoinColumn(name = "taskId", foreignKey = @ForeignKey(name = "fk_comments_tasks"))
private UserTaskInstanceEntity userTask;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/JobEntity.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/JobEntity.java
index aa24c7d1a0..5abe456578 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/JobEntity.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/JobEntity.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.model;
import java.time.ZonedDateTime;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/JobEntityRepository.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/JobEntityRepository.java
index 8ad87be815..a6539a8641 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/JobEntityRepository.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/JobEntityRepository.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.model;
import javax.enterprise.context.ApplicationScoped;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/MilestoneEntity.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/MilestoneEntity.java
index 142e1f349a..74b97b526a 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/MilestoneEntity.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/MilestoneEntity.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.model;
import java.util.Objects;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/MilestoneEntityId.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/MilestoneEntityId.java
index e205e35227..4036c81e2c 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/MilestoneEntityId.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/MilestoneEntityId.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.model;
import java.io.Serializable;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/NodeEntity.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/NodeEntity.java
index c67db1e093..33df9215d9 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/NodeEntity.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/NodeEntity.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.model;
import java.util.Map;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/NodeEntityId.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/NodeEntityId.java
index e347a3c488..3a41703f87 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/NodeEntityId.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/NodeEntityId.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.model;
import java.io.Serializable;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/NodeInstanceEntity.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/NodeInstanceEntity.java
index 5c85028b8f..d078189caa 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/NodeInstanceEntity.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/NodeInstanceEntity.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.model;
import java.time.ZonedDateTime;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/ProcessDefinitionEntity.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/ProcessDefinitionEntity.java
index 3f6714e8c8..9da7d4c2b6 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/ProcessDefinitionEntity.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/ProcessDefinitionEntity.java
@@ -1,22 +1,25 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.model;
import java.util.List;
+import java.util.Map;
import java.util.Objects;
import java.util.Set;
@@ -29,6 +32,7 @@
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
+import javax.persistence.MapKeyColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
@@ -46,6 +50,7 @@ public class ProcessDefinitionEntity extends AbstractEntity {
@Id
private String version;
private String name;
+ private String description;
private String type;
private byte[] source;
@@ -69,6 +74,22 @@ public class ProcessDefinitionEntity extends AbstractEntity {
@OneToMany(cascade = CascadeType.ALL, mappedBy = "processDefinition")
private List nodes;
+ @ElementCollection
+ @JoinColumn(name = "id")
+ @CollectionTable(name = "definitions_annotations", joinColumns = { @JoinColumn(name = "process_id", referencedColumnName = "id"),
+ @JoinColumn(name = "process_version", referencedColumnName = "version") }, foreignKey = @ForeignKey(name = "fk_definitions_annotations"))
+ @OnDelete(action = OnDeleteAction.CASCADE)
+ @Column(name = "value")
+ private Set annotations;
+ @ElementCollection
+ @JoinColumn(name = "id")
+ @CollectionTable(name = "definitions_metadata", joinColumns = {
+ @JoinColumn(name = "process_id", referencedColumnName = "id"), @JoinColumn(name = "process_version", referencedColumnName = "version") },
+ foreignKey = @ForeignKey(name = "fk_definitions_metadata"))
+ @MapKeyColumn(name = "key")
+ @Column(name = "value")
+ @OnDelete(action = OnDeleteAction.CASCADE)
+ private Map metadata;
@Override
public String getId() {
@@ -143,6 +164,30 @@ public void setNodes(List nodes) {
this.nodes = nodes;
}
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Set getAnnotations() {
+ return annotations;
+ }
+
+ public void setAnnotations(Set annotations) {
+ this.annotations = annotations;
+ }
+
+ public Map getMetadata() {
+ return metadata;
+ }
+
+ public void setMetadata(Map metadata) {
+ this.metadata = metadata;
+ }
+
@Override
public boolean equals(Object o) {
if (this == o)
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/ProcessDefinitionEntityId.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/ProcessDefinitionEntityId.java
index 0aba5ca672..bea27464d0 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/ProcessDefinitionEntityId.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/ProcessDefinitionEntityId.java
@@ -1,24 +1,29 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.model;
import java.io.Serializable;
import java.util.Objects;
+import static org.kie.kogito.index.model.ProcessDefinition.fromKey;
+import static org.kie.kogito.index.model.ProcessDefinition.toKey;
+
public class ProcessDefinitionEntityId implements Serializable {
private String id;
@@ -29,9 +34,9 @@ public ProcessDefinitionEntityId() {
}
public ProcessDefinitionEntityId(String key) {
- String[] split = key.split("-");
- this.id = split[0];
- this.version = split[1];
+ String[] fromKey = fromKey(key);
+ this.id = fromKey[0];
+ this.version = fromKey[1];
}
public ProcessDefinitionEntityId(String id, String version) {
@@ -40,7 +45,7 @@ public ProcessDefinitionEntityId(String id, String version) {
}
public String getKey() {
- return String.format("%s-%s", id, version);
+ return toKey(id, version);
}
public String getId() {
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/ProcessDefinitionEntityRepository.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/ProcessDefinitionEntityRepository.java
index 198cd99b21..3e938f32f3 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/ProcessDefinitionEntityRepository.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/ProcessDefinitionEntityRepository.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.model;
import javax.enterprise.context.ApplicationScoped;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/ProcessInstanceEntity.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/ProcessInstanceEntity.java
index bedc0c6851..cbb6799469 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/ProcessInstanceEntity.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/ProcessInstanceEntity.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.model;
import java.time.ZonedDateTime;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/ProcessInstanceEntityRepository.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/ProcessInstanceEntityRepository.java
index 202b94546d..fd0be9cb12 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/ProcessInstanceEntityRepository.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/ProcessInstanceEntityRepository.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.model;
import javax.enterprise.context.ApplicationScoped;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/ProcessInstanceErrorEntity.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/ProcessInstanceErrorEntity.java
index 2658f6f94b..14b2354340 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/ProcessInstanceErrorEntity.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/ProcessInstanceErrorEntity.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.model;
import java.util.Objects;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/UserTaskInstanceEntity.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/UserTaskInstanceEntity.java
index c757982177..99fbd674e8 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/UserTaskInstanceEntity.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/UserTaskInstanceEntity.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.model;
import java.time.ZonedDateTime;
@@ -26,6 +28,7 @@
import javax.persistence.Column;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
+import javax.persistence.FetchType;
import javax.persistence.ForeignKey;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
@@ -97,9 +100,9 @@ public class UserTaskInstanceEntity extends AbstractEntity {
@Column(columnDefinition = "jsonb")
private ObjectNode outputs;
private String endpoint;
- @OneToMany(cascade = CascadeType.ALL, mappedBy = "userTask")
+ @OneToMany(cascade = CascadeType.ALL, mappedBy = "userTask", orphanRemoval = true, fetch = FetchType.LAZY)
private List comments;
- @OneToMany(cascade = CascadeType.ALL, mappedBy = "userTask")
+ @OneToMany(cascade = CascadeType.ALL, mappedBy = "userTask", orphanRemoval = true, fetch = FetchType.LAZY)
private List attachments;
@Override
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/UserTaskInstanceEntityRepository.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/UserTaskInstanceEntityRepository.java
index a36b9f91df..b5f77f7b24 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/UserTaskInstanceEntityRepository.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/model/UserTaskInstanceEntityRepository.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.model;
import javax.enterprise.context.ApplicationScoped;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/AbstractStorage.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/AbstractStorage.java
index 2118fa991d..dd4135b023 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/AbstractStorage.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/AbstractStorage.java
@@ -1,24 +1,29 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.storage;
+import java.util.ConcurrentModificationException;
import java.util.Map;
import java.util.function.Function;
+import javax.persistence.LockModeType;
+import javax.persistence.PersistenceException;
import javax.transaction.Transactional;
import org.kie.kogito.index.postgresql.model.AbstractEntity;
@@ -83,8 +88,19 @@ public V get(String key) {
@Override
@Transactional
public V put(String key, V value) {
- repository.deleteById(key);
- repository.persist(mapToEntity.apply(value));
+ //Pessimistic lock is used to lock the row to handle concurrency with an exiting registry
+ E persistedEntity = repository.findById(key, LockModeType.PESSIMISTIC_WRITE);
+ E newEntity = mapToEntity.apply(value);
+ if (persistedEntity != null) {
+ repository.getEntityManager().merge(newEntity);
+ } else {
+ try {
+ //to handle concurrency in case of a new registry persist flush and throw an exception to allow retry on the caller side
+ repository.persistAndFlush(newEntity);
+ } catch (PersistenceException e) {
+ throw new ConcurrentModificationException(e);
+ }
+ }
return value;
}
@@ -98,6 +114,7 @@ public V remove(String key) {
return value;
}
+ @Transactional
@Override
public boolean containsKey(String key) {
return repository.count("id = ?1", key) == 1;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/JobEntityStorage.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/JobEntityStorage.java
index 6e5f96f492..a738deb083 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/JobEntityStorage.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/JobEntityStorage.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.storage;
import javax.enterprise.context.ApplicationScoped;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/PostgreSqlQuery.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/PostgreSqlQuery.java
index 3e6ce9e28d..da5d5dd540 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/PostgreSqlQuery.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/PostgreSqlQuery.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.postgresql.storage;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/PostgreSqlStorageService.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/PostgreSqlStorageService.java
index 05fed40714..413e0a2b77 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/PostgreSqlStorageService.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/PostgreSqlStorageService.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.postgresql.storage;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/ProcessDefinitionEntityStorage.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/ProcessDefinitionEntityStorage.java
index 2e5eef7588..38d60c065f 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/ProcessDefinitionEntityStorage.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/ProcessDefinitionEntityStorage.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.storage;
import java.util.Optional;
@@ -21,6 +23,8 @@
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.persistence.EntityManager;
+import javax.persistence.LockModeType;
+import javax.transaction.Transactional;
import org.kie.kogito.index.model.ProcessDefinition;
import org.kie.kogito.index.postgresql.mapper.ProcessDefinitionEntityMapper;
@@ -42,6 +46,7 @@ public ProcessDefinitionEntityStorage(ProcessDefinitionEntityRepository reposito
e.getVersion()).getKey());
}
+ @Transactional
@Override
public boolean containsKey(String key) {
ProcessDefinitionEntityId id = new ProcessDefinitionEntityId(key);
@@ -66,6 +71,11 @@ public Optional findByIdOptional(String key) {
return repository.findByIdOptional(new ProcessDefinitionEntityId(key));
}
+ @Override
+ public ProcessDefinitionEntity findById(String s, LockModeType lockModeType) {
+ return repository.findById(new ProcessDefinitionEntityId(s), lockModeType);
+ }
+
@Override
public void persist(ProcessDefinitionEntity entity) {
repository.persist(entity);
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/ProcessInstanceEntityStorage.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/ProcessInstanceEntityStorage.java
index 5b6313f03d..12e3960b0e 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/ProcessInstanceEntityStorage.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/ProcessInstanceEntityStorage.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.storage;
import javax.enterprise.context.ApplicationScoped;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/UserTaskInstanceEntityStorage.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/UserTaskInstanceEntityStorage.java
index cc1ba8aebf..ed7281b75e 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/UserTaskInstanceEntityStorage.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/UserTaskInstanceEntityStorage.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.storage;
import javax.enterprise.context.ApplicationScoped;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/META-INF/beans.xml b/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/META-INF/beans.xml
index 72a7a85a63..a0eb9fbf8c 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/META-INF/beans.xml
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/META-INF/beans.xml
@@ -1,16 +1,20 @@
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/db/migration/V1.32.0__data_index_create.sql b/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/db/migration/V1.32.0__data_index_create.sql
index 58cbc17bce..5499ecb057 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/db/migration/V1.32.0__data_index_create.sql
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/db/migration/V1.32.0__data_index_create.sql
@@ -1,4 +1,4 @@
-create table attachments
+create table IF NOT EXISTS attachments
(
id varchar(255) not null,
content varchar(255),
@@ -9,7 +9,7 @@ create table attachments
primary key (id)
);
-create table comments
+create table IF NOT EXISTS comments
(
id varchar(255) not null,
content varchar(255),
@@ -19,7 +19,7 @@ create table comments
primary key (id)
);
-create table jobs
+create table IF NOT EXISTS jobs
(
id varchar(255) not null,
callback_endpoint varchar(255),
@@ -41,7 +41,7 @@ create table jobs
primary key (id)
);
-create table milestones
+create table IF NOT EXISTS milestones
(
id varchar(255) not null,
process_instance_id varchar(255) not null,
@@ -50,7 +50,7 @@ create table milestones
primary key (id, process_instance_id)
);
-create table nodes
+create table IF NOT EXISTS nodes
(
id varchar(255) not null,
definition_id varchar(255),
@@ -63,7 +63,7 @@ create table nodes
primary key (id)
);
-create table processes
+create table IF NOT EXISTS processes
(
id varchar(255) not null,
business_key varchar(255),
@@ -83,21 +83,21 @@ create table processes
primary key (id)
);
-create table processes_addons
+create table IF NOT EXISTS processes_addons
(
process_id varchar(255) not null,
addon varchar(255) not null,
primary key (process_id, addon)
);
-create table processes_roles
+create table IF NOT EXISTS processes_roles
(
process_id varchar(255) not null,
role varchar(255) not null,
primary key (process_id, role)
);
-create table tasks
+create table IF NOT EXISTS tasks
(
id varchar(255) not null,
actual_owner varchar(255),
@@ -119,41 +119,45 @@ create table tasks
primary key (id)
);
-create table tasks_admin_groups
+create table IF NOT EXISTS tasks_admin_groups
(
task_id varchar(255) not null,
group_id varchar(255) not null,
primary key (task_id, group_id)
);
-create table tasks_admin_users
+create table IF NOT EXISTS tasks_admin_users
(
task_id varchar(255) not null,
user_id varchar(255) not null,
primary key (task_id, user_id)
);
-create table tasks_excluded_users
+create table IF NOT EXISTS tasks_excluded_users
(
task_id varchar(255) not null,
user_id varchar(255) not null,
primary key (task_id, user_id)
);
-create table tasks_potential_groups
+create table IF NOT EXISTS tasks_potential_groups
(
task_id varchar(255) not null,
group_id varchar(255) not null,
primary key (task_id, group_id)
);
-create table tasks_potential_users
+create table IF NOT EXISTS tasks_potential_users
(
task_id varchar(255) not null,
user_id varchar(255) not null,
primary key (task_id, user_id)
);
+alter table if exists attachments
+ drop constraint if exists fk_attachments_tasks
+cascade;
+
alter table if exists attachments
add constraint fk_attachments_tasks
foreign key (task_id)
@@ -162,6 +166,10 @@ alter table if exists attachments
delete
cascade;
+alter table if exists comments
+ drop constraint if exists fk_comments_tasks
+cascade;
+
alter table if exists comments
add constraint fk_comments_tasks
foreign key (task_id)
@@ -170,6 +178,10 @@ alter table if exists comments
delete
cascade;
+alter table if exists milestones
+drop constraint if exists fk_milestones_process
+cascade;
+
alter table if exists milestones
add constraint fk_milestones_process
foreign key (process_instance_id)
@@ -178,6 +190,10 @@ alter table if exists milestones
delete
cascade;
+alter table if exists nodes
+drop constraint if exists fk_nodes_process
+cascade;
+
alter table if exists nodes
add constraint fk_nodes_process
foreign key (process_instance_id)
@@ -186,6 +202,10 @@ alter table if exists nodes
delete
cascade;
+alter table if exists processes_addons
+drop constraint if exists fk_processes_addons_processes
+cascade;
+
alter table if exists processes_addons
add constraint fk_processes_addons_processes
foreign key (process_id)
@@ -194,6 +214,10 @@ alter table if exists processes_addons
delete
cascade;
+alter table if exists processes_roles
+drop constraint if exists fk_processes_roles_processes
+cascade;
+
alter table if exists processes_roles
add constraint fk_processes_roles_processes
foreign key (process_id)
@@ -202,6 +226,10 @@ alter table if exists processes_roles
delete
cascade;
+alter table if exists tasks_admin_groups
+drop constraint if exists fk_tasks_admin_groups_tasks
+cascade;
+
alter table if exists tasks_admin_groups
add constraint fk_tasks_admin_groups_tasks
foreign key (task_id)
@@ -210,6 +238,10 @@ alter table if exists tasks_admin_groups
delete
cascade;
+alter table if exists tasks_admin_users
+drop constraint if exists fk_tasks_admin_users_tasks
+cascade;
+
alter table if exists tasks_admin_users
add constraint fk_tasks_admin_users_tasks
foreign key (task_id)
@@ -218,6 +250,10 @@ alter table if exists tasks_admin_users
delete
cascade;
+alter table if exists tasks_excluded_users
+drop constraint if exists fk_tasks_excluded_users_tasks
+cascade;
+
alter table if exists tasks_excluded_users
add constraint fk_tasks_excluded_users_tasks
foreign key (task_id)
@@ -226,6 +262,10 @@ alter table if exists tasks_excluded_users
delete
cascade;
+alter table if exists tasks_potential_groups
+drop constraint if exists fk_tasks_potential_groups_tasks
+cascade;
+
alter table if exists tasks_potential_groups
add constraint fk_tasks_potential_groups_tasks
foreign key (task_id)
@@ -234,6 +274,10 @@ alter table if exists tasks_potential_groups
delete
cascade;
+alter table if exists tasks_potential_users
+drop constraint if exists fk_tasks_potential_users_tasks
+cascade;
+
alter table if exists tasks_potential_users
add constraint fk_tasks_potential_users_tasks
foreign key (task_id)
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/db/migration/V1.44.0__data_index_definitions.sql b/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/db/migration/V1.44.0__data_index_definitions.sql
index 407913ff70..6c7937a44e 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/db/migration/V1.44.0__data_index_definitions.sql
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/db/migration/V1.44.0__data_index_definitions.sql
@@ -1,4 +1,4 @@
-create table definitions
+create table IF NOT EXISTS definitions
(
id varchar(255) not null,
version varchar(255) not null,
@@ -9,7 +9,7 @@ create table definitions
primary key (id, version)
);
-create table definitions_addons
+create table IF NOT EXISTS definitions_addons
(
process_id varchar(255) not null,
process_version varchar(255) not null,
@@ -17,7 +17,7 @@ create table definitions_addons
primary key (process_id, process_version, addon)
);
-create table definitions_roles
+create table IF NOT EXISTS definitions_roles
(
process_id varchar(255) not null,
process_version varchar(255) not null,
@@ -25,6 +25,10 @@ create table definitions_roles
primary key (process_id, process_version, role)
);
+alter table if exists definitions_addons
+drop constraint if exists fk_definitions_addons_definitions
+cascade;
+
alter table if exists definitions_addons
add constraint fk_definitions_addons_definitions
foreign key (process_id, process_version)
@@ -33,6 +37,10 @@ alter table if exists definitions_addons
delete
cascade;
+alter table if exists definitions_roles
+drop constraint if exists fk_definitions_roles_definitions
+cascade;
+
alter table if exists definitions_roles
add constraint fk_definitions_roles_definitions
foreign key (process_id, process_version)
@@ -42,4 +50,4 @@ delete
cascade;
alter table if exists processes
- add column version varchar (255);
+ add column IF NOT EXISTS version varchar (255);
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/db/migration/V1.45.0.0__data_index_node_definitions.sql b/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/db/migration/V1.45.0.0__data_index_node_definitions.sql
index 8b5f79995b..5332c4946d 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/db/migration/V1.45.0.0__data_index_node_definitions.sql
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/db/migration/V1.45.0.0__data_index_node_definitions.sql
@@ -1,4 +1,4 @@
-create table definitions_nodes
+create table IF NOT EXISTS definitions_nodes
(
id varchar(255) not null,
name varchar(255),
@@ -9,7 +9,7 @@ create table definitions_nodes
primary key (id, process_id, process_version)
);
-create table definitions_nodes_metadata
+create table IF NOT EXISTS definitions_nodes_metadata
(
node_id varchar(255) not null,
process_id varchar(255) not null,
@@ -18,6 +18,9 @@ create table definitions_nodes_metadata
key varchar(255) not null,
primary key (node_id, process_id, process_version, key)
);
+alter table if exists definitions_nodes
+drop constraint if exists fk_definitions_nodes_definitions
+cascade;
alter table if exists definitions_nodes
add constraint fk_definitions_nodes_definitions
@@ -27,6 +30,10 @@ alter table if exists definitions_nodes
delete
cascade;
+alter table if exists definitions_nodes_metadata
+drop constraint if exists fk_definitions_nodes_metadata_definitions_nodes
+cascade;
+
alter table if exists definitions_nodes_metadata
add constraint fk_definitions_nodes_metadata_definitions_nodes
foreign key (node_id, process_id, process_version)
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/db/migration/V1.45.0.1__add_identity_to_process_instance.sql b/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/db/migration/V1.45.0.1__add_identity_to_process_instance.sql
index c942bfeb96..dc94cd5caf 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/db/migration/V1.45.0.1__add_identity_to_process_instance.sql
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/db/migration/V1.45.0.1__add_identity_to_process_instance.sql
@@ -1,3 +1,3 @@
-ALTER TABLE processes
- ADD COLUMN created_by character varying,
- ADD COLUMN updated_by character varying;
\ No newline at end of file
+ALTER TABLE IF exists processes
+ ADD COLUMN IF NOT EXISTS created_by character varying,
+ ADD COLUMN IF NOT EXISTS updated_by character varying;
\ No newline at end of file
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/db/migration/V1.45.0.2__data_index_definitions_add_collums.sql b/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/db/migration/V1.45.0.2__data_index_definitions_add_collums.sql
new file mode 100644
index 0000000000..c976a3ee0b
--- /dev/null
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/db/migration/V1.45.0.2__data_index_definitions_add_collums.sql
@@ -0,0 +1,35 @@
+create table definitions_annotations
+(
+ value varchar(255) not null,
+ process_id varchar(255) not null,
+ process_version varchar(255) not null,
+ primary key (value, process_id, process_version)
+);
+
+create table definitions_metadata
+(
+ process_id varchar(255) not null,
+ process_version varchar(255) not null,
+ value varchar(255),
+ key varchar(255) not null,
+ primary key (process_id, process_version, key)
+);
+
+alter table if exists definitions_annotations
+ add constraint fk_definitions_annotations
+ foreign key (process_id, process_version)
+ references definitions
+ on
+delete
+cascade;
+
+alter table if exists definitions_metadata
+ add constraint fk_definitions_metadata
+ foreign key (process_id, process_version)
+ references definitions
+ on
+delete
+cascade;
+
+alter table if exists definitions
+ add column description varchar (255);
\ No newline at end of file
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/db/migration/readme.txt b/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/db/migration/readme.txt
new file mode 100644
index 0000000000..e08db4d0ae
--- /dev/null
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/resources/db/migration/readme.txt
@@ -0,0 +1,2 @@
+Ensure migration scripts are developed to support several executions over the same database without any error.
+This feature will make sure this migration execution would be compatible with other needed flyway migrations without broking the chain.
\ No newline at end of file
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/mapper/JobEntityMapperIT.java b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/mapper/JobEntityMapperIT.java
index 0dddb30c07..96a36f757b 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/mapper/JobEntityMapperIT.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/mapper/JobEntityMapperIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.mapper;
import java.time.ZonedDateTime;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/mapper/ProcessDefinitionEntityMapperIT.java b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/mapper/ProcessDefinitionEntityMapperIT.java
index 9f9ce07f41..8fbb3ed040 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/mapper/ProcessDefinitionEntityMapperIT.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/mapper/ProcessDefinitionEntityMapperIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.mapper;
import java.util.Set;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/mapper/ProcessInstanceEntityMapperIT.java b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/mapper/ProcessInstanceEntityMapperIT.java
index fdcfdab19e..14a7d89b5a 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/mapper/ProcessInstanceEntityMapperIT.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/mapper/ProcessInstanceEntityMapperIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.mapper;
import java.time.ZonedDateTime;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/mapper/UserTaskInstanceEntityMapperIT.java b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/mapper/UserTaskInstanceEntityMapperIT.java
index b991c844fe..9d0a71005f 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/mapper/UserTaskInstanceEntityMapperIT.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/mapper/UserTaskInstanceEntityMapperIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.mapper;
import java.time.ZonedDateTime;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/query/JobEntityQueryIT.java b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/query/JobEntityQueryIT.java
index fc48c8fb0c..abfe0411e3 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/query/JobEntityQueryIT.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/query/JobEntityQueryIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.query;
import javax.inject.Inject;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/query/ProcessDefinitionEntityQueryIT.java b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/query/ProcessDefinitionEntityQueryIT.java
index a7fd475db0..3cbb177ac4 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/query/ProcessDefinitionEntityQueryIT.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/query/ProcessDefinitionEntityQueryIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.query;
import javax.inject.Inject;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/query/ProcessInstanceEntityQueryIT.java b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/query/ProcessInstanceEntityQueryIT.java
index 60760dc54e..f8fe9be76e 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/query/ProcessInstanceEntityQueryIT.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/query/ProcessInstanceEntityQueryIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.query;
import javax.inject.Inject;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/query/UserTaskInstanceEntityQueryIT.java b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/query/UserTaskInstanceEntityQueryIT.java
index 8435d0285d..126f642b33 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/query/UserTaskInstanceEntityQueryIT.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/query/UserTaskInstanceEntityQueryIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.query;
import javax.inject.Inject;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/schema/DDLSchemaExporter.java b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/schema/DDLSchemaExporter.java
index c2e13d15b5..6022ec6883 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/schema/DDLSchemaExporter.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/schema/DDLSchemaExporter.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.schema;
import java.util.EnumSet;
@@ -37,6 +39,7 @@
import org.kie.kogito.index.postgresql.model.ProcessInstanceEntity;
import org.kie.kogito.index.postgresql.model.ProcessInstanceErrorEntity;
import org.kie.kogito.index.postgresql.model.UserTaskInstanceEntity;
+import org.kie.kogito.testcontainers.Constants;
import org.kie.kogito.testcontainers.KogitoPostgreSqlContainer;
import org.testcontainers.containers.wait.strategy.Wait;
@@ -44,7 +47,7 @@ public class DDLSchemaExporter {
public static void main(String[] args) {
try (KogitoPostgreSqlContainer postgresql = new KogitoPostgreSqlContainer()) {
- postgresql.waitingFor(Wait.forListeningPort());
+ postgresql.waitingFor(Wait.forListeningPort()).withStartupTimeout(Constants.CONTAINER_START_TIMEOUT);
postgresql.start();
Map settings = new HashMap<>();
settings.put(Environment.URL, postgresql.getJdbcUrl());
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/storage/AbstractStorageIT.java b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/storage/AbstractStorageIT.java
index 4805235391..95121a5e6c 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/storage/AbstractStorageIT.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/storage/AbstractStorageIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.storage;
import org.kie.kogito.index.postgresql.model.AbstractEntity;
@@ -40,22 +42,18 @@ void testStorage(String key, T value1, T value2) {
Storage cache = getStorage().getCache("cache", type);
assertThat(cache.get(key)).isNull();
assertThat(cache.containsKey(key)).isFalse();
- assertThat(getRepository().count()).isZero();
cache.put(key, value1);
assertThat(cache.get(key)).isEqualTo(value1);
assertThat(cache.containsKey(key)).isTrue();
- assertThat(getRepository().count()).isOne();
cache.put(key, value2);
assertThat(cache.get(key)).isEqualTo(value2);
assertThat(cache.containsKey(key)).isTrue();
- assertThat(getRepository().count()).isOne();
cache.remove(key);
assertThat(cache.get(key)).isNull();
assertThat(cache.containsKey(key)).isFalse();
- assertThat(getRepository().count()).isZero();
}
}
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/storage/DomainQueryTest.java b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/storage/DomainQueryTest.java
index a614255fa3..c39f5e2f6d 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/storage/DomainQueryTest.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/storage/DomainQueryTest.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.postgresql.storage;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/storage/JobStorageIT.java b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/storage/JobStorageIT.java
index 6b27fbc491..b3845d8349 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/storage/JobStorageIT.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/storage/JobStorageIT.java
@@ -1,28 +1,28 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.storage;
import java.util.UUID;
import javax.inject.Inject;
-import javax.transaction.Transactional;
import org.apache.commons.lang3.RandomStringUtils;
-import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.kie.kogito.index.model.Job;
import org.kie.kogito.index.postgresql.model.JobEntity;
@@ -58,14 +58,7 @@ public StorageService getStorage() {
return storage;
}
- @BeforeEach
- @Transactional
- public void setup() {
- repository.deleteAll();
- }
-
@Test
- @Transactional
public void testJobEntity() {
String jobId = UUID.randomUUID().toString();
String processInstanceId = UUID.randomUUID().toString();
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/storage/ProcessDefinitionStorageIT.java b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/storage/ProcessDefinitionStorageIT.java
index a928c69ae5..111d71d418 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/storage/ProcessDefinitionStorageIT.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/storage/ProcessDefinitionStorageIT.java
@@ -1,26 +1,28 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.storage;
import java.util.Set;
import javax.inject.Inject;
-import javax.transaction.Transactional;
+import org.apache.commons.lang3.RandomStringUtils;
import org.junit.jupiter.api.Test;
import org.kie.kogito.index.model.ProcessDefinition;
import org.kie.kogito.index.postgresql.model.ProcessDefinitionEntity;
@@ -57,9 +59,8 @@ public StorageService getStorage() {
}
@Test
- @Transactional
void testProcessInstanceEntity() {
- String processId = "travels";
+ String processId = RandomStringUtils.randomAlphabetic(10);
String version = "1.0";
ProcessDefinition pdv1 = TestUtils.createProcessDefinition(processId, version, Set.of("admin", "kogito"));
ProcessDefinition pdv2 = TestUtils.createProcessDefinition(processId, version, Set.of("kogito"));
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/storage/ProcessInstanceStorageIT.java b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/storage/ProcessInstanceStorageIT.java
index 8fefdc1e16..326229c139 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/storage/ProcessInstanceStorageIT.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/storage/ProcessInstanceStorageIT.java
@@ -1,25 +1,26 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.storage;
import java.util.UUID;
import javax.inject.Inject;
-import javax.transaction.Transactional;
import org.apache.commons.lang3.RandomStringUtils;
import org.junit.jupiter.api.Test;
@@ -59,7 +60,6 @@ public StorageService getStorage() {
}
@Test
- @Transactional
public void testProcessInstanceEntity() {
String processInstanceId = UUID.randomUUID().toString();
ProcessInstance processInstance1 = TestUtils
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/storage/UserTaskInstanceStorageIT.java b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/storage/UserTaskInstanceStorageIT.java
index 232e6cd71c..f64359fdf8 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/storage/UserTaskInstanceStorageIT.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/storage/UserTaskInstanceStorageIT.java
@@ -1,25 +1,26 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.postgresql.storage;
import java.util.UUID;
import javax.inject.Inject;
-import javax.transaction.Transactional;
import org.apache.commons.lang3.RandomStringUtils;
import org.junit.jupiter.api.Test;
@@ -58,7 +59,6 @@ public UserTaskInstanceEntityRepository getRepository() {
}
@Test
- @Transactional
public void testUserTaskInstanceEntity() {
String taskId = UUID.randomUUID().toString();
String processInstanceId = UUID.randomUUID().toString();
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/test/resources/application.properties b/data-index/data-index-storage/data-index-storage-postgresql/src/test/resources/application.properties
index 2e3627afaa..517ca87684 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/test/resources/application.properties
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/test/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Kogito
kogito.apps.persistence.type=postgresql
# Data source
diff --git a/data-index/data-index-storage/data-index-storage-protobuf/pom.xml b/data-index/data-index-storage/data-index-storage-protobuf/pom.xml
index 1c1bedd084..b34b7a900b 100644
--- a/data-index/data-index-storage/data-index-storage-protobuf/pom.xml
+++ b/data-index/data-index-storage/data-index-storage-protobuf/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/data-index/data-index-storage/data-index-storage-protobuf/src/main/java/org/kie/kogito/index/protobuf/ProtostreamProducer.java b/data-index/data-index-storage/data-index-storage-protobuf/src/main/java/org/kie/kogito/index/protobuf/ProtostreamProducer.java
index fb1fa800b8..f08e7b0572 100644
--- a/data-index/data-index-storage/data-index-storage-protobuf/src/main/java/org/kie/kogito/index/protobuf/ProtostreamProducer.java
+++ b/data-index/data-index-storage/data-index-storage-protobuf/src/main/java/org/kie/kogito/index/protobuf/ProtostreamProducer.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.protobuf;
import java.io.IOException;
diff --git a/data-index/data-index-storage/data-index-storage-protobuf/src/main/resources/META-INF/beans.xml b/data-index/data-index-storage/data-index-storage-protobuf/src/main/resources/META-INF/beans.xml
index e69de29bb2..a0eb9fbf8c 100644
--- a/data-index/data-index-storage/data-index-storage-protobuf/src/main/resources/META-INF/beans.xml
+++ b/data-index/data-index-storage/data-index-storage-protobuf/src/main/resources/META-INF/beans.xml
@@ -0,0 +1,20 @@
+
diff --git a/data-index/data-index-storage/data-index-storage-protobuf/src/main/resources/META-INF/kogito-index.proto b/data-index/data-index-storage/data-index-storage-protobuf/src/main/resources/META-INF/kogito-index.proto
index e8b7eed338..a2315f0211 100644
--- a/data-index/data-index-storage/data-index-storage-protobuf/src/main/resources/META-INF/kogito-index.proto
+++ b/data-index/data-index-storage/data-index-storage-protobuf/src/main/resources/META-INF/kogito-index.proto
@@ -62,6 +62,17 @@ message ProcessDefinition {
optional string endpoint = 7;
optional bytes source = 8;
repeated Node nodes = 9;
+ optional string description = 10;
+ repeated string annotations = 11;
+ repeated Entry metadata = 12;
+
+}
+
+message Entry {
+ /* @Field(store = Store.YES) */
+ optional string key = 1;
+ /* @Field(store = Store.YES) */
+ optional string value = 2;
}
/* @Indexed */
diff --git a/data-index/data-index-storage/data-index-storage-protobuf/src/test/java/org/kie/kogito/index/protobuf/ProtostreamProducerTest.java b/data-index/data-index-storage/data-index-storage-protobuf/src/test/java/org/kie/kogito/index/protobuf/ProtostreamProducerTest.java
index a758fd0289..7454ac1292 100644
--- a/data-index/data-index-storage/data-index-storage-protobuf/src/test/java/org/kie/kogito/index/protobuf/ProtostreamProducerTest.java
+++ b/data-index/data-index-storage/data-index-storage-protobuf/src/test/java/org/kie/kogito/index/protobuf/ProtostreamProducerTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.protobuf;
import java.io.IOException;
diff --git a/data-index/data-index-storage/pom.xml b/data-index/data-index-storage/pom.xml
index 848c285bac..35836fbe31 100644
--- a/data-index/data-index-storage/pom.xml
+++ b/data-index/data-index-storage/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/data-index/data-index-test-utils/pom.xml b/data-index/data-index-test-utils/pom.xml
index 09929bc2ae..69cf0c05f9 100644
--- a/data-index/data-index-test-utils/pom.xml
+++ b/data-index/data-index-test-utils/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/Constants.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/Constants.java
index 3cc6a0dbae..8569591d6d 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/Constants.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/Constants.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test;
public class Constants {
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/TestUtils.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/TestUtils.java
index 95ee2eb5ba..b9a8acc347 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/TestUtils.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/TestUtils.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.test;
@@ -21,7 +24,6 @@
import java.io.InputStream;
import java.net.URI;
import java.nio.charset.StandardCharsets;
-import java.time.Instant;
import java.time.ZonedDateTime;
import java.time.temporal.ChronoUnit;
import java.util.Date;
@@ -33,15 +35,23 @@
import java.util.UUID;
import org.eclipse.microprofile.config.ConfigProvider;
-import org.kie.kogito.event.process.AttachmentEventBody;
-import org.kie.kogito.event.process.CommentEventBody;
-import org.kie.kogito.event.process.MilestoneEventBody;
-import org.kie.kogito.event.process.NodeInstanceEventBody;
-import org.kie.kogito.event.process.ProcessErrorEventBody;
-import org.kie.kogito.event.process.ProcessInstanceDataEvent;
-import org.kie.kogito.event.process.ProcessInstanceEventBody;
-import org.kie.kogito.event.process.UserTaskInstanceDataEvent;
-import org.kie.kogito.event.process.UserTaskInstanceEventBody;
+import org.kie.kogito.event.process.NodeDefinition;
+import org.kie.kogito.event.process.ProcessDefinitionDataEvent;
+import org.kie.kogito.event.process.ProcessDefinitionEventBody;
+import org.kie.kogito.event.process.ProcessInstanceErrorDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceErrorEventBody;
+import org.kie.kogito.event.process.ProcessInstanceEventMetadata;
+import org.kie.kogito.event.process.ProcessInstanceStateDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceStateEventBody;
+import org.kie.kogito.event.process.ProcessInstanceVariableDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceVariableEventBody;
+import org.kie.kogito.event.usertask.UserTaskInstanceAttachmentDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceAttachmentEventBody;
+import org.kie.kogito.event.usertask.UserTaskInstanceCommentDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceCommentEventBody;
+import org.kie.kogito.event.usertask.UserTaskInstanceEventMetadata;
+import org.kie.kogito.event.usertask.UserTaskInstanceStateDataEvent;
+import org.kie.kogito.event.usertask.UserTaskInstanceStateEventBody;
import org.kie.kogito.index.event.KogitoJobCloudEvent;
import org.kie.kogito.index.model.Attachment;
import org.kie.kogito.index.model.Comment;
@@ -56,13 +66,14 @@
import com.fasterxml.jackson.databind.node.ObjectNode;
-import static java.util.Collections.emptyMap;
import static java.util.Collections.singleton;
import static org.kie.kogito.index.json.JsonUtils.getObjectMapper;
public final class TestUtils {
private static final String MILESTONE_ID = UUID.randomUUID().toString();
+ public static final String ADDONS = "jobs-management,prometheus-monitoring,process-management";
+ public static final String PROCESS_VERSION = "1.0";
private TestUtils() {
}
@@ -93,54 +104,111 @@ public static String readFileContent(String file) throws IOException {
}
}
- public static ProcessInstanceDataEvent getProcessCloudEvent(String processId, String processInstanceId, ProcessInstanceState status, String rootProcessInstanceId, String rootProcessId,
+ public static ProcessDefinitionDataEvent getProcessDefinitionDataEvent(String processId) {
+ ProcessDefinitionEventBody body = ProcessDefinitionEventBody.builder()
+ .setVersion(PROCESS_VERSION)
+ .setId(processId)
+ .setName(getProcessName(processId))
+ .setDescription("new definition for testing")
+ .setAddons(Set.of(ADDONS.split(",")))
+ .setAnnotations(Set.of("annotation1", "annotation2"))
+ .setMetadata(Map.of("meta1", "value1", "meta2", "value2"))
+ .setRoles(Set.of("admin"))
+ .setNodes(List.of(NodeDefinition.builder().setName("node1").setId("id1").build()))
+ .setEndpoint(getEndpoint(processId))
+ .build();
+
+ return new ProcessDefinitionDataEvent(body);
+ }
+
+ public static ProcessInstanceStateDataEvent getProcessCloudEvent(String processId, String processInstanceId, ProcessInstanceState status, String rootProcessInstanceId, String rootProcessId,
String parentProcessInstanceId, String identity) {
- ProcessInstanceEventBody body = ProcessInstanceEventBody.create()
- .id(processInstanceId)
+ int eventType = status.equals(ProcessInstanceState.COMPLETED) ? ProcessInstanceStateEventBody.EVENT_TYPE_ENDED : ProcessInstanceStateEventBody.EVENT_TYPE_STARTED;
+ ProcessInstanceStateEventBody body = ProcessInstanceStateEventBody.create()
+ .processInstanceId(processInstanceId)
.parentInstanceId(parentProcessInstanceId)
- .rootInstanceId(rootProcessInstanceId)
- .processId(processId)
- .version("1.0")
+ .rootProcessInstanceId(rootProcessInstanceId)
.rootProcessId(rootProcessId)
- .processName(String.format("%s-name", processId))
- .startDate(new Date())
- .endDate(status == ProcessInstanceState.COMPLETED ? Date.from(Instant.now().plus(1, ChronoUnit.HOURS)) : null)
+ .processId(processId)
+ .processVersion(PROCESS_VERSION)
+ .processName(getProcessName(processId))
+ .eventDate(new Date())
.state(status.ordinal())
- .businessKey(String.format("%s-key", processId))
- .identity(identity)
- .variables(getProcessInstanceVariablesMap())
- .milestones(Set.of(
- MilestoneEventBody.create()
- .id(MILESTONE_ID)
- .name("SimpleMilestone")
- .status(MilestoneStatus.AVAILABLE.name())
- .build()))
+ .businessKey(processInstanceId)
.roles("admin")
- .nodeInstance(NodeInstanceEventBody.create()
- .id(processInstanceId + "-1")
- .triggerTime(new Date())
- .nodeName("Start")
- .nodeType("StartNode")
- .nodeId("1")
- .nodeDefinitionId("StartEvent_1")
- .leaveTime(status == ProcessInstanceState.COMPLETED ? Date.from(Instant.now().plus(1, ChronoUnit.HOURS)) : null)
- .build())
- .error(status == ProcessInstanceState.ERROR ? ProcessErrorEventBody.create()
- .nodeDefinitionId("StartEvent_1")
- .errorMessage("Something went wrong")
- .build() : null)
+ .eventUser(identity)
+ .eventType(eventType)
+ .build();
+
+ return new ProcessInstanceStateDataEvent(URI.create("http://localhost:8080/" + processId).toString(), "jobs-management,prometheus-monitoring,process-management", (String) identity,
+ body.metaData(), body);
+
+ }
+
+ public static ProcessInstanceErrorDataEvent deriveErrorProcessCloudEvent(ProcessInstanceStateDataEvent event, String errorMessage, String nodeDefinition, String nodeInstanceId) {
+
+ ProcessInstanceErrorEventBody body = ProcessInstanceErrorEventBody.create()
+ .eventDate(new Date())
+ .eventUser(event.getData().getEventUser())
+ .processId(event.getData().getProcessId())
+ .processInstanceId(event.getData().getProcessInstanceId())
+ .processVersion(event.getData().getProcessVersion())
+ .errorMessage(errorMessage)
+ .nodeDefinitionId(nodeDefinition)
+ .nodeInstanceId(nodeInstanceId)
+ .build();
+
+ Map metadata = new HashMap<>();
+ metadata.put(ProcessInstanceEventMetadata.PROCESS_INSTANCE_ID_META_DATA, event.getKogitoProcessInstanceId());
+ metadata.put(ProcessInstanceEventMetadata.PROCESS_VERSION_META_DATA, event.getKogitoProcessInstanceVersion());
+ metadata.put(ProcessInstanceEventMetadata.PROCESS_ID_META_DATA, event.getKogitoProcessId());
+ metadata.put(ProcessInstanceEventMetadata.PROCESS_INSTANCE_STATE_META_DATA, event.getKogitoProcessInstanceState());
+ metadata.put(ProcessInstanceEventMetadata.PROCESS_TYPE_META_DATA, event.getKogitoProcessType());
+ metadata.put(ProcessInstanceEventMetadata.PARENT_PROCESS_INSTANCE_ID_META_DATA, event.getKogitoParentProcessInstanceId());
+ metadata.put(ProcessInstanceEventMetadata.ROOT_PROCESS_ID_META_DATA, event.getKogitoRootProcessId());
+ metadata.put(ProcessInstanceEventMetadata.ROOT_PROCESS_INSTANCE_ID_META_DATA, event.getKogitoRootProcessInstanceId());
+
+ return new ProcessInstanceErrorDataEvent(event.getSource().toString(), event.getKogitoAddons(), event.getKogitoIdentity(), metadata, body);
+
+ }
+
+ public static ProcessInstanceVariableDataEvent deriveProcessVariableCloudEvent(ProcessInstanceStateDataEvent event, String variableName, Object value) {
+
+ ProcessInstanceVariableEventBody body = ProcessInstanceVariableEventBody.create()
+ .eventDate(new Date())
+ .eventUser(event.getData().getEventUser())
+ .variableId(variableName)
+ .variableName(variableName)
+ .variableValue(value)
+ .processId(event.getData().getProcessId())
+ .processInstanceId(event.getData().getProcessInstanceId())
+ .processVersion(event.getData().getProcessVersion())
.build();
+ Map metadata = new HashMap<>();
+ metadata.put(ProcessInstanceEventMetadata.PROCESS_INSTANCE_ID_META_DATA, event.getKogitoProcessInstanceId());
+ metadata.put(ProcessInstanceEventMetadata.PROCESS_VERSION_META_DATA, event.getKogitoProcessInstanceVersion());
+ metadata.put(ProcessInstanceEventMetadata.PROCESS_ID_META_DATA, event.getKogitoProcessId());
+ metadata.put(ProcessInstanceEventMetadata.PROCESS_INSTANCE_STATE_META_DATA, event.getKogitoProcessInstanceState());
+ metadata.put(ProcessInstanceEventMetadata.PROCESS_TYPE_META_DATA, event.getKogitoProcessType());
+ metadata.put(ProcessInstanceEventMetadata.PARENT_PROCESS_INSTANCE_ID_META_DATA, event.getKogitoParentProcessInstanceId());
+ metadata.put(ProcessInstanceEventMetadata.ROOT_PROCESS_ID_META_DATA, event.getKogitoRootProcessId());
+ metadata.put(ProcessInstanceEventMetadata.ROOT_PROCESS_INSTANCE_ID_META_DATA, event.getKogitoRootProcessInstanceId());
+
+ return new ProcessInstanceVariableDataEvent(event.getSource().toString(), event.getKogitoAddons(), event.getKogitoIdentity(), metadata, body);
+
+ }
- return new ProcessInstanceDataEvent(URI.create("http://localhost:8080/" + processId).toString(), "jobs-management,prometheus-monitoring,process-management", identity, body.metaData(), body);
+ private static String getProcessName(String processId) {
+ return String.format("%s-name", processId);
}
public static ProcessInstance getProcessInstance(String processId, String processInstanceId, Integer status, String rootProcessInstanceId, String rootProcessId) {
ProcessInstance pi = new ProcessInstance();
pi.setId(processInstanceId);
pi.setProcessId(processId);
- pi.setVersion("1.0");
- pi.setProcessName(String.format("%s-name", processId));
+ pi.setVersion(PROCESS_VERSION);
+ pi.setProcessName(getProcessName(processId));
pi.setRootProcessInstanceId(rootProcessInstanceId);
pi.setParentProcessInstanceId(rootProcessInstanceId);
pi.setRootProcessId(rootProcessId);
@@ -201,56 +269,105 @@ private static ObjectNode getProcessInstanceVariablesJson() {
return getObjectMapper().valueToTree(getProcessInstanceVariablesMap());
}
- public static UserTaskInstanceDataEvent getUserTaskCloudEvent(String taskId, String processId, String processInstanceId, String rootProcessInstanceId, String rootProcessId, String state) {
- return getUserTaskCloudEvent(taskId, processId, processInstanceId, rootProcessInstanceId, rootProcessId, state, "kogito");
+ public static UserTaskInstanceStateDataEvent getUserTaskCloudEvent(String taskId, String processId, String processInstanceId, String rootProcessInstanceId, String rootProcessId, String state) {
+ return getUserTaskCloudEvent(taskId, processId, processInstanceId, rootProcessInstanceId, rootProcessId, state, "kogito", 1);
}
- public static UserTaskInstanceDataEvent getUserTaskCloudEvent(String taskId, String processId, String processInstanceId, String rootProcessInstanceId, String rootProcessId, String state,
- String actualOwner) {
+ public static UserTaskInstanceStateDataEvent getUserTaskCloudEvent(String taskId, String processId, String processInstanceId, String rootProcessInstanceId, String rootProcessId, String state,
+ String actualOwner, Integer eventType) {
- UserTaskInstanceEventBody body = UserTaskInstanceEventBody.create()
- .id(taskId)
+ UserTaskInstanceStateEventBody body = UserTaskInstanceStateEventBody.create()
+ .eventType(eventType)
+ .userTaskInstanceId(taskId)
.state(state)
- .taskName("TaskName")
- .taskDescription("TaskDescription")
- .taskPriority("High")
+ .userTaskName("TaskName")
+ .userTaskDescription("TaskDescription")
+ .userTaskPriority("High")
.actualOwner(actualOwner)
- .startDate(new Date())
- .completeDate(Date.from(Instant.now().plus(1, ChronoUnit.HOURS)))
- .adminGroups(singleton("admin"))
- .adminUsers(singleton("kogito"))
- .excludedUsers(singleton("excluded"))
- .potentialGroups(singleton("potentialGroup"))
- .potentialUsers(singleton("potentialUser"))
+ .eventDate(new Date())
.processInstanceId(processInstanceId)
- .rootProcessInstanceId(rootProcessInstanceId)
- .processId(processId)
- .rootProcessId(rootProcessId)
- .comments(singleton(getTaskComment("commentId" + taskId, "kogito", "Comment 1")))
- .attachments(singleton(getTaskAttachment("attachmentId" + taskId, "kogito", "http://linltodoc.com/1", "doc1")))
- .inputs(emptyMap())
- .outputs(emptyMap())
.build();
+ UserTaskInstanceStateDataEvent event = new UserTaskInstanceStateDataEvent(URI.create("http://localhost:8080/" + processId).toString(), null, null, body.metaData(), body);
+ event.setKogitoProcessId(processId);
+ event.setKogitoProcessInstanceId(processInstanceId);
+ event.setKogitoRootProcessId(rootProcessId);
+ event.setKogitoRootProcessInstanceId(rootProcessInstanceId);
+ return event;
+ }
+
+ public static UserTaskInstanceAttachmentDataEvent getUserTaskAttachmentEvent(String taskId, String processId, String processInstanceId, String rootProcessInstanceId, String rootProcessId,
+ String state,
+ String actualOwner, String attachmentId, URI attachmentURI, String attachmentName, Integer eventType) {
+
+ UserTaskInstanceAttachmentEventBody attachmentBody = UserTaskInstanceAttachmentEventBody.create()
+ .attachmentId(attachmentId)
+ .attachmentName(attachmentName)
+ .attachmentURI(attachmentURI)
+ .eventDate(new Date())
+ .eventType(UserTaskInstanceAttachmentEventBody.EVENT_TYPE_ADDED)
+ .userTaskInstanceId(taskId)
+ .build();
+
+ Map metadata = new HashMap<>();
+ metadata.put(UserTaskInstanceEventMetadata.USER_TASK_INSTANCE_ID_META_DATA, taskId);
+ metadata.put(ProcessInstanceEventMetadata.PROCESS_INSTANCE_ID_META_DATA, processInstanceId);
+ metadata.put(UserTaskInstanceEventMetadata.USER_TASK_INSTANCE_STATE_META_DATA, state);
+
+ UserTaskInstanceAttachmentDataEvent attachmentEvent =
+ new UserTaskInstanceAttachmentDataEvent(URI.create("http://localhost:8080/" + processId).toString(), null, null, metadata, attachmentBody);
+ attachmentEvent.setKogitoProcessId(processId);
+ attachmentEvent.setKogitoProcessInstanceId(processInstanceId);
+ attachmentEvent.setKogitoRootProcessId(rootProcessId);
+ attachmentEvent.setKogitoRootProcessInstanceId(rootProcessInstanceId);
+ return attachmentEvent;
+ }
+
+ public static UserTaskInstanceCommentDataEvent getUserTaskCommentEvent(String taskId, String processId, String processInstanceId, String rootProcessInstanceId, String rootProcessId,
+ String state,
+ String actualOwner, String commentId, String commentContent, Integer eventType) {
+
+ UserTaskInstanceCommentEventBody attachmentBody = UserTaskInstanceCommentEventBody.create()
+ .commentId(commentId)
+ .commentContent(commentContent)
+ .eventDate(new Date())
+ .eventType(UserTaskInstanceAttachmentEventBody.EVENT_TYPE_ADDED)
+ .userTaskInstanceId(taskId)
+ .build();
+
+ Map metadata = new HashMap<>();
+ metadata.put(UserTaskInstanceEventMetadata.USER_TASK_INSTANCE_ID_META_DATA, taskId);
+ metadata.put(ProcessInstanceEventMetadata.PROCESS_INSTANCE_ID_META_DATA, processInstanceId);
+ metadata.put(UserTaskInstanceEventMetadata.USER_TASK_INSTANCE_STATE_META_DATA, state);
+
+ UserTaskInstanceCommentDataEvent attachmentEvent =
+ new UserTaskInstanceCommentDataEvent(URI.create("http://localhost:8080/" + processId).toString(), null, null, metadata, attachmentBody);
+ attachmentEvent.setKogitoProcessId(processId);
+ attachmentEvent.setKogitoProcessInstanceId(processInstanceId);
+ attachmentEvent.setKogitoRootProcessId(rootProcessId);
+ attachmentEvent.setKogitoRootProcessInstanceId(rootProcessInstanceId);
+ return attachmentEvent;
+ }
- return new UserTaskInstanceDataEvent(URI.create("http://localhost:8080/" + processId).toString(), null, null, body.metaData(), body);
+ private static String getEndpoint(String processId) {
+ return URI.create("http://localhost:8080/" + processId).toString();
}
- public static AttachmentEventBody getTaskAttachment(String id, String user, String name, String content) {
- return AttachmentEventBody.create()
- .id(id)
- .updatedBy(user)
- .name(name)
- .content(content == null ? null : URI.create(content))
- .updatedAt(new Date())
+ public static UserTaskInstanceAttachmentEventBody getTaskAttachment(String id, String user, String name, String content) {
+ return UserTaskInstanceAttachmentEventBody.create()
+ .attachmentId(id)
+ .eventUser(user)
+ .attachmentName(name)
+ .attachmentURI(content == null ? null : URI.create(content))
+ .eventDate(new Date())
.build();
}
- public static CommentEventBody getTaskComment(String id, String user, String comment) {
- return CommentEventBody.create()
- .id(id)
- .content(comment)
- .updatedBy(user)
- .updatedAt(new Date())
+ public static UserTaskInstanceCommentEventBody getTaskComment(String id, String user, String comment) {
+ return UserTaskInstanceCommentEventBody.create()
+ .commentId(id)
+ .commentContent(comment)
+ .eventUser(user)
+ .eventDate(new Date())
.build();
}
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/AbstractDataIndexContainer.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/AbstractDataIndexContainer.java
index 8f2a20e666..dc9a34cc71 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/AbstractDataIndexContainer.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/AbstractDataIndexContainer.java
@@ -1,24 +1,32 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.containers;
import java.io.File;
+import java.io.IOException;
+import java.io.UncheckedIOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
import org.kie.kogito.test.resources.TestResource;
+import org.kie.kogito.testcontainers.Constants;
import org.kie.kogito.testcontainers.KogitoGenericContainer;
import org.testcontainers.containers.BindMode;
import org.testcontainers.containers.wait.strategy.Wait;
@@ -34,7 +42,7 @@ public abstract class AbstractDataIndexContainer extends KogitoGenericContainer<
public AbstractDataIndexContainer(String containerName) {
super(containerName);
addExposedPort(PORT);
- waitingFor(Wait.forListeningPort());
+ waitingFor(Wait.forListeningPort()).withStartupTimeout(Constants.CONTAINER_START_TIMEOUT);
addEnv("KOGITO_PROTOBUF_FOLDER", "/home/kogito/data/protobufs/");
withAccessToHost(true);
}
@@ -46,9 +54,20 @@ public void setKafkaURL(String kafkaURL) {
public void addProtoFileFolder() {
String pathStr = "target/classes/META-INF/resources/persistence/protobuf/";
String absolutePath = new File(pathStr).getAbsolutePath();
+ createIfNotExists(absolutePath);
withFileSystemBind(absolutePath, "/home/kogito/data/protobufs/", BindMode.READ_ONLY);
}
+ public Path createIfNotExists(String absolutePath) {
+ Path path = Paths.get(absolutePath);
+ try {
+ Files.createDirectories(path);
+ } catch (IOException e) {
+ throw new UncheckedIOException(e);
+ }
+ return path;
+ }
+
@Override
public int getMappedPort() {
return getMappedPort(PORT);
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexInMemoryContainer.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexInMemoryContainer.java
index a1d11cb2ec..39c941700d 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexInMemoryContainer.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexInMemoryContainer.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.containers;
/**
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexInfinispanContainer.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexInfinispanContainer.java
index 468e181040..85fdb5d4e6 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexInfinispanContainer.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexInfinispanContainer.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.containers;
/**
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexMongoDBContainer.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexMongoDBContainer.java
index 6e169dca9c..f29896c029 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexMongoDBContainer.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexMongoDBContainer.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.containers;
/**
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexOracleContainer.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexOracleContainer.java
index 28435bc7f7..c6b7cc143a 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexOracleContainer.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexOracleContainer.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.containers;
/**
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexPostgreSqlContainer.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexPostgreSqlContainer.java
index 04d8efc586..c02aca8414 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexPostgreSqlContainer.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/DataIndexPostgreSqlContainer.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.containers;
/**
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/KogitoKafkaContainerWithoutBridge.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/KogitoKafkaContainerWithoutBridge.java
index c304c65ee4..a4daa3c0d7 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/KogitoKafkaContainerWithoutBridge.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/containers/KogitoKafkaContainerWithoutBridge.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.test.containers;
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/DataIndexInMemoryQuarkusTestResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/DataIndexInMemoryQuarkusTestResource.java
index 9bc75a8335..caf191899d 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/DataIndexInMemoryQuarkusTestResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/DataIndexInMemoryQuarkusTestResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.quarkus;
import java.util.HashMap;
@@ -37,13 +39,12 @@ protected Map getProperties() {
properties.putAll(getTestResource().getProperties());
properties.put("mp.messaging.outgoing.kogito-processinstances-events.connector", "quarkus-http");
properties.put("mp.messaging.outgoing.kogito-processinstances-events.url", dataIndexUrl + "/processes");
+ properties.put("mp.messaging.outgoing.kogito-processdefinitions-events.connector", "quarkus-http");
+ properties.put("mp.messaging.outgoing.kogito-processdefinitions-events.url", dataIndexUrl + "/definitions");
properties.put("mp.messaging.outgoing.kogito-usertaskinstances-events.connector", "quarkus-http");
properties.put("mp.messaging.outgoing.kogito-usertaskinstances-events.url", dataIndexUrl + "/tasks");
- properties.put("mp.messaging.outgoing.kogito-variables-events.connector", "quarkus-http");
- properties.put("mp.messaging.outgoing.kogito-variables-events.url", dataIndexUrl);
properties.put("mp.messaging.outgoing.kogito-jobs-events.connector", "quarkus-http");
properties.put("mp.messaging.outgoing.kogito-jobs-events.url", dataIndexUrl + "/jobs");
- properties.put("kogito.events.variables.enabled", "false");
return properties;
}
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/DataIndexInMemoryResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/DataIndexInMemoryResource.java
index 1ce9387d4d..3c618adb31 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/DataIndexInMemoryResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/DataIndexInMemoryResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.quarkus;
import java.util.HashMap;
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/KogitoServiceRandomPortTestResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/KogitoServiceRandomPortTestResource.java
index 77c03bd5dd..9db1435faf 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/KogitoServiceRandomPortTestResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/KogitoServiceRandomPortTestResource.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.test.quarkus;
@@ -34,7 +37,9 @@ public String getResourceName() {
@Override
public void start() {
- httpPort = SocketUtils.findAvailablePort();
+ if (httpPort == 0) {
+ httpPort = SocketUtils.findAvailablePort();
+ }
Testcontainers.exposeHostPorts(httpPort);
//the hostname for the container to access the host is "host.testcontainers.internal"
//https://www.testcontainers.org/features/networking/#exposing-host-ports-to-the-container
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/AbstractDataIndexHttpQuarkusTestResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/AbstractDataIndexHttpQuarkusTestResource.java
index 100084dfa4..4a6200e007 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/AbstractDataIndexHttpQuarkusTestResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/AbstractDataIndexHttpQuarkusTestResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.quarkus.http;
import java.util.HashMap;
@@ -41,13 +43,12 @@ protected Map getDataIndexConnectionProperties() {
properties.put(KOGITO_DATA_INDEX_SERVICE_URL, dataIndexUrl);
properties.put("mp.messaging.outgoing.kogito-processinstances-events.connector", "quarkus-http");
properties.put("mp.messaging.outgoing.kogito-processinstances-events.url", dataIndexUrl + "/processes");
+ properties.put("mp.messaging.outgoing.kogito-processdefinitions-events.connector", "quarkus-http");
+ properties.put("mp.messaging.outgoing.kogito-processdefinitions-events.url", dataIndexUrl + "/definitions");
properties.put("mp.messaging.outgoing.kogito-usertaskinstances-events.connector", "quarkus-http");
properties.put("mp.messaging.outgoing.kogito-usertaskinstances-events.url", dataIndexUrl + "/tasks");
- properties.put("mp.messaging.outgoing.kogito-variables-events.connector", "quarkus-http");
- properties.put("mp.messaging.outgoing.kogito-variables-events.url", dataIndexUrl);
properties.put("mp.messaging.outgoing.kogito-jobs-events.connector", "quarkus-http");
properties.put("mp.messaging.outgoing.kogito-jobs-events.url", dataIndexUrl + "/jobs");
- properties.put("kogito.events.variables.enabled", "false");
return properties;
}
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexInfinispanHttpQuarkusTestResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexInfinispanHttpQuarkusTestResource.java
index f7955a3b33..b016686f00 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexInfinispanHttpQuarkusTestResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexInfinispanHttpQuarkusTestResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.quarkus.http;
import java.util.HashMap;
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexInfinispanHttpResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexInfinispanHttpResource.java
index df98d8a12b..2d47759494 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexInfinispanHttpResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexInfinispanHttpResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.quarkus.http;
import java.util.HashMap;
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexMongoDBHttpQuarkusTestResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexMongoDBHttpQuarkusTestResource.java
index 9aa30d4775..e3fc904dcc 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexMongoDBHttpQuarkusTestResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexMongoDBHttpQuarkusTestResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.quarkus.http;
import java.util.HashMap;
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexMongoDBHttpResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexMongoDBHttpResource.java
index 9b01354a9d..699e50d006 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexMongoDBHttpResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexMongoDBHttpResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.quarkus.http;
import java.util.HashMap;
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexOracleHttpQuarkusTestResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexOracleHttpQuarkusTestResource.java
index 6d91bf6fd4..e72a31e8e8 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexOracleHttpQuarkusTestResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexOracleHttpQuarkusTestResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.quarkus.http;
import java.util.HashMap;
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexOracleHttpResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexOracleHttpResource.java
index af3e077a2c..fc8f666f14 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexOracleHttpResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexOracleHttpResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.quarkus.http;
import java.util.HashMap;
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexPostgreSqlHttpQuarkusTestResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexPostgreSqlHttpQuarkusTestResource.java
index 032ad61b86..af75fdb60b 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexPostgreSqlHttpQuarkusTestResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexPostgreSqlHttpQuarkusTestResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.quarkus.http;
import java.util.HashMap;
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexPostgreSqlHttpResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexPostgreSqlHttpResource.java
index aa744f387f..a0483a101a 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexPostgreSqlHttpResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/DataIndexPostgreSqlHttpResource.java
@@ -1,23 +1,26 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.quarkus.http;
import org.kie.kogito.index.test.containers.DataIndexPostgreSqlContainer;
import org.kie.kogito.test.resources.TestResource;
+import org.kie.kogito.testcontainers.Constants;
import org.kie.kogito.testcontainers.KogitoPostgreSqlContainer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -42,7 +45,7 @@ public void start() {
Network network = Network.newNetwork();
postgresql.withNetwork(network);
postgresql.withNetworkAliases("postgresql");
- postgresql.waitingFor(Wait.forListeningPort());
+ postgresql.waitingFor(Wait.forListeningPort()).withStartupTimeout(Constants.CONTAINER_START_TIMEOUT);
postgresql.start();
dataIndex.addProtoFileFolder();
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/KogitoServiceRandomPortQuarkusHttpTestResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/KogitoServiceRandomPortQuarkusHttpTestResource.java
similarity index 52%
rename from apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/KogitoServiceRandomPortQuarkusHttpTestResource.java
rename to data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/KogitoServiceRandomPortQuarkusHttpTestResource.java
index 2902585f90..b8f76f8435 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-quarkus/src/test/java/org/kie/kogito/index/quarkus/http/KogitoServiceRandomPortQuarkusHttpTestResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/http/KogitoServiceRandomPortQuarkusHttpTestResource.java
@@ -1,19 +1,22 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-package org.kie.kogito.index.quarkus.http;
+package org.kie.kogito.index.test.quarkus.http;
import java.util.HashMap;
import java.util.Map;
@@ -26,6 +29,7 @@
public class KogitoServiceRandomPortQuarkusHttpTestResource extends ConditionalQuarkusTestResource {
public static final String QUARKUS_SERVICE_HTTP_PORT = "quarkus.http.port";
+ public static final String QUARKUS_SERVICE_HTTP_TEST_PORT = "quarkus.http.test-port";
public KogitoServiceRandomPortQuarkusHttpTestResource() {
super(new KogitoServiceRandomPortTestResource());
@@ -43,8 +47,10 @@ public int order() {
protected Map getProperties() {
Map properties = new HashMap<>();
System.setProperty(QUARKUS_SERVICE_HTTP_PORT, String.valueOf(getTestResource().getMappedPort()));
+ System.setProperty(QUARKUS_SERVICE_HTTP_TEST_PORT, String.valueOf(getTestResource().getMappedPort()));
properties.put(QUARKUS_SERVICE_HTTP_PORT, String.valueOf(getTestResource().getMappedPort()));
+ properties.put(QUARKUS_SERVICE_HTTP_TEST_PORT, String.valueOf(getTestResource().getMappedPort()));
properties.put(KOGITO_SERVICE_URL, "http://host.testcontainers.internal:" + getTestResource().getMappedPort());
return properties;
}
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexInfinispanKafkaResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexInfinispanKafkaResource.java
index 7dce8d199c..4ae5430e22 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexInfinispanKafkaResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexInfinispanKafkaResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.quarkus.kafka;
import java.util.HashMap;
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexInfinispanQuarkusKafkaTestResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexInfinispanQuarkusKafkaTestResource.java
index 1f0aea80b1..f511e0cf63 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexInfinispanQuarkusKafkaTestResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexInfinispanQuarkusKafkaTestResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.quarkus.kafka;
import java.util.HashMap;
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexMongoDBKafkaResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexMongoDBKafkaResource.java
index 3099861601..694b3b371c 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexMongoDBKafkaResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexMongoDBKafkaResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.quarkus.kafka;
import java.util.HashMap;
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexMongoDBQuarkusKafkaTestResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexMongoDBQuarkusKafkaTestResource.java
index bfd0491512..b206d167b5 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexMongoDBQuarkusKafkaTestResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexMongoDBQuarkusKafkaTestResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.quarkus.kafka;
import java.util.HashMap;
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexOracleKafkaResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexOracleKafkaResource.java
index 78ce2f9673..968ad34f5e 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexOracleKafkaResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexOracleKafkaResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.quarkus.kafka;
import java.util.HashMap;
@@ -22,6 +24,7 @@
import org.kie.kogito.index.test.containers.DataIndexOracleContainer;
import org.kie.kogito.index.test.containers.KogitoKafkaContainerWithoutBridge;
import org.kie.kogito.test.resources.TestResource;
+import org.kie.kogito.testcontainers.Constants;
import org.kie.kogito.testcontainers.KogitoOracleSqlContainer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -54,7 +57,7 @@ public void start() {
oracle.start();
kafka.withNetwork(network);
kafka.withNetworkAliases("kafka");
- kafka.waitingFor(Wait.forListeningPort());
+ kafka.waitingFor(Wait.forListeningPort()).withStartupTimeout(Constants.CONTAINER_START_TIMEOUT);
kafka.start();
String kafkaURL = kafka.getBootstrapServers();
properties.put("kafka.bootstrap.servers", kafkaURL);
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexOracleQuarkusKafkaTestResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexOracleQuarkusKafkaTestResource.java
index 08b08b53c6..1466378146 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexOracleQuarkusKafkaTestResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexOracleQuarkusKafkaTestResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.quarkus.kafka;
import java.util.HashMap;
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexPostgreSqlKafkaResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexPostgreSqlKafkaResource.java
index a436135a59..cf9caf6d82 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexPostgreSqlKafkaResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexPostgreSqlKafkaResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.quarkus.kafka;
import java.util.HashMap;
@@ -22,6 +24,7 @@
import org.kie.kogito.index.test.containers.DataIndexPostgreSqlContainer;
import org.kie.kogito.index.test.containers.KogitoKafkaContainerWithoutBridge;
import org.kie.kogito.test.resources.TestResource;
+import org.kie.kogito.testcontainers.Constants;
import org.kie.kogito.testcontainers.KogitoPostgreSqlContainer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -49,11 +52,11 @@ public void start() {
Network network = Network.newNetwork();
postgresql.withNetwork(network);
postgresql.withNetworkAliases("postgresql");
- postgresql.waitingFor(Wait.forListeningPort());
+ postgresql.waitingFor(Wait.forListeningPort()).withStartupTimeout(Constants.CONTAINER_START_TIMEOUT);
postgresql.start();
kafka.withNetwork(network);
kafka.withNetworkAliases("kafka");
- kafka.waitingFor(Wait.forListeningPort());
+ kafka.waitingFor(Wait.forListeningPort()).withStartupTimeout(Constants.CONTAINER_START_TIMEOUT);
kafka.start();
String kafkaURL = kafka.getBootstrapServers();
properties.put("kafka.bootstrap.servers", kafkaURL);
diff --git a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexPostgreSqlQuarkusKafkaTestResource.java b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexPostgreSqlQuarkusKafkaTestResource.java
index 1a3c810a01..b61cf69880 100644
--- a/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexPostgreSqlQuarkusKafkaTestResource.java
+++ b/data-index/data-index-test-utils/src/main/java/org/kie/kogito/index/test/quarkus/kafka/DataIndexPostgreSqlQuarkusKafkaTestResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.test.quarkus.kafka;
import java.util.HashMap;
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/deployment/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/deployment/pom.xml
index 9c0b57c0de..f4b04fc603 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/deployment/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/deployment/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
@@ -30,5 +50,13 @@
org.kie.kogito
kogito-addons-quarkus-source-files-deployment
+
+ io.quarkus
+ quarkus-oidc-deployment
+
+
+ io.quarkus
+ quarkus-smallrye-fault-tolerance-deployment
+
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/AbstractKogitoAddonsQuarkusDataIndexPersistenceProcessor.java b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/AbstractKogitoAddonsQuarkusDataIndexPersistenceProcessor.java
index 1e517cb461..f37f3ffa58 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/AbstractKogitoAddonsQuarkusDataIndexPersistenceProcessor.java
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/AbstractKogitoAddonsQuarkusDataIndexPersistenceProcessor.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.addons.quarkus.data.index.persistence.deployment;
import org.jboss.jandex.DotName;
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/pom.xml
index 1d22996002..68ad6cfd20 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/pom.xml
index fab7cdcf23..2adca65f55 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/pom.xml
@@ -1,4 +1,24 @@
+
@@ -27,6 +47,10 @@
org.kie.kogito
kogito-addons-quarkus-source-files
+
+ io.quarkus
+ quarkus-oidc
+
org.kie.kogito
jbpm-flow
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/main/java/org/kie/kogito/index/addon/DataIndexEventPublisher.java b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/main/java/org/kie/kogito/index/addon/DataIndexEventPublisher.java
index ebf34ecdbe..d8bcd1509d 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/main/java/org/kie/kogito/index/addon/DataIndexEventPublisher.java
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/main/java/org/kie/kogito/index/addon/DataIndexEventPublisher.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.addon;
import java.io.IOException;
@@ -26,15 +28,15 @@
import org.kie.kogito.event.DataEvent;
import org.kie.kogito.event.EventPublisher;
+import org.kie.kogito.event.process.ProcessDefinitionDataEvent;
import org.kie.kogito.event.process.ProcessInstanceDataEvent;
-import org.kie.kogito.event.process.UserTaskInstanceDataEvent;
-import org.kie.kogito.index.event.ProcessInstanceEventMapper;
-import org.kie.kogito.index.event.UserTaskInstanceEventMapper;
+import org.kie.kogito.event.usertask.UserTaskInstanceDataEvent;
import org.kie.kogito.index.model.Job;
import org.kie.kogito.index.service.IndexingService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import static org.kie.kogito.event.process.ProcessDefinitionDataEvent.PROCESS_DEFINITION_EVENT;
import static org.kie.kogito.index.json.JsonUtils.getObjectMapper;
@ApplicationScoped
@@ -50,15 +52,29 @@ public class DataIndexEventPublisher implements EventPublisher {
public void publish(DataEvent> event) {
LOGGER.debug("Sending event to embedded data index: {}", event);
switch (event.getType()) {
- case "ProcessInstanceEvent":
- indexingService.indexProcessInstance(new ProcessInstanceEventMapper().apply((ProcessInstanceDataEvent) event));
+ case PROCESS_DEFINITION_EVENT:
+ indexingService.indexProcessDefinition((ProcessDefinitionDataEvent) event);
+ break;
+ case "ProcessInstanceErrorDataEvent":
+ case "ProcessInstanceNodeDataEvent":
+ case "ProcessInstanceSLADataEvent":
+ case "ProcessInstanceStateDataEvent":
+ case "ProcessInstanceVariableDataEvent":
+ indexingService.indexProcessInstanceEvent((ProcessInstanceDataEvent>) event);
break;
- case "UserTaskInstanceEvent":
- indexingService.indexUserTaskInstance(new UserTaskInstanceEventMapper().apply((UserTaskInstanceDataEvent) event));
+ case "UserTaskInstanceAssignmentDataEvent":
+ case "UserTaskInstanceAttachmentDataEvent":
+ case "UserTaskInstanceCommentDataEvent":
+ case "UserTaskInstanceDeadlineDataEvent":
+ case "UserTaskInstanceStateDataEvent":
+ case "UserTaskInstanceVariableDataEvent":
+ indexingService.indexUserTaskInstanceEvent((UserTaskInstanceDataEvent>) event);
break;
case "JobEvent":
try {
- indexingService.indexJob(getObjectMapper().readValue(new String((byte[]) event.getData()), Job.class));
+ Job job = getObjectMapper().readValue(new String((byte[]) event.getData()), Job.class);
+ job.setEndpoint(event.getSource() == null ? null : event.getSource().toString());
+ indexingService.indexJob(job);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/main/java/org/kie/kogito/index/addon/ProcessDefinitionRegister.java b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/main/java/org/kie/kogito/index/addon/ProcessDefinitionRegister.java
deleted file mode 100644
index 1cf53ee080..0000000000
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/main/java/org/kie/kogito/index/addon/ProcessDefinitionRegister.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.kie.kogito.index.addon;
-
-import java.util.Optional;
-import java.util.Set;
-import java.util.function.Function;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.event.Observes;
-import javax.enterprise.inject.Instance;
-
-import org.eclipse.microprofile.config.inject.ConfigProperty;
-import org.kie.kogito.Application;
-import org.kie.kogito.index.api.KogitoRuntimeClient;
-import org.kie.kogito.index.model.ProcessDefinition;
-import org.kie.kogito.index.service.DataIndexServiceException;
-import org.kie.kogito.index.storage.DataIndexStorageService;
-import org.kie.kogito.process.Process;
-import org.kie.kogito.process.Processes;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import io.quarkus.runtime.StartupEvent;
-
-import static java.lang.String.format;
-
-@ApplicationScoped
-public class ProcessDefinitionRegister {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(ProcessDefinitionRegister.class);
-
- @ConfigProperty(name = "kogito.service.url")
- Optional kogitoServiceUrl;
-
- void startup(@Observes StartupEvent event, Instance processesInstance, Application app, DataIndexStorageService storage, KogitoRuntimeClient client) {
- if (processesInstance.isResolvable()) {
- Processes processes = processesInstance.get();
- processes.processIds().stream()
- .map(processes::processById)
- .map(mapProcessDefinition(app.config().addons().availableAddons(), kogitoServiceUrl.orElse(null), client))
- .forEach(process -> {
- LOGGER.debug("Registering process definition with id: {}", process.getId());
- storage.getProcessDefinitionsCache().put(process.getKey(), process);
- });
- } else {
- LOGGER.info("No process definitions to register.");
- }
- }
-
- private Function, ProcessDefinition> mapProcessDefinition(Set addons, String endpoint, KogitoRuntimeClient client) {
- return p -> {
- ProcessDefinition pd = new ProcessDefinition();
- pd.setId(p.id());
- pd.setName(p.name());
- pd.setVersion(p.version());
- pd.setType(pd.getType());
- pd.setAddons(addons);
- // See ProcessInstanceEventBatch.buildSource
- pd.setEndpoint(endpoint + "/" + (p.id().contains(".") ? p.id().substring(p.id().lastIndexOf('.') + 1) : p.id()));
- try {
- String content = client.getProcessDefinitionSourceFileContent(null, p.id()).get();
- pd.setSource(content);
- } catch (InterruptedException e) {
- LOGGER.warn("Interrupted thread while registering process definition with id: {}", p.id(), e);
- Thread.currentThread().interrupt();
- } catch (Exception e) {
- throw new DataIndexServiceException(format("Failed to register process definition with id: %s", p.id()), e);
- }
- try {
- pd.setNodes(client.getProcessDefinitionNodes(null, p.id()).get());
- } catch (InterruptedException e) {
- LOGGER.warn("Interrupted thread while registering process definition with id: {}", p.id(), e);
- Thread.currentThread().interrupt();
- } catch (Exception e) {
- throw new DataIndexServiceException(format("Failed to register process definition with id: %s", p.id()), e);
- }
- return pd;
- };
- }
-
-}
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/main/java/org/kie/kogito/index/addon/api/KogitoAddonRuntimeClientImpl.java b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/main/java/org/kie/kogito/index/addon/api/KogitoAddonRuntimeClientImpl.java
index 654b577cdb..4ac132c3d0 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/main/java/org/kie/kogito/index/addon/api/KogitoAddonRuntimeClientImpl.java
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/main/java/org/kie/kogito/index/addon/api/KogitoAddonRuntimeClientImpl.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.addon.api;
import java.io.IOException;
@@ -33,7 +35,7 @@
import org.kie.kogito.Application;
import org.kie.kogito.addon.source.files.SourceFilesProvider;
import org.kie.kogito.index.api.KogitoRuntimeClient;
-import org.kie.kogito.index.model.Job;
+import org.kie.kogito.index.api.KogitoRuntimeCommonClient;
import org.kie.kogito.index.model.Node;
import org.kie.kogito.index.model.ProcessInstance;
import org.kie.kogito.index.model.UserTaskInstance;
@@ -49,7 +51,7 @@
import static java.util.stream.Collectors.toMap;
@ApplicationScoped
-public class KogitoAddonRuntimeClientImpl implements KogitoRuntimeClient {
+public class KogitoAddonRuntimeClientImpl extends KogitoRuntimeCommonClient implements KogitoRuntimeClient {
private static String SUCCESSFULLY_OPERATION_MESSAGE = "Successfully performed: %s";
@@ -212,14 +214,6 @@ public CompletableFuture cancelNodeInstance(String serviceURL, ProcessIn
}));
}
- public CompletableFuture cancelJob(String serviceURL, Job job) {
- return throwUnsupportedException();
- }
-
- public CompletableFuture rescheduleJob(String serviceURL, Job job, String newJobData) throws UncheckedIOException {
- return throwUnsupportedException();
- }
-
@Override
public CompletableFuture getUserTaskSchema(String serviceURL, UserTaskInstance userTaskInstance, String user, List groups) {
return throwUnsupportedException();
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/main/resources/META-INF/beans.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/main/resources/META-INF/beans.xml
index e69de29bb2..a0eb9fbf8c 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/main/resources/META-INF/beans.xml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/main/resources/META-INF/beans.xml
@@ -0,0 +1,20 @@
+
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/test/java/org/kie/kogito/index/addon/DataIndexEventPublisherTest.java b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/test/java/org/kie/kogito/index/addon/DataIndexEventPublisherTest.java
index bbe9867547..731ee24cae 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/test/java/org/kie/kogito/index/addon/DataIndexEventPublisherTest.java
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/test/java/org/kie/kogito/index/addon/DataIndexEventPublisherTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.addon;
import java.io.UncheckedIOException;
@@ -24,9 +26,8 @@
import org.junit.jupiter.api.extension.ExtendWith;
import org.kie.kogito.event.AbstractDataEvent;
import org.kie.kogito.event.DataEvent;
-import org.kie.kogito.event.process.ProcessInstanceDataEvent;
+import org.kie.kogito.event.process.ProcessInstanceStateDataEvent;
import org.kie.kogito.index.model.Job;
-import org.kie.kogito.index.model.ProcessInstance;
import org.kie.kogito.index.service.IndexingService;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
@@ -70,13 +71,14 @@ public void setup() {
@Test
void onProcessInstanceEvent() {
- ArgumentCaptor eventCaptor = ArgumentCaptor.forClass(ProcessInstance.class);
- ProcessInstanceDataEvent event = getProcessCloudEvent(PROCESS_ID, PROCESS_INSTANCE_ID, COMPLETED,
+
+ ArgumentCaptor eventCaptor = ArgumentCaptor.forClass(ProcessInstanceStateDataEvent.class);
+ ProcessInstanceStateDataEvent event = getProcessCloudEvent(PROCESS_ID, PROCESS_INSTANCE_ID, COMPLETED,
ROOT_PROCESS_INSTANCE_ID, ROOT_PROCESS_ID, ROOT_PROCESS_INSTANCE_ID, "currentUser");
dataIndexEventPublisher.publish(event);
- verify(indexingService).indexProcessInstance(eventCaptor.capture());
+ verify(indexingService).indexProcessInstanceEvent(eventCaptor.capture());
}
@Test
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/test/java/org/kie/kogito/index/addon/api/KogitoAddonRuntimeClientImplTest.java b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/test/java/org/kie/kogito/index/addon/api/KogitoAddonRuntimeClientImplTest.java
index d041cc37ea..e1c56069ae 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/test/java/org/kie/kogito/index/addon/api/KogitoAddonRuntimeClientImplTest.java
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-common/runtime/src/test/java/org/kie/kogito/index/addon/api/KogitoAddonRuntimeClientImplTest.java
@@ -1,20 +1,24 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.addon.api;
+import java.nio.Buffer;
import java.util.Optional;
import javax.enterprise.inject.Instance;
@@ -24,6 +28,8 @@
import org.junit.jupiter.api.extension.ExtendWith;
import org.kie.kogito.Application;
import org.kie.kogito.addon.source.files.SourceFilesProvider;
+import org.kie.kogito.index.api.KogitoRuntimeCommonClient;
+import org.kie.kogito.index.model.Job;
import org.kie.kogito.index.model.ProcessInstance;
import org.kie.kogito.index.test.TestUtils;
import org.kie.kogito.process.ProcessError;
@@ -34,10 +40,24 @@
import org.kie.kogito.services.uow.CollectingUnitOfWorkFactory;
import org.kie.kogito.services.uow.DefaultUnitOfWorkManager;
import org.kie.kogito.svg.ProcessSvgService;
+import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
-import static org.junit.jupiter.api.Assertions.assertThrows;
+import io.quarkus.security.credential.TokenCredential;
+import io.quarkus.security.identity.SecurityIdentity;
+import io.vertx.core.AsyncResult;
+import io.vertx.core.Handler;
+import io.vertx.core.Vertx;
+import io.vertx.core.json.JsonObject;
+import io.vertx.ext.web.client.HttpRequest;
+import io.vertx.ext.web.client.HttpResponse;
+import io.vertx.ext.web.client.WebClient;
+import io.vertx.ext.web.client.WebClientOptions;
+
+import static java.lang.String.format;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.Mockito.*;
@ExtendWith(MockitoExtension.class)
@@ -50,6 +70,21 @@ public class KogitoAddonRuntimeClientImplTest {
private static final String NODE_ID = "nodeId";
private static String TASK_ID = "taskId";
private static String JOB_ID = "jobId";
+ private static String AUTHORIZED_TOKEN = "authToken";
+
+ @Mock
+ public Vertx vertx;
+
+ @Mock
+ private SecurityIdentity identityMock;
+
+ private TokenCredential tokenCredential;
+
+ @Mock
+ private WebClient webClientMock;
+
+ @Mock
+ private HttpRequest httpRequestMock;
public static final String NODE_ID_ERROR = "processInstanceIdError";
@@ -111,6 +146,10 @@ public void setup() {
lenient().when(applicationInstance.get()).thenReturn(application);
client = spy(new KogitoAddonRuntimeClientImpl(processSvgServiceInstance, sourceFilesProvider, processesInstance, applicationInstance));
+ client.setGatewayTargetUrl(Optional.empty());
+ client.addServiceWebClient(SERVICE_URL, webClientMock);
+ client.setVertx(vertx);
+ client.setIdentity(identityMock);
}
private org.kie.kogito.process.ProcessInstance mockProcessInstanceStatusActive() {
@@ -200,8 +239,137 @@ void testCancelNodeInstance() {
verify(processInstance, times(1)).cancelNodeInstance(NODE_ID);
}
+ @Test
+ protected void testCancelJobRest() {
+ setupIdentityMock();
+ when(webClientMock.delete(anyString())).thenReturn(httpRequestMock);
+ Job job = createJob(JOB_ID, PROCESS_INSTANCE_ID, "SCHEDULED");
+ client.cancelJob(SERVICE_URL, job);
+
+ verify(client).sendDeleteClientRequest(webClientMock,
+ format(KogitoRuntimeCommonClient.CANCEL_JOB_PATH, job.getId()),
+ "CANCEL Job with id: " + JOB_ID);
+ ArgumentCaptor handlerCaptor = ArgumentCaptor.forClass(Handler.class);
+ verify(httpRequestMock).send(handlerCaptor.capture());
+ checkResponseHandling(handlerCaptor.getValue());
+ }
+
+ @Test
+ protected void testRescheduleWithoutJobServiceInstance() {
+ String newJobData = "{\"expirationTime\": \"2023-08-27T04:35:54.631Z\",\"retries\": 2}";
+ setupIdentityMock();
+ when(webClientMock.patch(anyString())).thenReturn(httpRequestMock);
+
+ Job job = createJob(JOB_ID, PROCESS_INSTANCE_ID, "SCHEDULED");
+
+ client.rescheduleJob(SERVICE_URL, job, newJobData);
+ ArgumentCaptor jsonCaptor = ArgumentCaptor.forClass(JsonObject.class);
+
+ verify(client).sendPatchClientRequest(eq(webClientMock),
+ eq(format(KogitoRuntimeCommonClient.RESCHEDULE_JOB_PATH, JOB_ID)),
+ eq("RESCHEDULED JOB with id: " + job.getId()),
+ jsonCaptor.capture());
+
+ assertThat(jsonCaptor.getValue().getString("expirationTime")).isEqualTo("2023-08-27T04:35:54.631Z");
+ assertThat(jsonCaptor.getValue().getString("retries")).isEqualTo("2");
+
+ ArgumentCaptor handlerCaptor = ArgumentCaptor.forClass(Handler.class);
+ JsonObject jsonOject = new JsonObject(newJobData);
+ verify(httpRequestMock).sendJson(eq(jsonOject), handlerCaptor.capture());
+ verify(httpRequestMock).putHeader("Authorization", "Bearer " + AUTHORIZED_TOKEN);
+ checkResponseHandling(handlerCaptor.getValue());
+ }
+
+ @Test
+ public void testWebClientToURLOptions() {
+ String defaultHost = "localhost";
+ int defaultPort = 8180;
+ WebClientOptions webClientOptions = client.getWebClientToURLOptions("http://" + defaultHost + ":" + defaultPort);
+ assertThat(webClientOptions.getDefaultHost()).isEqualTo(defaultHost);
+ assertThat(webClientOptions.getDefaultPort()).isEqualTo(defaultPort);
+ }
+
+ @Test
+ public void testWebClientToURLOptionsWithoutPort() {
+ String dataIndexUrl = "http://service.com";
+ WebClientOptions webClientOptions = client.getWebClientToURLOptions(dataIndexUrl);
+ assertThat(webClientOptions.getDefaultPort()).isEqualTo(80);
+ assertThat(webClientOptions.getDefaultHost()).isEqualTo("service.com");
+ assertFalse(webClientOptions.isSsl());
+ }
+
+ @Test
+ public void testWebClientToURLOptionsWithoutPortSSL() {
+ String dataIndexurl = "https://service.com";
+ WebClientOptions webClientOptions = client.getWebClientToURLOptions(dataIndexurl);
+ assertThat(webClientOptions.getDefaultPort()).isEqualTo(443);
+ assertThat(webClientOptions.getDefaultHost()).isEqualTo("service.com");
+ assertTrue(webClientOptions.isSsl());
+ }
+
+ @Test
+ public void testMalformedURL() {
+ assertThat(client.getWebClientToURLOptions("malformedURL")).isNull();
+ }
+
+ @Test
+ void testOverrideURL() {
+ String host = "host.testcontainers.internal";
+ client.setGatewayTargetUrl(Optional.of(host));
+ WebClientOptions webClientOptions = client.getWebClientToURLOptions("http://service.com");
+ assertThat(webClientOptions.getDefaultHost()).isEqualTo(host);
+ }
+
+ @Test
+ public void testGetAuthHeader() {
+ tokenCredential = mock(TokenCredential.class);
+ when(identityMock.getCredential(TokenCredential.class)).thenReturn(tokenCredential);
+ when(tokenCredential.getToken()).thenReturn(AUTHORIZED_TOKEN);
+
+ String token = client.getAuthHeader();
+ verify(identityMock, times(2)).getCredential(TokenCredential.class);
+ assertThat(token).isEqualTo("Bearer " + AUTHORIZED_TOKEN);
+
+ when(identityMock.getCredential(TokenCredential.class)).thenReturn(null);
+ token = client.getAuthHeader();
+ assertThat(token).isEqualTo("");
+ }
+
private ProcessInstance createProcessInstance(String processInstanceId, int status) {
return TestUtils.getProcessInstance("travels", processInstanceId, status, null, null);
}
+ private Job createJob(String jobId, String processInstanceId, String status) {
+ return TestUtils.getJob(jobId, "travels", processInstanceId, null, null, status);
+ }
+
+ private AsyncResult createResponseMocks(HttpResponse response, boolean succeed, int statusCode) {
+ AsyncResult asyncResultMock = mock(AsyncResult.class);
+ when(asyncResultMock.succeeded()).thenReturn(succeed);
+ when(asyncResultMock.result()).thenReturn(response);
+ when(response.statusCode()).thenReturn(statusCode);
+ return asyncResultMock;
+ }
+
+ protected void checkResponseHandling(Handler>> handler) {
+ HttpResponse response = mock(HttpResponse.class);
+ HttpResponse responseWithoutError = mock(HttpResponse.class);
+
+ handler.handle(createResponseMocks(response, false, 404));
+ verify(response).statusMessage();
+ verify(response).body();
+ verify(response, never()).bodyAsString();
+
+ handler.handle(createResponseMocks(responseWithoutError, true, 200));
+ verify(responseWithoutError, never()).statusMessage();
+ verify(responseWithoutError, never()).body();
+ verify(responseWithoutError).bodyAsString();
+ }
+
+ protected void setupIdentityMock() {
+ tokenCredential = mock(TokenCredential.class);
+ when(identityMock.getCredential(TokenCredential.class)).thenReturn(tokenCredential);
+ when(tokenCredential.getToken()).thenReturn(AUTHORIZED_TOKEN);
+ when(httpRequestMock.putHeader(eq("Authorization"), eq("Bearer " + AUTHORIZED_TOKEN))).thenReturn(httpRequestMock);
+ }
}
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/deployment/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/deployment/pom.xml
index 0a5f17e8f4..57c5d839a8 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/deployment/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/deployment/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/InfinispanDataIndexPersistenceProcessor.java b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/InfinispanDataIndexPersistenceProcessor.java
index f9b1dec732..1a0225d6eb 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/InfinispanDataIndexPersistenceProcessor.java
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/InfinispanDataIndexPersistenceProcessor.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.addons.quarkus.data.index.persistence.deployment;
import io.quarkus.deployment.annotations.BuildProducer;
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-process/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-process/pom.xml
index 038db2c370..0e8ba6363e 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-process/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-process/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-process/src/main/resources/application.properties b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-process/src/main/resources/application.properties
index e43686884a..e261bcff15 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-process/src/main/resources/application.properties
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-process/src/main/resources/application.properties
@@ -1,5 +1,29 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
kogito.persistence.type=infinispan
kogito.service.url=http://localhost:8080
quarkus.devservices.enabled=false
-quarkus.infinispan-client.use-auth=false
\ No newline at end of file
+quarkus.infinispan-client.use-auth=false
+
+# Security
+quarkus.oidc.enabled=false
+quarkus.oidc.tenant-enabled=false
+quarkus.oidc.auth-server-url=none
\ No newline at end of file
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/InfinispanQuarkusAddonDataIndexPersistenceIT.java b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/InfinispanQuarkusAddonDataIndexPersistenceIT.java
index c9d7827f4c..e085a08b21 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/InfinispanQuarkusAddonDataIndexPersistenceIT.java
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/InfinispanQuarkusAddonDataIndexPersistenceIT.java
@@ -1,23 +1,26 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.addons.quarkus.data.index.it;
import org.junit.jupiter.api.Test;
import org.kie.kogito.index.test.quarkus.http.DataIndexInfinispanHttpQuarkusTestResource;
+import org.kie.kogito.index.test.quarkus.http.KogitoServiceRandomPortQuarkusHttpTestResource;
import org.kie.kogito.test.quarkus.QuarkusTestProperty;
import io.quarkus.test.common.QuarkusTestResource;
@@ -36,6 +39,7 @@
@QuarkusIntegrationTest
@QuarkusTestResource(DataIndexInfinispanHttpQuarkusTestResource.class)
+@QuarkusTestResource(value = KogitoServiceRandomPortQuarkusHttpTestResource.class)
class InfinispanQuarkusAddonDataIndexPersistenceIT {
static {
@@ -55,7 +59,7 @@ void testDataIndexAddon() {
.body("data.ProcessDefinitions[0].id", is("hello"))
.body("data.ProcessDefinitions[0].name", is("hello"))
.body("data.ProcessDefinitions[0].version", is("1.0"))
- .body("data.ProcessDefinitions[0].endpoint", is("http://localhost:8080/hello"))
+ .body("data.ProcessDefinitions[0].endpoint", is(not(emptyOrNullString())))
.body("data.ProcessDefinitions[0].addons", hasItem("infinispan-persistence"))
.body("data.ProcessDefinitions[0].source", is(not(emptyOrNullString())))
.body("data.ProcessDefinitions[0].nodes.size()", is(2))
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-sw/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-sw/pom.xml
index 78252951cb..60d8a67587 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-sw/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-sw/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-sw/src/main/resources/application.properties b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-sw/src/main/resources/application.properties
index e43686884a..e261bcff15 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-sw/src/main/resources/application.properties
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-sw/src/main/resources/application.properties
@@ -1,5 +1,29 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
kogito.persistence.type=infinispan
kogito.service.url=http://localhost:8080
quarkus.devservices.enabled=false
-quarkus.infinispan-client.use-auth=false
\ No newline at end of file
+quarkus.infinispan-client.use-auth=false
+
+# Security
+quarkus.oidc.enabled=false
+quarkus.oidc.tenant-enabled=false
+quarkus.oidc.auth-server-url=none
\ No newline at end of file
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/InfinispanQuarkusAddonDataIndexPersistenceIT.java b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/InfinispanQuarkusAddonDataIndexPersistenceIT.java
index 272cdf8a88..7d18859b37 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/InfinispanQuarkusAddonDataIndexPersistenceIT.java
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/InfinispanQuarkusAddonDataIndexPersistenceIT.java
@@ -1,23 +1,26 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.addons.quarkus.data.index.it;
import org.junit.jupiter.api.Test;
import org.kie.kogito.index.test.quarkus.http.DataIndexInfinispanHttpQuarkusTestResource;
+import org.kie.kogito.index.test.quarkus.http.KogitoServiceRandomPortQuarkusHttpTestResource;
import org.kie.kogito.test.quarkus.QuarkusTestProperty;
import io.quarkus.test.common.QuarkusTestResource;
@@ -37,6 +40,7 @@
@QuarkusIntegrationTest
@QuarkusTestResource(DataIndexInfinispanHttpQuarkusTestResource.class)
+@QuarkusTestResource(value = KogitoServiceRandomPortQuarkusHttpTestResource.class)
class InfinispanQuarkusAddonDataIndexPersistenceIT {
static {
@@ -56,7 +60,7 @@ void testDataIndexAddon() {
.body("data.ProcessDefinitions[0].id", is("greet"))
.body("data.ProcessDefinitions[0].name", is("Greeting workflow"))
.body("data.ProcessDefinitions[0].version", is("1.0"))
- .body("data.ProcessDefinitions[0].endpoint", is("http://localhost:8080/greet"))
+ .body("data.ProcessDefinitions[0].endpoint", is(not(emptyOrNullString())))
.body("data.ProcessDefinitions[0].addons", hasItem("infinispan-persistence"))
.body("data.ProcessDefinitions[0].source", is(not(emptyOrNullString())))
.body("data.ProcessDefinitions[0].nodes.size()", is(12))
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/pom.xml
index 449f50d00c..b30f334c50 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/runtime/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/runtime/pom.xml
index 423eec8f86..2015f5933e 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/runtime/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/runtime/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/runtime/src/main/resources/META-INF/hotrod-client.properties b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/runtime/src/main/resources/META-INF/hotrod-client.properties
index ed23c02c1a..03bfa85f8f 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/runtime/src/main/resources/META-INF/hotrod-client.properties
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/runtime/src/main/resources/META-INF/hotrod-client.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Docker 4 Mac workaround
# infinispan.client.hotrod.client_intelligence=BASIC
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/runtime/src/main/resources/META-INF/quarkus-extension.yaml
index e647d5855d..f128cd3d65 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/runtime/src/main/resources/META-INF/quarkus-extension.yaml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
name: Kogito Addons Quarkus Data Index Persistence Infinispan
description: Kogito Data Index Persistence Infinispan Add-On
metadata:
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/runtime/src/main/resources/application.properties b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/runtime/src/main/resources/application.properties
index 75cf6d17dc..6db7c08ae0 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/runtime/src/main/resources/application.properties
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/runtime/src/main/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
quarkus.qute.property-not-found-strategy=default
quarkus.qute.strict-rendering=false
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/runtime/src/main/resources/templates/kogito-cache-default.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/runtime/src/main/resources/templates/kogito-cache-default.xml
index 3d69eb35d8..8fea9fc6db 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/runtime/src/main/resources/templates/kogito-cache-default.xml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-infinispan/runtime/src/main/resources/templates/kogito-cache-default.xml
@@ -1,3 +1,23 @@
+
{#let template=config:property('kogito.cache.domain.template')}
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/deployment/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/deployment/pom.xml
index 0575370af4..c8b66d8791 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/deployment/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/deployment/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/MongoDataIndexPersistenceProcessor.java b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/MongoDataIndexPersistenceProcessor.java
index 8a152d857f..23cf37e6b1 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/MongoDataIndexPersistenceProcessor.java
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/MongoDataIndexPersistenceProcessor.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.addons.quarkus.data.index.persistence.deployment;
import org.kie.kogito.index.mongodb.model.ProcessDefinitionEntity;
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-process/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-process/pom.xml
index 9deb641f74..89dc1c37f6 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-process/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-process/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-process/src/main/resources/application.properties b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-process/src/main/resources/application.properties
index ebf86e7b1f..34d50644cf 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-process/src/main/resources/application.properties
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-process/src/main/resources/application.properties
@@ -1,7 +1,31 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
kogito.persistence.type=mongodb
kogito.service.url=http://localhost:8080
# MongoDB
quarkus.mongodb.database=kogito
-quarkus.devservices.enabled=false
\ No newline at end of file
+quarkus.devservices.enabled=false
+
+# Security
+quarkus.oidc.enabled=false
+quarkus.oidc.tenant-enabled=false
+quarkus.oidc.auth-server-url=none
\ No newline at end of file
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/MongoQuarkusAddonDataIndexPersistenceIT.java b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/MongoQuarkusAddonDataIndexPersistenceIT.java
index 2b6bf13a05..cd1e5bad7b 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/MongoQuarkusAddonDataIndexPersistenceIT.java
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/MongoQuarkusAddonDataIndexPersistenceIT.java
@@ -1,23 +1,26 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.addons.quarkus.data.index.it;
import org.junit.jupiter.api.Test;
import org.kie.kogito.index.test.quarkus.http.DataIndexMongoDBHttpQuarkusTestResource;
+import org.kie.kogito.index.test.quarkus.http.KogitoServiceRandomPortQuarkusHttpTestResource;
import org.kie.kogito.test.quarkus.QuarkusTestProperty;
import io.quarkus.test.common.QuarkusTestResource;
@@ -36,6 +39,7 @@
@QuarkusIntegrationTest
@QuarkusTestResource(DataIndexMongoDBHttpQuarkusTestResource.class)
+@QuarkusTestResource(value = KogitoServiceRandomPortQuarkusHttpTestResource.class)
class MongoQuarkusAddonDataIndexPersistenceIT {
static {
@@ -55,7 +59,7 @@ void testDataIndexAddon() {
.body("data.ProcessDefinitions[0].id", is("hello"))
.body("data.ProcessDefinitions[0].name", is("hello"))
.body("data.ProcessDefinitions[0].version", is("1.0"))
- .body("data.ProcessDefinitions[0].endpoint", is("http://localhost:8080/hello"))
+ .body("data.ProcessDefinitions[0].endpoint", is(not(emptyOrNullString())))
.body("data.ProcessDefinitions[0].addons", hasItem("mongodb-persistence"))
.body("data.ProcessDefinitions[0].source", is(not(emptyOrNullString())))
.body("data.ProcessDefinitions[0].nodes.size()", is(2))
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-sw/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-sw/pom.xml
index 9b3490d5fb..217920aec8 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-sw/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-sw/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-sw/src/main/resources/application.properties b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-sw/src/main/resources/application.properties
index ebf86e7b1f..34d50644cf 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-sw/src/main/resources/application.properties
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-sw/src/main/resources/application.properties
@@ -1,7 +1,31 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
kogito.persistence.type=mongodb
kogito.service.url=http://localhost:8080
# MongoDB
quarkus.mongodb.database=kogito
-quarkus.devservices.enabled=false
\ No newline at end of file
+quarkus.devservices.enabled=false
+
+# Security
+quarkus.oidc.enabled=false
+quarkus.oidc.tenant-enabled=false
+quarkus.oidc.auth-server-url=none
\ No newline at end of file
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/MongoQuarkusAddonDataIndexPersistenceIT.java b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/MongoQuarkusAddonDataIndexPersistenceIT.java
index 9f5e043543..12c95e8117 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/MongoQuarkusAddonDataIndexPersistenceIT.java
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/MongoQuarkusAddonDataIndexPersistenceIT.java
@@ -1,23 +1,26 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.addons.quarkus.data.index.it;
import org.junit.jupiter.api.Test;
import org.kie.kogito.index.test.quarkus.http.DataIndexMongoDBHttpQuarkusTestResource;
+import org.kie.kogito.index.test.quarkus.http.KogitoServiceRandomPortQuarkusHttpTestResource;
import org.kie.kogito.test.quarkus.QuarkusTestProperty;
import io.quarkus.test.common.QuarkusTestResource;
@@ -37,6 +40,7 @@
@QuarkusIntegrationTest
@QuarkusTestResource(DataIndexMongoDBHttpQuarkusTestResource.class)
+@QuarkusTestResource(value = KogitoServiceRandomPortQuarkusHttpTestResource.class)
class MongoQuarkusAddonDataIndexPersistenceIT {
static {
@@ -56,7 +60,7 @@ void testDataIndexAddon() {
.body("data.ProcessDefinitions[0].id", is("greet"))
.body("data.ProcessDefinitions[0].name", is("Greeting workflow"))
.body("data.ProcessDefinitions[0].version", is("1.0"))
- .body("data.ProcessDefinitions[0].endpoint", is("http://localhost:8080/greet"))
+ .body("data.ProcessDefinitions[0].endpoint", is(not(emptyOrNullString())))
.body("data.ProcessDefinitions[0].addons", hasItem("mongodb-persistence"))
.body("data.ProcessDefinitions[0].source", is(not(emptyOrNullString())))
.body("data.ProcessDefinitions[0].nodes.size()", is(12))
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/pom.xml
index b9299577f4..dcb7893898 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/runtime/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/runtime/pom.xml
index 56f0defaf7..248216ef87 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/runtime/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/runtime/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/runtime/src/main/resources/META-INF/quarkus-extension.yaml
index 6fa0a2e1e2..4889d304d8 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/runtime/src/main/resources/META-INF/quarkus-extension.yaml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
name: Kogito Addons Quarkus Data Index Persistence MongoDB
description: Kogito Data Index Persistence MongoDB Add-On
metadata:
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/runtime/src/main/resources/application.properties b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/runtime/src/main/resources/application.properties
index 8eb5c97876..bc7ef3e84d 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/runtime/src/main/resources/application.properties
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-mongodb/runtime/src/main/resources/application.properties
@@ -1,2 +1,21 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
#Data Index
kogito.apps.persistence.type=mongodb
\ No newline at end of file
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/deployment/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/deployment/pom.xml
index a735b0d8a8..3cb55ca2a0 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/deployment/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/deployment/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/PostgreSQLDataIndexPersistenceProcessor.java b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/PostgreSQLDataIndexPersistenceProcessor.java
index f59a2d5479..4dc33512e9 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/PostgreSQLDataIndexPersistenceProcessor.java
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/persistence/deployment/PostgreSQLDataIndexPersistenceProcessor.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.addons.quarkus.data.index.persistence.deployment;
import io.quarkus.deployment.annotations.BuildProducer;
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/pom.xml
index 591a82fd16..3de0726e4e 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/src/main/resources/application.properties b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/src/main/resources/application.properties
index 8e8e2ecf39..0041b31ee4 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/src/main/resources/application.properties
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/src/main/resources/application.properties
@@ -1,9 +1,33 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
kogito.persistence.type=jdbc
-kogito.service.url=http://localhost:8080
+kogito.service.url=http://localhost:${quarkus.http.port}
quarkus.flyway.migrate-at-start=true
quarkus.flyway.baseline-on-migrate=true
quarkus.datasource.db-kind=postgresql
-quarkus.devservices.enabled=false
\ No newline at end of file
+quarkus.devservices.enabled=false
+
+# Security
+quarkus.oidc.enabled=false
+quarkus.oidc.tenant-enabled=false
+quarkus.oidc.auth-server-url=none
\ No newline at end of file
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusAddonDataIndexPersistenceIT.java b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusAddonDataIndexPersistenceIT.java
index c8af346d97..f45b83f670 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusAddonDataIndexPersistenceIT.java
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusAddonDataIndexPersistenceIT.java
@@ -1,23 +1,26 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.addons.quarkus.data.index.it;
import org.junit.jupiter.api.Test;
import org.kie.kogito.index.test.quarkus.http.DataIndexPostgreSqlHttpQuarkusTestResource;
+import org.kie.kogito.index.test.quarkus.http.KogitoServiceRandomPortQuarkusHttpTestResource;
import org.kie.kogito.test.quarkus.QuarkusTestProperty;
import io.quarkus.test.common.QuarkusTestResource;
@@ -38,6 +41,7 @@
@QuarkusIntegrationTest
@QuarkusTestResource(value = DataIndexPostgreSqlHttpQuarkusTestResource.class, initArgs = { @ResourceArg(name = DATA_INDEX_MIGRATE_DB, value = "false") })
+@QuarkusTestResource(value = KogitoServiceRandomPortQuarkusHttpTestResource.class)
class PostgreSQLQuarkusAddonDataIndexPersistenceIT {
static {
@@ -49,15 +53,17 @@ class PostgreSQLQuarkusAddonDataIndexPersistenceIT {
@Test
void testDataIndexAddon() {
+ String processDefId = "hello";
given().contentType(ContentType.JSON)
.baseUri(dataIndex)
- .body("{ \"query\" : \"{ ProcessDefinitions{ id, name, version, endpoint, addons, source, nodes { id, name, type, uniqueId, metadata { UniqueId } } } }\" }")
+ .body("{ \"query\" : \"{ ProcessDefinitions (where: { id: {equal: \\\"" + processDefId
+ + "\\\"}}){ id, name, version, endpoint, addons, source, nodes { id, name, type, uniqueId, metadata { UniqueId } } } }\" }")
.when().post("/graphql")
.then().log().ifValidationFails().statusCode(200)
.body("data.ProcessDefinitions[0].id", is("hello"))
.body("data.ProcessDefinitions[0].name", is("hello"))
.body("data.ProcessDefinitions[0].version", is("1.0"))
- .body("data.ProcessDefinitions[0].endpoint", is("http://localhost:8080/hello"))
+ .body("data.ProcessDefinitions[0].endpoint", is(not(emptyOrNullString())))
.body("data.ProcessDefinitions[0].addons", hasItem("jdbc-persistence"))
.body("data.ProcessDefinitions[0].source", is(not(emptyOrNullString())))
.body("data.ProcessDefinitions[0].nodes.size()", is(2))
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-sw/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-sw/pom.xml
index 754362298d..f35da27607 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-sw/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-sw/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
@@ -31,6 +51,10 @@
org.kie.kogito
kogito-addons-quarkus-persistence-jdbc
+
+ org.kie.kogito
+ kogito-addons-quarkus-source-files
+
io.quarkus
quarkus-agroal
@@ -44,6 +68,10 @@
data-index-test-utils
test
+
+ org.kie.kogito
+ kogito-test-utils
+
org.assertj
assertj-core
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-sw/src/main/resources/application.properties b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-sw/src/main/resources/application.properties
index 8e8e2ecf39..b1ee569ad1 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-sw/src/main/resources/application.properties
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-sw/src/main/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
kogito.persistence.type=jdbc
kogito.service.url=http://localhost:8080
@@ -6,4 +25,9 @@ quarkus.flyway.baseline-on-migrate=true
quarkus.datasource.db-kind=postgresql
-quarkus.devservices.enabled=false
\ No newline at end of file
+quarkus.devservices.enabled=false
+
+# Security
+quarkus.oidc.enabled=false
+quarkus.oidc.tenant-enabled=false
+quarkus.oidc.auth-server-url=none
\ No newline at end of file
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusAddonDataIndexPersistenceIT.java b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusAddonDataIndexPersistenceIT.java
index 41fda510ca..c0857d9510 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusAddonDataIndexPersistenceIT.java
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusAddonDataIndexPersistenceIT.java
@@ -1,28 +1,31 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.addons.quarkus.data.index.it;
import org.junit.jupiter.api.Test;
import org.kie.kogito.index.test.quarkus.http.DataIndexPostgreSqlHttpQuarkusTestResource;
+import org.kie.kogito.index.test.quarkus.http.KogitoServiceRandomPortQuarkusHttpTestResource;
import org.kie.kogito.test.quarkus.QuarkusTestProperty;
import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.common.ResourceArg;
-import io.quarkus.test.junit.QuarkusIntegrationTest;
+import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
import io.restassured.http.ContentType;
import io.restassured.path.json.JsonPath;
@@ -37,8 +40,9 @@
import static org.kie.kogito.index.test.Constants.KOGITO_DATA_INDEX_SERVICE_URL;
import static org.kie.kogito.index.test.quarkus.http.DataIndexPostgreSqlHttpQuarkusTestResource.DATA_INDEX_MIGRATE_DB;
-@QuarkusIntegrationTest
+@QuarkusTest
@QuarkusTestResource(value = DataIndexPostgreSqlHttpQuarkusTestResource.class, initArgs = { @ResourceArg(name = DATA_INDEX_MIGRATE_DB, value = "false") })
+@QuarkusTestResource(value = KogitoServiceRandomPortQuarkusHttpTestResource.class)
class PostgreSQLQuarkusAddonDataIndexPersistenceIT {
static {
@@ -50,15 +54,19 @@ class PostgreSQLQuarkusAddonDataIndexPersistenceIT {
@Test
void testDataIndexAddon() {
+ Integer port = RestAssured.port;
+
+ String processDefId = "greet";
String source = given().contentType(ContentType.JSON)
.baseUri(dataIndex)
- .body("{ \"query\" : \"{ ProcessDefinitions{ id, name, version, endpoint, addons, source, nodes { id, name, type, uniqueId, metadata { UniqueId } } } }\" }")
+ .body("{ \"query\" : \"{ ProcessDefinitions(where: { id: {equal: \\\"" + processDefId
+ + "\\\"}}){ id, name, version, endpoint, addons, source, nodes { id, name, type, uniqueId, metadata { UniqueId } } } }\" }")
.when().post("/graphql")
.then().log().ifValidationFails().statusCode(200)
.body("data.ProcessDefinitions[0].id", is("greet"))
.body("data.ProcessDefinitions[0].name", is("Greeting workflow"))
.body("data.ProcessDefinitions[0].version", is("1.0"))
- .body("data.ProcessDefinitions[0].endpoint", is("http://localhost:8080/greet"))
+ .body("data.ProcessDefinitions[0].endpoint", is(not(emptyOrNullString())))
.body("data.ProcessDefinitions[0].addons", hasItem("jdbc-persistence"))
.body("data.ProcessDefinitions[0].source", is(not(emptyOrNullString())))
.body("data.ProcessDefinitions[0].nodes.size()", is(12))
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/pom.xml
index ad03ba3520..6c5e8a3b79 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/runtime/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/runtime/pom.xml
index d8a4799960..7e495b4f6f 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/runtime/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/runtime/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/runtime/src/main/resources/META-INF/quarkus-extension.yaml
index e587f845dd..bcdc2b21be 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/runtime/src/main/resources/META-INF/quarkus-extension.yaml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
name: Kogito Addons Quarkus Data Index Persistence PostgreSQL
description: Kogito Data Index Persistence PostgreSQL Add-On
metadata:
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/runtime/src/main/resources/application.properties b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/runtime/src/main/resources/application.properties
index 6b647a231a..087f52897a 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/runtime/src/main/resources/application.properties
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/kogito-addons-quarkus-data-index-persistence-postgresql/runtime/src/main/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
#Data Index
kogito.apps.persistence.type=postgresql
@@ -7,5 +26,5 @@ quarkus.datasource.db-kind=postgresql
#Hibernate
quarkus.hibernate-orm.jdbc.timezone=UTC
quarkus.hibernate-orm.physical-naming-strategy=org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy
-
-quarkus.flyway.locations=classpath:db/migration
\ No newline at end of file
+quarkus.flyway.locations=classpath:db/migration
+quarkus.flyway.repair-at-start=true
\ No newline at end of file
diff --git a/data-index/kogito-addons-quarkus-data-index-persistence/pom.xml b/data-index/kogito-addons-quarkus-data-index-persistence/pom.xml
index 2f7903a121..68ffe9a4eb 100644
--- a/data-index/kogito-addons-quarkus-data-index-persistence/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index-persistence/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/deployment/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/deployment/pom.xml
index a21102534f..4aad85a945 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/deployment/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/deployment/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
@@ -22,6 +42,10 @@
org.kie.kogito
kogito-addons-quarkus-data-index-persistence-common-deployment
+
+ io.quarkus
+ quarkus-smallrye-fault-tolerance-deployment
+
org.kie.kogito
kogito-addons-quarkus-data-index-common-runtime
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/AbstractKogitoAddonsQuarkusDataIndexProcessor.java b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/AbstractKogitoAddonsQuarkusDataIndexProcessor.java
index dde8b38f96..cda0bbdbb6 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/AbstractKogitoAddonsQuarkusDataIndexProcessor.java
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/AbstractKogitoAddonsQuarkusDataIndexProcessor.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.addons.quarkus.data.index.deployment;
import org.jboss.jandex.DotName;
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/pom.xml
index 7669cc9a55..87e3aa909e 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/pom.xml
index afaadc30bb..43cbbd3c1a 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/config/DataIndexBuildConfig.java b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/config/DataIndexBuildConfig.java
index d83b42c359..a5385ac669 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/config/DataIndexBuildConfig.java
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/config/DataIndexBuildConfig.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.addon.config;
import io.quarkus.runtime.annotations.ConfigItem;
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/config/DataIndexRuntimeConfig.java b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/config/DataIndexRuntimeConfig.java
index becc6a7781..aed72e1eb9 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/config/DataIndexRuntimeConfig.java
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/config/DataIndexRuntimeConfig.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.addon.config;
import java.util.Optional;
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/config/DataIndexUIClientRuntimeConfig.java b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/config/DataIndexUIClientRuntimeConfig.java
index 39bf898ed7..09c75923f7 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/config/DataIndexUIClientRuntimeConfig.java
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/config/DataIndexUIClientRuntimeConfig.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.index.addon.config;
import io.quarkus.runtime.annotations.ConfigItem;
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/graphql/GraphQLAddonSchemaManagerImpl.java b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/graphql/GraphQLAddonSchemaManagerImpl.java
index 8ec4f67ed6..33b10f4523 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/graphql/GraphQLAddonSchemaManagerImpl.java
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/graphql/GraphQLAddonSchemaManagerImpl.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.addon.graphql;
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/vertx/VertxGraphiQLSetup.java b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/vertx/VertxGraphiQLSetup.java
index f93b4ce3f2..29ab0a1d8a 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/vertx/VertxGraphiQLSetup.java
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/java/org/kie/kogito/index/addon/vertx/VertxGraphiQLSetup.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.index.addon.vertx;
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/resources/META-INF/beans.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/resources/META-INF/beans.xml
index e69de29bb2..a0eb9fbf8c 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/resources/META-INF/beans.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-common/runtime/src/main/resources/META-INF/beans.xml
@@ -0,0 +1,20 @@
+
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/deployment/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/deployment/pom.xml
index 5d25a8d570..ac9c148914 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/deployment/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/deployment/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/InfinispanDataIndexProcessor.java b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/InfinispanDataIndexProcessor.java
index b6219a9d5e..0fc6070abd 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/InfinispanDataIndexProcessor.java
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/InfinispanDataIndexProcessor.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.addons.quarkus.data.index.deployment;
import io.quarkus.deployment.annotations.BuildStep;
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/deployment/src/main/resources/dev-templates/dataindex.html b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/deployment/src/main/resources/dev-templates/dataindex.html
index eea31b584b..c121df7858 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/deployment/src/main/resources/dev-templates/dataindex.html
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/deployment/src/main/resources/dev-templates/dataindex.html
@@ -1,16 +1,32 @@
-{#include main fluid=true}
-{#style}
-.main-container {
- margin: 0;
- padding: 0;
-}
-{/style}
-{#title}Data Index GraphQL UI{/title}
-{#body}
+
+{#include main fluid=true} {#style} .main-container { margin: 0; padding: 0; }
+{/style} {#title}Data Index GraphQL UI{/title} {#body}
-{/body}
-{/include}
\ No newline at end of file
+{/body} {/include}
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/deployment/src/main/resources/dev-templates/embedded.html b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/deployment/src/main/resources/dev-templates/embedded.html
index cc7a241e02..09553d5f19 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/deployment/src/main/resources/dev-templates/embedded.html
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/deployment/src/main/resources/dev-templates/embedded.html
@@ -1,4 +1,24 @@
+
-
- Data Index GraphQL UI
-
\ No newline at end of file
+
+ Data Index GraphQL UI
+
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-process/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-process/pom.xml
index f34efb1501..e887894a38 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-process/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-process/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-process/src/main/resources/application.properties b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-process/src/main/resources/application.properties
index a247c8061f..46a76d7e35 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-process/src/main/resources/application.properties
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-process/src/main/resources/application.properties
@@ -1,3 +1,29 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
kogito.persistence.type=infinispan
-quarkus.kogito.data-index.graphql.ui.always-include=true
\ No newline at end of file
+quarkus.kogito.data-index.graphql.ui.always-include=true
+# Not using Keycloak Dev service in test
+quarkus.keycloak.devservices.enabled=false
+
+# Security
+quarkus.oidc.enabled=false
+quarkus.oidc.tenant-enabled=false
+quarkus.oidc.auth-server-url=none
\ No newline at end of file
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/InfinispanQuarkusAddonDataIndexIT.java b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/InfinispanQuarkusAddonDataIndexIT.java
index e59d8fc972..9efaaa9e13 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/InfinispanQuarkusAddonDataIndexIT.java
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/InfinispanQuarkusAddonDataIndexIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.addons.quarkus.data.index.it;
import org.junit.jupiter.api.Test;
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-sw/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-sw/pom.xml
index 45705a4218..f74ba06e56 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-sw/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-sw/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-sw/src/main/resources/application.properties b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-sw/src/main/resources/application.properties
index a247c8061f..46a76d7e35 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-sw/src/main/resources/application.properties
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-sw/src/main/resources/application.properties
@@ -1,3 +1,29 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
kogito.persistence.type=infinispan
-quarkus.kogito.data-index.graphql.ui.always-include=true
\ No newline at end of file
+quarkus.kogito.data-index.graphql.ui.always-include=true
+# Not using Keycloak Dev service in test
+quarkus.keycloak.devservices.enabled=false
+
+# Security
+quarkus.oidc.enabled=false
+quarkus.oidc.tenant-enabled=false
+quarkus.oidc.auth-server-url=none
\ No newline at end of file
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/InfinispanQuarkusAddonDataIndexIT.java b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/InfinispanQuarkusAddonDataIndexIT.java
index 5bf66c83b7..1e6eac629c 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/InfinispanQuarkusAddonDataIndexIT.java
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/InfinispanQuarkusAddonDataIndexIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.addons.quarkus.data.index.it;
import org.junit.jupiter.api.Test;
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/pom.xml
index a6f6299562..7d74daf5bf 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/runtime/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/runtime/pom.xml
index 2a2f40af4a..f0bf79556c 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/runtime/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/runtime/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/runtime/src/main/resources/META-INF/quarkus-extension.yaml
index bdbdadb4de..c7eab06352 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/runtime/src/main/resources/META-INF/quarkus-extension.yaml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-infinispan/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
name: Kogito Addons Quarkus Data Index Infinispan
description: Kogito Data Index Infinispan Add-On
metadata:
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/deployment/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/deployment/pom.xml
index 7694ed5beb..7328c77467 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/deployment/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/deployment/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/InMemoryDataIndexProcessor.java b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/InMemoryDataIndexProcessor.java
index bbea5a5c1f..3290dee299 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/InMemoryDataIndexProcessor.java
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/InMemoryDataIndexProcessor.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.addons.quarkus.data.index.deployment;
import io.quarkus.deployment.annotations.BuildProducer;
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/deployment/src/main/resources/dev-templates/dataindex.html b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/deployment/src/main/resources/dev-templates/dataindex.html
index eea31b584b..c121df7858 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/deployment/src/main/resources/dev-templates/dataindex.html
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/deployment/src/main/resources/dev-templates/dataindex.html
@@ -1,16 +1,32 @@
-{#include main fluid=true}
-{#style}
-.main-container {
- margin: 0;
- padding: 0;
-}
-{/style}
-{#title}Data Index GraphQL UI{/title}
-{#body}
+
+{#include main fluid=true} {#style} .main-container { margin: 0; padding: 0; }
+{/style} {#title}Data Index GraphQL UI{/title} {#body}
-{/body}
-{/include}
\ No newline at end of file
+{/body} {/include}
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/deployment/src/main/resources/dev-templates/embedded.html b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/deployment/src/main/resources/dev-templates/embedded.html
index cc7a241e02..09553d5f19 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/deployment/src/main/resources/dev-templates/embedded.html
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/deployment/src/main/resources/dev-templates/embedded.html
@@ -1,4 +1,24 @@
+
-
- Data Index GraphQL UI
-
\ No newline at end of file
+
+ Data Index GraphQL UI
+
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-process/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-process/pom.xml
index b7bfc2c368..2592adea2d 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-process/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-process/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-process/src/main/resources/application.properties b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-process/src/main/resources/application.properties
index b111c27b59..77ec1076d1 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-process/src/main/resources/application.properties
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-process/src/main/resources/application.properties
@@ -1 +1,27 @@
-quarkus.kogito.data-index.graphql.ui.always-include=true
\ No newline at end of file
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+quarkus.kogito.data-index.graphql.ui.always-include=true
+# Not using Keycloak Dev service in test
+quarkus.keycloak.devservices.enabled=false
+
+# Security
+quarkus.oidc.enabled=false
+quarkus.oidc.tenant-enabled=false
+quarkus.oidc.auth-server-url=none
\ No newline at end of file
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/InMemoryQuarkusAddonDataIndexIT.java b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/InMemoryQuarkusAddonDataIndexIT.java
index 5aa9229e97..2cb3475e73 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/InMemoryQuarkusAddonDataIndexIT.java
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/InMemoryQuarkusAddonDataIndexIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.addons.quarkus.data.index.it;
import org.junit.jupiter.api.Test;
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-sw/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-sw/pom.xml
index 6c120fcad4..bf3f3a7d86 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-sw/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-sw/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-sw/src/main/resources/application.properties b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-sw/src/main/resources/application.properties
index b111c27b59..77ec1076d1 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-sw/src/main/resources/application.properties
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-sw/src/main/resources/application.properties
@@ -1 +1,27 @@
-quarkus.kogito.data-index.graphql.ui.always-include=true
\ No newline at end of file
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+quarkus.kogito.data-index.graphql.ui.always-include=true
+# Not using Keycloak Dev service in test
+quarkus.keycloak.devservices.enabled=false
+
+# Security
+quarkus.oidc.enabled=false
+quarkus.oidc.tenant-enabled=false
+quarkus.oidc.auth-server-url=none
\ No newline at end of file
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/InMemoryQuarkusAddonDataIndexIT.java b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/InMemoryQuarkusAddonDataIndexIT.java
index e48b742e72..dcc1f26b70 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/InMemoryQuarkusAddonDataIndexIT.java
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/InMemoryQuarkusAddonDataIndexIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.addons.quarkus.data.index.it;
import org.junit.jupiter.api.Test;
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/pom.xml
index 7dc26b852d..f7b9574696 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/runtime/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/runtime/pom.xml
index 3c9371e854..8f34b531aa 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/runtime/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/runtime/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/runtime/src/main/resources/META-INF/quarkus-extension.yaml
index 4e218c7502..81daebd833 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/runtime/src/main/resources/META-INF/quarkus-extension.yaml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
name: Kogito Addons Quarkus Data Index In-memory
description: Kogito Data Index In-memory Add-On
metadata:
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/runtime/src/main/resources/application.properties b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/runtime/src/main/resources/application.properties
index 3544e58cb0..587a8cf10c 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/runtime/src/main/resources/application.properties
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-inmemory/runtime/src/main/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
#Data Index
kogito.apps.persistence.type=postgresql
kogito.data-index.domain-indexing=false
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/deployment/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/deployment/pom.xml
index 0ed4623487..fb30219c39 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/deployment/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/deployment/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/MongoDataIndexProcessor.java b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/MongoDataIndexProcessor.java
index d724534128..ce6bfb77de 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/MongoDataIndexProcessor.java
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/MongoDataIndexProcessor.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.addons.quarkus.data.index.deployment;
import io.quarkus.deployment.annotations.BuildStep;
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/deployment/src/main/resources/dev-templates/dataindex.html b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/deployment/src/main/resources/dev-templates/dataindex.html
index eea31b584b..c121df7858 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/deployment/src/main/resources/dev-templates/dataindex.html
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/deployment/src/main/resources/dev-templates/dataindex.html
@@ -1,16 +1,32 @@
-{#include main fluid=true}
-{#style}
-.main-container {
- margin: 0;
- padding: 0;
-}
-{/style}
-{#title}Data Index GraphQL UI{/title}
-{#body}
+
+{#include main fluid=true} {#style} .main-container { margin: 0; padding: 0; }
+{/style} {#title}Data Index GraphQL UI{/title} {#body}
-{/body}
-{/include}
\ No newline at end of file
+{/body} {/include}
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/deployment/src/main/resources/dev-templates/embedded.html b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/deployment/src/main/resources/dev-templates/embedded.html
index cc7a241e02..09553d5f19 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/deployment/src/main/resources/dev-templates/embedded.html
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/deployment/src/main/resources/dev-templates/embedded.html
@@ -1,4 +1,24 @@
+
-
- Data Index GraphQL UI
-
\ No newline at end of file
+
+ Data Index GraphQL UI
+
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-process/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-process/pom.xml
index dfbb6f39b9..cfec10de2c 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-process/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-process/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-process/src/main/resources/application.properties b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-process/src/main/resources/application.properties
index 8e215c2eed..1e9d0ed64a 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-process/src/main/resources/application.properties
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-process/src/main/resources/application.properties
@@ -1,5 +1,31 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
kogito.persistence.type=mongodb
quarkus.kogito.data-index.graphql.ui.always-include=true
# MongoDB
-quarkus.mongodb.database=kogito
\ No newline at end of file
+quarkus.mongodb.database=kogito
+# Not using Keycloak Dev service in test
+quarkus.keycloak.devservices.enabled=false
+
+# Security
+quarkus.oidc.enabled=false
+quarkus.oidc.tenant-enabled=false
+quarkus.oidc.auth-server-url=none
\ No newline at end of file
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/MongoQuarkusAddonDataIndexIT.java b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/MongoQuarkusAddonDataIndexIT.java
index 16ab87bbe1..6b6e309c96 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/MongoQuarkusAddonDataIndexIT.java
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/MongoQuarkusAddonDataIndexIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.addons.quarkus.data.index.it;
import org.junit.jupiter.api.Test;
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-sw/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-sw/pom.xml
index 0001c4ea1a..af59ab74ff 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-sw/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-sw/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-sw/src/main/resources/application.properties b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-sw/src/main/resources/application.properties
index 8e215c2eed..1e9d0ed64a 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-sw/src/main/resources/application.properties
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-sw/src/main/resources/application.properties
@@ -1,5 +1,31 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
kogito.persistence.type=mongodb
quarkus.kogito.data-index.graphql.ui.always-include=true
# MongoDB
-quarkus.mongodb.database=kogito
\ No newline at end of file
+quarkus.mongodb.database=kogito
+# Not using Keycloak Dev service in test
+quarkus.keycloak.devservices.enabled=false
+
+# Security
+quarkus.oidc.enabled=false
+quarkus.oidc.tenant-enabled=false
+quarkus.oidc.auth-server-url=none
\ No newline at end of file
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/MongoQuarkusAddonDataIndexIT.java b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/MongoQuarkusAddonDataIndexIT.java
index 6e4370ad7a..ae4134894b 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/MongoQuarkusAddonDataIndexIT.java
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/MongoQuarkusAddonDataIndexIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.addons.quarkus.data.index.it;
import org.junit.jupiter.api.Test;
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/pom.xml
index de1658a77f..4620895c92 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/runtime/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/runtime/pom.xml
index 49b7fada24..bca58f0347 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/runtime/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/runtime/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/runtime/src/main/resources/META-INF/quarkus-extension.yaml
index d65194a8c7..e04f00a450 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/runtime/src/main/resources/META-INF/quarkus-extension.yaml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
name: Kogito Addons Quarkus Data Index MongoDB
description: Kogito Data Index MongoDB Add-On
metadata:
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/runtime/src/main/resources/application.properties b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/runtime/src/main/resources/application.properties
index 8eb5c97876..bc7ef3e84d 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/runtime/src/main/resources/application.properties
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-mongodb/runtime/src/main/resources/application.properties
@@ -1,2 +1,21 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
#Data Index
kogito.apps.persistence.type=mongodb
\ No newline at end of file
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/deployment/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/deployment/pom.xml
index 4b4e861810..d3deaf0b6e 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/deployment/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/deployment/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/PostgreSQLDataIndexProcessor.java b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/PostgreSQLDataIndexProcessor.java
index f56793ed7c..31e077e7ea 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/PostgreSQLDataIndexProcessor.java
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/deployment/src/main/java/org/kie/kogito/addons/quarkus/data/index/deployment/PostgreSQLDataIndexProcessor.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.addons.quarkus.data.index.deployment;
import io.quarkus.deployment.annotations.BuildStep;
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/deployment/src/main/resources/dev-templates/dataindex.html b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/deployment/src/main/resources/dev-templates/dataindex.html
index eea31b584b..c121df7858 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/deployment/src/main/resources/dev-templates/dataindex.html
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/deployment/src/main/resources/dev-templates/dataindex.html
@@ -1,16 +1,32 @@
-{#include main fluid=true}
-{#style}
-.main-container {
- margin: 0;
- padding: 0;
-}
-{/style}
-{#title}Data Index GraphQL UI{/title}
-{#body}
+
+{#include main fluid=true} {#style} .main-container { margin: 0; padding: 0; }
+{/style} {#title}Data Index GraphQL UI{/title} {#body}
-{/body}
-{/include}
\ No newline at end of file
+{/body} {/include}
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/deployment/src/main/resources/dev-templates/embedded.html b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/deployment/src/main/resources/dev-templates/embedded.html
index cc7a241e02..09553d5f19 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/deployment/src/main/resources/dev-templates/embedded.html
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/deployment/src/main/resources/dev-templates/embedded.html
@@ -1,4 +1,24 @@
+
-
- Data Index GraphQL UI
-
\ No newline at end of file
+
+ Data Index GraphQL UI
+
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-process/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-process/pom.xml
index 8e27f86341..c7ce503ead 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-process/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-process/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-process/src/main/resources/application.properties b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-process/src/main/resources/application.properties
index 115d80eed3..6f4c0f96ca 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-process/src/main/resources/application.properties
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-process/src/main/resources/application.properties
@@ -1,6 +1,32 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
kogito.persistence.type=jdbc
quarkus.flyway.migrate-at-start=true
quarkus.kogito.data-index.graphql.ui.always-include=true
quarkus.datasource.db-kind=postgresql
+# Not using Keycloak Dev service in test
+quarkus.keycloak.devservices.enabled=false
+
+# Security
+quarkus.oidc.enabled=false
+quarkus.oidc.tenant-enabled=false
+quarkus.oidc.auth-server-url=none
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusAddonDataIndexIT.java b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusAddonDataIndexIT.java
index 34219bd0b6..0ad49c47b7 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusAddonDataIndexIT.java
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-process/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusAddonDataIndexIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2023 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.addons.quarkus.data.index.it;
import org.junit.jupiter.api.Test;
@@ -36,7 +38,9 @@ class PostgreSQLQuarkusAddonDataIndexIT {
@Test
void testDataIndexAddon() {
- given().contentType(ContentType.JSON).body("{ \"query\" : \"{ProcessDefinitions{ id, version, name } }\" }")
+ String processDefId = "hello";
+ given().contentType(ContentType.JSON).body("{ \"query\" : \"{ProcessDefinitions(where: { id: {equal: \\\"" + processDefId +
+ "\\\"}}){ id, version, name } }\" }")
.when().post("/graphql")
.then().statusCode(200)
.body("data.ProcessDefinitions.size()", is(1))
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-sw/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-sw/pom.xml
index 7b7e71a70d..4f5ec35d9a 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-sw/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-sw/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-sw/src/main/resources/application.properties b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-sw/src/main/resources/application.properties
index 115d80eed3..6f4c0f96ca 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-sw/src/main/resources/application.properties
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-sw/src/main/resources/application.properties
@@ -1,6 +1,32 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
kogito.persistence.type=jdbc
quarkus.flyway.migrate-at-start=true
quarkus.kogito.data-index.graphql.ui.always-include=true
quarkus.datasource.db-kind=postgresql
+# Not using Keycloak Dev service in test
+quarkus.keycloak.devservices.enabled=false
+
+# Security
+quarkus.oidc.enabled=false
+quarkus.oidc.tenant-enabled=false
+quarkus.oidc.auth-server-url=none
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusAddonDataIndexIT.java b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusAddonDataIndexIT.java
index dffb6bdfeb..7259a80f5d 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusAddonDataIndexIT.java
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/integration-tests-sw/src/test/java/org/kie/kogito/addons/quarkus/data/index/it/PostgreSQLQuarkusAddonDataIndexIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.addons.quarkus.data.index.it;
import org.junit.jupiter.api.Test;
@@ -37,7 +39,9 @@ class PostgreSQLQuarkusAddonDataIndexIT {
@Test
void testDataIndexAddon() {
- given().contentType(ContentType.JSON).body("{ \"query\" : \"{ProcessDefinitions{ id, version, name } }\" }")
+ String processDefId = "greet";
+ given().contentType(ContentType.JSON).body("{ \"query\" : \"{ProcessDefinitions(where: { id: {equal: \\\"" + processDefId +
+ "\\\"}}){ id, version, name } }\" }")
.when().post("/graphql")
.then().statusCode(200)
.body("data.ProcessDefinitions.size()", is(1))
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/pom.xml
index e1502a50a6..932832ab6c 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/runtime/pom.xml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/runtime/pom.xml
index df7cf27fa9..db6cb62c9f 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/runtime/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/runtime/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/runtime/src/main/resources/META-INF/quarkus-extension.yaml
index 4c4a9a3fc3..c06bb06e62 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/runtime/src/main/resources/META-INF/quarkus-extension.yaml
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
name: Kogito Addons Quarkus Data Index PostgreSQL
description: Kogito Data Index PostgreSQL Add-On
metadata:
diff --git a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/runtime/src/main/resources/application.properties b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/runtime/src/main/resources/application.properties
index 06b1733993..06fc524aba 100644
--- a/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/runtime/src/main/resources/application.properties
+++ b/data-index/kogito-addons-quarkus-data-index/kogito-addons-quarkus-data-index-postgresql/runtime/src/main/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
#Data Index
kogito.apps.persistence.type=postgresql
kogito.data-index.domain-indexing=false
@@ -9,5 +28,4 @@ quarkus.datasource.db-kind=postgresql
#Hibernate
quarkus.hibernate-orm.jdbc.timezone=UTC
quarkus.hibernate-orm.physical-naming-strategy=org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy
-
quarkus.flyway.locations=classpath:db/migration
\ No newline at end of file
diff --git a/data-index/kogito-addons-quarkus-data-index/pom.xml b/data-index/kogito-addons-quarkus-data-index/pom.xml
index 519857e681..f1890693a7 100644
--- a/data-index/kogito-addons-quarkus-data-index/pom.xml
+++ b/data-index/kogito-addons-quarkus-data-index/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/data-index/pom.xml b/data-index/pom.xml
index f43d362431..a789840f65 100644
--- a/data-index/pom.xml
+++ b/data-index/pom.xml
@@ -1,4 +1,24 @@
+
@@ -24,4 +44,4 @@
kogito-addons-quarkus-data-index
-
\ No newline at end of file
+
diff --git a/explainability/explainability-api/pom.xml b/explainability/explainability-api/pom.xml
index 93ff8f9f20..332e9f8932 100644
--- a/explainability/explainability-api/pom.xml
+++ b/explainability/explainability-api/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/BaseExplainabilityRequest.java b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/BaseExplainabilityRequest.java
index 3f8545317d..d8db183feb 100644
--- a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/BaseExplainabilityRequest.java
+++ b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/BaseExplainabilityRequest.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.api;
diff --git a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/BaseExplainabilityResult.java b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/BaseExplainabilityResult.java
index fbd9b8eeda..1830a5968a 100644
--- a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/BaseExplainabilityResult.java
+++ b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/BaseExplainabilityResult.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.explainability.api;
import java.util.Objects;
diff --git a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualDomain.java b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualDomain.java
index 6b27d181f6..3c97eeda13 100644
--- a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualDomain.java
+++ b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualDomain.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.api;
diff --git a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualDomainCategorical.java b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualDomainCategorical.java
index 90b04c511c..2a13a1a792 100644
--- a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualDomainCategorical.java
+++ b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualDomainCategorical.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.api;
diff --git a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualDomainRange.java b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualDomainRange.java
index b189a93ea9..9b19c33640 100644
--- a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualDomainRange.java
+++ b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualDomainRange.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.api;
diff --git a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualExplainabilityRequest.java b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualExplainabilityRequest.java
index c5ab1a5a71..c35367153e 100644
--- a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualExplainabilityRequest.java
+++ b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualExplainabilityRequest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.explainability.api;
import java.util.Collection;
diff --git a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualExplainabilityResult.java b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualExplainabilityResult.java
index 1a1eb4d00f..38580f1440 100644
--- a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualExplainabilityResult.java
+++ b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualExplainabilityResult.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.explainability.api;
import java.util.Collection;
diff --git a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualSearchDomain.java b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualSearchDomain.java
index cadae35a29..64b15cb313 100644
--- a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualSearchDomain.java
+++ b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualSearchDomain.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.api;
diff --git a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualSearchDomainCollectionValue.java b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualSearchDomainCollectionValue.java
index cb0460897c..a6383c913f 100644
--- a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualSearchDomainCollectionValue.java
+++ b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualSearchDomainCollectionValue.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.api;
diff --git a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualSearchDomainStructureValue.java b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualSearchDomainStructureValue.java
index 93d767e4a7..f894a0fb9d 100644
--- a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualSearchDomainStructureValue.java
+++ b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualSearchDomainStructureValue.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.api;
diff --git a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualSearchDomainUnitValue.java b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualSearchDomainUnitValue.java
index bfe9d131a9..516d211da5 100644
--- a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualSearchDomainUnitValue.java
+++ b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualSearchDomainUnitValue.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.api;
diff --git a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualSearchDomainValue.java b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualSearchDomainValue.java
index cf77f9d9d0..d7cfe490f7 100644
--- a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualSearchDomainValue.java
+++ b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/CounterfactualSearchDomainValue.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.api;
diff --git a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/ExplainabilityStatus.java b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/ExplainabilityStatus.java
index 36c2db87be..8a9f6d414a 100644
--- a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/ExplainabilityStatus.java
+++ b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/ExplainabilityStatus.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.api;
diff --git a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/FeatureImportanceModel.java b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/FeatureImportanceModel.java
index 41cb9ec607..0d42f82bb0 100644
--- a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/FeatureImportanceModel.java
+++ b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/FeatureImportanceModel.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.api;
diff --git a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/HasNameValue.java b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/HasNameValue.java
index b7d688b7f6..75e5ba4fd6 100644
--- a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/HasNameValue.java
+++ b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/HasNameValue.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.api;
diff --git a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/LIMEExplainabilityRequest.java b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/LIMEExplainabilityRequest.java
index 702b94eda2..02f18fc55a 100644
--- a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/LIMEExplainabilityRequest.java
+++ b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/LIMEExplainabilityRequest.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.api;
diff --git a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/LIMEExplainabilityResult.java b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/LIMEExplainabilityResult.java
index fee2c94b12..af066bcd4b 100644
--- a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/LIMEExplainabilityResult.java
+++ b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/LIMEExplainabilityResult.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.explainability.api;
import java.util.Collections;
diff --git a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/ModelIdentifier.java b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/ModelIdentifier.java
index ba7bce8676..3727bdf6f8 100644
--- a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/ModelIdentifier.java
+++ b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/ModelIdentifier.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.api;
diff --git a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/NamedTypedValue.java b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/NamedTypedValue.java
index 771d231428..35aa22e2d4 100644
--- a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/NamedTypedValue.java
+++ b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/NamedTypedValue.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.api;
diff --git a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/SaliencyModel.java b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/SaliencyModel.java
index b0b0f00b08..b5bd777549 100644
--- a/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/SaliencyModel.java
+++ b/explainability/explainability-api/src/main/java/org/kie/kogito/explainability/api/SaliencyModel.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.api;
diff --git a/explainability/explainability-api/src/test/java/org/kie/kogito/explainability/api/CounterfactualDomainSerialisationTest.java b/explainability/explainability-api/src/test/java/org/kie/kogito/explainability/api/CounterfactualDomainSerialisationTest.java
index c8be380418..16165ffc02 100644
--- a/explainability/explainability-api/src/test/java/org/kie/kogito/explainability/api/CounterfactualDomainSerialisationTest.java
+++ b/explainability/explainability-api/src/test/java/org/kie/kogito/explainability/api/CounterfactualDomainSerialisationTest.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.api;
diff --git a/explainability/explainability-service-messaging/pom.xml b/explainability/explainability-service-messaging/pom.xml
index 00f6359ba9..2e43121761 100644
--- a/explainability/explainability-service-messaging/pom.xml
+++ b/explainability/explainability-service-messaging/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/explainability/explainability-service-messaging/src/main/java/org/kie/kogito/explainability/messaging/ExplainabilityMessagingHandler.java b/explainability/explainability-service-messaging/src/main/java/org/kie/kogito/explainability/messaging/ExplainabilityMessagingHandler.java
index d8da956d0d..da33c98eb2 100644
--- a/explainability/explainability-service-messaging/src/main/java/org/kie/kogito/explainability/messaging/ExplainabilityMessagingHandler.java
+++ b/explainability/explainability-service-messaging/src/main/java/org/kie/kogito/explainability/messaging/ExplainabilityMessagingHandler.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.messaging;
diff --git a/explainability/explainability-service-messaging/src/main/resources/META-INF/beans.xml b/explainability/explainability-service-messaging/src/main/resources/META-INF/beans.xml
index e69de29bb2..a0eb9fbf8c 100644
--- a/explainability/explainability-service-messaging/src/main/resources/META-INF/beans.xml
+++ b/explainability/explainability-service-messaging/src/main/resources/META-INF/beans.xml
@@ -0,0 +1,20 @@
+
diff --git a/explainability/explainability-service-messaging/src/main/resources/application.properties b/explainability/explainability-service-messaging/src/main/resources/application.properties
index d02b64ba52..cf636c176a 100644
--- a/explainability/explainability-service-messaging/src/main/resources/application.properties
+++ b/explainability/explainability-service-messaging/src/main/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
#Container image
quarkus.container-image.build=${quarkus.build.image:true}
quarkus.container-image.group=org.kie.kogito
diff --git a/explainability/explainability-service-messaging/src/test/java/org/kie/kogito/explainability/messaging/BaseExplainabilityMessagingHandlerIT.java b/explainability/explainability-service-messaging/src/test/java/org/kie/kogito/explainability/messaging/BaseExplainabilityMessagingHandlerIT.java
index 25bdb52086..2874f5f7c7 100644
--- a/explainability/explainability-service-messaging/src/test/java/org/kie/kogito/explainability/messaging/BaseExplainabilityMessagingHandlerIT.java
+++ b/explainability/explainability-service-messaging/src/test/java/org/kie/kogito/explainability/messaging/BaseExplainabilityMessagingHandlerIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.explainability.messaging;
import java.io.IOException;
diff --git a/explainability/explainability-service-messaging/src/test/java/org/kie/kogito/explainability/messaging/ExplainabilityCloudEventBuilder.java b/explainability/explainability-service-messaging/src/test/java/org/kie/kogito/explainability/messaging/ExplainabilityCloudEventBuilder.java
index 5b6d2dced6..21dd689de1 100644
--- a/explainability/explainability-service-messaging/src/test/java/org/kie/kogito/explainability/messaging/ExplainabilityCloudEventBuilder.java
+++ b/explainability/explainability-service-messaging/src/test/java/org/kie/kogito/explainability/messaging/ExplainabilityCloudEventBuilder.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.explainability.messaging;
import java.net.URI;
diff --git a/explainability/explainability-service-messaging/src/test/java/org/kie/kogito/explainability/messaging/ExplainabilityMessagingHandlerCounterfactualsIT.java b/explainability/explainability-service-messaging/src/test/java/org/kie/kogito/explainability/messaging/ExplainabilityMessagingHandlerCounterfactualsIT.java
index 27e0b103ba..691a65171c 100644
--- a/explainability/explainability-service-messaging/src/test/java/org/kie/kogito/explainability/messaging/ExplainabilityMessagingHandlerCounterfactualsIT.java
+++ b/explainability/explainability-service-messaging/src/test/java/org/kie/kogito/explainability/messaging/ExplainabilityMessagingHandlerCounterfactualsIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.messaging;
diff --git a/explainability/explainability-service-messaging/src/test/java/org/kie/kogito/explainability/messaging/ExplainabilityMessagingHandlerLIMEIT.java b/explainability/explainability-service-messaging/src/test/java/org/kie/kogito/explainability/messaging/ExplainabilityMessagingHandlerLIMEIT.java
index b7706d17c5..eaf78ae6f3 100644
--- a/explainability/explainability-service-messaging/src/test/java/org/kie/kogito/explainability/messaging/ExplainabilityMessagingHandlerLIMEIT.java
+++ b/explainability/explainability-service-messaging/src/test/java/org/kie/kogito/explainability/messaging/ExplainabilityMessagingHandlerLIMEIT.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.explainability.messaging;
import java.util.Collections;
diff --git a/explainability/explainability-service-messaging/src/test/java/org/kie/kogito/explainability/messaging/ExplainabilityMessagingHandlerTest.java b/explainability/explainability-service-messaging/src/test/java/org/kie/kogito/explainability/messaging/ExplainabilityMessagingHandlerTest.java
index d3405bd90a..067a768fcf 100644
--- a/explainability/explainability-service-messaging/src/test/java/org/kie/kogito/explainability/messaging/ExplainabilityMessagingHandlerTest.java
+++ b/explainability/explainability-service-messaging/src/test/java/org/kie/kogito/explainability/messaging/ExplainabilityMessagingHandlerTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.explainability.messaging;
import java.util.Collections;
diff --git a/explainability/explainability-service-messaging/src/test/resources/application.properties b/explainability/explainability-service-messaging/src/test/resources/application.properties
index 5c0874db4b..2cfbd73db4 100644
--- a/explainability/explainability-service-messaging/src/test/resources/application.properties
+++ b/explainability/explainability-service-messaging/src/test/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Kafka Explainability Request
mp.messaging.incoming.trusty-explainability-request.group.id=trusty
mp.messaging.incoming.trusty-explainability-request.connector=smallrye-kafka
diff --git a/explainability/explainability-service-rest/pom.xml b/explainability/explainability-service-rest/pom.xml
index 457fcbd883..c6334690fc 100644
--- a/explainability/explainability-service-rest/pom.xml
+++ b/explainability/explainability-service-rest/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/explainability/explainability-service-rest/src/main/java/org/kie/kogito/explainability/rest/ExplainabilityApiV1.java b/explainability/explainability-service-rest/src/main/java/org/kie/kogito/explainability/rest/ExplainabilityApiV1.java
index af971e5b1b..67b36a591f 100644
--- a/explainability/explainability-service-rest/src/main/java/org/kie/kogito/explainability/rest/ExplainabilityApiV1.java
+++ b/explainability/explainability-service-rest/src/main/java/org/kie/kogito/explainability/rest/ExplainabilityApiV1.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.rest;
diff --git a/explainability/explainability-service-rest/src/main/resources/META-INF/beans.xml b/explainability/explainability-service-rest/src/main/resources/META-INF/beans.xml
index e69de29bb2..a0eb9fbf8c 100644
--- a/explainability/explainability-service-rest/src/main/resources/META-INF/beans.xml
+++ b/explainability/explainability-service-rest/src/main/resources/META-INF/beans.xml
@@ -0,0 +1,20 @@
+
diff --git a/explainability/explainability-service-rest/src/main/resources/application.properties b/explainability/explainability-service-rest/src/main/resources/application.properties
index 9bf7ce6fc0..eabb5fc8c6 100644
--- a/explainability/explainability-service-rest/src/main/resources/application.properties
+++ b/explainability/explainability-service-rest/src/main/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
#oidc
quarkus.oidc.enabled=true
quarkus.oidc.tenant-enabled=false
diff --git a/explainability/explainability-service-rest/src/test/java/org/kie/kogito/explainability/rest/ExplainabilityApiV1IT.java b/explainability/explainability-service-rest/src/test/java/org/kie/kogito/explainability/rest/ExplainabilityApiV1IT.java
index 23e0ea3b82..2ef891a9f1 100644
--- a/explainability/explainability-service-rest/src/test/java/org/kie/kogito/explainability/rest/ExplainabilityApiV1IT.java
+++ b/explainability/explainability-service-rest/src/test/java/org/kie/kogito/explainability/rest/ExplainabilityApiV1IT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.rest;
diff --git a/explainability/explainability-service-rest/src/test/java/org/kie/kogito/explainability/rest/KeycloakExplainabilityServiceIT.java b/explainability/explainability-service-rest/src/test/java/org/kie/kogito/explainability/rest/KeycloakExplainabilityServiceIT.java
index 7ee202b4b4..ee532e9153 100644
--- a/explainability/explainability-service-rest/src/test/java/org/kie/kogito/explainability/rest/KeycloakExplainabilityServiceIT.java
+++ b/explainability/explainability-service-rest/src/test/java/org/kie/kogito/explainability/rest/KeycloakExplainabilityServiceIT.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.rest;
diff --git a/explainability/explainability-service-rest/src/test/java/org/kie/kogito/explainability/rest/LocalExplainerMock.java b/explainability/explainability-service-rest/src/test/java/org/kie/kogito/explainability/rest/LocalExplainerMock.java
index 5b9b38f0f4..aadffa9409 100644
--- a/explainability/explainability-service-rest/src/test/java/org/kie/kogito/explainability/rest/LocalExplainerMock.java
+++ b/explainability/explainability-service-rest/src/test/java/org/kie/kogito/explainability/rest/LocalExplainerMock.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.rest;
diff --git a/explainability/explainability-service-rest/src/test/java/org/kie/kogito/explainability/rest/PredictionProviderFactoryMock.java b/explainability/explainability-service-rest/src/test/java/org/kie/kogito/explainability/rest/PredictionProviderFactoryMock.java
index 42e4153ab0..958dcc4048 100644
--- a/explainability/explainability-service-rest/src/test/java/org/kie/kogito/explainability/rest/PredictionProviderFactoryMock.java
+++ b/explainability/explainability-service-rest/src/test/java/org/kie/kogito/explainability/rest/PredictionProviderFactoryMock.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.rest;
diff --git a/explainability/explainability-service-rest/src/test/java/org/kie/kogito/explainability/rest/PredictionProviderMock.java b/explainability/explainability-service-rest/src/test/java/org/kie/kogito/explainability/rest/PredictionProviderMock.java
index cc9836e1dc..231222254f 100644
--- a/explainability/explainability-service-rest/src/test/java/org/kie/kogito/explainability/rest/PredictionProviderMock.java
+++ b/explainability/explainability-service-rest/src/test/java/org/kie/kogito/explainability/rest/PredictionProviderMock.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.rest;
diff --git a/explainability/explainability-service-rest/src/test/resources/application.properties b/explainability/explainability-service-rest/src/test/resources/application.properties
index 0eca8533b4..cc897b8e1a 100644
--- a/explainability/explainability-service-rest/src/test/resources/application.properties
+++ b/explainability/explainability-service-rest/src/test/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
#oidc
quarkus.oidc.enabled=true
quarkus.oidc.tenant-enabled=false
@@ -5,3 +24,6 @@ quarkus.oidc.auth-server-url=none
%keycloak.quarkus.oidc.tenant-enabled=true
%keycloak.quarkus.oidc.client-id=kogito-app
%keycloak.quarkus.oidc.credentials.secret=secret
+
+# Not using Dev service in test, but rather org.kie.kogito.testcontainers.quarkus.KeycloakQuarkusTestResource
+quarkus.keycloak.devservices.enabled=false
diff --git a/explainability/explainability-service/pom.xml b/explainability/explainability-service/pom.xml
index a5e964b393..f4ea39a3e4 100644
--- a/explainability/explainability-service/pom.xml
+++ b/explainability/explainability-service/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/ConversionUtils.java b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/ConversionUtils.java
index ae3b15877d..5d6f08245f 100644
--- a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/ConversionUtils.java
+++ b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/ConversionUtils.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability;
diff --git a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/ExplanationService.java b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/ExplanationService.java
index 0d9d174c13..c5ebfe9bce 100644
--- a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/ExplanationService.java
+++ b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/ExplanationService.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.explainability;
import java.util.concurrent.CompletionStage;
diff --git a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/ExplanationServiceImpl.java b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/ExplanationServiceImpl.java
index ed520823d9..f5b9f46e73 100644
--- a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/ExplanationServiceImpl.java
+++ b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/ExplanationServiceImpl.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.explainability;
import java.util.concurrent.CompletionStage;
diff --git a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/PredictionProviderFactory.java b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/PredictionProviderFactory.java
index e799de08b1..69aec23cae 100644
--- a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/PredictionProviderFactory.java
+++ b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/PredictionProviderFactory.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.explainability;
import java.util.Collection;
diff --git a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/PredictionProviderFactoryImpl.java b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/PredictionProviderFactoryImpl.java
index c9ff4ad370..76adbc6160 100644
--- a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/PredictionProviderFactoryImpl.java
+++ b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/PredictionProviderFactoryImpl.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.explainability;
import java.util.Collection;
diff --git a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/RemotePredictionProvider.java b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/RemotePredictionProvider.java
index dfbcfcace9..439d81d7e0 100644
--- a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/RemotePredictionProvider.java
+++ b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/RemotePredictionProvider.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability;
diff --git a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/handlers/CounterfactualExplainerProducer.java b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/handlers/CounterfactualExplainerProducer.java
index 16631cb22e..dd7070d27e 100644
--- a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/handlers/CounterfactualExplainerProducer.java
+++ b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/handlers/CounterfactualExplainerProducer.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.explainability.handlers;
import javax.enterprise.context.ApplicationScoped;
diff --git a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/handlers/CounterfactualExplainerServiceHandler.java b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/handlers/CounterfactualExplainerServiceHandler.java
index ecab71879e..dc5ef56876 100644
--- a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/handlers/CounterfactualExplainerServiceHandler.java
+++ b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/handlers/CounterfactualExplainerServiceHandler.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.handlers;
diff --git a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/handlers/LimeExplainerProducer.java b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/handlers/LimeExplainerProducer.java
index 3781aff0fe..995ce31f32 100644
--- a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/handlers/LimeExplainerProducer.java
+++ b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/handlers/LimeExplainerProducer.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.explainability.handlers;
import java.security.SecureRandom;
diff --git a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/handlers/LimeExplainerServiceHandler.java b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/handlers/LimeExplainerServiceHandler.java
index 3c98cacf95..bab1445814 100644
--- a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/handlers/LimeExplainerServiceHandler.java
+++ b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/handlers/LimeExplainerServiceHandler.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.handlers;
diff --git a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/handlers/LocalExplainerServiceHandler.java b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/handlers/LocalExplainerServiceHandler.java
index 455535ffc5..df0225c5a8 100644
--- a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/handlers/LocalExplainerServiceHandler.java
+++ b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/handlers/LocalExplainerServiceHandler.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.handlers;
diff --git a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/handlers/LocalExplainerServiceHandlerRegistry.java b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/handlers/LocalExplainerServiceHandlerRegistry.java
index 45856bfb5e..0653ceda29 100644
--- a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/handlers/LocalExplainerServiceHandlerRegistry.java
+++ b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/handlers/LocalExplainerServiceHandlerRegistry.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.handlers;
diff --git a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/models/PredictInput.java b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/models/PredictInput.java
index c92f36a89e..da7727ddd2 100644
--- a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/models/PredictInput.java
+++ b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/models/PredictInput.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.models;
diff --git a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/models/PredictOutput.java b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/models/PredictOutput.java
index b76343d19d..f0f663811b 100644
--- a/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/models/PredictOutput.java
+++ b/explainability/explainability-service/src/main/java/org/kie/kogito/explainability/models/PredictOutput.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.models;
diff --git a/explainability/explainability-service/src/main/resources/META-INF/beans.xml b/explainability/explainability-service/src/main/resources/META-INF/beans.xml
index e69de29bb2..a0eb9fbf8c 100644
--- a/explainability/explainability-service/src/main/resources/META-INF/beans.xml
+++ b/explainability/explainability-service/src/main/resources/META-INF/beans.xml
@@ -0,0 +1,20 @@
+
diff --git a/explainability/explainability-service/src/main/resources/application.properties b/explainability/explainability-service/src/main/resources/application.properties
index 54ce9c8415..f2372f8e04 100644
--- a/explainability/explainability-service/src/main/resources/application.properties
+++ b/explainability/explainability-service/src/main/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# Incoming Explainability Requests
mp.messaging.incoming.trusty-explainability-request.group.id=explainability-service
mp.messaging.incoming.trusty-explainability-request.connector=smallrye-kafka
diff --git a/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/ConversionUtilsTest.java b/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/ConversionUtilsTest.java
index b2026206e4..464e63c966 100644
--- a/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/ConversionUtilsTest.java
+++ b/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/ConversionUtilsTest.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability;
diff --git a/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/ExplanationServiceImplTest.java b/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/ExplanationServiceImplTest.java
index cb59f4827b..32fa35a3b6 100644
--- a/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/ExplanationServiceImplTest.java
+++ b/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/ExplanationServiceImplTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.explainability;
import java.util.concurrent.CompletableFuture;
diff --git a/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/PredictionProviderFactoryImplTest.java b/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/PredictionProviderFactoryImplTest.java
index cb5fdb8864..e6ace68808 100644
--- a/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/PredictionProviderFactoryImplTest.java
+++ b/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/PredictionProviderFactoryImplTest.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability;
diff --git a/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/RemotePredictionProviderTest.java b/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/RemotePredictionProviderTest.java
index 151e2c49d0..f757891d05 100644
--- a/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/RemotePredictionProviderTest.java
+++ b/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/RemotePredictionProviderTest.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability;
diff --git a/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/TestUtils.java b/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/TestUtils.java
index b1bafff09d..4b92d5515d 100644
--- a/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/TestUtils.java
+++ b/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/TestUtils.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.explainability;
import java.util.ArrayList;
diff --git a/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/handlers/CounterfactualExplainerProducerTest.java b/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/handlers/CounterfactualExplainerProducerTest.java
index 53d1cf4895..4a0dee2bdb 100644
--- a/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/handlers/CounterfactualExplainerProducerTest.java
+++ b/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/handlers/CounterfactualExplainerProducerTest.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.handlers;
diff --git a/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/handlers/CounterfactualExplainerServiceHandlerTest.java b/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/handlers/CounterfactualExplainerServiceHandlerTest.java
index 48aecc15a0..ab58f9f6fb 100644
--- a/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/handlers/CounterfactualExplainerServiceHandlerTest.java
+++ b/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/handlers/CounterfactualExplainerServiceHandlerTest.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.handlers;
diff --git a/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/handlers/LimeExplainerProducerTest.java b/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/handlers/LimeExplainerProducerTest.java
index e878763265..6ea1ba65b9 100644
--- a/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/handlers/LimeExplainerProducerTest.java
+++ b/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/handlers/LimeExplainerProducerTest.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.handlers;
diff --git a/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/handlers/LimeExplainerServiceHandlerTest.java b/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/handlers/LimeExplainerServiceHandlerTest.java
index d6c63c604f..52fb721083 100644
--- a/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/handlers/LimeExplainerServiceHandlerTest.java
+++ b/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/handlers/LimeExplainerServiceHandlerTest.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.handlers;
diff --git a/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/handlers/LocalExplainerServiceHandlerRegistryTest.java b/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/handlers/LocalExplainerServiceHandlerRegistryTest.java
index b351192b71..a1ae055fe9 100644
--- a/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/handlers/LocalExplainerServiceHandlerRegistryTest.java
+++ b/explainability/explainability-service/src/test/java/org/kie/kogito/explainability/handlers/LocalExplainerServiceHandlerRegistryTest.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.explainability.handlers;
diff --git a/explainability/pom.xml b/explainability/pom.xml
index 539118c858..9348831a3b 100644
--- a/explainability/pom.xml
+++ b/explainability/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/jitexecutor/jitexecutor-bpmn/pom.xml b/jitexecutor/jitexecutor-bpmn/pom.xml
index 51cd7a61cf..d470dd3ab7 100644
--- a/jitexecutor/jitexecutor-bpmn/pom.xml
+++ b/jitexecutor/jitexecutor-bpmn/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/jitexecutor/jitexecutor-bpmn/src/main/java/org/kie/kogito/jitexecutor/bpmn/JITBPMNService.java b/jitexecutor/jitexecutor-bpmn/src/main/java/org/kie/kogito/jitexecutor/bpmn/JITBPMNService.java
index 5697131ac8..cc156aa506 100644
--- a/jitexecutor/jitexecutor-bpmn/src/main/java/org/kie/kogito/jitexecutor/bpmn/JITBPMNService.java
+++ b/jitexecutor/jitexecutor-bpmn/src/main/java/org/kie/kogito/jitexecutor/bpmn/JITBPMNService.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.jitexecutor.bpmn;
import org.kie.kogito.jitexecutor.bpmn.responses.JITBPMNValidationResult;
diff --git a/jitexecutor/jitexecutor-bpmn/src/main/java/org/kie/kogito/jitexecutor/bpmn/JITBPMNServiceImpl.java b/jitexecutor/jitexecutor-bpmn/src/main/java/org/kie/kogito/jitexecutor/bpmn/JITBPMNServiceImpl.java
index ea7a5d79ad..c0b70cffbe 100644
--- a/jitexecutor/jitexecutor-bpmn/src/main/java/org/kie/kogito/jitexecutor/bpmn/JITBPMNServiceImpl.java
+++ b/jitexecutor/jitexecutor-bpmn/src/main/java/org/kie/kogito/jitexecutor/bpmn/JITBPMNServiceImpl.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.jitexecutor.bpmn;
import java.io.ByteArrayInputStream;
diff --git a/jitexecutor/jitexecutor-bpmn/src/main/java/org/kie/kogito/jitexecutor/bpmn/api/BPMNValidationResource.java b/jitexecutor/jitexecutor-bpmn/src/main/java/org/kie/kogito/jitexecutor/bpmn/api/BPMNValidationResource.java
index 327a868783..5022f49037 100644
--- a/jitexecutor/jitexecutor-bpmn/src/main/java/org/kie/kogito/jitexecutor/bpmn/api/BPMNValidationResource.java
+++ b/jitexecutor/jitexecutor-bpmn/src/main/java/org/kie/kogito/jitexecutor/bpmn/api/BPMNValidationResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.jitexecutor.bpmn.api;
import javax.inject.Inject;
diff --git a/jitexecutor/jitexecutor-bpmn/src/main/java/org/kie/kogito/jitexecutor/bpmn/responses/JITBPMNValidationResult.java b/jitexecutor/jitexecutor-bpmn/src/main/java/org/kie/kogito/jitexecutor/bpmn/responses/JITBPMNValidationResult.java
index 21211f74c0..d1fa20e9e3 100644
--- a/jitexecutor/jitexecutor-bpmn/src/main/java/org/kie/kogito/jitexecutor/bpmn/responses/JITBPMNValidationResult.java
+++ b/jitexecutor/jitexecutor-bpmn/src/main/java/org/kie/kogito/jitexecutor/bpmn/responses/JITBPMNValidationResult.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.jitexecutor.bpmn.responses;
diff --git a/jitexecutor/jitexecutor-bpmn/src/main/resources/META-INF/beans.xml b/jitexecutor/jitexecutor-bpmn/src/main/resources/META-INF/beans.xml
index e69de29bb2..a0eb9fbf8c 100644
--- a/jitexecutor/jitexecutor-bpmn/src/main/resources/META-INF/beans.xml
+++ b/jitexecutor/jitexecutor-bpmn/src/main/resources/META-INF/beans.xml
@@ -0,0 +1,20 @@
+
diff --git a/jitexecutor/jitexecutor-bpmn/src/main/resources/application.properties b/jitexecutor/jitexecutor-bpmn/src/main/resources/application.properties
index c09e2b84d1..f43a8a1a7d 100644
--- a/jitexecutor/jitexecutor-bpmn/src/main/resources/application.properties
+++ b/jitexecutor/jitexecutor-bpmn/src/main/resources/application.properties
@@ -1,3 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
# quarkus.log.console.enable=true
# quarkus.log.console.format=%d{HH:mm:ss} %-5p [%c{2.}] (%t) %s%e%n
# quarkus.log.console.level=INFO
diff --git a/jitexecutor/jitexecutor-bpmn/src/test/java/org/kie/kogito/jitexecutor/bpmn/JITBPMNServiceImplTest.java b/jitexecutor/jitexecutor-bpmn/src/test/java/org/kie/kogito/jitexecutor/bpmn/JITBPMNServiceImplTest.java
index 0bff9623a5..4540510703 100644
--- a/jitexecutor/jitexecutor-bpmn/src/test/java/org/kie/kogito/jitexecutor/bpmn/JITBPMNServiceImplTest.java
+++ b/jitexecutor/jitexecutor-bpmn/src/test/java/org/kie/kogito/jitexecutor/bpmn/JITBPMNServiceImplTest.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.jitexecutor.bpmn;
diff --git a/jitexecutor/jitexecutor-bpmn/src/test/java/org/kie/kogito/jitexecutor/bpmn/TestingUtils.java b/jitexecutor/jitexecutor-bpmn/src/test/java/org/kie/kogito/jitexecutor/bpmn/TestingUtils.java
index 589758e809..6364c090f9 100644
--- a/jitexecutor/jitexecutor-bpmn/src/test/java/org/kie/kogito/jitexecutor/bpmn/TestingUtils.java
+++ b/jitexecutor/jitexecutor-bpmn/src/test/java/org/kie/kogito/jitexecutor/bpmn/TestingUtils.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.jitexecutor.bpmn;
diff --git a/jitexecutor/jitexecutor-bpmn/src/test/java/org/kie/kogito/jitexecutor/bpmn/api/BPMNValidatorResourceTest.java b/jitexecutor/jitexecutor-bpmn/src/test/java/org/kie/kogito/jitexecutor/bpmn/api/BPMNValidatorResourceTest.java
index a06afd1988..79b718e54a 100644
--- a/jitexecutor/jitexecutor-bpmn/src/test/java/org/kie/kogito/jitexecutor/bpmn/api/BPMNValidatorResourceTest.java
+++ b/jitexecutor/jitexecutor-bpmn/src/test/java/org/kie/kogito/jitexecutor/bpmn/api/BPMNValidatorResourceTest.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.jitexecutor.bpmn.api;
import java.io.IOException;
diff --git a/jitexecutor/jitexecutor-common/pom.xml b/jitexecutor/jitexecutor-common/pom.xml
index a14cd11255..72b0dffee6 100644
--- a/jitexecutor/jitexecutor-common/pom.xml
+++ b/jitexecutor/jitexecutor-common/pom.xml
@@ -1,4 +1,24 @@
+
diff --git a/jitexecutor/jitexecutor-common/src/main/java/org/kie/kogito/jitexecutor/common/requests/MultipleResourcesPayload.java b/jitexecutor/jitexecutor-common/src/main/java/org/kie/kogito/jitexecutor/common/requests/MultipleResourcesPayload.java
index 0a4634458d..ef9f394435 100644
--- a/jitexecutor/jitexecutor-common/src/main/java/org/kie/kogito/jitexecutor/common/requests/MultipleResourcesPayload.java
+++ b/jitexecutor/jitexecutor-common/src/main/java/org/kie/kogito/jitexecutor/common/requests/MultipleResourcesPayload.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.jitexecutor.common.requests;
import java.util.List;
diff --git a/jitexecutor/jitexecutor-common/src/main/java/org/kie/kogito/jitexecutor/common/requests/ResourceWithURI.java b/jitexecutor/jitexecutor-common/src/main/java/org/kie/kogito/jitexecutor/common/requests/ResourceWithURI.java
index 12ece8a9b3..7d74778b9e 100644
--- a/jitexecutor/jitexecutor-common/src/main/java/org/kie/kogito/jitexecutor/common/requests/ResourceWithURI.java
+++ b/jitexecutor/jitexecutor-common/src/main/java/org/kie/kogito/jitexecutor/common/requests/ResourceWithURI.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.jitexecutor.common.requests;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/jitexecutor/jitexecutor-dmn/pom.xml b/jitexecutor/jitexecutor-dmn/pom.xml
index 7873955611..96da553b7f 100644
--- a/jitexecutor/jitexecutor-dmn/pom.xml
+++ b/jitexecutor/jitexecutor-dmn/pom.xml
@@ -1,4 +1,24 @@
+
4.0.0
diff --git a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/DMNEvaluator.java b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/DMNEvaluator.java
index e284cb6a40..b8c849638c 100644
--- a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/DMNEvaluator.java
+++ b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/DMNEvaluator.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.jitexecutor.dmn;
import java.io.StringReader;
diff --git a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/JITDMNObjectMapperCustomizer.java b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/JITDMNObjectMapperCustomizer.java
index 65c1a8c6f2..ec8b9bde98 100644
--- a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/JITDMNObjectMapperCustomizer.java
+++ b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/JITDMNObjectMapperCustomizer.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.jitexecutor.dmn;
import javax.inject.Singleton;
diff --git a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/JITDMNService.java b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/JITDMNService.java
index d26466bcf2..6db6dbb97e 100644
--- a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/JITDMNService.java
+++ b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/JITDMNService.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.jitexecutor.dmn;
import java.util.Map;
diff --git a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/JITDMNServiceImpl.java b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/JITDMNServiceImpl.java
index c5f9c9c3f9..b2230ecd4d 100644
--- a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/JITDMNServiceImpl.java
+++ b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/JITDMNServiceImpl.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.jitexecutor.dmn;
import java.util.ArrayList;
diff --git a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/LocalDMNPredictionProvider.java b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/LocalDMNPredictionProvider.java
index 7f822ac5dc..8950c4c6c4 100644
--- a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/LocalDMNPredictionProvider.java
+++ b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/LocalDMNPredictionProvider.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.jitexecutor.dmn;
import java.util.ArrayList;
diff --git a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/api/DMNValidationResource.java b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/api/DMNValidationResource.java
index 5c929ebe38..b50ad939ed 100644
--- a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/api/DMNValidationResource.java
+++ b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/api/DMNValidationResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.jitexecutor.dmn.api;
import java.io.StringReader;
diff --git a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/api/JITDMNResource.java b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/api/JITDMNResource.java
index 046a5b94d9..6ff12594c4 100644
--- a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/api/JITDMNResource.java
+++ b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/api/JITDMNResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.jitexecutor.dmn.api;
import java.util.HashMap;
diff --git a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/api/SchemaResource.java b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/api/SchemaResource.java
index 86ebaa1958..cec99ab0ee 100644
--- a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/api/SchemaResource.java
+++ b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/api/SchemaResource.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.jitexecutor.dmn.api;
import java.util.Collections;
diff --git a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/requests/JITDMNPayload.java b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/requests/JITDMNPayload.java
index 78b84fa3b9..178dfd578c 100644
--- a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/requests/JITDMNPayload.java
+++ b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/requests/JITDMNPayload.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.jitexecutor.dmn.requests;
import java.util.List;
diff --git a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/responses/DMNResultWithExplanation.java b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/responses/DMNResultWithExplanation.java
index e6489993c9..fd7e7e8486 100644
--- a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/responses/DMNResultWithExplanation.java
+++ b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/responses/DMNResultWithExplanation.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.jitexecutor.dmn.responses;
import org.kie.kogito.trusty.service.common.responses.SalienciesResponse;
diff --git a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/responses/JITDMNDecisionResult.java b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/responses/JITDMNDecisionResult.java
index 400350bc4c..7348a4dc9c 100644
--- a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/responses/JITDMNDecisionResult.java
+++ b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/responses/JITDMNDecisionResult.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.jitexecutor.dmn.responses;
diff --git a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/responses/JITDMNMessage.java b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/responses/JITDMNMessage.java
index fa4f25fb89..fb90a077a5 100644
--- a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/responses/JITDMNMessage.java
+++ b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/responses/JITDMNMessage.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.jitexecutor.dmn.responses;
import java.io.Serializable;
diff --git a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/responses/JITDMNResult.java b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/responses/JITDMNResult.java
index 145158079d..bfaea16420 100644
--- a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/responses/JITDMNResult.java
+++ b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/responses/JITDMNResult.java
@@ -1,17 +1,20 @@
/*
- * Copyright 2022 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.kie.kogito.jitexecutor.dmn.responses;
diff --git a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/utils/ResolveByKey.java b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/utils/ResolveByKey.java
index e7b55f0813..8377baf6ae 100644
--- a/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/utils/ResolveByKey.java
+++ b/jitexecutor/jitexecutor-dmn/src/main/java/org/kie/kogito/jitexecutor/dmn/utils/ResolveByKey.java
@@ -1,19 +1,21 @@
/*
- * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.kie.kogito.jitexecutor.dmn.utils;
import java.io.IOException;
diff --git a/jitexecutor/jitexecutor-dmn/src/main/resources/META-INF/beans.xml b/jitexecutor/jitexecutor-dmn/src/main/resources/META-INF/beans.xml
index e69de29bb2..a0eb9fbf8c 100644
--- a/jitexecutor/jitexecutor-dmn/src/main/resources/META-INF/beans.xml
+++ b/jitexecutor/jitexecutor-dmn/src/main/resources/META-INF/beans.xml
@@ -0,0 +1,20 @@
+
diff --git a/jitexecutor/jitexecutor-dmn/src/main/resources/META-INF/resources/index.html b/jitexecutor/jitexecutor-dmn/src/main/resources/META-INF/resources/index.html
index 7701c9d2a4..91b0c13b65 100644
--- a/jitexecutor/jitexecutor-dmn/src/main/resources/META-INF/resources/index.html
+++ b/jitexecutor/jitexecutor-dmn/src/main/resources/META-INF/resources/index.html
@@ -1,21 +1,46 @@
-
+
+
-
-
+
+
+
+
-
-
Demo system
-
- Demo system
-
+ Demo system
-
-
\ No newline at end of file
+