diff --git a/.asf.yaml b/.asf.yaml new file mode 100644 index 0000000000..40a66c4cea --- /dev/null +++ b/.asf.yaml @@ -0,0 +1,3 @@ +github: + features: + issues: true diff --git a/.ci/environments/common/update_quarkus.sh b/.ci/environments/common/update_quarkus.sh index 00b98ae80a..e0cfaa77dc 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/README.md b/.ci/environments/quarkus-3/README.md deleted file mode 100644 index 36d8f225a1..0000000000 --- a/.ci/environments/quarkus-3/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# quarkus-3 environment scripts - -This folder contains specific script(s)/patch(es) for the Quarkus 3 migration. - -**Here is the command:** - -```bash -.ci/environments/update.sh quarkus-3 -``` - -Steps of the basic execution: - -- Execute `before.sh` script - In the basic execution, this script will skip the rewrite commands, which is taking a lot of time to perform. - If you want to perform the rewrite or update the "before.sh" patch, please see next sections. -- Apply all patches from `patches` folder - -## Full execution - -**Command:** - -```bash -.ci/environments/update.sh quarkus-3 rewrite -``` - -Steps of the full execution: - -- Execute the rewrite execution -- Synchronize the libraries' version with Quarkus BOM -- Store the changes from previous steps into the `patches/001_before_sh.patch` file -- Apply patches from `patches` folder - -## Patches information - -1. the `0001_before_sh.patch` is generated executing the `before.sh` script; it then contains all the `openrewrite` migration and the synchronization of libraries with quarkus ones (see next section) -2. all other patches have been made manually -3. if some other modifications are needed, they should be created as `patch`, following numerations -4. if some patch does not apply anymore, it has to be recreated manually; in case of the first one, it means to execute the `before.sh` script again - -## How to recreate the `001_before_sh.patch` file ? - -The `001_before_sh.patch` file contains all changes from a rewrite execution. -In case of a full execution, this file will be overriden with the new changes. - -You can also regenerate that file without having to run the full quarkus-3 environment migration. -To do so, just run: - -```bash -.ci/environments/quarkus-3/before.sh rewrite -``` - -## Recipe files - -There are 3 recipe files: - -- `project-recipe.yml` is the recipe file to update in case you need a new recipe -- `quarkus3-base-recipe.yml` is the base recipe setup by Quarkus team in https://github.com/quarkusio/quarkus-updates. You should not modify it ! -- `quarkus3.yml` is the final recipe file and is a compute of the previous 2 files, plus some processing. - See also comments in [Jbang script](jbang/CreateKieQuarkusProjectMigrationRecipe.java) for more details on the generation. - -### How to reset the quarkus3.yaml recipe file ? - -The `before.sh` script should handle the reset of the `quarkus3.yml` recipe file when executed with `rewrite` command. - -In case you want to do manually, check the `./before.sh` script - -### How to update the Quarkus version ? - -If you are setting a new Quarkus version: - -1. Update `quarkus-devtools-common` version in `jbang/CreateKieQuarkusProjectMigrationRecipe.java` file -2. Update `QUARKUS_VERSION` in `jbang/CreateKieQuarkusProjectMigrationRecipe.java` file -3. Update `QUARKUS_UPDATES_BASE_URL` with the corresponding released version of https://github.com/quarkusio/quarkus-updates recipe file -4. See [How to reset the quarkus3.yaml recipe file ?](#how-to-reset-the-quarkus3yaml-recipe-file) section and run jbang script with `-d` option \ No newline at end of file diff --git a/.ci/environments/quarkus-3/after.sh b/.ci/environments/quarkus-3/after.sh deleted file mode 100755 index 54efba4bfa..0000000000 --- a/.ci/environments/quarkus-3/after.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -set -euo pipefail - -script_dir_path=$(cd `dirname "${BASH_SOURCE[0]}"`; pwd -P) -mvn_cmd="mvn ${BUILD_MVN_OPTS:-} ${BUILD_MVN_OPTS_QUARKUS_UPDATE:-}" - -# Retrieve current Maven project version -project_version=$(mvn -q -Dexpression=project.version -DforceStdout help:evaluate) -# New version is based on current project version and increment the Major => (M+1).m.y -new_version=$(echo ${project_version} | awk -F. -v OFS=. '{$1 += 1 ; print}') - -# Change version -${mvn_cmd} -fae -N -e versions:update-parent -Dfull -DparentVersion="[${new_version}]" -DallowSnapshots=true -DgenerateBackupPoms=false -${mvn_cmd} -fae -N -e versions:update-child-modules -Dfull -DallowSnapshots=true -DgenerateBackupPoms=false diff --git a/.ci/environments/quarkus-3/before.sh b/.ci/environments/quarkus-3/before.sh deleted file mode 100755 index 1181f2ed13..0000000000 --- a/.ci/environments/quarkus-3/before.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/bash -set -euo pipefail - -script_dir_path=$(cd `dirname "${BASH_SOURCE[0]}"`; pwd -P) -mvn_cmd="mvn ${BUILD_MVN_OPTS:-} ${BUILD_MVN_OPTS_QUARKUS_UPDATE:-}" -ci="${CI:-false}" - -rewrite_plugin_version=4.43.0 -quarkus_version=${QUARKUS_VERSION:-3.0.0.Final} - -quarkus_recipe_file="${script_dir_path}/quarkus3.yml" -patch_file="${script_dir_path}"/patches/0001_before_sh.patch - -if [ "${ci}" = "true" ]; then - # In CI we need the main branch snapshot artifacts deployed locally - set -x - ${mvn_cmd} clean install -DskipTests - set +x -fi - -rewrite=${1:-'none'} -behavior=${2:-'none'} -echo "rewrite "${rewrite} -if [ "rewrite" != ${rewrite} ]; then - echo "No rewrite to be done. Exited" - exit 0 -fi - -export MAVEN_OPTS="-Xmx16192m" - -echo "Update project with Quarkus version ${quarkus_version}" - -set -x - -# Retrieve Project & Drools version used -project_version=$(mvn -q -Dexpression=project.version -DforceStdout help:evaluate) -drools_version=$(mvn -q -pl :decisiontable-quarkus-example -Dexpression=version.org.drools -DforceStdout help:evaluate) -# New drools version is based on current drools version and increment the Major => (M+1).m.y -new_project_version=$(echo ${project_version} | awk -F. -v OFS=. '{$1 += 1 ; print}') -new_drools_version=$(echo ${drools_version} | awk -F. -v OFS=. '{$1 += 1 ; print}') - -# Regenerate quarkus3 recipe -cd ${script_dir_path} -curl -Ls https://sh.jbang.dev | \ - bash -s - jbang/CreateKieQuarkusProjectMigrationRecipe.java \ - -v quarkus-plugin.version=${quarkus_version} \ - -v quarkus.platform.version=${quarkus_version} \ - -v version.org.drools=${new_drools_version} \ - -v version.org.kie.kogito=${new_project_version} \ - -v kogito.bom.version=${new_project_version} -cd - - -# Launch Quarkus 3 Openrewrite -${mvn_cmd} org.openrewrite.maven:rewrite-maven-plugin:${rewrite_plugin_version}:run \ - -Drewrite.configLocation="${quarkus_recipe_file}" \ - -DactiveRecipes=io.quarkus.openrewrite.Quarkus \ - -Drewrite.recipeArtifactCoordinates=org.kie:jpmml-migration-recipe:"${drools_version}" \ - -Denforcer.skip \ - -fae \ - -Dexclusions=**/target \ - -DplainTextMasks=**/kmodule.xml - -# Update dependencies with Quarkus 3 bom -${mvn_cmd} \ - -DremotePom=io.quarkus:quarkus-bom:${quarkus_version} \ - -DupdatePropertyVersions=true \ - -DupdateDependencies=true \ - -DgenerateBackupPoms=false \ - versions:compare-dependencies - -# Create the `patches/0001_before_sh.patch` file -git add . -git reset "${quarkus_recipe_file}" # Do not include recipe file -git diff --cached > "${patch_file}" -git reset - -# Commit the change on patch -if [ "$(git status --porcelain ${patch_file})" != '' ]; then - if [ "$(git status --porcelain ${quarkus_recipe_file})" != '' ]; then - git add "${quarkus_recipe_file}" # We suppose that if the recipe has changed, the patch file as well - fi - git add "${patch_file}" - git commit -m '[Quarkus 3] Updated rewrite data' - - git reset --hard - if [ "${behavior}" = 'push_changes' ]; then - git_remote="${GIT_REMOTE:-origin}" - branch=$(git branch --show-current) - echo "Pushing changes to ${git_remote}/${branch} after rebase " - git fetch ${git_remote} - git rebase ${git_remote}/${branch} - git push ${git_remote} ${branch} - fi -fi - -# Reset all other changes as they will be applied next by the `patches/0001_before_sh.patch` file -git reset --hard diff --git a/.ci/environments/quarkus-3/jbang/CreateKieQuarkusProjectMigrationRecipe.java b/.ci/environments/quarkus-3/jbang/CreateKieQuarkusProjectMigrationRecipe.java deleted file mode 100755 index ef4a67020b..0000000000 --- a/.ci/environments/quarkus-3/jbang/CreateKieQuarkusProjectMigrationRecipe.java +++ /dev/null @@ -1,130 +0,0 @@ -import java.net.URL; -import java.nio.charset.Charset; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.Callable; - -import org.apache.commons.io.IOUtils; - -import io.quarkus.devtools.project.BuildTool; -import io.quarkus.devtools.project.update.QuarkusUpdateRecipe; -import io.quarkus.devtools.project.update.QuarkusUpdateRecipeIO; -import io.quarkus.devtools.project.update.operations.UpdatePropertyOperation; -import picocli.CommandLine; -import picocli.CommandLine.Command; -import picocli.CommandLine.Option; - -///usr/bin/env jbang "$0" "$@" ; exit $? -// Version to be changed when needed -//DEPS io.quarkus:quarkus-devtools-common:3.0.0.Final -//DEPS info.picocli:picocli:4.5.0 - -/* - * This script will generate the final `quarkus3.yml` file based on: - * - quarkus recipe file (see `QUARKUS_UPDATES_BASE_URL` constant) - * - local project-recipe.yaml => Specific project repository rules - * - * We use a lot of managed dependencies, it concatenates both files but it also add some new rules: - * In the Quarkus recipe, the dependencies rules are modified only for direct dependencies but not for managed dependencies. - * So the script adds a new step: - * - Reads all modified direct dependencies from the Quarkus recipe - * - Generates one managed dependency rule for each of them - */ -@Command(name = "migrationrecipecli", mixinStandardHelpOptions = true, version = "migrationrecipecli 0.1", - description = "migrationrecipecli to create the Q3 migration recipe for a project") - class CreateKieQuarkusProjectMigrationRecipeCli implements Callable { - - @Option(names={ "-d", "--download-quarkus-recipe"}, description = "Download quarkus update recipe for final recipe generation") - private boolean downloadQuarkusRecipe = false; - - @Option(names={ "-v", "--property-version"}, description = "(multi). Add a dynamic property version to the final recipe") - private Map versionProperties = new HashMap<>(); - - static final String QUARKUS_UPDATES_BASE_URL = "https://raw.githubusercontent.com/quarkusio/quarkus-updates/1.0.0/recipes/src/main/resources/quarkus-updates/core/3alpha.yaml"; - - static final Path quarkus3DownloadedRecipePath = Paths.get("quarkus3-base-recipe.yml"); - static final Path quarkus3GeneratedRecipePath = Paths.get("quarkus3.yml"); - static final Path projectBaseRecipePath = Paths.get("project-recipe.yml"); - - @Override - public Integer call() throws Exception { // your business logic goes here... - if (downloadQuarkusRecipe) { - System.out.println("Downloading recipe from Quarkus"); - Files.write(quarkus3DownloadedRecipePath, new URL(QUARKUS_UPDATES_BASE_URL).openStream().readAllBytes()); - } - - if (!Files.exists(quarkus3DownloadedRecipePath)) { - System.out.println("The Quarkus base recipe (" + quarkus3DownloadedRecipePath.getFileName() - + ") does not exist into the folder. Please download it manually or add the `true` parameter to the script call !"); - return 1; - } - - List quarkusRecipes = QuarkusUpdateRecipeIO - .readRecipesYaml(Files.readString(quarkus3DownloadedRecipePath)); - QuarkusUpdateRecipe mainRecipe = new QuarkusUpdateRecipe() - .buildTool(BuildTool.MAVEN); - versionProperties.forEach((property, version) -> { - System.out.println("Add Property '" + property + "' with value '" + version + "'"); - mainRecipe.addOperation(new UpdatePropertyOperation(property, version)); - }); - - if (Files.exists(projectBaseRecipePath)) { - System.out.println("Adding Project base recipe(s)"); - mainRecipe.addRecipes(QuarkusUpdateRecipeIO.readRecipesYaml(Files.readString(projectBaseRecipePath))); - } else { - System.out.println("No Project base recipe(s) available. Nothing done here ..."); - } - - System.out.println("Adding Managed dependency recipe(s)"); - Map managedDependencyMainRecipe = Map.of( - "type", "specs.openrewrite.org/v1beta/recipe", - "name", "org.kie.ManagedDependencies", - "displayName", "Update Managed Dependencies", - "description", "Update all managed dependencies based on dependency updates from Quarkus.", - "recipeList", retrieveAllChangeDependencyRecipesToManagedDependency(quarkusRecipes)); - mainRecipe.addRecipe(managedDependencyMainRecipe); - - System.out.println("Adding Quarkus base recipe(s)"); - mainRecipe.addRecipes(quarkusRecipes); - - System.out.println("Writing main recipe"); - QuarkusUpdateRecipeIO.write(quarkus3GeneratedRecipePath, mainRecipe); - - return 0; - } - - - public static void main(String... args) throws Exception { - int exitCode = new CommandLine(new CreateKieQuarkusProjectMigrationRecipeCli()).execute(args); - System.exit(exitCode); - } - - private List retrieveAllChangeDependencyRecipesToManagedDependency(List recipes) { - List changeDependencyRecipeList = new ArrayList<>(); - recipes.forEach(r -> { - if (r instanceof Map) { - List recipeList = (List) ((Map) r).get("recipeList"); - recipeList.forEach(recipeMap -> { - if (recipeMap instanceof Map) { - ((Map>) recipeMap).forEach((recipeName, args) -> { - if (recipeName.equals("org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId")) { - args.remove("overrideManagedVersion"); - if (!args.containsKey("newArtifactId")) { - args.put("newArtifactId", args.get("oldArtifactId")); - } - changeDependencyRecipeList.add(Map - .of("org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId", args)); - } - }); - } - }); - } - }); - return changeDependencyRecipeList; - } -} diff --git a/.ci/environments/quarkus-3/jbang/CreateQuarkusDroolsMigrationRecipe.java b/.ci/environments/quarkus-3/jbang/CreateQuarkusDroolsMigrationRecipe.java deleted file mode 100755 index 45405d171a..0000000000 --- a/.ci/environments/quarkus-3/jbang/CreateQuarkusDroolsMigrationRecipe.java +++ /dev/null @@ -1,111 +0,0 @@ -import java.net.URL; -import java.nio.charset.Charset; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import org.apache.commons.io.IOUtils; - -import io.quarkus.devtools.project.BuildTool; -import io.quarkus.devtools.project.update.QuarkusUpdateRecipe; -import io.quarkus.devtools.project.update.QuarkusUpdateRecipeIO; -import io.quarkus.devtools.project.update.operations.UpdatePropertyOperation; - -///usr/bin/env jbang "$0" "$@" ; exit $? -// Version to be changed when needed -//DEPS io.quarkus:quarkus-devtools-common:3.0.0.Final - -/* - * This script will generate the final `quarkus3.yml` file based on: - * - quarkus recipe file (see `QUARKUS_UPDATES_BASE_URL` constant) - * - local project-recipe.yaml => Specific project repository rules - * - * We use a lot of managed dependencies, it concatenates both files but it also add some new rules: - * In the Quarkus recipe, the dependencies rules are modified only for direct dependencies but not for managed dependencies. - * So the script adds a new step: - * - Reads all modified direct dependencies from the Quarkus recipe - * - Generates one managed dependency rule for each of them - */ -class CreateQuarkusProjectMigrationRecipe { - - static final String QUARKUS_VERSION = "3.0.0.Final"; - static final String QUARKUS_UPDATES_BASE_URL = "https://raw.githubusercontent.com/quarkusio/quarkus-updates/1.0.0/recipes/src/main/resources/quarkus-updates/core/3alpha.yaml"; - - static final Path quarkus3DownloadedRecipePath = Paths.get("quarkus3-base-recipe.yml"); - static final Path quarkus3GeneratedRecipePath = Paths.get("quarkus3.yml"); - static final Path projectBaseRecipePath = Paths.get("project-recipe.yml"); - - public static void main(String... args) throws Exception { - boolean downloadQuarkusRecipe = false; - if (args.length > 0) { - downloadQuarkusRecipe = Boolean.parseBoolean(args[0]); - } - - if (downloadQuarkusRecipe) { - Files.write(quarkus3DownloadedRecipePath, new URL(QUARKUS_UPDATES_BASE_URL).openStream().readAllBytes()); - } - - if (!Files.exists(quarkus3DownloadedRecipePath)) { - System.out.println("The Quarkus base recipe (" + quarkus3DownloadedRecipePath.getFileName() - + ") does not exist into the folder. Please download it manually or add the `true` parameter to the script call !"); - System.exit(1); - } - - List quarkusRecipes = QuarkusUpdateRecipeIO - .readRecipesYaml(Files.readString(quarkus3DownloadedRecipePath)); - QuarkusUpdateRecipe mainRecipe = new QuarkusUpdateRecipe() - .buildTool(BuildTool.MAVEN) - .addOperation(new UpdatePropertyOperation("version.io.quarkus", QUARKUS_VERSION)); - .addOperation(new UpdatePropertyOperation("quarkus.platform.version", QUARKUS_VERSION)); - .addOperation(new UpdatePropertyOperation("quarkus-plugin.version", QUARKUS_VERSION)); - - if (Files.exists(projectBaseRecipePath)) { - System.out.println("Adding Project base recipe(s)"); - mainRecipe.addRecipes(QuarkusUpdateRecipeIO.readRecipesYaml(Files.readString(projectBaseRecipePath))); - } else { - System.out.println("No Project base recipe(s) available. Nothing done here ..."); - } - - System.out.println("Adding Managed dependency recipe(s)"); - Map managedDependencyMainRecipe = Map.of( - "type", "specs.openrewrite.org/v1beta/recipe", - "name", "org.kie.ManagedDependencies", - "displayName", "Update Managed Dependencies", - "description", "Update all managed dependencies based on dependency updates from Quarkus.", - "recipeList", retrieveAllChangeDependencyRecipesToManagedDependency(quarkusRecipes)); - mainRecipe.addRecipe(managedDependencyMainRecipe); - - System.out.println("Adding Quarkus base recipe(s)"); - mainRecipe.addRecipes(quarkusRecipes); - - System.out.println("Writing main recipe"); - QuarkusUpdateRecipeIO.write(quarkus3GeneratedRecipePath, mainRecipe); - } - - private static List retrieveAllChangeDependencyRecipesToManagedDependency(List recipes) { - List changeDependencyRecipeList = new ArrayList<>(); - recipes.forEach(r -> { - if (r instanceof Map) { - List recipeList = (List) ((Map) r).get("recipeList"); - recipeList.forEach(recipeMap -> { - if (recipeMap instanceof Map) { - ((Map>) recipeMap).forEach((recipeName, args) -> { - if (recipeName.equals("org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId")) { - args.remove("overrideManagedVersion"); - if (!args.containsKey("newArtifactId")) { - args.put("newArtifactId", args.get("oldArtifactId")); - } - changeDependencyRecipeList.add(Map - .of("org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId", args)); - } - }); - } - }); - } - }); - return changeDependencyRecipeList; - } -} diff --git a/.ci/environments/quarkus-3/patches/0001_before_sh.patch b/.ci/environments/quarkus-3/patches/0001_before_sh.patch deleted file mode 100644 index a26fdb5c02..0000000000 --- a/.ci/environments/quarkus-3/patches/0001_before_sh.patch +++ /dev/null @@ -1,6440 +0,0 @@ -diff --git a/kogito-quarkus-examples/decisiontable-quarkus-example/pom.xml b/kogito-quarkus-examples/decisiontable-quarkus-example/pom.xml -index c584434b6..0d15bd47c 100644 ---- a/kogito-quarkus-examples/decisiontable-quarkus-example/pom.xml -+++ b/kogito-quarkus-examples/decisiontable-quarkus-example/pom.xml -@@ -10,15 +10,15 @@ - decisiontable-quarkus-example - Kogito Example :: Decision Table - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -- 8.44.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 9.44.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/decisiontable-quarkus-example/src/test/java/org/kie/kogito/decisiontable/quarkus/NativeRestQueryIT.java b/kogito-quarkus-examples/decisiontable-quarkus-example/src/test/java/org/kie/kogito/decisiontable/quarkus/NativeRestQueryIT.java -index eb6ce553f..379ac3c45 100644 ---- a/kogito-quarkus-examples/decisiontable-quarkus-example/src/test/java/org/kie/kogito/decisiontable/quarkus/NativeRestQueryIT.java -+++ b/kogito-quarkus-examples/decisiontable-quarkus-example/src/test/java/org/kie/kogito/decisiontable/quarkus/NativeRestQueryIT.java -@@ -15,9 +15,9 @@ - */ - package org.kie.kogito.decisiontable.quarkus; - --import io.quarkus.test.junit.NativeImageTest; -+import io.quarkus.test.junit.QuarkusIntegrationTest; - --@NativeImageTest -+@QuarkusIntegrationTest - public class NativeRestQueryIT extends RestQueryTest { - - // Execute the same tests but in native mode. -diff --git a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/pom.xml b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/pom.xml -index 5edc5ee79..fe2725438 100755 ---- a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/pom.xml -+++ b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/pom.xml -@@ -10,14 +10,14 @@ - dmn-drools-quarkus-metrics - Kogito Example :: DMN Metrics Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/java/org/kie/kogito/app/CustomDMNRuntimeEventListener.java b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/java/org/kie/kogito/app/CustomDMNRuntimeEventListener.java -index 7744eb66d..352066fca 100644 ---- a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/java/org/kie/kogito/app/CustomDMNRuntimeEventListener.java -+++ b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/java/org/kie/kogito/app/CustomDMNRuntimeEventListener.java -@@ -15,8 +15,8 @@ - */ - package org.kie.kogito.app; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; - - import org.kie.dmn.api.core.event.AfterEvaluateAllEvent; - import org.kie.dmn.api.core.event.AfterEvaluateContextEntryEvent; -diff --git a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/java/org/kie/kogito/app/RuleEventListenerConfig.java b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/java/org/kie/kogito/app/RuleEventListenerConfig.java -index de6b18ed7..206a1665d 100644 ---- a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/java/org/kie/kogito/app/RuleEventListenerConfig.java -+++ b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/java/org/kie/kogito/app/RuleEventListenerConfig.java -@@ -15,8 +15,8 @@ - */ - package org.kie.kogito.app; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; - - import org.kie.kogito.drools.core.config.DefaultRuleEventListenerConfig; - import org.kie.kogito.examples.CustomRuleEventListener; -diff --git a/kogito-quarkus-examples/dmn-event-driven-quarkus/pom.xml b/kogito-quarkus-examples/dmn-event-driven-quarkus/pom.xml -index f494fc03e..d06bbbd1e 100644 ---- a/kogito-quarkus-examples/dmn-event-driven-quarkus/pom.xml -+++ b/kogito-quarkus-examples/dmn-event-driven-quarkus/pom.xml -@@ -12,14 +12,14 @@ - dmn-event-driven-quarkus - Kogito Example :: DMN Event-Driven :: Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/dmn-event-driven-quarkus/src/test/java/org/kie/kogito/examples/NativeDmnEventDrivenIT.java b/kogito-quarkus-examples/dmn-event-driven-quarkus/src/test/java/org/kie/kogito/examples/NativeDmnEventDrivenIT.java -index 663d5b38a..d84f87993 100644 ---- a/kogito-quarkus-examples/dmn-event-driven-quarkus/src/test/java/org/kie/kogito/examples/NativeDmnEventDrivenIT.java -+++ b/kogito-quarkus-examples/dmn-event-driven-quarkus/src/test/java/org/kie/kogito/examples/NativeDmnEventDrivenIT.java -@@ -18,9 +18,9 @@ package org.kie.kogito.examples; - import org.kie.kogito.testcontainers.quarkus.KafkaQuarkusTestResource; - - import io.quarkus.test.common.QuarkusTestResource; --import io.quarkus.test.junit.NativeImageTest; -+import io.quarkus.test.junit.QuarkusIntegrationTest; - --@NativeImageTest -+@QuarkusIntegrationTest - @QuarkusTestResource(KafkaQuarkusTestResource.class) - public class NativeDmnEventDrivenIT extends DmnEventDrivenIT { - -diff --git a/kogito-quarkus-examples/dmn-incubation-api-quarkus/pom.xml b/kogito-quarkus-examples/dmn-incubation-api-quarkus/pom.xml -index c5abbd378..50ee80ba3 100644 ---- a/kogito-quarkus-examples/dmn-incubation-api-quarkus/pom.xml -+++ b/kogito-quarkus-examples/dmn-incubation-api-quarkus/pom.xml -@@ -10,14 +10,14 @@ - dmn-incubation-api-quarkus - Kogito Example :: DMN Incubation API With Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/dmn-incubation-api-quarkus/src/main/java/org/acme/CustomRestDecision.java b/kogito-quarkus-examples/dmn-incubation-api-quarkus/src/main/java/org/acme/CustomRestDecision.java -index 6b130eb44..a0d601529 100644 ---- a/kogito-quarkus-examples/dmn-incubation-api-quarkus/src/main/java/org/acme/CustomRestDecision.java -+++ b/kogito-quarkus-examples/dmn-incubation-api-quarkus/src/main/java/org/acme/CustomRestDecision.java -@@ -17,12 +17,12 @@ package org.acme; - - import java.util.Map; - --import javax.inject.Inject; --import javax.ws.rs.Consumes; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; -+import jakarta.inject.Inject; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; - - import org.kie.kogito.incubation.application.AppRoot; - import org.kie.kogito.incubation.common.DataContext; -diff --git a/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/pom.xml b/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/pom.xml -index 52abe49c3..9d413db17 100644 ---- a/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/pom.xml -+++ b/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/pom.xml -@@ -14,14 +14,14 @@ - - - 2.33.2 -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/src/test/java/org/kie/kogito/examples/CloudEventListenerTest.java b/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/src/test/java/org/kie/kogito/examples/CloudEventListenerTest.java -index d4156050f..5f258cd40 100644 ---- a/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/src/test/java/org/kie/kogito/examples/CloudEventListenerTest.java -+++ b/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/src/test/java/org/kie/kogito/examples/CloudEventListenerTest.java -@@ -17,7 +17,7 @@ package org.kie.kogito.examples; - - import java.util.Map; - --import javax.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.MediaType; - - import org.junit.jupiter.api.AfterAll; - import org.junit.jupiter.api.BeforeAll; -diff --git a/kogito-quarkus-examples/dmn-listener-dtable/pom.xml b/kogito-quarkus-examples/dmn-listener-dtable/pom.xml -index 8b3abdb38..9cfc58da5 100644 ---- a/kogito-quarkus-examples/dmn-listener-dtable/pom.xml -+++ b/kogito-quarkus-examples/dmn-listener-dtable/pom.xml -@@ -10,14 +10,14 @@ - dmn-listener-dtable - Kogito Example :: DMN Decision Table listener - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/dmn-listener-dtable/src/main/java/org/kie/kogito/dmn/quarkus/example/dtlistener/ExampleDMNRuntimeEventListener.java b/kogito-quarkus-examples/dmn-listener-dtable/src/main/java/org/kie/kogito/dmn/quarkus/example/dtlistener/ExampleDMNRuntimeEventListener.java -index 5c9c238d3..527490b64 100644 ---- a/kogito-quarkus-examples/dmn-listener-dtable/src/main/java/org/kie/kogito/dmn/quarkus/example/dtlistener/ExampleDMNRuntimeEventListener.java -+++ b/kogito-quarkus-examples/dmn-listener-dtable/src/main/java/org/kie/kogito/dmn/quarkus/example/dtlistener/ExampleDMNRuntimeEventListener.java -@@ -18,7 +18,7 @@ package org.kie.kogito.dmn.quarkus.example.dtlistener; - import java.util.Queue; - import java.util.concurrent.ConcurrentLinkedQueue; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.kie.dmn.api.core.event.AfterEvaluateDecisionTableEvent; - import org.kie.dmn.core.api.event.DefaultDMNRuntimeEventListener; -diff --git a/kogito-quarkus-examples/dmn-listener-dtable/src/main/java/org/kie/kogito/dmn/quarkus/example/dtlistener/PeriodicJobBean.java b/kogito-quarkus-examples/dmn-listener-dtable/src/main/java/org/kie/kogito/dmn/quarkus/example/dtlistener/PeriodicJobBean.java -index 206919212..b0def9c39 100644 ---- a/kogito-quarkus-examples/dmn-listener-dtable/src/main/java/org/kie/kogito/dmn/quarkus/example/dtlistener/PeriodicJobBean.java -+++ b/kogito-quarkus-examples/dmn-listener-dtable/src/main/java/org/kie/kogito/dmn/quarkus/example/dtlistener/PeriodicJobBean.java -@@ -17,8 +17,8 @@ package org.kie.kogito.dmn.quarkus.example.dtlistener; - - import java.util.concurrent.TimeUnit; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; - - import org.kie.dmn.api.core.event.AfterEvaluateDecisionTableEvent; - import org.kie.dmn.model.api.DecisionTable; -diff --git a/kogito-quarkus-examples/dmn-listener-dtable/src/test/java/org/kie/kogito/dmn/quarkus/example/dtlistener/DecisionTableTest.java b/kogito-quarkus-examples/dmn-listener-dtable/src/test/java/org/kie/kogito/dmn/quarkus/example/dtlistener/DecisionTableTest.java -index 58d847b1e..3b7d821f6 100644 ---- a/kogito-quarkus-examples/dmn-listener-dtable/src/test/java/org/kie/kogito/dmn/quarkus/example/dtlistener/DecisionTableTest.java -+++ b/kogito-quarkus-examples/dmn-listener-dtable/src/test/java/org/kie/kogito/dmn/quarkus/example/dtlistener/DecisionTableTest.java -@@ -17,7 +17,7 @@ package org.kie.kogito.dmn.quarkus.example.dtlistener; - - import java.util.concurrent.TimeUnit; - --import javax.inject.Inject; -+import jakarta.inject.Inject; - - import org.junit.jupiter.api.Test; - -diff --git a/kogito-quarkus-examples/dmn-listener-quarkus/pom.xml b/kogito-quarkus-examples/dmn-listener-quarkus/pom.xml -index df719ac5b..4041c807a 100644 ---- a/kogito-quarkus-examples/dmn-listener-quarkus/pom.xml -+++ b/kogito-quarkus-examples/dmn-listener-quarkus/pom.xml -@@ -10,14 +10,14 @@ - dmn-listener-quarkus - Kogito Example :: DMN with listeners - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/dmn-listener-quarkus/src/main/java/org/kie/kogito/dmn/quarkus/example/listener/ExampleDMNRuntimeEventListener.java b/kogito-quarkus-examples/dmn-listener-quarkus/src/main/java/org/kie/kogito/dmn/quarkus/example/listener/ExampleDMNRuntimeEventListener.java -index 5be5815cd..f2524241d 100644 ---- a/kogito-quarkus-examples/dmn-listener-quarkus/src/main/java/org/kie/kogito/dmn/quarkus/example/listener/ExampleDMNRuntimeEventListener.java -+++ b/kogito-quarkus-examples/dmn-listener-quarkus/src/main/java/org/kie/kogito/dmn/quarkus/example/listener/ExampleDMNRuntimeEventListener.java -@@ -15,7 +15,7 @@ - */ - package org.kie.kogito.dmn.quarkus.example.listener; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - /** - * This class demonstrates one of the two methods offered by Kogito to inject custom -diff --git a/kogito-quarkus-examples/dmn-listener-quarkus/src/main/java/org/kie/kogito/dmn/quarkus/example/listener/ExampleDecisionEventListenerConfig.java b/kogito-quarkus-examples/dmn-listener-quarkus/src/main/java/org/kie/kogito/dmn/quarkus/example/listener/ExampleDecisionEventListenerConfig.java -index 02e7e6b87..bfe7fee1b 100644 ---- a/kogito-quarkus-examples/dmn-listener-quarkus/src/main/java/org/kie/kogito/dmn/quarkus/example/listener/ExampleDecisionEventListenerConfig.java -+++ b/kogito-quarkus-examples/dmn-listener-quarkus/src/main/java/org/kie/kogito/dmn/quarkus/example/listener/ExampleDecisionEventListenerConfig.java -@@ -15,7 +15,7 @@ - */ - package org.kie.kogito.dmn.quarkus.example.listener; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.kie.kogito.dmn.config.CachedDecisionEventListenerConfig; - -diff --git a/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/listener/NativeTrafficViolationIT.java b/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/listener/NativeTrafficViolationIT.java -index a4223fe04..04eaa0c31 100644 ---- a/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/listener/NativeTrafficViolationIT.java -+++ b/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/listener/NativeTrafficViolationIT.java -@@ -15,9 +15,9 @@ - */ - package org.kie.kogito.dmn.quarkus.example.listener; - --import io.quarkus.test.junit.NativeImageTest; -+import io.quarkus.test.junit.QuarkusIntegrationTest; - --@NativeImageTest -+@QuarkusIntegrationTest - public class NativeTrafficViolationIT extends TrafficViolationTest { - - // Execute the same tests but in native mode. -diff --git a/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/listener/TrafficViolationListenerTest.java b/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/listener/TrafficViolationListenerTest.java -index 207d9e43e..ee82faee9 100644 ---- a/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/listener/TrafficViolationListenerTest.java -+++ b/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/listener/TrafficViolationListenerTest.java -@@ -19,7 +19,7 @@ import java.util.List; - import java.util.Map; - import java.util.Optional; - --import javax.inject.Inject; -+import jakarta.inject.Inject; - - import org.junit.jupiter.api.Test; - import org.kie.dmn.api.core.event.DMNRuntimeEventListener; -diff --git a/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/mock/MockDMNRuntimeEventListener.java b/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/mock/MockDMNRuntimeEventListener.java -index 427bad341..fe300f8c0 100644 ---- a/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/mock/MockDMNRuntimeEventListener.java -+++ b/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/mock/MockDMNRuntimeEventListener.java -@@ -18,7 +18,7 @@ package org.kie.kogito.dmn.quarkus.example.mock; - import java.util.HashMap; - import java.util.Map; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.kie.dmn.api.core.event.AfterEvaluateAllEvent; - import org.kie.dmn.api.core.event.BeforeEvaluateAllEvent; -diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/pom.xml b/kogito-quarkus-examples/dmn-pmml-quarkus-example/pom.xml -index 2b502a045..a5dd0e6de 100644 ---- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/pom.xml -+++ b/kogito-quarkus-examples/dmn-pmml-quarkus-example/pom.xml -@@ -10,14 +10,14 @@ - dmn-pmml-quarkus-example - Kogito Example :: DMN :: PMML - QUARKUS - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDMNRegressionIT.java b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDMNRegressionIT.java -index 1c752f6d6..2792343e6 100644 ---- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDMNRegressionIT.java -+++ b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDMNRegressionIT.java -@@ -15,9 +15,9 @@ - */ - package org.kie.kogito.dmn.pmml.quarkus.example; - --import io.quarkus.test.junit.NativeImageTest; -+import io.quarkus.test.junit.QuarkusIntegrationTest; - --@NativeImageTest -+@QuarkusIntegrationTest - public class NativeDMNRegressionIT extends DMNRegressionTest { - - // Execute the same tests but in native mode. -diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDMNTreeIT.java b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDMNTreeIT.java -index 174768ce4..1509a3f88 100644 ---- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDMNTreeIT.java -+++ b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDMNTreeIT.java -@@ -15,9 +15,9 @@ - */ - package org.kie.kogito.dmn.pmml.quarkus.example; - --import io.quarkus.test.junit.NativeImageTest; -+import io.quarkus.test.junit.QuarkusIntegrationTest; - --@NativeImageTest -+@QuarkusIntegrationTest - public class NativeDMNTreeIT extends DMNTreeTest { - - // Execute the same tests but in native mode. -diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDecisionTreeIT.java b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDecisionTreeIT.java -index c227f3ff2..6e84ddf29 100644 ---- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDecisionTreeIT.java -+++ b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDecisionTreeIT.java -@@ -15,9 +15,9 @@ - */ - package org.kie.kogito.dmn.pmml.quarkus.example; - --import io.quarkus.test.junit.NativeImageTest; -+import io.quarkus.test.junit.QuarkusIntegrationTest; - --@NativeImageTest -+@QuarkusIntegrationTest - public class NativeDecisionTreeIT extends DecisionTreeTest { - - // Execute the same tests but in native mode. -diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeLinRegIT.java b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeLinRegIT.java -index 1718164ec..7c979f9c9 100644 ---- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeLinRegIT.java -+++ b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeLinRegIT.java -@@ -15,9 +15,9 @@ - */ - package org.kie.kogito.dmn.pmml.quarkus.example; - --import io.quarkus.test.junit.NativeImageTest; -+import io.quarkus.test.junit.QuarkusIntegrationTest; - --@NativeImageTest -+@QuarkusIntegrationTest - public class NativeLinRegIT extends LinRegTest { - - // Execute the same tests but in native mode. -diff --git a/kogito-quarkus-examples/dmn-quarkus-example/pom.xml b/kogito-quarkus-examples/dmn-quarkus-example/pom.xml -index 38ccc0370..93aaf6ce2 100644 ---- a/kogito-quarkus-examples/dmn-quarkus-example/pom.xml -+++ b/kogito-quarkus-examples/dmn-quarkus-example/pom.xml -@@ -10,14 +10,14 @@ - dmn-quarkus-example - Kogito Example :: DMN - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/dmn-quarkus-example/src/test/java/org/kie/kogito/dmn/quarkus/example/NativeTrafficViolationIT.java b/kogito-quarkus-examples/dmn-quarkus-example/src/test/java/org/kie/kogito/dmn/quarkus/example/NativeTrafficViolationIT.java -index cbd459afc..6e8fc9234 100644 ---- a/kogito-quarkus-examples/dmn-quarkus-example/src/test/java/org/kie/kogito/dmn/quarkus/example/NativeTrafficViolationIT.java -+++ b/kogito-quarkus-examples/dmn-quarkus-example/src/test/java/org/kie/kogito/dmn/quarkus/example/NativeTrafficViolationIT.java -@@ -15,9 +15,9 @@ - */ - package org.kie.kogito.dmn.quarkus.example; - --import io.quarkus.test.junit.NativeImageTest; -+import io.quarkus.test.junit.QuarkusIntegrationTest; - --@NativeImageTest -+@QuarkusIntegrationTest - public class NativeTrafficViolationIT extends TrafficViolationTest { - - // Execute the same tests but in native mode. -diff --git a/kogito-quarkus-examples/dmn-tracing-quarkus/pom.xml b/kogito-quarkus-examples/dmn-tracing-quarkus/pom.xml -index 07fc0c4ce..0eb1f4f7e 100644 ---- a/kogito-quarkus-examples/dmn-tracing-quarkus/pom.xml -+++ b/kogito-quarkus-examples/dmn-tracing-quarkus/pom.xml -@@ -10,14 +10,14 @@ - dmn-tracing-quarkus - Kogito Example :: DMN Tracing - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/dmn-tracing-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/tracing/NativeLoanEligibilityIT.java b/kogito-quarkus-examples/dmn-tracing-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/tracing/NativeLoanEligibilityIT.java -index 75cb11174..e20d0f871 100644 ---- a/kogito-quarkus-examples/dmn-tracing-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/tracing/NativeLoanEligibilityIT.java -+++ b/kogito-quarkus-examples/dmn-tracing-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/tracing/NativeLoanEligibilityIT.java -@@ -18,9 +18,9 @@ package org.kie.kogito.dmn.quarkus.tracing; - import org.kie.kogito.testcontainers.quarkus.KafkaQuarkusTestResource; - - import io.quarkus.test.common.QuarkusTestResource; --import io.quarkus.test.junit.NativeImageTest; -+import io.quarkus.test.junit.QuarkusIntegrationTest; - --@NativeImageTest -+@QuarkusIntegrationTest - @QuarkusTestResource(KafkaQuarkusTestResource.class) - public class NativeLoanEligibilityIT extends LoanEligibilityIT { - -diff --git a/kogito-quarkus-examples/flexible-process-quarkus/pom.xml b/kogito-quarkus-examples/flexible-process-quarkus/pom.xml -index f59b52e1f..a06c67d3b 100644 ---- a/kogito-quarkus-examples/flexible-process-quarkus/pom.xml -+++ b/kogito-quarkus-examples/flexible-process-quarkus/pom.xml -@@ -10,14 +10,14 @@ - flexible-process-quarkus - Kogito Example :: Flexible Process - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/service/CommentService.java b/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/service/CommentService.java -index 70061b61c..449f2ad29 100644 ---- a/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/service/CommentService.java -+++ b/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/service/CommentService.java -@@ -15,7 +15,7 @@ - */ - package org.kie.kogito.flexible.example.service; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.kie.kogito.flexible.example.model.Comment; - import org.kie.kogito.flexible.example.model.State; -diff --git a/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/service/StateService.java b/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/service/StateService.java -index 68d512c10..95f7cc2ea 100644 ---- a/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/service/StateService.java -+++ b/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/service/StateService.java -@@ -15,7 +15,7 @@ - */ - package org.kie.kogito.flexible.example.service; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.kie.kogito.flexible.example.model.Questionnaire; - import org.kie.kogito.flexible.example.model.State; -diff --git a/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/service/TriageService.java b/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/service/TriageService.java -index 2f98e7371..7e08d7b26 100644 ---- a/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/service/TriageService.java -+++ b/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/service/TriageService.java -@@ -17,7 +17,7 @@ package org.kie.kogito.flexible.example.service; - - import java.util.Random; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.kie.kogito.flexible.example.model.State; - import org.kie.kogito.flexible.example.model.SupportCase; -diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/pom.xml b/kogito-quarkus-examples/kogito-travel-agency/basic/pom.xml -index ef3c38177..0bd6d027c 100644 ---- a/kogito-quarkus-examples/kogito-travel-agency/basic/pom.xml -+++ b/kogito-quarkus-examples/kogito-travel-agency/basic/pom.xml -@@ -12,15 +12,15 @@ - - UTF-8 - UTF-8 -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -- 8.44.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 9.44.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/service/FlightBookingService.java b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/service/FlightBookingService.java -index 952adcee9..a696fe524 100644 ---- a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/service/FlightBookingService.java -+++ b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/service/FlightBookingService.java -@@ -15,7 +15,7 @@ - */ - package org.acme.travels.service; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.acme.travels.Flight; - import org.acme.travels.Trip; -diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/service/HotelBookingService.java b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/service/HotelBookingService.java -index d03812216..39119f13b 100644 ---- a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/service/HotelBookingService.java -+++ b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/service/HotelBookingService.java -@@ -15,7 +15,7 @@ - */ - package org.acme.travels.service; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.acme.travels.Address; - import org.acme.travels.Hotel; -diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/BookFlightTest.java b/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/BookFlightTest.java -index 5f5d08ebf..8342d60cd 100644 ---- a/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/BookFlightTest.java -+++ b/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/BookFlightTest.java -@@ -19,8 +19,8 @@ import java.util.Date; - import java.util.HashMap; - import java.util.Map; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.acme.travels.Address; - import org.acme.travels.Flight; -diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/BookHotelTest.java b/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/BookHotelTest.java -index 6161bde5d..350aa3d47 100644 ---- a/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/BookHotelTest.java -+++ b/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/BookHotelTest.java -@@ -19,8 +19,8 @@ import java.util.Date; - import java.util.HashMap; - import java.util.Map; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.acme.travels.Address; - import org.acme.travels.Hotel; -diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/TravelTest.java b/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/TravelTest.java -index a79fa3e35..38262abf0 100644 ---- a/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/TravelTest.java -+++ b/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/TravelTest.java -@@ -21,8 +21,8 @@ import java.util.HashMap; - import java.util.List; - import java.util.Map; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.acme.travels.Address; - import org.acme.travels.Flight; -diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/VisaRulesTest.java b/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/VisaRulesTest.java -index a45f594c8..cbff49950 100644 ---- a/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/VisaRulesTest.java -+++ b/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/VisaRulesTest.java -@@ -17,7 +17,7 @@ package org.acme.travel; - - import java.util.Date; - --import javax.inject.Inject; -+import jakarta.inject.Inject; - - import org.acme.travels.Address; - import org.acme.travels.Traveller; -diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/pom.xml b/kogito-quarkus-examples/kogito-travel-agency/extended/pom.xml -index c95c81251..6040d3fe5 100644 ---- a/kogito-quarkus-examples/kogito-travel-agency/extended/pom.xml -+++ b/kogito-quarkus-examples/kogito-travel-agency/extended/pom.xml -@@ -15,10 +15,10 @@ - visas - - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - - - -diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/pom.xml b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/pom.xml -index 7495c8277..2c080c04b 100644 ---- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/pom.xml -+++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/pom.xml -@@ -10,15 +10,15 @@ - travels - Kogito Example :: Travel Agency :: Travels - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -- 8.44.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 9.44.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/Traveller.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/Traveller.java -index 2f2f9c004..eee3f54bb 100644 ---- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/Traveller.java -+++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/Traveller.java -@@ -15,10 +15,10 @@ - */ - package org.acme.travels; - --import javax.validation.constraints.Email; --import javax.validation.constraints.NotBlank; --import javax.validation.constraints.NotNull; --import javax.validation.constraints.Size; -+import jakarta.validation.constraints.Email; -+import jakarta.validation.constraints.NotBlank; -+import jakarta.validation.constraints.NotNull; -+import jakarta.validation.constraints.Size; - - public class Traveller { - -diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/service/FlightBookingResource.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/service/FlightBookingResource.java -index 6963ac09d..84927223d 100644 ---- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/service/FlightBookingResource.java -+++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/service/FlightBookingResource.java -@@ -15,12 +15,12 @@ - */ - package org.acme.travels.service; - --import javax.inject.Inject; --import javax.ws.rs.GET; --import javax.ws.rs.PUT; --import javax.ws.rs.Path; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; -+import jakarta.inject.Inject; -+import jakarta.ws.rs.GET; -+import jakarta.ws.rs.PUT; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; - - @Path("/flightservice") - public class FlightBookingResource { -diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/service/FlightBookingService.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/service/FlightBookingService.java -index fd8dca72b..f8f2dbdb7 100644 ---- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/service/FlightBookingService.java -+++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/service/FlightBookingService.java -@@ -15,7 +15,7 @@ - */ - package org.acme.travels.service; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.acme.travels.Flight; - import org.acme.travels.Trip; -diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/service/HotelBookingService.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/service/HotelBookingService.java -index d03812216..39119f13b 100644 ---- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/service/HotelBookingService.java -+++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/service/HotelBookingService.java -@@ -15,7 +15,7 @@ - */ - package org.acme.travels.service; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.acme.travels.Address; - import org.acme.travels.Hotel; -diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/kie/kogito/app/VertxRouter.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/kie/kogito/app/VertxRouter.java -index 5a5f7ed9b..5414e1756 100644 ---- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/kie/kogito/app/VertxRouter.java -+++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/kie/kogito/app/VertxRouter.java -@@ -15,9 +15,9 @@ - */ - package org.kie.kogito.app; - --import javax.enterprise.context.ApplicationScoped; --import javax.enterprise.event.Observes; --import javax.inject.Inject; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.event.Observes; -+import jakarta.inject.Inject; - - import io.quarkus.qute.Location; - import io.quarkus.qute.Template; -diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/BookFlightIT.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/BookFlightIT.java -index 70283a30a..cda81b09d 100644 ---- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/BookFlightIT.java -+++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/BookFlightIT.java -@@ -19,8 +19,8 @@ import java.util.Date; - import java.util.HashMap; - import java.util.Map; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.acme.travels.Address; - import org.acme.travels.Flight; -diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/BookHotelIT.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/BookHotelIT.java -index 506a68177..909d1ebef 100644 ---- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/BookHotelIT.java -+++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/BookHotelIT.java -@@ -19,8 +19,8 @@ import java.util.Date; - import java.util.HashMap; - import java.util.Map; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.acme.travels.Address; - import org.acme.travels.Hotel; -diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/TravelIT.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/TravelIT.java -index e9d522dee..3420a34d2 100644 ---- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/TravelIT.java -+++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/TravelIT.java -@@ -21,8 +21,8 @@ import java.util.HashMap; - import java.util.List; - import java.util.Map; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.acme.travels.Address; - import org.acme.travels.Flight; -diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/VisaRulesIT.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/VisaRulesIT.java -index 608ca9daa..dcfe44dfa 100644 ---- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/VisaRulesIT.java -+++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/VisaRulesIT.java -@@ -17,7 +17,7 @@ package org.acme.travel; - - import java.util.Date; - --import javax.inject.Inject; -+import jakarta.inject.Inject; - - import org.acme.travels.Address; - import org.acme.travels.Traveller; -diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/pom.xml b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/pom.xml -index 8e8342f2a..116a1b614 100644 ---- a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/pom.xml -+++ b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/pom.xml -@@ -10,14 +10,14 @@ - visas - Kogito Example :: Travel Agency :: Visas - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/kie/kogito/app/ProcessEventListenerConfig.java b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/kie/kogito/app/ProcessEventListenerConfig.java -index e49595a34..51a2282a3 100644 ---- a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/kie/kogito/app/ProcessEventListenerConfig.java -+++ b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/kie/kogito/app/ProcessEventListenerConfig.java -@@ -14,11 +14,10 @@ - * limitations under the License. - */ - package org.kie.kogito.app; -- --import javax.annotation.PostConstruct; --import javax.annotation.PreDestroy; --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -+import jakarta.annotation.PostConstruct; -+import jakarta.annotation.PreDestroy; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; - - import org.kie.kogito.KogitoGAV; - import org.kie.kogito.config.ConfigBean; -diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/kie/kogito/app/VertxRouter.java b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/kie/kogito/app/VertxRouter.java -index 20705faa7..e8b278eac 100644 ---- a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/kie/kogito/app/VertxRouter.java -+++ b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/kie/kogito/app/VertxRouter.java -@@ -15,9 +15,9 @@ - */ - package org.kie.kogito.app; - --import javax.enterprise.context.ApplicationScoped; --import javax.enterprise.event.Observes; --import javax.inject.Inject; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.event.Observes; -+import jakarta.inject.Inject; - - import io.quarkus.qute.Location; - import io.quarkus.qute.Template; -diff --git a/kogito-quarkus-examples/kogito-travel-agency/pom.xml b/kogito-quarkus-examples/kogito-travel-agency/pom.xml -index 57f6d1b31..8b8ccd73f 100644 ---- a/kogito-quarkus-examples/kogito-travel-agency/pom.xml -+++ b/kogito-quarkus-examples/kogito-travel-agency/pom.xml -@@ -15,10 +15,10 @@ - extended - - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - - - -diff --git a/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/IdResource.java b/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/IdResource.java -index b34a44c82..1ee05ccf7 100644 ---- a/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/IdResource.java -+++ b/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/IdResource.java -@@ -15,11 +15,11 @@ - */ - package org.kie.kogito.examples.hr; - --import javax.ws.rs.Consumes; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; - - @Path("/id") - public class IdResource { -diff --git a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/BaseWorkItemHandlerConfig.java b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/BaseWorkItemHandlerConfig.java -index cf8e63d12..544a249a6 100644 ---- a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/BaseWorkItemHandlerConfig.java -+++ b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/BaseWorkItemHandlerConfig.java -@@ -15,6 +15,7 @@ - */ - package org.kie.kogito.examples; - -+import jakarta.annotation.PostConstruct; - import java.util.ArrayList; - import java.util.Arrays; - import java.util.Collection; -@@ -22,8 +23,7 @@ import java.util.HashMap; - import java.util.List; - import java.util.Map; - --import javax.annotation.PostConstruct; --import javax.inject.Inject; -+import jakarta.inject.Inject; - - import org.eclipse.microprofile.config.inject.ConfigProperty; - import org.kie.kogito.addons.k8s.Endpoint; -diff --git a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/WorkItemHandlerConfig.java b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/WorkItemHandlerConfig.java -index a56957ec5..f183cf98a 100644 ---- a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/WorkItemHandlerConfig.java -+++ b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/WorkItemHandlerConfig.java -@@ -15,7 +15,7 @@ - */ - package org.kie.kogito.examples; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - @ApplicationScoped - public class WorkItemHandlerConfig extends BaseWorkItemHandlerConfig { -diff --git a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/onboarding/DecisionTaskWorkItemHandler.java b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/onboarding/DecisionTaskWorkItemHandler.java -index 5caf31508..424aaaab7 100644 ---- a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/onboarding/DecisionTaskWorkItemHandler.java -+++ b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/onboarding/DecisionTaskWorkItemHandler.java -@@ -17,7 +17,7 @@ package org.kie.kogito.examples.onboarding; - - import java.util.Map; - --import javax.ws.rs.HttpMethod; -+import jakarta.ws.rs.HttpMethod; - - import org.kie.kogito.addons.quarkus.k8s.workitems.QuarkusDiscoveredEndpointCaller; - import org.kie.kogito.internal.process.runtime.KogitoWorkItem; -diff --git a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/test/java/org/kie/kogito/examples/onboarding/OnboardingEndpointIT.java b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/test/java/org/kie/kogito/examples/onboarding/OnboardingEndpointIT.java -index 31e515055..dd582af13 100644 ---- a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/test/java/org/kie/kogito/examples/onboarding/OnboardingEndpointIT.java -+++ b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/test/java/org/kie/kogito/examples/onboarding/OnboardingEndpointIT.java -@@ -23,7 +23,7 @@ import java.util.HashMap; - import java.util.Map; - import java.util.function.Function; - --import javax.inject.Inject; -+import jakarta.inject.Inject; - - import org.junit.jupiter.api.Test; - import org.kie.kogito.examples.test.RecordedOutputWorkItemHandler; -diff --git a/kogito-quarkus-examples/onboarding-example/payroll/pom.xml b/kogito-quarkus-examples/onboarding-example/payroll/pom.xml -index dc3a6cfa0..ee41039b3 100644 ---- a/kogito-quarkus-examples/onboarding-example/payroll/pom.xml -+++ b/kogito-quarkus-examples/onboarding-example/payroll/pom.xml -@@ -11,10 +11,10 @@ - Kogito Example :: Onboarding Example :: Payroll with DMN - Payroll related decisions for onboarding - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - - - -diff --git a/kogito-quarkus-examples/onboarding-example/pom.xml b/kogito-quarkus-examples/onboarding-example/pom.xml -index 0c349c8b1..01038a7d7 100644 ---- a/kogito-quarkus-examples/onboarding-example/pom.xml -+++ b/kogito-quarkus-examples/onboarding-example/pom.xml -@@ -17,14 +17,14 @@ - onboarding-quarkus - - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/pmml-event-driven-quarkus/pom.xml b/kogito-quarkus-examples/pmml-event-driven-quarkus/pom.xml -index 04ad43e09..78d159362 100644 ---- a/kogito-quarkus-examples/pmml-event-driven-quarkus/pom.xml -+++ b/kogito-quarkus-examples/pmml-event-driven-quarkus/pom.xml -@@ -10,14 +10,14 @@ - pmml-event-driven-quarkus - Kogito Example :: PMML Event-Driven - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/pmml-incubation-api-quarkus/pom.xml b/kogito-quarkus-examples/pmml-incubation-api-quarkus/pom.xml -index 4a930255b..e82901bca 100644 ---- a/kogito-quarkus-examples/pmml-incubation-api-quarkus/pom.xml -+++ b/kogito-quarkus-examples/pmml-incubation-api-quarkus/pom.xml -@@ -10,14 +10,14 @@ - pmml-incubation-api-quarkus - Kogito Example :: PMML Incubation API With Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/pmml-incubation-api-quarkus/src/main/java/org/acme/CustomRestPrediction.java b/kogito-quarkus-examples/pmml-incubation-api-quarkus/src/main/java/org/acme/CustomRestPrediction.java -index ff7152a4f..8da1acfc7 100644 ---- a/kogito-quarkus-examples/pmml-incubation-api-quarkus/src/main/java/org/acme/CustomRestPrediction.java -+++ b/kogito-quarkus-examples/pmml-incubation-api-quarkus/src/main/java/org/acme/CustomRestPrediction.java -@@ -17,12 +17,12 @@ package org.acme; - - import java.util.Map; - --import javax.inject.Inject; --import javax.ws.rs.Consumes; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; -+import jakarta.inject.Inject; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; - - import org.kie.kogito.incubation.application.AppRoot; - import org.kie.kogito.incubation.common.DataContext; -diff --git a/kogito-quarkus-examples/pmml-quarkus-example/pom.xml b/kogito-quarkus-examples/pmml-quarkus-example/pom.xml -index 40fb97a02..39fa0424e 100644 ---- a/kogito-quarkus-examples/pmml-quarkus-example/pom.xml -+++ b/kogito-quarkus-examples/pmml-quarkus-example/pom.xml -@@ -10,14 +10,14 @@ - pmml-quarkus-example - Kogito Example :: PMML - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeLinRegTestIT.java b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeLinRegTestIT.java -index d173b1e4d..422f91590 100644 ---- a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeLinRegTestIT.java -+++ b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeLinRegTestIT.java -@@ -15,9 +15,9 @@ - */ - package org.kie.kogito.pmml.quarkus.example; - --import io.quarkus.test.junit.NativeImageTest; -+import io.quarkus.test.junit.QuarkusIntegrationTest; - --@NativeImageTest -+@QuarkusIntegrationTest - public class NativeLinRegTestIT extends LinRegTest { - - // Execute the same tests but in native mode. -diff --git a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeMiningModelTestIT.java b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeMiningModelTestIT.java -index f29e5a049..e4e6e02a0 100644 ---- a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeMiningModelTestIT.java -+++ b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeMiningModelTestIT.java -@@ -15,9 +15,9 @@ - */ - package org.kie.kogito.pmml.quarkus.example; - --import io.quarkus.test.junit.NativeImageTest; -+import io.quarkus.test.junit.QuarkusIntegrationTest; - --@NativeImageTest -+@QuarkusIntegrationTest - public class NativeMiningModelTestIT extends MiningModelTest { - - // Execute the same tests but in native mode. -diff --git a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeSampleMineTestIT.java b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeSampleMineTestIT.java -index 8b4160f80..a75ea13c5 100644 ---- a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeSampleMineTestIT.java -+++ b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeSampleMineTestIT.java -@@ -15,9 +15,9 @@ - */ - package org.kie.kogito.pmml.quarkus.example; - --import io.quarkus.test.junit.NativeImageTest; -+import io.quarkus.test.junit.QuarkusIntegrationTest; - --@NativeImageTest -+@QuarkusIntegrationTest - public class NativeSampleMineTestIT extends SampleMineTest { - - // Execute the same tests but in native mode. -diff --git a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeSimpleScorecardTestIT.java b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeSimpleScorecardTestIT.java -index e2ebcb606..57ca4ae5a 100644 ---- a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeSimpleScorecardTestIT.java -+++ b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeSimpleScorecardTestIT.java -@@ -15,9 +15,9 @@ - */ - package org.kie.kogito.pmml.quarkus.example; - --import io.quarkus.test.junit.NativeImageTest; -+import io.quarkus.test.junit.QuarkusIntegrationTest; - --@NativeImageTest -+@QuarkusIntegrationTest - public class NativeSimpleScorecardTestIT extends SimpleScorecardTest { - - // Execute the same tests but in native mode. -diff --git a/kogito-quarkus-examples/process-business-rules-quarkus/pom.xml b/kogito-quarkus-examples/process-business-rules-quarkus/pom.xml -index d20e8e4f8..64f0ff6ec 100644 ---- a/kogito-quarkus-examples/process-business-rules-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-business-rules-quarkus/pom.xml -@@ -11,14 +11,14 @@ - Kogito Example :: Process Business Rules Quarkus - Kogito business rules invocation - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-business-rules-quarkus/src/test/java/org/acme/travels/PersonProcessTest.java b/kogito-quarkus-examples/process-business-rules-quarkus/src/test/java/org/acme/travels/PersonProcessTest.java -index 9ff19f514..727a32d48 100644 ---- a/kogito-quarkus-examples/process-business-rules-quarkus/src/test/java/org/acme/travels/PersonProcessTest.java -+++ b/kogito-quarkus-examples/process-business-rules-quarkus/src/test/java/org/acme/travels/PersonProcessTest.java -@@ -19,8 +19,8 @@ import java.util.HashMap; - import java.util.List; - import java.util.Map; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.junit.jupiter.api.Test; - import org.kie.kogito.Model; -diff --git a/kogito-quarkus-examples/process-decisions-quarkus/pom.xml b/kogito-quarkus-examples/process-decisions-quarkus/pom.xml -index d13f21a70..4053e229d 100644 ---- a/kogito-quarkus-examples/process-decisions-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-decisions-quarkus/pom.xml -@@ -11,14 +11,14 @@ - Kogito Example :: Process :: Decisions :: Quarkus - Process with DMN and DRL integration - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-decisions-quarkus/src/main/java/org/kie/kogito/traffic/DriverService.java b/kogito-quarkus-examples/process-decisions-quarkus/src/main/java/org/kie/kogito/traffic/DriverService.java -index 595aa50e4..78510ddd2 100644 ---- a/kogito-quarkus-examples/process-decisions-quarkus/src/main/java/org/kie/kogito/traffic/DriverService.java -+++ b/kogito-quarkus-examples/process-decisions-quarkus/src/main/java/org/kie/kogito/traffic/DriverService.java -@@ -19,7 +19,7 @@ package org.kie.kogito.traffic; - import java.time.ZonedDateTime; - import java.util.Date; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.slf4j.Logger; - import org.slf4j.LoggerFactory; -diff --git a/kogito-quarkus-examples/process-decisions-quarkus/src/test/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java b/kogito-quarkus-examples/process-decisions-quarkus/src/test/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java -index 169733039..1a49b80db 100644 ---- a/kogito-quarkus-examples/process-decisions-quarkus/src/test/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java -+++ b/kogito-quarkus-examples/process-decisions-quarkus/src/test/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java -@@ -15,8 +15,8 @@ - */ - package org.kie.kogito.traffic; - --import io.quarkus.test.junit.NativeImageTest; -+import io.quarkus.test.junit.QuarkusIntegrationTest; - --@NativeImageTest -+@QuarkusIntegrationTest - public class NativeTrafficProcessIT extends TrafficProcessIT { - } -diff --git a/kogito-quarkus-examples/process-decisions-rest-quarkus/pom.xml b/kogito-quarkus-examples/process-decisions-rest-quarkus/pom.xml -index 852e7997b..0a53fcee5 100644 ---- a/kogito-quarkus-examples/process-decisions-rest-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-decisions-rest-quarkus/pom.xml -@@ -12,14 +12,14 @@ - Process with DMN and DRL integration through REST - Quarkus - - 8080 -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/DriverService.java b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/DriverService.java -index 595aa50e4..78510ddd2 100644 ---- a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/DriverService.java -+++ b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/DriverService.java -@@ -19,7 +19,7 @@ package org.kie.kogito.traffic; - import java.time.ZonedDateTime; - import java.util.Date; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.slf4j.Logger; - import org.slf4j.LoggerFactory; -diff --git a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/LicenseValidationRestClient.java b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/LicenseValidationRestClient.java -index d624fcbe2..e70f81897 100644 ---- a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/LicenseValidationRestClient.java -+++ b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/LicenseValidationRestClient.java -@@ -17,11 +17,11 @@ package org.kie.kogito.traffic; - - import java.util.Map; - --import javax.ws.rs.Consumes; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; - - import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; - -diff --git a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/LicenseValidationRestService.java b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/LicenseValidationRestService.java -index f8dc39309..ff6c99787 100644 ---- a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/LicenseValidationRestService.java -+++ b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/LicenseValidationRestService.java -@@ -17,8 +17,8 @@ package org.kie.kogito.traffic; - - import java.util.Collections; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; - - import org.eclipse.microprofile.rest.client.inject.RestClient; - -diff --git a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/TrafficViolationRestClient.java b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/TrafficViolationRestClient.java -index 7c6945cbf..8cc4bff87 100644 ---- a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/TrafficViolationRestClient.java -+++ b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/TrafficViolationRestClient.java -@@ -17,11 +17,11 @@ package org.kie.kogito.traffic; - - import java.util.Map; - --import javax.ws.rs.Consumes; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; - - import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; - -diff --git a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/TrafficViolationRestService.java b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/TrafficViolationRestService.java -index 881e99969..b22e2e212 100644 ---- a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/TrafficViolationRestService.java -+++ b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/TrafficViolationRestService.java -@@ -18,8 +18,8 @@ package org.kie.kogito.traffic; - import java.util.HashMap; - import java.util.Map; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; - - import org.eclipse.microprofile.rest.client.inject.RestClient; - -diff --git a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/test/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/test/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java -index 169733039..1a49b80db 100644 ---- a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/test/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java -+++ b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/test/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java -@@ -15,8 +15,8 @@ - */ - package org.kie.kogito.traffic; - --import io.quarkus.test.junit.NativeImageTest; -+import io.quarkus.test.junit.QuarkusIntegrationTest; - --@NativeImageTest -+@QuarkusIntegrationTest - public class NativeTrafficProcessIT extends TrafficProcessIT { - } -diff --git a/kogito-quarkus-examples/process-decisions-rules-quarkus/pom.xml b/kogito-quarkus-examples/process-decisions-rules-quarkus/pom.xml -index d80e3fe23..8b4a25a4c 100644 ---- a/kogito-quarkus-examples/process-decisions-rules-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-decisions-rules-quarkus/pom.xml -@@ -11,14 +11,14 @@ - Kogito Example :: Process :: Decisions :: Rules :: Quarkus - Process with DRL, DMN and DRL integration - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/DriverService.java b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/DriverService.java -index 38ebb18de..471e27352 100644 ---- a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/DriverService.java -+++ b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/DriverService.java -@@ -19,7 +19,7 @@ package org.kie.kogito.traffic; - import java.time.ZonedDateTime; - import java.util.Date; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.kie.kogito.traffic.licensevalidation.Driver; - import org.slf4j.Logger; -diff --git a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/test/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/test/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java -index 169733039..1a49b80db 100644 ---- a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/test/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java -+++ b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/test/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java -@@ -15,8 +15,8 @@ - */ - package org.kie.kogito.traffic; - --import io.quarkus.test.junit.NativeImageTest; -+import io.quarkus.test.junit.QuarkusIntegrationTest; - --@NativeImageTest -+@QuarkusIntegrationTest - public class NativeTrafficProcessIT extends TrafficProcessIT { - } -diff --git a/kogito-quarkus-examples/process-error-handling/pom.xml b/kogito-quarkus-examples/process-error-handling/pom.xml -index a8ea2e0d9..72cdc45de 100644 ---- a/kogito-quarkus-examples/process-error-handling/pom.xml -+++ b/kogito-quarkus-examples/process-error-handling/pom.xml -@@ -10,14 +10,14 @@ - Kogito Example :: Process Scripts With Quarkus - Kogito scripts invocation - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-error-handling/src/main/java/org/acme/wih/CustomWorkItemHandlerConfig.java b/kogito-quarkus-examples/process-error-handling/src/main/java/org/acme/wih/CustomWorkItemHandlerConfig.java -index 99b78b853..1bbb71cf7 100644 ---- a/kogito-quarkus-examples/process-error-handling/src/main/java/org/acme/wih/CustomWorkItemHandlerConfig.java -+++ b/kogito-quarkus-examples/process-error-handling/src/main/java/org/acme/wih/CustomWorkItemHandlerConfig.java -@@ -15,7 +15,7 @@ - */ - package org.acme.wih; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.kie.kogito.process.impl.DefaultWorkItemHandlerConfig; - -diff --git a/kogito-quarkus-examples/process-error-handling/src/test/java/org/acme/travels/quarkus/HelloErrorProcessTest.java b/kogito-quarkus-examples/process-error-handling/src/test/java/org/acme/travels/quarkus/HelloErrorProcessTest.java -index 1764afdf5..1861f1fe5 100644 ---- a/kogito-quarkus-examples/process-error-handling/src/test/java/org/acme/travels/quarkus/HelloErrorProcessTest.java -+++ b/kogito-quarkus-examples/process-error-handling/src/test/java/org/acme/travels/quarkus/HelloErrorProcessTest.java -@@ -18,8 +18,8 @@ package org.acme.travels.quarkus; - import java.util.HashMap; - import java.util.Map; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.junit.jupiter.api.Test; - import org.kie.kogito.Model; -diff --git a/kogito-quarkus-examples/process-incubation-api-quarkus/pom.xml b/kogito-quarkus-examples/process-incubation-api-quarkus/pom.xml -index bddd25ce0..32bcae41e 100644 ---- a/kogito-quarkus-examples/process-incubation-api-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-incubation-api-quarkus/pom.xml -@@ -10,14 +10,14 @@ - process-incubation-api-quarkus - Kogito Example :: Process Incubation API With Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-incubation-api-quarkus/src/main/java/org/acme/CustomRestProcess.java b/kogito-quarkus-examples/process-incubation-api-quarkus/src/main/java/org/acme/CustomRestProcess.java -index 2d6846e20..9b83e574a 100644 ---- a/kogito-quarkus-examples/process-incubation-api-quarkus/src/main/java/org/acme/CustomRestProcess.java -+++ b/kogito-quarkus-examples/process-incubation-api-quarkus/src/main/java/org/acme/CustomRestProcess.java -@@ -17,12 +17,12 @@ package org.acme; - - import java.util.Map; - --import javax.inject.Inject; --import javax.ws.rs.Consumes; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; -+import jakarta.inject.Inject; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; - - import org.kie.kogito.incubation.application.AppRoot; - import org.kie.kogito.incubation.common.DataContext; -diff --git a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/pom.xml b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/pom.xml -index fdecf09f8..a2ad322c2 100644 ---- a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/pom.xml -@@ -11,14 +11,14 @@ - Kogito Example :: Process Infinispan Persistence Quarkus - Process with Infinispan persistence - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/test/java/org/acme/deals/NativeDealsRestIT.java b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/test/java/org/acme/deals/NativeDealsRestIT.java -index 81b8e1b43..09dfeba1b 100644 ---- a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/test/java/org/acme/deals/NativeDealsRestIT.java -+++ b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/test/java/org/acme/deals/NativeDealsRestIT.java -@@ -15,9 +15,9 @@ - */ - package org.acme.deals; - --import io.quarkus.test.junit.NativeImageTest; -+import io.quarkus.test.junit.QuarkusIntegrationTest; - --@NativeImageTest -+@QuarkusIntegrationTest - public class NativeDealsRestIT extends DealsRestIT { - - } -diff --git a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/pom.xml b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/pom.xml -index 2473da2ba..955f1baa0 100644 ---- a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/pom.xml -@@ -11,14 +11,14 @@ - Kogito Example :: Process with Kafka and Quarkus, multiple channels, avro serialization - Kogito with Kafka - Quarkus, using one channel per message name - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/AvroMarshallerProducer.java b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/AvroMarshallerProducer.java -index d10c67208..1a96476f5 100644 ---- a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/AvroMarshallerProducer.java -+++ b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/AvroMarshallerProducer.java -@@ -15,11 +15,11 @@ - */ - package org.acme.travel; - -+import jakarta.annotation.PostConstruct; - import java.io.IOException; - --import javax.annotation.PostConstruct; --import javax.enterprise.context.ApplicationScoped; --import javax.enterprise.inject.Produces; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.inject.Produces; - - import org.kie.kogito.event.EventMarshaller; - import org.kie.kogito.event.EventUnmarshaller; -diff --git a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/StringKeyDecorator.java b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/StringKeyDecorator.java -index b86ac3eed..8573a244d 100644 ---- a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/StringKeyDecorator.java -+++ b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/StringKeyDecorator.java -@@ -15,7 +15,7 @@ - */ - package org.acme.travel; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.eclipse.microprofile.reactive.messaging.Message; - import org.kie.kogito.addon.quarkus.common.reactive.messaging.MessageDecorator; -diff --git a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/test/java/org/acme/travel/tests/avro/quarkus/MultiMessagingIT.java b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/test/java/org/acme/travel/tests/avro/quarkus/MultiMessagingIT.java -index 11bd3766a..32f56442c 100644 ---- a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/test/java/org/acme/travel/tests/avro/quarkus/MultiMessagingIT.java -+++ b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/test/java/org/acme/travel/tests/avro/quarkus/MultiMessagingIT.java -@@ -22,7 +22,7 @@ import java.util.concurrent.CountDownLatch; - import java.util.concurrent.TimeUnit; - import java.util.stream.IntStream; - --import javax.inject.Inject; -+import jakarta.inject.Inject; - - import org.acme.travel.Traveller; - import org.eclipse.microprofile.reactive.messaging.Channel; -diff --git a/kogito-quarkus-examples/process-kafka-multi-quarkus/pom.xml b/kogito-quarkus-examples/process-kafka-multi-quarkus/pom.xml -index 3fa03011a..bc665ceb1 100644 ---- a/kogito-quarkus-examples/process-kafka-multi-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-kafka-multi-quarkus/pom.xml -@@ -11,14 +11,14 @@ - Kogito Example :: Process with Kafka and Quarkus, multiple channels - Kogito with Kafka - Quarkus, using one channel per message name - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-kafka-persistence-quarkus/pom.xml b/kogito-quarkus-examples/process-kafka-persistence-quarkus/pom.xml -index c0d02b120..3192692c4 100644 ---- a/kogito-quarkus-examples/process-kafka-persistence-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-kafka-persistence-quarkus/pom.xml -@@ -29,14 +29,14 @@ - Kogito Example :: Process Kafka Persistence Quarkus - Process with Kafka persistence - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/java/org/acme/deals/Application.java b/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/java/org/acme/deals/Application.java -index 533137b03..971e11bf6 100644 ---- a/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/java/org/acme/deals/Application.java -+++ b/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/java/org/acme/deals/Application.java -@@ -19,10 +19,10 @@ import java.util.Map; - import java.util.Set; - import java.util.concurrent.TimeUnit; - --import javax.annotation.PostConstruct; --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; - -+import jakarta.annotation.PostConstruct; - import org.apache.kafka.clients.admin.AdminClient; - import org.apache.kafka.clients.admin.NewTopic; - import org.slf4j.Logger; -diff --git a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/pom.xml b/kogito-quarkus-examples/process-kafka-quickstart-quarkus/pom.xml -index 294e08f52..bc6755b0a 100644 ---- a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-kafka-quickstart-quarkus/pom.xml -@@ -11,14 +11,14 @@ - Kogito Example :: Process with Kafka and Quarkus - Kogito with Kafka - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-knative-quickstart-quarkus/pom.xml b/kogito-quarkus-examples/process-knative-quickstart-quarkus/pom.xml -index 5d32855e6..622713d78 100644 ---- a/kogito-quarkus-examples/process-knative-quickstart-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-knative-quickstart-quarkus/pom.xml -@@ -12,14 +12,14 @@ - Kogito with Knative Eventing - Quarkus - - 2.33.2 -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/test/java/org/acme/travel/CloudEventListenerTest.java b/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/test/java/org/acme/travel/CloudEventListenerTest.java -index 0fddbe097..9f587f744 100644 ---- a/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/test/java/org/acme/travel/CloudEventListenerTest.java -+++ b/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/test/java/org/acme/travel/CloudEventListenerTest.java -@@ -15,7 +15,7 @@ - */ - package org.acme.travel; - --import javax.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.MediaType; - - import org.junit.jupiter.api.AfterAll; - import org.junit.jupiter.api.BeforeAll; -diff --git a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/pom.xml b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/pom.xml -index 094560f07..3fcb22315 100644 ---- a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/pom.xml -@@ -11,14 +11,14 @@ - Kogito Example :: Process MongoDB Persistence Quarkus - Process with MongoDB persistence - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/test/java/org/acme/deals/NativeDealsRestIT.java b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/test/java/org/acme/deals/NativeDealsRestIT.java -index 81b8e1b43..09dfeba1b 100644 ---- a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/test/java/org/acme/deals/NativeDealsRestIT.java -+++ b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/test/java/org/acme/deals/NativeDealsRestIT.java -@@ -15,9 +15,9 @@ - */ - package org.acme.deals; - --import io.quarkus.test.junit.NativeImageTest; -+import io.quarkus.test.junit.QuarkusIntegrationTest; - --@NativeImageTest -+@QuarkusIntegrationTest - public class NativeDealsRestIT extends DealsRestIT { - - } -diff --git a/kogito-quarkus-examples/process-monitoring-quarkus/pom.xml b/kogito-quarkus-examples/process-monitoring-quarkus/pom.xml -index 1669a3fdf..34d9aba07 100755 ---- a/kogito-quarkus-examples/process-monitoring-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-monitoring-quarkus/pom.xml -@@ -11,14 +11,14 @@ - Kogito Example :: Process Monitoring :: Quarkus - - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-monitoring-quarkus/src/main/java/org/kie/kogito/examples/quarkus/CalculationService.java b/kogito-quarkus-examples/process-monitoring-quarkus/src/main/java/org/kie/kogito/examples/quarkus/CalculationService.java -index 11dfcb97e..aaaf456b7 100644 ---- a/kogito-quarkus-examples/process-monitoring-quarkus/src/main/java/org/kie/kogito/examples/quarkus/CalculationService.java -+++ b/kogito-quarkus-examples/process-monitoring-quarkus/src/main/java/org/kie/kogito/examples/quarkus/CalculationService.java -@@ -17,7 +17,7 @@ package org.kie.kogito.examples.quarkus; - - import java.util.Random; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.kie.kogito.examples.quarkus.demo.Order; - -diff --git a/kogito-quarkus-examples/process-monitoring-quarkus/src/test/java/org/kie/kogito/examples/quarkus/NativeDashboardGenerationIT.java b/kogito-quarkus-examples/process-monitoring-quarkus/src/test/java/org/kie/kogito/examples/quarkus/NativeDashboardGenerationIT.java -index 7bf4ac629..a22971073 100644 ---- a/kogito-quarkus-examples/process-monitoring-quarkus/src/test/java/org/kie/kogito/examples/quarkus/NativeDashboardGenerationIT.java -+++ b/kogito-quarkus-examples/process-monitoring-quarkus/src/test/java/org/kie/kogito/examples/quarkus/NativeDashboardGenerationIT.java -@@ -16,9 +16,9 @@ - - package org.kie.kogito.examples.quarkus; - --import io.quarkus.test.junit.NativeImageTest; -+import io.quarkus.test.junit.QuarkusIntegrationTest; - --@NativeImageTest -+@QuarkusIntegrationTest - public class NativeDashboardGenerationIT extends DashboardGenerationIT { - - // Execute the same tests but in native mode. -diff --git a/kogito-quarkus-examples/process-monitoring-quarkus/src/test/java/org/kie/kogito/examples/quarkus/ProcessMetricsTest.java b/kogito-quarkus-examples/process-monitoring-quarkus/src/test/java/org/kie/kogito/examples/quarkus/ProcessMetricsTest.java -index a51cd75ee..291197179 100644 ---- a/kogito-quarkus-examples/process-monitoring-quarkus/src/test/java/org/kie/kogito/examples/quarkus/ProcessMetricsTest.java -+++ b/kogito-quarkus-examples/process-monitoring-quarkus/src/test/java/org/kie/kogito/examples/quarkus/ProcessMetricsTest.java -@@ -19,8 +19,8 @@ package org.kie.kogito.examples.quarkus; - import java.util.HashMap; - import java.util.Map; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; -diff --git a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/pom.xml b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/pom.xml -index 47aa6727e..e956fb11c 100644 ---- a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/pom.xml -@@ -15,14 +15,14 @@ - - - 1.7 -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/java/org/kie/kogito/examples/CalculationService.java b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/java/org/kie/kogito/examples/CalculationService.java -index fc2e8fee7..54f7827a2 100644 ---- a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/java/org/kie/kogito/examples/CalculationService.java -+++ b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/java/org/kie/kogito/examples/CalculationService.java -@@ -17,7 +17,7 @@ package org.kie.kogito.examples; - - import java.util.Random; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.kie.kogito.examples.demo.Order; - -diff --git a/kogito-quarkus-examples/process-performance-client/pom.xml b/kogito-quarkus-examples/process-performance-client/pom.xml -index 99cf83fa0..f15550c51 100755 ---- a/kogito-quarkus-examples/process-performance-client/pom.xml -+++ b/kogito-quarkus-examples/process-performance-client/pom.xml -@@ -13,14 +13,14 @@ - Kogito Example :: Client Performance test - Client Performance test - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-performance-quarkus/pom.xml b/kogito-quarkus-examples/process-performance-quarkus/pom.xml -index 0d527b438..541bac1c4 100755 ---- a/kogito-quarkus-examples/process-performance-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-performance-quarkus/pom.xml -@@ -13,14 +13,14 @@ - Kogito Example :: Quarkus Performance test - Quarkus Performance test - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/pom.xml b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/pom.xml -index 9068e217f..6f9a91b80 100644 ---- a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/pom.xml -@@ -16,14 +16,14 @@ - Kogito Example :: Process PostgreSQL Persistence Quarkus - Process with PostgreSQL persistence - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-quarkus-example/pom.xml b/kogito-quarkus-examples/process-quarkus-example/pom.xml -index 828f07f1f..00bb4ba37 100755 ---- a/kogito-quarkus-examples/process-quarkus-example/pom.xml -+++ b/kogito-quarkus-examples/process-quarkus-example/pom.xml -@@ -11,14 +11,14 @@ - Kogito Example :: Process and Quarkus - Order management service - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-quarkus-example/src/main/java/org/kie/kogito/examples/CalculationService.java b/kogito-quarkus-examples/process-quarkus-example/src/main/java/org/kie/kogito/examples/CalculationService.java -index bf28039f0..455c48635 100644 ---- a/kogito-quarkus-examples/process-quarkus-example/src/main/java/org/kie/kogito/examples/CalculationService.java -+++ b/kogito-quarkus-examples/process-quarkus-example/src/main/java/org/kie/kogito/examples/CalculationService.java -@@ -17,7 +17,7 @@ package org.kie.kogito.examples; - - import java.util.Random; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.kie.kogito.examples.demo.Order; - -diff --git a/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/OrdersProcessIT.java b/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/OrdersProcessIT.java -index 55a9515e7..426886e07 100644 ---- a/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/OrdersProcessIT.java -+++ b/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/OrdersProcessIT.java -@@ -21,8 +21,8 @@ import java.util.List; - import java.util.Map; - import java.util.Optional; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; -diff --git a/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/OrdersRestIT.java b/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/OrdersRestIT.java -index a6c91f37b..c136b806e 100644 ---- a/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/OrdersRestIT.java -+++ b/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/OrdersRestIT.java -@@ -15,8 +15,8 @@ - */ - package org.kie.kogito.examples; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; -diff --git a/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/PersonProcessIT.java b/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/PersonProcessIT.java -index bf8bec9a8..c5367ec3c 100644 ---- a/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/PersonProcessIT.java -+++ b/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/PersonProcessIT.java -@@ -20,8 +20,8 @@ import java.util.HashMap; - import java.util.List; - import java.util.Map; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.junit.jupiter.api.Test; - import org.kie.kogito.Model; -diff --git a/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/PersonsRestIT.java b/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/PersonsRestIT.java -index 3dece4add..934c56d38 100644 ---- a/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/PersonsRestIT.java -+++ b/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/PersonsRestIT.java -@@ -15,8 +15,8 @@ - */ - package org.kie.kogito.examples; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; -diff --git a/kogito-quarkus-examples/process-rest-service-call-quarkus/pom.xml b/kogito-quarkus-examples/process-rest-service-call-quarkus/pom.xml -index f15c86c1e..c73f6ca0c 100644 ---- a/kogito-quarkus-examples/process-rest-service-call-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-rest-service-call-quarkus/pom.xml -@@ -11,14 +11,14 @@ - Kogito Example :: Process Service Rest Cal with Quarkus - Kogito service invocation using REST - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -@@ -66,7 +66,7 @@ - - io.smallrye - smallrye-context-propagation-propagators-rxjava2 -- 1.2.2 -+ 2.1.0 - - - io.quarkus -diff --git a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/rest/UsersRemoteService.java b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/rest/UsersRemoteService.java -index 7fb378539..945647371 100644 ---- a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/rest/UsersRemoteService.java -+++ b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/rest/UsersRemoteService.java -@@ -15,10 +15,10 @@ - */ - package org.acme.travels.rest; - --import javax.ws.rs.GET; --import javax.ws.rs.Path; --import javax.ws.rs.PathParam; --import javax.ws.rs.Produces; -+import jakarta.ws.rs.GET; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.PathParam; -+import jakarta.ws.rs.Produces; - - import org.acme.travels.quarkus.User; - import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; -diff --git a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/services/AuditService.java b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/services/AuditService.java -index 8db780db9..e102ce294 100644 ---- a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/services/AuditService.java -+++ b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/services/AuditService.java -@@ -15,7 +15,7 @@ - */ - package org.acme.travels.services; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.acme.travels.quarkus.User; - import org.slf4j.Logger; -diff --git a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/services/UserService.java b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/services/UserService.java -index a6b61d869..dfe413339 100644 ---- a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/services/UserService.java -+++ b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/services/UserService.java -@@ -15,8 +15,8 @@ - */ - package org.acme.travels.services; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; - - import org.acme.travels.quarkus.User; - import org.acme.travels.rest.UsersRemoteService; -diff --git a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/test/java/org/acme/travels/quarkus/UsersProcessTest.java b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/test/java/org/acme/travels/quarkus/UsersProcessTest.java -index 9d4f22920..828839877 100644 ---- a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/test/java/org/acme/travels/quarkus/UsersProcessTest.java -+++ b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/test/java/org/acme/travels/quarkus/UsersProcessTest.java -@@ -18,8 +18,8 @@ package org.acme.travels.quarkus; - import java.util.HashMap; - import java.util.Map; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.junit.jupiter.api.Disabled; - import org.junit.jupiter.api.Test; -diff --git a/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/pom.xml b/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/pom.xml -index a0cdb5918..4706ea592 100644 ---- a/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/pom.xml -@@ -11,14 +11,14 @@ - Kogito Example :: Process Rest :: Quarkus - Invoking multiple Rest WS using RestWorkItemHandler - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/main/java/org/acme/numbers/NumbersResource.java b/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/main/java/org/acme/numbers/NumbersResource.java -index 71dbca9bc..4b29149c6 100644 ---- a/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/main/java/org/acme/numbers/NumbersResource.java -+++ b/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/main/java/org/acme/numbers/NumbersResource.java -@@ -15,20 +15,20 @@ - */ - package org.acme.numbers; - -+import jakarta.annotation.PostConstruct; - import java.util.Random; - import java.util.stream.Collectors; - --import javax.annotation.PostConstruct; --import javax.enterprise.context.ApplicationScoped; --import javax.ws.rs.DefaultValue; --import javax.ws.rs.GET; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.PathParam; --import javax.ws.rs.Produces; --import javax.ws.rs.QueryParam; --import javax.ws.rs.core.MediaType; --import javax.ws.rs.core.Response; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.ws.rs.DefaultValue; -+import jakarta.ws.rs.GET; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.PathParam; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.QueryParam; -+import jakarta.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.Response; - - @Path("/numbers") - @Produces(MediaType.APPLICATION_JSON) -diff --git a/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/test/java/org/acme/numbers/NativeForRestExampleTestIT.java b/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/test/java/org/acme/numbers/NativeForRestExampleTestIT.java -index 9852e8da3..5eb548715 100644 ---- a/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/test/java/org/acme/numbers/NativeForRestExampleTestIT.java -+++ b/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/test/java/org/acme/numbers/NativeForRestExampleTestIT.java -@@ -15,9 +15,9 @@ - */ - package org.acme.numbers; - --import io.quarkus.test.junit.NativeImageTest; -+import io.quarkus.test.junit.QuarkusIntegrationTest; - --@NativeImageTest -+@QuarkusIntegrationTest - class NativeForRestExampleTestIT extends RestExampleTestIT { - - } -diff --git a/kogito-quarkus-examples/process-rest-workitem-quarkus/pom.xml b/kogito-quarkus-examples/process-rest-workitem-quarkus/pom.xml -index 70c6af42c..cd47ab411 100644 ---- a/kogito-quarkus-examples/process-rest-workitem-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-rest-workitem-quarkus/pom.xml -@@ -11,14 +11,14 @@ - Kogito Example :: Process Service Rest WorkItem call with Quarkus - Kogito service invocation using REST work item and Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/rest/UsersRemoteService.java b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/rest/UsersRemoteService.java -index e5f3223c6..179dc4d97 100644 ---- a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/rest/UsersRemoteService.java -+++ b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/rest/UsersRemoteService.java -@@ -15,10 +15,10 @@ - */ - package org.acme.travels.rest; - --import javax.ws.rs.GET; --import javax.ws.rs.Path; --import javax.ws.rs.PathParam; --import javax.ws.rs.Produces; -+import jakarta.ws.rs.GET; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.PathParam; -+import jakarta.ws.rs.Produces; - - import org.acme.travels.User; - import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; -diff --git a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/services/AuditService.java b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/services/AuditService.java -index e9c805c39..b053ec38c 100644 ---- a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/services/AuditService.java -+++ b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/services/AuditService.java -@@ -15,7 +15,7 @@ - */ - package org.acme.travels.services; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.acme.travels.User; - import org.slf4j.Logger; -diff --git a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/test/java/org/acme/travels/UsersProcessTest.java b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/test/java/org/acme/travels/UsersProcessTest.java -index ee59e0502..64fcf49a3 100644 ---- a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/test/java/org/acme/travels/UsersProcessTest.java -+++ b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/test/java/org/acme/travels/UsersProcessTest.java -@@ -18,8 +18,8 @@ package org.acme.travels; - import java.util.HashMap; - import java.util.Map; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.junit.jupiter.api.Disabled; - import org.junit.jupiter.api.Test; -diff --git a/kogito-quarkus-examples/process-saga-quarkus/pom.xml b/kogito-quarkus-examples/process-saga-quarkus/pom.xml -index 1cf320103..7f8d2ec98 100644 ---- a/kogito-quarkus-examples/process-saga-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-saga-quarkus/pom.xml -@@ -13,14 +13,14 @@ - How to implement Saga with a BPMN Process using Compensations - - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/MockService.java b/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/MockService.java -index f54ca193e..933bc9125 100644 ---- a/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/MockService.java -+++ b/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/MockService.java -@@ -19,7 +19,7 @@ import java.util.Objects; - import java.util.Optional; - import java.util.UUID; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - @ApplicationScoped - public class MockService { -diff --git a/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/OrderService.java b/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/OrderService.java -index 516164b9b..402e2a7b3 100644 ---- a/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/OrderService.java -+++ b/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/OrderService.java -@@ -15,7 +15,7 @@ - */ - package org.kie.kogito.examples; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.slf4j.Logger; - import org.slf4j.LoggerFactory; -diff --git a/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/PaymentService.java b/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/PaymentService.java -index 960c190f4..e26abd3a4 100644 ---- a/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/PaymentService.java -+++ b/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/PaymentService.java -@@ -15,8 +15,8 @@ - */ - package org.kie.kogito.examples; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; - - import org.slf4j.Logger; - import org.slf4j.LoggerFactory; -diff --git a/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/ShippingService.java b/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/ShippingService.java -index 26c06a016..941da9902 100644 ---- a/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/ShippingService.java -+++ b/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/ShippingService.java -@@ -15,8 +15,8 @@ - */ - package org.kie.kogito.examples; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; - - import org.slf4j.Logger; - import org.slf4j.LoggerFactory; -diff --git a/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/StockService.java b/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/StockService.java -index 8c74346bd..113a1f869 100644 ---- a/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/StockService.java -+++ b/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/StockService.java -@@ -15,8 +15,8 @@ - */ - package org.kie.kogito.examples; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; - - import org.slf4j.Logger; - import org.slf4j.LoggerFactory; -diff --git a/kogito-quarkus-examples/process-scripts-quarkus/pom.xml b/kogito-quarkus-examples/process-scripts-quarkus/pom.xml -index 8515e4db6..1dc334ce4 100644 ---- a/kogito-quarkus-examples/process-scripts-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-scripts-quarkus/pom.xml -@@ -11,14 +11,14 @@ - Kogito Example :: Process Scripts With Quarkus - Kogito scripts invocation - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-scripts-quarkus/src/test/java/org/acme/travels/quarkus/ScriptsProcessTest.java b/kogito-quarkus-examples/process-scripts-quarkus/src/test/java/org/acme/travels/quarkus/ScriptsProcessTest.java -index 066d0a4e6..c46942ece 100644 ---- a/kogito-quarkus-examples/process-scripts-quarkus/src/test/java/org/acme/travels/quarkus/ScriptsProcessTest.java -+++ b/kogito-quarkus-examples/process-scripts-quarkus/src/test/java/org/acme/travels/quarkus/ScriptsProcessTest.java -@@ -18,8 +18,8 @@ package org.acme.travels.quarkus; - import java.util.HashMap; - import java.util.Map; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.junit.jupiter.api.Test; - import org.kie.kogito.Model; -diff --git a/kogito-quarkus-examples/process-service-calls-quarkus/pom.xml b/kogito-quarkus-examples/process-service-calls-quarkus/pom.xml -index 8c439f235..4cd92aa14 100644 ---- a/kogito-quarkus-examples/process-service-calls-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-service-calls-quarkus/pom.xml -@@ -11,14 +11,14 @@ - Kogito Example :: Process Service Calls with Quarkus - Kogito service invocation - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/GreetingTravellerService.java b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/GreetingTravellerService.java -index 155659b4f..8075006f1 100644 ---- a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/GreetingTravellerService.java -+++ b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/GreetingTravellerService.java -@@ -15,7 +15,7 @@ - */ - package org.acme.travels.services; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.acme.travels.quarkus.Traveller; - import org.slf4j.Logger; -diff --git a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/HelloService.java b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/HelloService.java -index 4506a6d8e..c163ec36c 100644 ---- a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/HelloService.java -+++ b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/HelloService.java -@@ -15,7 +15,7 @@ - */ - package org.acme.travels.services; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.slf4j.Logger; - import org.slf4j.LoggerFactory; -diff --git a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/StoreTravellerService.java b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/StoreTravellerService.java -index 808b07ffa..122f357cd 100644 ---- a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/StoreTravellerService.java -+++ b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/StoreTravellerService.java -@@ -18,7 +18,7 @@ package org.acme.travels.services; - import java.util.HashMap; - import java.util.Map; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.acme.travels.quarkus.Traveller; - -diff --git a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/TravellerAuditService.java b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/TravellerAuditService.java -index 6068492ea..a348da705 100644 ---- a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/TravellerAuditService.java -+++ b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/TravellerAuditService.java -@@ -15,7 +15,7 @@ - */ - package org.acme.travels.services; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.acme.travels.quarkus.Traveller; - import org.slf4j.Logger; -diff --git a/kogito-quarkus-examples/process-service-calls-quarkus/src/test/java/org/acme/travels/quarkus/MultiParamServiceProcessTest.java b/kogito-quarkus-examples/process-service-calls-quarkus/src/test/java/org/acme/travels/quarkus/MultiParamServiceProcessTest.java -index bd2a39001..de85de4ae 100644 ---- a/kogito-quarkus-examples/process-service-calls-quarkus/src/test/java/org/acme/travels/quarkus/MultiParamServiceProcessTest.java -+++ b/kogito-quarkus-examples/process-service-calls-quarkus/src/test/java/org/acme/travels/quarkus/MultiParamServiceProcessTest.java -@@ -18,8 +18,8 @@ package org.acme.travels.quarkus; - import java.util.HashMap; - import java.util.Map; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.junit.jupiter.api.Test; - import org.kie.kogito.Model; -diff --git a/kogito-quarkus-examples/process-service-calls-quarkus/src/test/java/org/acme/travels/quarkus/TravellersProcessTest.java b/kogito-quarkus-examples/process-service-calls-quarkus/src/test/java/org/acme/travels/quarkus/TravellersProcessTest.java -index 0b17a5600..ff04f1fde 100644 ---- a/kogito-quarkus-examples/process-service-calls-quarkus/src/test/java/org/acme/travels/quarkus/TravellersProcessTest.java -+++ b/kogito-quarkus-examples/process-service-calls-quarkus/src/test/java/org/acme/travels/quarkus/TravellersProcessTest.java -@@ -18,8 +18,8 @@ package org.acme.travels.quarkus; - import java.util.HashMap; - import java.util.Map; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.junit.jupiter.api.Test; - import org.kie.kogito.Model; -diff --git a/kogito-quarkus-examples/process-timer-quarkus/pom.xml b/kogito-quarkus-examples/process-timer-quarkus/pom.xml -index 32533e090..8ce39248d 100644 ---- a/kogito-quarkus-examples/process-timer-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-timer-quarkus/pom.xml -@@ -11,14 +11,14 @@ - Kogito Example :: Process Timer with Quarkus - Kogito with timers - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/pom.xml b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/pom.xml -index 50dffbd7f..517163a3f 100644 ---- a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/pom.xml -@@ -11,14 +11,14 @@ - Kogito Example :: Process Usertasks With Custom Lifecycle - Kogito user tasks orchestration with custom life cycle - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/config/CustomWorkItemHandlerConfig.java b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/config/CustomWorkItemHandlerConfig.java -index ad0e0178c..8e0ac14ca 100644 ---- a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/config/CustomWorkItemHandlerConfig.java -+++ b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/config/CustomWorkItemHandlerConfig.java -@@ -15,7 +15,7 @@ - */ - package org.acme.travels.config; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.acme.travels.usertasks.CustomHumanTaskLifeCycle; - import org.jbpm.process.instance.impl.humantask.HumanTaskWorkItemHandler; -diff --git a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/test/java/org/acme/travels/custom/lifecycle/quarkus/ApprovalsProcessTest.java b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/test/java/org/acme/travels/custom/lifecycle/quarkus/ApprovalsProcessTest.java -index 59efe6c70..b88193f30 100644 ---- a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/test/java/org/acme/travels/custom/lifecycle/quarkus/ApprovalsProcessTest.java -+++ b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/test/java/org/acme/travels/custom/lifecycle/quarkus/ApprovalsProcessTest.java -@@ -20,8 +20,8 @@ import java.util.HashMap; - import java.util.List; - import java.util.Map; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.acme.travels.Address; - import org.acme.travels.Traveller; -diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/pom.xml b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/pom.xml -index d0a90b39a..d71f4c641 100644 ---- a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/pom.xml -+++ b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/pom.xml -@@ -10,14 +10,14 @@ - process-usertasks-quarkus-with-console - Kogito Example :: Process with Usertasks Quarkus :: Console - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/test/java/org/kie/kogito/hr/HiringProcessIT.java b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/test/java/org/kie/kogito/hr/HiringProcessIT.java -index 01c683b6e..a99cfd301 100644 ---- a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/test/java/org/kie/kogito/hr/HiringProcessIT.java -+++ b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/test/java/org/kie/kogito/hr/HiringProcessIT.java -@@ -20,8 +20,8 @@ import java.util.HashMap; - import java.util.List; - import java.util.Map; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.junit.jupiter.api.Test; - import org.kie.kogito.Model; -diff --git a/kogito-quarkus-examples/process-usertasks-quarkus/pom.xml b/kogito-quarkus-examples/process-usertasks-quarkus/pom.xml -index 912b40335..9f9b6ed9a 100644 ---- a/kogito-quarkus-examples/process-usertasks-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-usertasks-quarkus/pom.xml -@@ -11,14 +11,14 @@ - Kogito Example :: Process with Usertasks Quarkus - Kogito user tasks orchestration - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-usertasks-quarkus/src/test/java/org/acme/travels/quarkus/ApprovalsProcessTest.java b/kogito-quarkus-examples/process-usertasks-quarkus/src/test/java/org/acme/travels/quarkus/ApprovalsProcessTest.java -index 385ee84c0..7d9a44719 100644 ---- a/kogito-quarkus-examples/process-usertasks-quarkus/src/test/java/org/acme/travels/quarkus/ApprovalsProcessTest.java -+++ b/kogito-quarkus-examples/process-usertasks-quarkus/src/test/java/org/acme/travels/quarkus/ApprovalsProcessTest.java -@@ -20,8 +20,8 @@ import java.util.HashMap; - import java.util.List; - import java.util.Map; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.acme.travels.Address; - import org.acme.travels.Traveller; -diff --git a/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/pom.xml b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/pom.xml -index d2f060946..ddcf8411a 100644 ---- a/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/pom.xml -+++ b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/pom.xml -@@ -10,14 +10,14 @@ - process-usertasks-timer-quarkus-with-console - Kogito Example :: Process UserTasks with Timer Quarkus :: Console - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/src/test/java/org/kie/kogito/hr/HiringProcessIT.java b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/src/test/java/org/kie/kogito/hr/HiringProcessIT.java -index 01c683b6e..a99cfd301 100644 ---- a/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/src/test/java/org/kie/kogito/hr/HiringProcessIT.java -+++ b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/src/test/java/org/kie/kogito/hr/HiringProcessIT.java -@@ -20,8 +20,8 @@ import java.util.HashMap; - import java.util.List; - import java.util.Map; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.junit.jupiter.api.Test; - import org.kie.kogito.Model; -diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/pom.xml b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/pom.xml -index 85006df8d..803c65497 100644 ---- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/pom.xml -+++ b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/pom.xml -@@ -11,14 +11,14 @@ - Kogito Example :: Process Usertasks Security OIDC Keycloak Quarkus :: Console - Kogito user tasks orchestration with security enabled on REST api - open id connect adapter(keycloak) - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/test/java/org/acme/travels/ApprovalsProcessIT.java b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/test/java/org/acme/travels/ApprovalsProcessIT.java -index 54b0e1f02..1b4d54b2d 100644 ---- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/test/java/org/acme/travels/ApprovalsProcessIT.java -+++ b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/test/java/org/acme/travels/ApprovalsProcessIT.java -@@ -21,8 +21,8 @@ import java.util.HashMap; - import java.util.List; - import java.util.Map; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.jbpm.process.instance.impl.humantask.HumanTaskTransition; - import org.jbpm.process.instance.impl.humantask.phases.Claim; -diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/test/java/org/acme/travels/NativeApprovalsRestIT.java b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/test/java/org/acme/travels/NativeApprovalsRestIT.java -index 4cdffa0e7..5de8dec89 100644 ---- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/test/java/org/acme/travels/NativeApprovalsRestIT.java -+++ b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/test/java/org/acme/travels/NativeApprovalsRestIT.java -@@ -19,9 +19,9 @@ import org.kie.kogito.testcontainers.quarkus.KafkaQuarkusTestResource; - import org.kie.kogito.testcontainers.quarkus.KeycloakQuarkusTestResource; - - import io.quarkus.test.common.QuarkusTestResource; --import io.quarkus.test.junit.NativeImageTest; -+import io.quarkus.test.junit.QuarkusIntegrationTest; - --@NativeImageTest -+@QuarkusIntegrationTest - @QuarkusTestResource(KeycloakQuarkusTestResource.class) - @QuarkusTestResource(KafkaQuarkusTestResource.class) - public class NativeApprovalsRestIT extends ApprovalsRestIT { -diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/pom.xml b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/pom.xml -index f6b393614..f9a18ee81 100644 ---- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/pom.xml -@@ -11,14 +11,14 @@ - Kogito Example :: Process Usertasks With Security OIDC Keycloak Quarkus - Kogito user tasks orchestration with security enabled on REST api - open id connect adapter(keycloak) - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/java/org/acme/travels/ApprovalsProcessIT.java b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/java/org/acme/travels/ApprovalsProcessIT.java -index 94a13ad0b..d9b495a4b 100644 ---- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/java/org/acme/travels/ApprovalsProcessIT.java -+++ b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/java/org/acme/travels/ApprovalsProcessIT.java -@@ -21,8 +21,8 @@ import java.util.HashMap; - import java.util.List; - import java.util.Map; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.jbpm.process.instance.impl.humantask.HumanTaskTransition; - import org.jbpm.process.instance.impl.humantask.phases.Claim; -diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/java/org/acme/travels/NativeApprovalsRestIT.java b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/java/org/acme/travels/NativeApprovalsRestIT.java -index 1d1eeaccf..122ce4f77 100644 ---- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/java/org/acme/travels/NativeApprovalsRestIT.java -+++ b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/java/org/acme/travels/NativeApprovalsRestIT.java -@@ -18,9 +18,9 @@ package org.acme.travels; - import org.kie.kogito.testcontainers.quarkus.KeycloakQuarkusTestResource; - - import io.quarkus.test.common.QuarkusTestResource; --import io.quarkus.test.junit.NativeImageTest; -+import io.quarkus.test.junit.QuarkusIntegrationTest; - --@NativeImageTest -+@QuarkusIntegrationTest - @QuarkusTestResource(KeycloakQuarkusTestResource.class) - public class NativeApprovalsRestIT extends ApprovalsRestIT { - // run the same tests only against native image -diff --git a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/pom.xml b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/pom.xml -index 6f84b3d3e..06f3bffcf 100644 ---- a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/pom.xml -+++ b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/pom.xml -@@ -11,14 +11,14 @@ - Kogito Example :: Process Usertasks With Security Quarkus - Kogito user tasks orchestration with security enabled on REST api - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/test/java/org/acme/travels/security/quarkus/ApprovalsProcessTest.java b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/test/java/org/acme/travels/security/quarkus/ApprovalsProcessTest.java -index b752b25a5..a96c2739a 100644 ---- a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/test/java/org/acme/travels/security/quarkus/ApprovalsProcessTest.java -+++ b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/test/java/org/acme/travels/security/quarkus/ApprovalsProcessTest.java -@@ -20,8 +20,8 @@ import java.util.HashMap; - import java.util.List; - import java.util.Map; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.acme.travels.Address; - import org.acme.travels.Traveller; -diff --git a/kogito-quarkus-examples/rules-incubation-api-quarkus/pom.xml b/kogito-quarkus-examples/rules-incubation-api-quarkus/pom.xml -index 75331b945..9231e0389 100644 ---- a/kogito-quarkus-examples/rules-incubation-api-quarkus/pom.xml -+++ b/kogito-quarkus-examples/rules-incubation-api-quarkus/pom.xml -@@ -10,14 +10,14 @@ - rules-incubation-api-quarkus - Kogito Example :: Rules Incubation API With Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/rules-incubation-api-quarkus/src/main/java/org/acme/CustomRestRules.java b/kogito-quarkus-examples/rules-incubation-api-quarkus/src/main/java/org/acme/CustomRestRules.java -index 923a30f4f..c354510ec 100644 ---- a/kogito-quarkus-examples/rules-incubation-api-quarkus/src/main/java/org/acme/CustomRestRules.java -+++ b/kogito-quarkus-examples/rules-incubation-api-quarkus/src/main/java/org/acme/CustomRestRules.java -@@ -18,12 +18,12 @@ package org.acme; - import java.util.Map; - import java.util.stream.Stream; - --import javax.inject.Inject; --import javax.ws.rs.Consumes; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; -+import jakarta.inject.Inject; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; - - import org.kie.kogito.examples.Hello; - import org.kie.kogito.incubation.application.AppRoot; -diff --git a/kogito-quarkus-examples/rules-legacy-quarkus-example/pom.xml b/kogito-quarkus-examples/rules-legacy-quarkus-example/pom.xml -index 3b0a40983..5297b4716 100644 ---- a/kogito-quarkus-examples/rules-legacy-quarkus-example/pom.xml -+++ b/kogito-quarkus-examples/rules-legacy-quarkus-example/pom.xml -@@ -10,14 +10,14 @@ - rules-legacy-quarkus-example - Kogito Example :: Rules Legacy API - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/java/org/kie/kogito/legacy/FindApprovedLoansEndpoint.java b/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/java/org/kie/kogito/legacy/FindApprovedLoansEndpoint.java -index 7eb1ae4e3..b7dae2e9e 100644 ---- a/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/java/org/kie/kogito/legacy/FindApprovedLoansEndpoint.java -+++ b/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/java/org/kie/kogito/legacy/FindApprovedLoansEndpoint.java -@@ -18,12 +18,12 @@ package org.kie.kogito.legacy; - import java.util.ArrayList; - import java.util.List; - --import javax.inject.Inject; --import javax.ws.rs.Consumes; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; -+import jakarta.inject.Inject; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; - - import org.kie.api.runtime.KieRuntimeBuilder; - import org.kie.api.runtime.KieSession; -diff --git a/kogito-quarkus-examples/rules-legacy-quarkus-example/src/test/java/org/kie/kogito/NativeRestQueryTestIT.java b/kogito-quarkus-examples/rules-legacy-quarkus-example/src/test/java/org/kie/kogito/NativeRestQueryTestIT.java -index 3455e8798..b7324fef5 100644 ---- a/kogito-quarkus-examples/rules-legacy-quarkus-example/src/test/java/org/kie/kogito/NativeRestQueryTestIT.java -+++ b/kogito-quarkus-examples/rules-legacy-quarkus-example/src/test/java/org/kie/kogito/NativeRestQueryTestIT.java -@@ -15,9 +15,9 @@ - */ - package org.kie.kogito; - --import io.quarkus.test.junit.NativeImageTest; -+import io.quarkus.test.junit.QuarkusIntegrationTest; - --@NativeImageTest -+@QuarkusIntegrationTest - public class NativeRestQueryTestIT extends RestQueryTest { - - // Execute the same tests but in native mode. -diff --git a/kogito-quarkus-examples/rules-quarkus-helloworld/pom.xml b/kogito-quarkus-examples/rules-quarkus-helloworld/pom.xml -index 3f593a155..1c41a3b0c 100755 ---- a/kogito-quarkus-examples/rules-quarkus-helloworld/pom.xml -+++ b/kogito-quarkus-examples/rules-quarkus-helloworld/pom.xml -@@ -10,14 +10,14 @@ - rules-quarkus-helloworld - Kogito Example :: Rules HelloWorld - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/rules-quarkus-helloworld/src/main/java/org/kie/kogito/examples/MyAgendaEventListener.java b/kogito-quarkus-examples/rules-quarkus-helloworld/src/main/java/org/kie/kogito/examples/MyAgendaEventListener.java -index 0af433e96..1861cba5a 100644 ---- a/kogito-quarkus-examples/rules-quarkus-helloworld/src/main/java/org/kie/kogito/examples/MyAgendaEventListener.java -+++ b/kogito-quarkus-examples/rules-quarkus-helloworld/src/main/java/org/kie/kogito/examples/MyAgendaEventListener.java -@@ -17,7 +17,7 @@ package org.kie.kogito.examples; - - import java.util.concurrent.atomic.AtomicInteger; - --import javax.inject.Singleton; -+import jakarta.inject.Singleton; - - import org.drools.core.event.DefaultAgendaEventListener; - import org.jboss.logging.Logger; -diff --git a/kogito-quarkus-examples/rules-quarkus-helloworld/src/test/java/org/kie/kogito/examples/HelloTest.java b/kogito-quarkus-examples/rules-quarkus-helloworld/src/test/java/org/kie/kogito/examples/HelloTest.java -index 689a1fd08..f2f6fd2d4 100644 ---- a/kogito-quarkus-examples/rules-quarkus-helloworld/src/test/java/org/kie/kogito/examples/HelloTest.java -+++ b/kogito-quarkus-examples/rules-quarkus-helloworld/src/test/java/org/kie/kogito/examples/HelloTest.java -@@ -15,7 +15,7 @@ - */ - package org.kie.kogito.examples; - --import javax.inject.Inject; -+import jakarta.inject.Inject; - - import org.junit.jupiter.api.Test; - -diff --git a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/pom.xml b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/pom.xml -index d04d83799..e845249aa 100644 ---- a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/pom.xml -+++ b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/pom.xml -@@ -12,14 +12,14 @@ - ruleunit-event-driven-quarkus - Kogito Example :: Rule Unit Event-Driven :: Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/ruleunit-quarkus-example/pom.xml b/kogito-quarkus-examples/ruleunit-quarkus-example/pom.xml -index 8093fb0f0..364cbbb74 100644 ---- a/kogito-quarkus-examples/ruleunit-quarkus-example/pom.xml -+++ b/kogito-quarkus-examples/ruleunit-quarkus-example/pom.xml -@@ -10,14 +10,14 @@ - ruleunit-quarkus-example - Kogito Example :: RuleUnit - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-quarkus-examples/ruleunit-quarkus-example/src/test/java/org/kie/kogito/decisiontable/quarkus/ruleunit/NativeRestQueryTestIT.java b/kogito-quarkus-examples/ruleunit-quarkus-example/src/test/java/org/kie/kogito/decisiontable/quarkus/ruleunit/NativeRestQueryTestIT.java -index ae65452de..244cc6e02 100644 ---- a/kogito-quarkus-examples/ruleunit-quarkus-example/src/test/java/org/kie/kogito/decisiontable/quarkus/ruleunit/NativeRestQueryTestIT.java -+++ b/kogito-quarkus-examples/ruleunit-quarkus-example/src/test/java/org/kie/kogito/decisiontable/quarkus/ruleunit/NativeRestQueryTestIT.java -@@ -15,9 +15,9 @@ - */ - package org.kie.kogito.decisiontable.quarkus.ruleunit; - --import io.quarkus.test.junit.NativeImageTest; -+import io.quarkus.test.junit.QuarkusIntegrationTest; - --@NativeImageTest -+@QuarkusIntegrationTest - public class NativeRestQueryTestIT extends RestQueryTest { - - // Execute the same tests but in native mode. -diff --git a/kogito-quarkus-examples/trusty-tracing-quarkus-devservices/pom.xml b/kogito-quarkus-examples/trusty-tracing-quarkus-devservices/pom.xml -index 90831591a..426d43584 100644 ---- a/kogito-quarkus-examples/trusty-tracing-quarkus-devservices/pom.xml -+++ b/kogito-quarkus-examples/trusty-tracing-quarkus-devservices/pom.xml -@@ -10,14 +10,14 @@ - trusty-tracing-quarkus-devservices - Kogito Example :: Trusty Tracing - Quarkus DevServices - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/decisiontable-springboot-example/pom.xml b/kogito-springboot-examples/decisiontable-springboot-example/pom.xml -index a6cc7875e..71228adff 100644 ---- a/kogito-springboot-examples/decisiontable-springboot-example/pom.xml -+++ b/kogito-springboot-examples/decisiontable-springboot-example/pom.xml -@@ -11,8 +11,8 @@ - Kogito Example :: Decision Table - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/dmn-drools-springboot-metrics/pom.xml b/kogito-springboot-examples/dmn-drools-springboot-metrics/pom.xml -index 67de35fee..81d735392 100755 ---- a/kogito-springboot-examples/dmn-drools-springboot-metrics/pom.xml -+++ b/kogito-springboot-examples/dmn-drools-springboot-metrics/pom.xml -@@ -13,8 +13,8 @@ - Kogito Example :: DMN Metrics SpringBoot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/dmn-event-driven-springboot/pom.xml b/kogito-springboot-examples/dmn-event-driven-springboot/pom.xml -index dfb740f57..9f33f4c56 100644 ---- a/kogito-springboot-examples/dmn-event-driven-springboot/pom.xml -+++ b/kogito-springboot-examples/dmn-event-driven-springboot/pom.xml -@@ -14,8 +14,8 @@ - Kogito Example :: DMN Event-Driven :: Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/dmn-listener-springboot/pom.xml b/kogito-springboot-examples/dmn-listener-springboot/pom.xml -index 4bf710397..af4d453ca 100644 ---- a/kogito-springboot-examples/dmn-listener-springboot/pom.xml -+++ b/kogito-springboot-examples/dmn-listener-springboot/pom.xml -@@ -14,8 +14,8 @@ - Kogito Example :: DMN with listeners - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/pom.xml b/kogito-springboot-examples/dmn-pmml-springboot-example/pom.xml -index 48564bdf3..8c337b8d7 100644 ---- a/kogito-springboot-examples/dmn-pmml-springboot-example/pom.xml -+++ b/kogito-springboot-examples/dmn-pmml-springboot-example/pom.xml -@@ -13,8 +13,8 @@ - Kogito Example :: DMN :: PMML - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/dmn-springboot-example/pom.xml b/kogito-springboot-examples/dmn-springboot-example/pom.xml -index 1016db26a..a5ff13f44 100644 ---- a/kogito-springboot-examples/dmn-springboot-example/pom.xml -+++ b/kogito-springboot-examples/dmn-springboot-example/pom.xml -@@ -14,8 +14,8 @@ - Kogito Example :: DMN - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/dmn-tracing-springboot/pom.xml b/kogito-springboot-examples/dmn-tracing-springboot/pom.xml -index 458b024c4..fe6aab951 100644 ---- a/kogito-springboot-examples/dmn-tracing-springboot/pom.xml -+++ b/kogito-springboot-examples/dmn-tracing-springboot/pom.xml -@@ -14,8 +14,8 @@ - Kogito Example :: DMN Tracing - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/flexible-process-springboot/pom.xml b/kogito-springboot-examples/flexible-process-springboot/pom.xml -index a54b5b752..6a23d3386 100644 ---- a/kogito-springboot-examples/flexible-process-springboot/pom.xml -+++ b/kogito-springboot-examples/flexible-process-springboot/pom.xml -@@ -14,8 +14,8 @@ - Kogito service invocation - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/onboarding-springboot/pom.xml b/kogito-springboot-examples/onboarding-springboot/pom.xml -index cbf0db3c5..e9f6f6ec4 100644 ---- a/kogito-springboot-examples/onboarding-springboot/pom.xml -+++ b/kogito-springboot-examples/onboarding-springboot/pom.xml -@@ -12,8 +12,8 @@ - Onboarding function and service orchestration - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/WorkItemHandlerConfig.java b/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/WorkItemHandlerConfig.java -index 92d7ecb12..674769d92 100644 ---- a/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/WorkItemHandlerConfig.java -+++ b/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/WorkItemHandlerConfig.java -@@ -15,6 +15,7 @@ - */ - package org.kie.kogito.examples; - -+import jakarta.annotation.PostConstruct; - import java.util.ArrayList; - import java.util.Arrays; - import java.util.Collection; -@@ -22,8 +23,6 @@ import java.util.HashMap; - import java.util.List; - import java.util.Map; - --import javax.annotation.PostConstruct; -- - import org.kie.kogito.addons.k8s.Endpoint; - import org.kie.kogito.addons.k8s.EndpointQueryKey; - import org.kie.kogito.addons.k8s.LocalEndpointDiscovery; -diff --git a/kogito-springboot-examples/pmml-event-driven-springboot/pom.xml b/kogito-springboot-examples/pmml-event-driven-springboot/pom.xml -index 9a46b97a1..7996361a2 100644 ---- a/kogito-springboot-examples/pmml-event-driven-springboot/pom.xml -+++ b/kogito-springboot-examples/pmml-event-driven-springboot/pom.xml -@@ -13,8 +13,8 @@ - Kogito Example :: PMML Event-Driven - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/pmml-springboot-example/pom.xml b/kogito-springboot-examples/pmml-springboot-example/pom.xml -index 8f7ef4a2f..65f7ae6ae 100644 ---- a/kogito-springboot-examples/pmml-springboot-example/pom.xml -+++ b/kogito-springboot-examples/pmml-springboot-example/pom.xml -@@ -13,8 +13,8 @@ - Kogito Example :: PMML - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/process-business-rules-springboot/pom.xml b/kogito-springboot-examples/process-business-rules-springboot/pom.xml -index e770ea884..d2a38f9fa 100644 ---- a/kogito-springboot-examples/process-business-rules-springboot/pom.xml -+++ b/kogito-springboot-examples/process-business-rules-springboot/pom.xml -@@ -14,8 +14,8 @@ - Kogito business rules invocation - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/process-decisions-rest-springboot/pom.xml b/kogito-springboot-examples/process-decisions-rest-springboot/pom.xml -index ce8928da6..d985c1908 100644 ---- a/kogito-springboot-examples/process-decisions-rest-springboot/pom.xml -+++ b/kogito-springboot-examples/process-decisions-rest-springboot/pom.xml -@@ -12,8 +12,8 @@ - Process with DMN and DRL integration through REST - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/process-decisions-rules-springboot/pom.xml b/kogito-springboot-examples/process-decisions-rules-springboot/pom.xml -index 72beacfa1..7f7c06ad0 100644 ---- a/kogito-springboot-examples/process-decisions-rules-springboot/pom.xml -+++ b/kogito-springboot-examples/process-decisions-rules-springboot/pom.xml -@@ -12,8 +12,8 @@ - Process with DRL, DMN and DRL integration - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/process-decisions-springboot/pom.xml b/kogito-springboot-examples/process-decisions-springboot/pom.xml -index 24b7e9809..b18bf67b3 100644 ---- a/kogito-springboot-examples/process-decisions-springboot/pom.xml -+++ b/kogito-springboot-examples/process-decisions-springboot/pom.xml -@@ -12,8 +12,8 @@ - Process with DMN and DRL integration - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/process-infinispan-persistence-springboot/pom.xml b/kogito-springboot-examples/process-infinispan-persistence-springboot/pom.xml -index fa6e8e5f3..543f69244 100644 ---- a/kogito-springboot-examples/process-infinispan-persistence-springboot/pom.xml -+++ b/kogito-springboot-examples/process-infinispan-persistence-springboot/pom.xml -@@ -14,8 +14,8 @@ - Kogito with Infinispan persistence - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/process-kafka-multi-springboot/pom.xml b/kogito-springboot-examples/process-kafka-multi-springboot/pom.xml -index a0ac30101..5c4f004b5 100644 ---- a/kogito-springboot-examples/process-kafka-multi-springboot/pom.xml -+++ b/kogito-springboot-examples/process-kafka-multi-springboot/pom.xml -@@ -14,8 +14,8 @@ - Kogito with Kafka - Spring Boot, using multiple channels - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/process-kafka-quickstart-springboot/pom.xml b/kogito-springboot-examples/process-kafka-quickstart-springboot/pom.xml -index aee4a36fd..45a289547 100644 ---- a/kogito-springboot-examples/process-kafka-quickstart-springboot/pom.xml -+++ b/kogito-springboot-examples/process-kafka-quickstart-springboot/pom.xml -@@ -14,8 +14,8 @@ - Kogito with Kafka - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/process-mongodb-persistence-springboot/pom.xml b/kogito-springboot-examples/process-mongodb-persistence-springboot/pom.xml -index 252f7d39e..c739d40cf 100644 ---- a/kogito-springboot-examples/process-mongodb-persistence-springboot/pom.xml -+++ b/kogito-springboot-examples/process-mongodb-persistence-springboot/pom.xml -@@ -15,8 +15,8 @@ - - - true -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/process-monitoring-springboot/pom.xml b/kogito-springboot-examples/process-monitoring-springboot/pom.xml -index 06d75a9cf..d2c0513ba 100644 ---- a/kogito-springboot-examples/process-monitoring-springboot/pom.xml -+++ b/kogito-springboot-examples/process-monitoring-springboot/pom.xml -@@ -13,8 +13,8 @@ - Kogito Example :: Process Monitoring :: Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/process-outbox-mongodb-springboot/pom.xml b/kogito-springboot-examples/process-outbox-mongodb-springboot/pom.xml -index 703fb4bca..e9c29f71d 100644 ---- a/kogito-springboot-examples/process-outbox-mongodb-springboot/pom.xml -+++ b/kogito-springboot-examples/process-outbox-mongodb-springboot/pom.xml -@@ -15,8 +15,8 @@ - - - 1.7 -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/process-performance-springboot/pom.xml b/kogito-springboot-examples/process-performance-springboot/pom.xml -index 2c3f44867..756ce3f11 100755 ---- a/kogito-springboot-examples/process-performance-springboot/pom.xml -+++ b/kogito-springboot-examples/process-performance-springboot/pom.xml -@@ -14,8 +14,8 @@ - Springboot Performance test - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -@@ -61,7 +61,7 @@ - - - org.springdoc -- springdoc-openapi-ui -+ springdoc-openapi-starter-webmvc-ui - - - org.springframework.boot -diff --git a/kogito-springboot-examples/process-postgresql-persistence-springboot/pom.xml b/kogito-springboot-examples/process-postgresql-persistence-springboot/pom.xml -index b64ac9d40..4cd045849 100644 ---- a/kogito-springboot-examples/process-postgresql-persistence-springboot/pom.xml -+++ b/kogito-springboot-examples/process-postgresql-persistence-springboot/pom.xml -@@ -14,8 +14,8 @@ - Kogito with PostgreSQL persistence - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/process-rest-service-call-springboot/pom.xml b/kogito-springboot-examples/process-rest-service-call-springboot/pom.xml -index 21ffc3289..6d0b94d56 100644 ---- a/kogito-springboot-examples/process-rest-service-call-springboot/pom.xml -+++ b/kogito-springboot-examples/process-rest-service-call-springboot/pom.xml -@@ -14,8 +14,8 @@ - Kogito service invocation with REST - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/process-scripts-springboot/pom.xml b/kogito-springboot-examples/process-scripts-springboot/pom.xml -index 1dfd2631d..0c42d218a 100644 ---- a/kogito-springboot-examples/process-scripts-springboot/pom.xml -+++ b/kogito-springboot-examples/process-scripts-springboot/pom.xml -@@ -14,8 +14,8 @@ - Kogito script invocation - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/process-service-calls-springboot/pom.xml b/kogito-springboot-examples/process-service-calls-springboot/pom.xml -index b689418ad..2558029c0 100644 ---- a/kogito-springboot-examples/process-service-calls-springboot/pom.xml -+++ b/kogito-springboot-examples/process-service-calls-springboot/pom.xml -@@ -14,8 +14,8 @@ - Kogito service invocation - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/process-springboot-example/pom.xml b/kogito-springboot-examples/process-springboot-example/pom.xml -index 4ba2e5554..8d8bc4a9a 100644 ---- a/kogito-springboot-examples/process-springboot-example/pom.xml -+++ b/kogito-springboot-examples/process-springboot-example/pom.xml -@@ -14,8 +14,8 @@ - Order management service - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/process-timer-springboot/pom.xml b/kogito-springboot-examples/process-timer-springboot/pom.xml -index 00b0b708b..6b51dd9df 100644 ---- a/kogito-springboot-examples/process-timer-springboot/pom.xml -+++ b/kogito-springboot-examples/process-timer-springboot/pom.xml -@@ -12,8 +12,8 @@ - Kogito with timers - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/pom.xml b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/pom.xml -index 8a3914d26..b267e3d09 100644 ---- a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/pom.xml -+++ b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/pom.xml -@@ -14,8 +14,8 @@ - Kogito usertasks orchestration with custom life cycle - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/pom.xml b/kogito-springboot-examples/process-usertasks-springboot-with-console/pom.xml -index 7b1859a5f..9c3b0ca17 100644 ---- a/kogito-springboot-examples/process-usertasks-springboot-with-console/pom.xml -+++ b/kogito-springboot-examples/process-usertasks-springboot-with-console/pom.xml -@@ -15,8 +15,8 @@ - - - true -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/process-usertasks-springboot/pom.xml b/kogito-springboot-examples/process-usertasks-springboot/pom.xml -index 0261a5c95..848825776 100644 ---- a/kogito-springboot-examples/process-usertasks-springboot/pom.xml -+++ b/kogito-springboot-examples/process-usertasks-springboot/pom.xml -@@ -14,8 +14,8 @@ - Kogito usertasks orchestration - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/pom.xml b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/pom.xml -index 5eb4ea4ff..0e39fbaa0 100644 ---- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/pom.xml -+++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/pom.xml -@@ -15,8 +15,8 @@ - - - true -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/pom.xml b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/pom.xml -index e242442ec..ea037b1f8 100644 ---- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/pom.xml -+++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/pom.xml -@@ -14,8 +14,8 @@ - Kogito usertasks orchestration with security enabled on REST api - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/process-usertasks-with-security-springboot/pom.xml b/kogito-springboot-examples/process-usertasks-with-security-springboot/pom.xml -index 7da2721b9..375818c87 100644 ---- a/kogito-springboot-examples/process-usertasks-with-security-springboot/pom.xml -+++ b/kogito-springboot-examples/process-usertasks-with-security-springboot/pom.xml -@@ -14,8 +14,8 @@ - Kogito usertasks orchestration with security enabled on REST api - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/rules-legacy-springboot-example/pom.xml b/kogito-springboot-examples/rules-legacy-springboot-example/pom.xml -index 6f98382b4..3cc16c9cd 100644 ---- a/kogito-springboot-examples/rules-legacy-springboot-example/pom.xml -+++ b/kogito-springboot-examples/rules-legacy-springboot-example/pom.xml -@@ -13,8 +13,8 @@ - Kogito Example :: Rules Legacy API - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/ruleunit-event-driven-springboot/pom.xml b/kogito-springboot-examples/ruleunit-event-driven-springboot/pom.xml -index 77decd35e..cd8e555a8 100644 ---- a/kogito-springboot-examples/ruleunit-event-driven-springboot/pom.xml -+++ b/kogito-springboot-examples/ruleunit-event-driven-springboot/pom.xml -@@ -13,8 +13,8 @@ - Kogito Example :: RuleUnit Event Driven :: Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/kogito-springboot-examples/ruleunit-springboot-example/pom.xml b/kogito-springboot-examples/ruleunit-springboot-example/pom.xml -index e14f65ecb..cb290c447 100644 ---- a/kogito-springboot-examples/ruleunit-springboot-example/pom.xml -+++ b/kogito-springboot-examples/ruleunit-springboot-example/pom.xml -@@ -13,8 +13,8 @@ - Kogito Example :: RuleUnit - Spring Boot - - -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/pom.xml b/pom.xml -index e51bbf698..c30159f15 100755 ---- a/pom.xml -+++ b/pom.xml -@@ -34,7 +34,7 @@ - - UTF-8 - -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - 1 - **/*IT.java -diff --git a/serverless-workflow-examples/serverless-workflow-annotations-description/pom.xml b/serverless-workflow-examples/serverless-workflow-annotations-description/pom.xml -index 13129a50a..a0b3ebde7 100644 ---- a/serverless-workflow-examples/serverless-workflow-annotations-description/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-annotations-description/pom.xml -@@ -11,14 +11,14 @@ - Kogito Example :: Serverless Workflow Annotations and Description:: Quarkus - Kogito Serverless Workflow Example - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - 3.22.0 - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 11 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/pom.xml b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/pom.xml -index 4e4602148..6f4e3d857 100644 ---- a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/pom.xml -@@ -12,13 +12,13 @@ - callback-event-service - Kogito Example :: Serverless Workflow CallBack Over HTTP Quarkus :: Callback Event Service - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 11 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/src/main/java/org/kie/kogito/examples/CallbackResource.java b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/src/main/java/org/kie/kogito/examples/CallbackResource.java -index 91ad34b97..a28d9f40e 100644 ---- a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/src/main/java/org/kie/kogito/examples/CallbackResource.java -+++ b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/src/main/java/org/kie/kogito/examples/CallbackResource.java -@@ -20,14 +20,14 @@ import java.time.OffsetDateTime; - import java.util.Collections; - import java.util.UUID; - --import javax.annotation.PostConstruct; --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; --import javax.ws.rs.Consumes; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.core.MediaType; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.core.MediaType; - -+import jakarta.annotation.PostConstruct; - import org.kie.kogito.event.cloudevents.CloudEventExtensionConstants; - import org.slf4j.Logger; - import org.slf4j.LoggerFactory; -diff --git a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/src/main/java/org/kie/kogito/examples/RegisterObjectMapper.java b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/src/main/java/org/kie/kogito/examples/RegisterObjectMapper.java -index e0477fba4..36f2aac9c 100644 ---- a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/src/main/java/org/kie/kogito/examples/RegisterObjectMapper.java -+++ b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/src/main/java/org/kie/kogito/examples/RegisterObjectMapper.java -@@ -15,7 +15,7 @@ - */ - package org.kie.kogito.examples; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import com.fasterxml.jackson.databind.ObjectMapper; - -diff --git a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-workflow/pom.xml b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-workflow/pom.xml -index 76a5fd018..a20b704ed 100644 ---- a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-workflow/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-workflow/pom.xml -@@ -13,13 +13,13 @@ - Kogito Example :: Serverless Workflow CallBack Over HTTP Quarkus :: Service - Kogito Serverless Workflow Callback Example Over HTTP - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 11 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-callback-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-callback-quarkus/pom.xml -index 2f1c84d57..4dbcc325b 100644 ---- a/serverless-workflow-examples/serverless-workflow-callback-quarkus/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-callback-quarkus/pom.xml -@@ -10,13 +10,13 @@ - Kogito Example :: Serverless Workflow Callback :: Quarkus - Kogito Serverless Workflow Callback Example - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 11 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/main/java/org/kie/kogito/examples/PrintService.java b/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/main/java/org/kie/kogito/examples/PrintService.java -index a1ee770e7..77b636420 100644 ---- a/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/main/java/org/kie/kogito/examples/PrintService.java -+++ b/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/main/java/org/kie/kogito/examples/PrintService.java -@@ -22,8 +22,8 @@ import java.util.Map; - import java.util.Optional; - import java.util.UUID; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; - - import org.eclipse.microprofile.reactive.messaging.Acknowledgment; - import org.eclipse.microprofile.reactive.messaging.Acknowledgment.Strategy; -diff --git a/serverless-workflow-examples/serverless-workflow-camel-routes/pom.xml b/serverless-workflow-examples/serverless-workflow-camel-routes/pom.xml -index 519234897..05e2b0dd8 100644 ---- a/serverless-workflow-examples/serverless-workflow-camel-routes/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-camel-routes/pom.xml -@@ -12,20 +12,20 @@ - Kogito Serverless Workflow Camel Routes Example - Quarkus - - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 11 - 3.8.1 - 3.0.0-M7 - - 3.5.4 - -- 2.16.0 -+ 3.0.0-M1 - - - -diff --git a/serverless-workflow-examples/serverless-workflow-compensation-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-compensation-quarkus/pom.xml -index 480206687..015d82784 100644 ---- a/serverless-workflow-examples/serverless-workflow-compensation-quarkus/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-compensation-quarkus/pom.xml -@@ -10,13 +10,13 @@ - Kogito Example :: Serverless Workflow Compensation :: Quarkus - Kogito Serverless Workflow Error Compensation - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 3.0.0-M7 - 11 -diff --git a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/pom.xml -index 4cc5b957b..15d303eec 100644 ---- a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/pom.xml -@@ -12,13 +12,13 @@ - Kogito Example :: Serverless Workflow Consuming Events Over HTTP :: Quarkus - Kogito Serverless Workflow Consuming Events Over HTTP - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 11 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/pom.xml -index 4cb87747c..f67a88ec0 100644 ---- a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/pom.xml -@@ -10,13 +10,13 @@ - Kogito Example :: Serverless Workflow Correlation :: Quarkus - Kogito Serverless Workflow Correlation Example - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 11 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/java/org/kie/kogito/examples/EventsService.java b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/java/org/kie/kogito/examples/EventsService.java -index ff08208ed..82e1404b2 100644 ---- a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/java/org/kie/kogito/examples/EventsService.java -+++ b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/java/org/kie/kogito/examples/EventsService.java -@@ -22,8 +22,8 @@ import java.util.Optional; - import java.util.UUID; - import java.util.concurrent.ConcurrentHashMap; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; - - import org.eclipse.microprofile.reactive.messaging.Acknowledgment; - import org.eclipse.microprofile.reactive.messaging.Acknowledgment.Strategy; -diff --git a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/java/org/kie/kogito/examples/WorkflowResource.java b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/java/org/kie/kogito/examples/WorkflowResource.java -index bb3edca5f..59f586060 100644 ---- a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/java/org/kie/kogito/examples/WorkflowResource.java -+++ b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/java/org/kie/kogito/examples/WorkflowResource.java -@@ -21,12 +21,12 @@ import java.util.Collections; - import java.util.Map; - import java.util.UUID; - --import javax.inject.Inject; --import javax.ws.rs.GET; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.PathParam; --import javax.ws.rs.core.Response; -+import jakarta.inject.Inject; -+import jakarta.ws.rs.GET; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.PathParam; -+import jakarta.ws.rs.core.Response; - - import org.eclipse.microprofile.reactive.messaging.Channel; - import org.eclipse.microprofile.reactive.messaging.Emitter; -diff --git a/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/pom.xml b/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/pom.xml -index bb232125f..ceedd0272 100644 ---- a/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/pom.xml -@@ -12,13 +12,13 @@ - custom-function-knative-service - Kogito Example :: Serverless Workflow Custom Function Knative :: Service - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 11 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/pom.xml b/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/pom.xml -index a92ad9e89..94b538fb1 100644 ---- a/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/pom.xml -@@ -13,13 +13,13 @@ - Kogito Example :: Serverless Workflow Custom Function Knative :: Workflow - Kogito Serverless Workflow Custom Function Knative - Workflow - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 11 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-custom-type/pom.xml b/serverless-workflow-examples/serverless-workflow-custom-type/pom.xml -index 519f3d236..43270cc84 100644 ---- a/serverless-workflow-examples/serverless-workflow-custom-type/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-custom-type/pom.xml -@@ -12,13 +12,13 @@ - - 3.8.1 - 3.1.0 -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.0.0-M7 - 11 - 1.7.30 -diff --git a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/src/main/java/org/kie/kogito/examples/sw/custom/RPCCustomWorkItemHandler.java b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/src/main/java/org/kie/kogito/examples/sw/custom/RPCCustomWorkItemHandler.java -index 309c561ef..53d216c13 100644 ---- a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/src/main/java/org/kie/kogito/examples/sw/custom/RPCCustomWorkItemHandler.java -+++ b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/src/main/java/org/kie/kogito/examples/sw/custom/RPCCustomWorkItemHandler.java -@@ -20,7 +20,7 @@ import java.io.UncheckedIOException; - import java.util.Iterator; - import java.util.Map; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.kie.kogito.examples.sw.custom.CalculatorClient.OperationId; - import org.kie.kogito.internal.process.runtime.KogitoWorkItem; -diff --git a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/src/main/java/org/kie/kogito/examples/sw/custom/RPCCustomWorkItemHandlerConfig.java b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/src/main/java/org/kie/kogito/examples/sw/custom/RPCCustomWorkItemHandlerConfig.java -index e1bbe63aa..b87cc7206 100644 ---- a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/src/main/java/org/kie/kogito/examples/sw/custom/RPCCustomWorkItemHandlerConfig.java -+++ b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/src/main/java/org/kie/kogito/examples/sw/custom/RPCCustomWorkItemHandlerConfig.java -@@ -15,9 +15,10 @@ - */ - package org.kie.kogito.examples.sw.custom; - --import javax.annotation.PostConstruct; --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -+import jakarta.annotation.PostConstruct; -+ -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; - - import org.kie.kogito.process.impl.CachedWorkItemHandlerConfig; - -diff --git a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/pom.xml -index b7b0a4ada..2e0b986da 100644 ---- a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/pom.xml -@@ -10,13 +10,13 @@ - Kogito Example :: Serverless Workflow Data Index :: Quarkus - Kogito Serverless Workflow Data Index Example - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 11 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/src/main/java/org/kie/kogito/examples/PrintService.java b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/src/main/java/org/kie/kogito/examples/PrintService.java -index 80259f870..14cb03297 100644 ---- a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/src/main/java/org/kie/kogito/examples/PrintService.java -+++ b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/src/main/java/org/kie/kogito/examples/PrintService.java -@@ -22,8 +22,8 @@ import java.util.Map; - import java.util.Optional; - import java.util.UUID; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; - - import org.eclipse.microprofile.reactive.messaging.Acknowledgment; - import org.eclipse.microprofile.reactive.messaging.Acknowledgment.Strategy; -diff --git a/serverless-workflow-examples/serverless-workflow-error-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-error-quarkus/pom.xml -index f4f65c528..17baa4d8a 100644 ---- a/serverless-workflow-examples/serverless-workflow-error-quarkus/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-error-quarkus/pom.xml -@@ -10,13 +10,13 @@ - Kogito Example :: Serverless Workflow Error :: Quarkus - Kogito Serverless Workflow Error Example - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 11 - 3.8.1 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-error-quarkus/src/main/java/org/kie/kogito/examples/EvenService.java b/serverless-workflow-examples/serverless-workflow-error-quarkus/src/main/java/org/kie/kogito/examples/EvenService.java -index 59c077d86..6468384d5 100644 ---- a/serverless-workflow-examples/serverless-workflow-error-quarkus/src/main/java/org/kie/kogito/examples/EvenService.java -+++ b/serverless-workflow-examples/serverless-workflow-error-quarkus/src/main/java/org/kie/kogito/examples/EvenService.java -@@ -15,7 +15,7 @@ - */ - package org.kie.kogito.examples; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - @ApplicationScoped - public class EvenService { -diff --git a/serverless-workflow-examples/serverless-workflow-events-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-events-quarkus/pom.xml -index 874e192c9..7379a037a 100644 ---- a/serverless-workflow-examples/serverless-workflow-events-quarkus/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-events-quarkus/pom.xml -@@ -10,17 +10,17 @@ - Kogito Example :: Serverless Workflow Events :: Quarkus - Kogito Serverless Workflow Example - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 11 - 3.0.0-M7 -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - - -diff --git a/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/ApplicantResource.java b/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/ApplicantResource.java -index 50492d1e2..065a317f6 100644 ---- a/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/ApplicantResource.java -+++ b/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/ApplicantResource.java -@@ -19,15 +19,15 @@ import java.io.IOException; - import java.net.URI; - import java.util.UUID; - --import javax.annotation.PostConstruct; --import javax.inject.Inject; --import javax.ws.rs.Consumes; --import javax.ws.rs.InternalServerErrorException; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; -+import jakarta.inject.Inject; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.InternalServerErrorException; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; - -+import jakarta.annotation.PostConstruct; - import org.eclipse.microprofile.reactive.messaging.Channel; - import org.eclipse.microprofile.reactive.messaging.Emitter; - import org.kie.kogito.event.CloudEventMarshaller; -diff --git a/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/AvroMarshallerProducer.java b/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/AvroMarshallerProducer.java -index 287b775c6..c969da8c7 100644 ---- a/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/AvroMarshallerProducer.java -+++ b/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/AvroMarshallerProducer.java -@@ -17,11 +17,11 @@ package org.kogito.serverless.examples; - - import java.io.IOException; - --import javax.annotation.PostConstruct; --import javax.enterprise.context.ApplicationScoped; --import javax.enterprise.inject.Produces; --import javax.inject.Named; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.inject.Produces; -+import jakarta.inject.Named; - -+import jakarta.annotation.PostConstruct; - import org.kie.kogito.addon.quarkus.messaging.common.ChannelFormat; - import org.kie.kogito.event.CloudEventUnmarshallerFactory; - import org.kie.kogito.event.avro.AvroCloudEventUnmarshallerFactory; -diff --git a/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/DecisionResource.java b/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/DecisionResource.java -index a9615feff..54a8b9a5a 100644 ---- a/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/DecisionResource.java -+++ b/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/DecisionResource.java -@@ -15,11 +15,11 @@ - */ - package org.kogito.serverless.examples; - --import javax.inject.Inject; --import javax.ws.rs.GET; --import javax.ws.rs.Path; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; -+import jakarta.inject.Inject; -+import jakarta.ws.rs.GET; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; - - import org.eclipse.microprofile.reactive.messaging.Channel; - import org.jboss.resteasy.annotations.SseElementType; -diff --git a/serverless-workflow-examples/serverless-workflow-events-quarkus/src/test/java/org/kogito/serverless/examples/ApplicantWorkflowIT.java b/serverless-workflow-examples/serverless-workflow-events-quarkus/src/test/java/org/kogito/serverless/examples/ApplicantWorkflowIT.java -index 22a64e6db..4ea73f3a2 100644 ---- a/serverless-workflow-examples/serverless-workflow-events-quarkus/src/test/java/org/kogito/serverless/examples/ApplicantWorkflowIT.java -+++ b/serverless-workflow-examples/serverless-workflow-events-quarkus/src/test/java/org/kogito/serverless/examples/ApplicantWorkflowIT.java -@@ -27,11 +27,11 @@ import java.util.UUID; - import java.util.concurrent.CopyOnWriteArrayList; - import java.util.concurrent.TimeUnit; - --import javax.ws.rs.client.Client; --import javax.ws.rs.client.ClientBuilder; --import javax.ws.rs.client.WebTarget; --import javax.ws.rs.core.MediaType; --import javax.ws.rs.sse.SseEventSource; -+import jakarta.ws.rs.client.Client; -+import jakarta.ws.rs.client.ClientBuilder; -+import jakarta.ws.rs.client.WebTarget; -+import jakarta.ws.rs.core.MediaType; -+import jakarta.ws.rs.sse.SseEventSource; - - import org.apache.kafka.common.serialization.ByteArrayDeserializer; - import org.apache.kafka.common.serialization.ByteArraySerializer; -diff --git a/serverless-workflow-examples/serverless-workflow-expression-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-expression-quarkus/pom.xml -index d866929bf..2144e8b6b 100644 ---- a/serverless-workflow-examples/serverless-workflow-expression-quarkus/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-expression-quarkus/pom.xml -@@ -10,13 +10,13 @@ - Kogito Example :: Serverless Workflow Expression :: Quarkus - Kogito Serverless Workflow Expression Example - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 11 - 3.8.1 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-foreach-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-foreach-quarkus/pom.xml -index 781162a98..dffac3171 100644 ---- a/serverless-workflow-examples/serverless-workflow-foreach-quarkus/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-foreach-quarkus/pom.xml -@@ -10,13 +10,13 @@ - Kogito Example :: Serverless Workflow For Each :: Quarkus - Kogito Serverless Workflow For Each Example - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 11 - 3.8.1 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/pom.xml -index 9424dc1b5..1d43def93 100644 ---- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/pom.xml -@@ -12,13 +12,13 @@ - - - 8080 -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 11 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/resources/AppointmentResource.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/resources/AppointmentResource.java -index b5584de03..1f9a0bdb8 100644 ---- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/resources/AppointmentResource.java -+++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/resources/AppointmentResource.java -@@ -20,17 +20,17 @@ import java.util.ArrayList; - import java.util.List; - import java.util.stream.Collectors; - --import javax.inject.Inject; --import javax.validation.constraints.NotEmpty; --import javax.validation.constraints.NotNull; --import javax.ws.rs.Consumes; --import javax.ws.rs.GET; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.PathParam; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; --import javax.ws.rs.core.Response; -+import jakarta.inject.Inject; -+import jakarta.validation.constraints.NotEmpty; -+import jakarta.validation.constraints.NotNull; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.GET; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.PathParam; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.Response; - - import org.acme.sw.onboarding.model.Appointment; - import org.acme.sw.onboarding.model.Error; -diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/resources/PatientResource.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/resources/PatientResource.java -index d7aab2dbc..1d6a6c06e 100644 ---- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/resources/PatientResource.java -+++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/resources/PatientResource.java -@@ -20,16 +20,16 @@ import java.util.List; - import java.util.Optional; - import java.util.UUID; - --import javax.validation.constraints.NotEmpty; --import javax.validation.constraints.NotNull; --import javax.ws.rs.Consumes; --import javax.ws.rs.GET; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.PathParam; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; --import javax.ws.rs.core.Response; -+import jakarta.validation.constraints.NotEmpty; -+import jakarta.validation.constraints.NotNull; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.GET; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.PathParam; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.Response; - - import org.acme.sw.onboarding.model.Patient; - import org.slf4j.Logger; -diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/services/ScheduleService.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/services/ScheduleService.java -index 52ac7f7bc..08cf946ac 100644 ---- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/services/ScheduleService.java -+++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/services/ScheduleService.java -@@ -23,7 +23,7 @@ import java.util.Map; - import java.util.Optional; - import java.util.concurrent.ConcurrentHashMap; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.acme.sw.onboarding.model.Appointment; - import org.acme.sw.onboarding.model.Patient; -diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/resources/AppointmentResourceIT.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/resources/AppointmentResourceIT.java -index f6beebbbe..aadaa1c8d 100644 ---- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/resources/AppointmentResourceIT.java -+++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/resources/AppointmentResourceIT.java -@@ -20,7 +20,7 @@ import java.text.ParseException; - import java.text.SimpleDateFormat; - import java.util.Date; - --import javax.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.MediaType; - - import org.junit.jupiter.api.Test; - -diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/resources/OnboardingIT.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/resources/OnboardingIT.java -index 41d8e0307..0f6b374f6 100644 ---- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/resources/OnboardingIT.java -+++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/resources/OnboardingIT.java -@@ -18,7 +18,7 @@ package org.acme.sw.onboarding.resources; - import java.time.Duration; - import java.util.UUID; - --import javax.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.MediaType; - - import org.junit.jupiter.api.Test; - -diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/services/ScheduleServiceTest.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/services/ScheduleServiceTest.java -index 8fc1044fe..81f8a9b04 100644 ---- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/services/ScheduleServiceTest.java -+++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/services/ScheduleServiceTest.java -@@ -18,7 +18,7 @@ package org.acme.sw.onboarding.services; - import java.time.LocalDateTime; - import java.util.List; - --import javax.inject.Inject; -+import jakarta.inject.Inject; - - import org.acme.sw.onboarding.model.Appointment; - import org.acme.sw.onboarding.model.Doctor; -diff --git a/serverless-workflow-examples/serverless-workflow-functions-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-functions-quarkus/pom.xml -index 35c91d68b..a4136e6f8 100644 ---- a/serverless-workflow-examples/serverless-workflow-functions-quarkus/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-functions-quarkus/pom.xml -@@ -12,13 +12,13 @@ - - - 8080 -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 11 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-functions-quarkus/src/main/java/org/acme/numbers/NumbersResource.java b/serverless-workflow-examples/serverless-workflow-functions-quarkus/src/main/java/org/acme/numbers/NumbersResource.java -index b9cbab2e8..6980366b7 100644 ---- a/serverless-workflow-examples/serverless-workflow-functions-quarkus/src/main/java/org/acme/numbers/NumbersResource.java -+++ b/serverless-workflow-examples/serverless-workflow-functions-quarkus/src/main/java/org/acme/numbers/NumbersResource.java -@@ -14,21 +14,20 @@ - * limitations under the License. - */ - package org.acme.numbers; -- -+import jakarta.annotation.PostConstruct; - import java.util.Random; - import java.util.stream.Collectors; - --import javax.annotation.PostConstruct; --import javax.enterprise.context.ApplicationScoped; --import javax.ws.rs.DefaultValue; --import javax.ws.rs.GET; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.PathParam; --import javax.ws.rs.Produces; --import javax.ws.rs.QueryParam; --import javax.ws.rs.core.MediaType; --import javax.ws.rs.core.Response; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.ws.rs.DefaultValue; -+import jakarta.ws.rs.GET; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.PathParam; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.QueryParam; -+import jakarta.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.Response; - - import org.slf4j.Logger; - import org.slf4j.LoggerFactory; -diff --git a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/pom.xml b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/pom.xml -index cda3b7296..011e97147 100644 ---- a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/pom.xml -@@ -11,10 +11,10 @@ - Kogito Example :: Serverless Workflow :: Funqy :: Services - Kogito Serverless Workflow Funqy Services - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - 3.8.1 - 11 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/functions/ClassificationFunction.java b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/functions/ClassificationFunction.java -index 6f90bae6d..56b1e20e5 100644 ---- a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/functions/ClassificationFunction.java -+++ b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/functions/ClassificationFunction.java -@@ -15,7 +15,7 @@ - */ - package org.kogito.serverless.examples.functions; - --import javax.inject.Inject; -+import jakarta.inject.Inject; - - import org.kogito.serverless.examples.input.Country; - import org.kogito.serverless.examples.services.ClassificationService; -diff --git a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/functions/CountriesFunction.java b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/functions/CountriesFunction.java -index 750823546..f17e7bea9 100644 ---- a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/functions/CountriesFunction.java -+++ b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/functions/CountriesFunction.java -@@ -15,7 +15,7 @@ - */ - package org.kogito.serverless.examples.functions; - --import javax.inject.Inject; -+import jakarta.inject.Inject; - - import org.kogito.serverless.examples.input.Country; - import org.kogito.serverless.examples.services.CountriesService; -diff --git a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/functions/PopulationFunction.java b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/functions/PopulationFunction.java -index 69066c4ec..8249c76b2 100644 ---- a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/functions/PopulationFunction.java -+++ b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/functions/PopulationFunction.java -@@ -15,7 +15,7 @@ - */ - package org.kogito.serverless.examples.functions; - --import javax.inject.Inject; -+import jakarta.inject.Inject; - - import org.kogito.serverless.examples.input.Country; - import org.kogito.serverless.examples.services.CountriesService; -diff --git a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/services/ClassificationService.java b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/services/ClassificationService.java -index 3731e3707..1f9bd1377 100644 ---- a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/services/ClassificationService.java -+++ b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/services/ClassificationService.java -@@ -18,7 +18,7 @@ package org.kogito.serverless.examples.services; - import java.util.HashMap; - import java.util.Map; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.kogito.serverless.examples.input.Country; - -diff --git a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/services/CountriesService.java b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/services/CountriesService.java -index acce33496..a6ffe63d9 100644 ---- a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/services/CountriesService.java -+++ b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/services/CountriesService.java -@@ -18,7 +18,7 @@ package org.kogito.serverless.examples.services; - import java.util.ArrayList; - import java.util.List; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.kogito.serverless.examples.input.Country; - -diff --git a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/services/PopulationService.java b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/services/PopulationService.java -index 8aa404d54..60910c580 100644 ---- a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/services/PopulationService.java -+++ b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/services/PopulationService.java -@@ -18,7 +18,7 @@ package org.kogito.serverless.examples.services; - import java.util.HashMap; - import java.util.Map; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.kogito.serverless.examples.input.Country; - -diff --git a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/pom.xml b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/pom.xml -index f651b169d..f72762b0b 100644 ---- a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/pom.xml -@@ -11,13 +11,13 @@ - Kogito Example :: Serverless Workflow :: Funqy :: Workflow - Kogito Serverless Workflow Funqy Workflow - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 11 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-greeting-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-greeting-quarkus/pom.xml -index 7ac2e39db..738e86c3f 100644 ---- a/serverless-workflow-examples/serverless-workflow-greeting-quarkus/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-greeting-quarkus/pom.xml -@@ -10,13 +10,13 @@ - Kogito Example :: Serverless Workflow Greeting :: Quarkus - Kogito Serverless Workflow Example - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 11 - 3.8.1 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-client-rpc-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-client-rpc-quarkus/pom.xml -index 8c6563339..707894ba9 100644 ---- a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-client-rpc-quarkus/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-client-rpc-quarkus/pom.xml -@@ -11,13 +11,13 @@ - Kogito Example :: Serverless Workflow Greeting :: gRPC Client :: Quarkus - Kogito Serverless Workflow Example that test a simple gRPC service - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 11 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-server-rpc-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-server-rpc-quarkus/pom.xml -index c2ca6f930..d004b2cc1 100644 ---- a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-server-rpc-quarkus/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-server-rpc-quarkus/pom.xml -@@ -16,7 +16,7 @@ - 11 - 3.0.0-M7 - 3.22.0 -- 1.51.1 -+ 1.54.0 - 1.6.0 - 0.6.1 - 3.3.0 -@@ -49,7 +49,7 @@ - - org.junit.jupiter - junit-jupiter -- 5.8.1 -+ 5.9.2 - - - -diff --git a/serverless-workflow-examples/serverless-workflow-hello-world/pom.xml b/serverless-workflow-examples/serverless-workflow-hello-world/pom.xml -index 12e44987a..a2eeb214a 100644 ---- a/serverless-workflow-examples/serverless-workflow-hello-world/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-hello-world/pom.xml -@@ -12,14 +12,14 @@ - Kogito Serverless Workflow Example - Quarkus - - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 11 - 3.8.1 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/CloudEventDataFormat.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/CloudEventDataFormat.java -index 4a5671fe4..d3039a141 100644 ---- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/CloudEventDataFormat.java -+++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/CloudEventDataFormat.java -@@ -3,8 +3,8 @@ package org.acme.serverless.loanbroker.aggregator; - import java.io.InputStream; - import java.io.OutputStream; - --import javax.inject.Inject; --import javax.inject.Singleton; -+import jakarta.inject.Inject; -+import jakarta.inject.Singleton; - - import org.apache.camel.Exchange; - import org.apache.camel.spi.DataFormat; -diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/CloudEventsConverter.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/CloudEventsConverter.java -index 89031cba2..2f5381355 100644 ---- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/CloudEventsConverter.java -+++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/CloudEventsConverter.java -@@ -3,9 +3,9 @@ package org.acme.serverless.loanbroker.aggregator; - import java.net.URI; - import java.util.UUID; - --import javax.inject.Inject; --import javax.inject.Singleton; --import javax.ws.rs.core.MediaType; -+import jakarta.inject.Inject; -+import jakarta.inject.Singleton; -+import jakarta.ws.rs.core.MediaType; - - import org.apache.camel.Exchange; - import org.apache.camel.TypeConversionException; -diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/InMemoryQuotesRepositoryProcessor.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/InMemoryQuotesRepositoryProcessor.java -index 83d5611b8..7f3dce6c4 100644 ---- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/InMemoryQuotesRepositoryProcessor.java -+++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/InMemoryQuotesRepositoryProcessor.java -@@ -5,7 +5,7 @@ import java.util.List; - import java.util.Map; - import java.util.concurrent.ConcurrentHashMap; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.acme.serverless.loanbroker.aggregator.model.BankQuote; - import org.apache.camel.Exchange; -diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/QuotesAggregatorRoute.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/QuotesAggregatorRoute.java -index 79c5fe0b2..b5e391126 100644 ---- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/QuotesAggregatorRoute.java -+++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/QuotesAggregatorRoute.java -@@ -1,7 +1,7 @@ - package org.acme.serverless.loanbroker.aggregator; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; - - import org.acme.serverless.loanbroker.aggregator.model.AggregationResponse; - import org.apache.camel.Exchange; -diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/QuotesCloudEventsResource.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/QuotesCloudEventsResource.java -index f564b32c5..87877a64b 100644 ---- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/QuotesCloudEventsResource.java -+++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/QuotesCloudEventsResource.java -@@ -1,12 +1,12 @@ - package org.acme.serverless.loanbroker.aggregator.resources; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; --import javax.ws.rs.core.Response; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.Response; - - import org.acme.serverless.loanbroker.aggregator.IntegrationConstants; - import org.acme.serverless.loanbroker.aggregator.model.BankQuote; -diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/QuotesExceptionMapper.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/QuotesExceptionMapper.java -index fd6af3cfc..d116d694e 100644 ---- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/QuotesExceptionMapper.java -+++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/QuotesExceptionMapper.java -@@ -1,8 +1,8 @@ - package org.acme.serverless.loanbroker.aggregator.resources; - --import javax.ws.rs.core.Response; --import javax.ws.rs.ext.ExceptionMapper; --import javax.ws.rs.ext.Provider; -+import jakarta.ws.rs.core.Response; -+import jakarta.ws.rs.ext.ExceptionMapper; -+import jakarta.ws.rs.ext.Provider; - - @Provider - public class QuotesExceptionMapper implements ExceptionMapper { -diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/QuotesResource.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/QuotesResource.java -index b31037174..9b725ed57 100644 ---- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/QuotesResource.java -+++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/QuotesResource.java -@@ -2,14 +2,14 @@ package org.acme.serverless.loanbroker.aggregator.resources; - - import java.util.List; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; --import javax.ws.rs.GET; --import javax.ws.rs.Path; --import javax.ws.rs.PathParam; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; --import javax.ws.rs.core.Response; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; -+import jakarta.ws.rs.GET; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.PathParam; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.Response; - - import org.acme.serverless.loanbroker.aggregator.QuotesRepositoryProcessor; - import org.acme.serverless.loanbroker.aggregator.model.BankQuote; -diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/test/java/org/acme/serverless/loanbroker/aggregator/QuotesAggregatorRouteTest.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/test/java/org/acme/serverless/loanbroker/aggregator/QuotesAggregatorRouteTest.java -index 696b43c7f..f314bf99d 100644 ---- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/test/java/org/acme/serverless/loanbroker/aggregator/QuotesAggregatorRouteTest.java -+++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/test/java/org/acme/serverless/loanbroker/aggregator/QuotesAggregatorRouteTest.java -@@ -3,8 +3,8 @@ package org.acme.serverless.loanbroker.aggregator; - import java.net.URI; - import java.util.concurrent.TimeUnit; - --import javax.inject.Inject; --import javax.ws.rs.core.MediaType; -+import jakarta.inject.Inject; -+import jakarta.ws.rs.core.MediaType; - - import org.acme.serverless.loanbroker.aggregator.model.BankQuote; - import org.apache.camel.Exchange; -diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/CreditBureauMock.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/CreditBureauMock.java -index cdc1aae34..de7a7314c 100644 ---- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/CreditBureauMock.java -+++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/CreditBureauMock.java -@@ -3,7 +3,7 @@ package org.acme.serverless.loanbroker.flow; - import java.util.Collections; - import java.util.Map; - --import javax.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.MediaType; - - import com.github.tomakehurst.wiremock.WireMockServer; - import com.github.tomakehurst.wiremock.core.WireMockConfiguration; -diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/LoanBrokerFlowTest.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/LoanBrokerFlowTest.java -index 1a11e28e4..8070fdcde 100644 ---- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/LoanBrokerFlowTest.java -+++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/LoanBrokerFlowTest.java -@@ -6,7 +6,7 @@ import java.util.Map; - import java.util.Objects; - import java.util.UUID; - --import javax.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.MediaType; - - import org.junit.jupiter.api.Test; - -diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/QuotesAggregatorMock.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/QuotesAggregatorMock.java -index 5b30c2aa1..e062e1faf 100644 ---- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/QuotesAggregatorMock.java -+++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/QuotesAggregatorMock.java -@@ -3,7 +3,7 @@ package org.acme.serverless.loanbroker.flow; - import java.util.Collections; - import java.util.Map; - --import javax.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.MediaType; - - import com.github.tomakehurst.wiremock.WireMockServer; - import com.github.tomakehurst.wiremock.core.WireMockConfiguration; -diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/AppResource.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/AppResource.java -index 3b331ac39..07a698a66 100644 ---- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/AppResource.java -+++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/AppResource.java -@@ -2,14 +2,14 @@ package org.acme.loanbroker; - - import java.util.Map; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; --import javax.ws.rs.GET; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; --import javax.ws.rs.core.Response; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; -+import jakarta.ws.rs.GET; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.Response; - - import org.acme.loanbroker.domain.QuotesResponse; - import org.eclipse.microprofile.config.inject.ConfigProperty; -diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/NewQuoteSocket.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/NewQuoteSocket.java -index 93e67d86b..e01a6161f 100644 ---- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/NewQuoteSocket.java -+++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/NewQuoteSocket.java -@@ -3,11 +3,11 @@ package org.acme.loanbroker; - import java.util.Queue; - import java.util.concurrent.ConcurrentLinkedQueue; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; --import javax.websocket.OnOpen; --import javax.websocket.Session; --import javax.websocket.server.ServerEndpoint; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; -+import jakarta.websocket.OnOpen; -+import jakarta.websocket.Session; -+import jakarta.websocket.server.ServerEndpoint; - - import org.acme.loanbroker.domain.QuotesResponse; - import org.slf4j.Logger; -diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/QuotesRepository.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/QuotesRepository.java -index c36e3fdf3..e4f815c9e 100644 ---- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/QuotesRepository.java -+++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/QuotesRepository.java -@@ -4,8 +4,8 @@ import java.util.Map; - import java.util.Optional; - import java.util.concurrent.ConcurrentHashMap; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; - - import org.acme.loanbroker.domain.QuotesResponse; - -diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/test/java/org/acme/loanbroker/AppResourceTest.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/test/java/org/acme/loanbroker/AppResourceTest.java -index 22075c1a9..0a2f935c5 100644 ---- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/test/java/org/acme/loanbroker/AppResourceTest.java -+++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/test/java/org/acme/loanbroker/AppResourceTest.java -@@ -7,13 +7,13 @@ import java.util.Objects; - import java.util.concurrent.LinkedBlockingDeque; - import java.util.concurrent.TimeUnit; - --import javax.inject.Inject; --import javax.websocket.ClientEndpoint; --import javax.websocket.ContainerProvider; --import javax.websocket.DeploymentException; --import javax.websocket.OnMessage; --import javax.websocket.Session; --import javax.ws.rs.core.MediaType; -+import jakarta.inject.Inject; -+import jakarta.websocket.ClientEndpoint; -+import jakarta.websocket.ContainerProvider; -+import jakarta.websocket.DeploymentException; -+import jakarta.websocket.OnMessage; -+import jakarta.websocket.Session; -+import jakarta.ws.rs.core.MediaType; - - import org.acme.loanbroker.domain.Credit; - import org.acme.loanbroker.domain.Quote; -diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/pom.xml b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/pom.xml -index efd654500..368067c17 100644 ---- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/pom.xml -@@ -12,13 +12,13 @@ - serverless-workflow-loanbroker-showcase - pom - -- 2.16.10.Final -+ 3.0.0.Final - io.quarkus - quarkus-bom -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - - UTF-8 - UTF-8 -@@ -28,7 +28,7 @@ - 2.3.0 - - -- 2.14.0 -+ 3.0.0-M1 - - 3.0.0-M7 - 3.8.1 -diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/pom.xml b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/pom.xml -index 2e08e9a86..d9f50f983 100644 ---- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/pom.xml -@@ -12,13 +12,13 @@ - serverless-workflow-newsletter-subscription - pom - -- 2.16.10.Final -+ 3.0.0.Final - io.quarkus - quarkus-bom -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.0.0-M7 - 5.1.3 - 3.6.0 -diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/main/java/org/kie/kogito/examples/VertxRouter.java b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/main/java/org/kie/kogito/examples/VertxRouter.java -index 67fb2aa54..19fadd31d 100644 ---- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/main/java/org/kie/kogito/examples/VertxRouter.java -+++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/main/java/org/kie/kogito/examples/VertxRouter.java -@@ -16,8 +16,8 @@ - - package org.kie.kogito.examples; - --import javax.enterprise.context.ApplicationScoped; --import javax.enterprise.event.Observes; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.event.Observes; - - import io.vertx.core.http.HttpMethod; - import io.vertx.ext.web.Router; -diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/test/java/org/acme/newsletter/subscription/flow/SubscriptionServiceMock.java b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/test/java/org/acme/newsletter/subscription/flow/SubscriptionServiceMock.java -index c5352f815..dc4738199 100644 ---- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/test/java/org/acme/newsletter/subscription/flow/SubscriptionServiceMock.java -+++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/test/java/org/acme/newsletter/subscription/flow/SubscriptionServiceMock.java -@@ -35,8 +35,8 @@ import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; - import static com.github.tomakehurst.wiremock.client.WireMock.get; - import static com.github.tomakehurst.wiremock.client.WireMock.post; - import static com.github.tomakehurst.wiremock.client.WireMock.put; --import static javax.ws.rs.core.HttpHeaders.CONTENT_TYPE; --import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -+import static jakarta.ws.rs.core.HttpHeaders.CONTENT_TYPE; -+import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; - import static org.acme.newsletter.subscription.flow.SubscriptionConstants.EMAIL; - import static org.acme.newsletter.subscription.flow.SubscriptionConstants.newSubscription; - -diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/InMemorySubscriptionRepository.java b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/InMemorySubscriptionRepository.java -index df97e0a3e..7b9750eef 100644 ---- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/InMemorySubscriptionRepository.java -+++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/InMemorySubscriptionRepository.java -@@ -22,13 +22,13 @@ import java.util.Optional; - import java.util.concurrent.ConcurrentHashMap; - import java.util.stream.Collectors; - --import javax.annotation.PostConstruct; --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.slf4j.Logger; - import org.slf4j.LoggerFactory; - - import io.quarkus.arc.DefaultBean; -+import jakarta.annotation.PostConstruct; - - /** - * This default implementation is used when the persistence is not enabled. -diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/PostgreSqlSubscriptionRepository.java b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/PostgreSqlSubscriptionRepository.java -index e299b1de9..0c2c4465a 100644 ---- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/PostgreSqlSubscriptionRepository.java -+++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/PostgreSqlSubscriptionRepository.java -@@ -22,9 +22,8 @@ import java.util.Optional; - import java.util.stream.Stream; - import java.util.stream.StreamSupport; - --import javax.annotation.PostConstruct; --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; - - import org.slf4j.Logger; - import org.slf4j.LoggerFactory; -@@ -35,6 +34,7 @@ import io.vertx.mutiny.sqlclient.Row; - import io.vertx.mutiny.sqlclient.RowIterator; - import io.vertx.mutiny.sqlclient.RowSet; - import io.vertx.mutiny.sqlclient.Tuple; -+import jakarta.annotation.PostConstruct; - - import static java.util.stream.Collectors.toList; - -diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionResource.java b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionResource.java -index bd08a1df3..b5c68acbd 100644 ---- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionResource.java -+++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionResource.java -@@ -19,19 +19,19 @@ package org.acme.newsletter.subscription.service; - import java.io.Serializable; - import java.util.Optional; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; --import javax.ws.rs.Consumes; --import javax.ws.rs.DELETE; --import javax.ws.rs.GET; --import javax.ws.rs.POST; --import javax.ws.rs.PUT; --import javax.ws.rs.Path; --import javax.ws.rs.PathParam; --import javax.ws.rs.Produces; --import javax.ws.rs.QueryParam; --import javax.ws.rs.core.MediaType; --import javax.ws.rs.core.Response; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.DELETE; -+import jakarta.ws.rs.GET; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.PUT; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.PathParam; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.QueryParam; -+import jakarta.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.Response; - - import org.eclipse.microprofile.openapi.annotations.media.Content; - import org.eclipse.microprofile.openapi.annotations.media.Schema; -diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionServiceImpl.java b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionServiceImpl.java -index 3c64999b2..c9fb43ee5 100644 ---- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionServiceImpl.java -+++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionServiceImpl.java -@@ -18,8 +18,8 @@ package org.acme.newsletter.subscription.service; - import java.util.List; - import java.util.Optional; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; - - @ApplicationScoped - public class SubscriptionServiceImpl implements SubscriptionService { -diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/pom.xml b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/pom.xml -index cdda9bb4f..dd69b0cc3 100644 ---- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/pom.xml -@@ -10,13 +10,13 @@ - acme-financial-service - Kogito Example :: Serverless Workflow Oauth2 Orchestration Example :: ACME Financial Service - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 11 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/AcmeFinancialApplication.java b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/AcmeFinancialApplication.java -index af5d49198..c77a16ba7 100644 ---- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/AcmeFinancialApplication.java -+++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/AcmeFinancialApplication.java -@@ -42,6 +42,6 @@ import org.eclipse.microprofile.openapi.annotations.security.SecurityScheme; - tokenUrl = "http://localhost:8281/auth/realms/kogito/protocol/openid-connect/token", - scopes = {}))) - })) --public class AcmeFinancialApplication extends javax.ws.rs.core.Application { -+public class AcmeFinancialApplication extends jakarta.ws.rs.core.Application { - - } -diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/AcmeFinancialResource.java b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/AcmeFinancialResource.java -index a79199507..5fef6920f 100644 ---- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/AcmeFinancialResource.java -+++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/AcmeFinancialResource.java -@@ -16,12 +16,12 @@ - - package org.acme; - --import javax.inject.Inject; --import javax.ws.rs.GET; --import javax.ws.rs.Path; --import javax.ws.rs.Produces; --import javax.ws.rs.QueryParam; --import javax.ws.rs.core.MediaType; -+import jakarta.inject.Inject; -+import jakarta.ws.rs.GET; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.QueryParam; -+import jakarta.ws.rs.core.MediaType; - - import org.eclipse.microprofile.openapi.annotations.Operation; - import org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement; -diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/ExchangeRatesDB.java b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/ExchangeRatesDB.java -index 725d728da..b253215fe 100644 ---- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/ExchangeRatesDB.java -+++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/ExchangeRatesDB.java -@@ -18,8 +18,9 @@ package org.acme; - import java.util.HashMap; - import java.util.Map; - --import javax.annotation.PostConstruct; --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; -+ -+import jakarta.annotation.PostConstruct; - - /** - * Emulates the Acme Financial Services database, implementation and maintenance of this DB -diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/pom.xml b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/pom.xml -index e0132a7d4..b7f310a7f 100644 ---- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/pom.xml -@@ -12,13 +12,13 @@ - Kogito Example :: Serverless Workflow Oauth2 Orchestration Example :: Currency Exchange - - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 11 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/java/org/kie/kogito/examples/ExchangeWorkflowHelper.java b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/java/org/kie/kogito/examples/ExchangeWorkflowHelper.java -index 335f6f86a..903e39aef 100644 ---- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/java/org/kie/kogito/examples/ExchangeWorkflowHelper.java -+++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/java/org/kie/kogito/examples/ExchangeWorkflowHelper.java -@@ -22,7 +22,7 @@ import java.util.Arrays; - import java.util.LinkedHashSet; - import java.util.Set; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.slf4j.Logger; - import org.slf4j.LoggerFactory; -diff --git a/serverless-workflow-examples/serverless-workflow-openvino-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-openvino-quarkus/pom.xml -index f9f8962f0..e3016358b 100644 ---- a/serverless-workflow-examples/serverless-workflow-openvino-quarkus/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-openvino-quarkus/pom.xml -@@ -10,13 +10,13 @@ - Kogito Example :: Serverless Workflow Openvino :: Quarkus - Kogito Serverless Workflow OpenVino Example - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 11 - 1.6.0 - 3.8.1 -diff --git a/serverless-workflow-examples/serverless-workflow-order-processing/pom.xml b/serverless-workflow-examples/serverless-workflow-order-processing/pom.xml -index 101b80b76..77a15e8cf 100644 ---- a/serverless-workflow-examples/serverless-workflow-order-processing/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-order-processing/pom.xml -@@ -11,13 +11,13 @@ - - Kogito Example :: Serverless Workflow Order Processing - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 2.33.2 - 11 -diff --git a/serverless-workflow-examples/serverless-workflow-order-processing/src/test/java/org/kie/kogito/examples/sw/orders/processing/VerifyWorkflowExecutionIT.java b/serverless-workflow-examples/serverless-workflow-order-processing/src/test/java/org/kie/kogito/examples/sw/orders/processing/VerifyWorkflowExecutionIT.java -index 5426850f6..38aafc756 100644 ---- a/serverless-workflow-examples/serverless-workflow-order-processing/src/test/java/org/kie/kogito/examples/sw/orders/processing/VerifyWorkflowExecutionIT.java -+++ b/serverless-workflow-examples/serverless-workflow-order-processing/src/test/java/org/kie/kogito/examples/sw/orders/processing/VerifyWorkflowExecutionIT.java -@@ -17,7 +17,7 @@ package org.kie.kogito.examples.sw.orders.processing; - - import java.util.UUID; - --import javax.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.MediaType; - - import org.junit.jupiter.api.AfterAll; - import org.junit.jupiter.api.BeforeAll; -diff --git a/serverless-workflow-examples/serverless-workflow-parallel-execution/pom.xml b/serverless-workflow-examples/serverless-workflow-parallel-execution/pom.xml -index f8d635e57..16804f95a 100644 ---- a/serverless-workflow-examples/serverless-workflow-parallel-execution/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-parallel-execution/pom.xml -@@ -12,14 +12,14 @@ - Kogito Serverless Workflow Example - Quarkus - - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 11 - 3.8.1 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-python-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-python-quarkus/pom.xml -index 850e11d5b..162da1ab5 100644 ---- a/serverless-workflow-examples/serverless-workflow-python-quarkus/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-python-quarkus/pom.xml -@@ -10,13 +10,13 @@ - Kogito Example :: Serverless Workflow Python :: Quarkus - Kogito Serverless Workflow Python Example - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 11 - 1.6.0 - 3.8.1 -diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/pom.xml b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/pom.xml -index 1ec7e7629..4152dd1c4 100644 ---- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/pom.xml -@@ -11,13 +11,13 @@ - query-answer-service - Kogito Example :: Serverless Workflow Query and Answer :: Workflow Service - -- 2.16.10.Final -+ 3.0.0.Final - io.quarkus - quarkus-bom -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 2.33.2 - - -diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/InMemoryQueryRecordRepository.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/InMemoryQueryRecordRepository.java -index 004aa222c..d1645462c 100644 ---- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/InMemoryQueryRecordRepository.java -+++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/InMemoryQueryRecordRepository.java -@@ -21,9 +21,8 @@ import java.util.List; - import java.util.Map; - import java.util.concurrent.ConcurrentHashMap; - --import javax.annotation.PostConstruct; --import javax.enterprise.context.ApplicationScoped; -- -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.annotation.PostConstruct; - import org.slf4j.Logger; - import org.slf4j.LoggerFactory; - -diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/PostgreSqlQueryRecordRepository.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/PostgreSqlQueryRecordRepository.java -index a94484142..e51e2eade 100644 ---- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/PostgreSqlQueryRecordRepository.java -+++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/PostgreSqlQueryRecordRepository.java -@@ -26,11 +26,10 @@ import java.time.ZonedDateTime; - import java.util.ArrayList; - import java.util.List; - --import javax.annotation.PostConstruct; --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; - import javax.sql.DataSource; -- -+import jakarta.annotation.PostConstruct; - import org.slf4j.Logger; - import org.slf4j.LoggerFactory; - -diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryAnswerServiceHelper.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryAnswerServiceHelper.java -index 054805d2a..b6093ce43 100644 ---- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryAnswerServiceHelper.java -+++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryAnswerServiceHelper.java -@@ -18,8 +18,8 @@ package org.acme; - - import java.time.ZonedDateTime; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; - - import org.kie.kogito.internal.process.runtime.KogitoProcessContext; - import org.slf4j.Logger; -diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryAnswerServiceResource.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryAnswerServiceResource.java -index 51c4ec7f6..b62653584 100644 ---- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryAnswerServiceResource.java -+++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryAnswerServiceResource.java -@@ -18,10 +18,10 @@ package org.acme; - - import java.util.List; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; --import javax.ws.rs.GET; --import javax.ws.rs.Path; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; -+import jakarta.ws.rs.GET; -+import jakarta.ws.rs.Path; - - @Path("/queries") - @ApplicationScoped -diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/test/java/org/acme/it/WireMockQueryServiceResource.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/test/java/org/acme/it/WireMockQueryServiceResource.java -index 9de564150..74d52d35b 100644 ---- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/test/java/org/acme/it/WireMockQueryServiceResource.java -+++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/test/java/org/acme/it/WireMockQueryServiceResource.java -@@ -27,8 +27,8 @@ import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; - import static com.github.tomakehurst.wiremock.client.WireMock.configureFor; - import static com.github.tomakehurst.wiremock.client.WireMock.post; - import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; --import static javax.ws.rs.core.HttpHeaders.CONTENT_TYPE; --import static javax.ws.rs.core.MediaType.APPLICATION_JSON; -+import static jakarta.ws.rs.core.HttpHeaders.CONTENT_TYPE; -+import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; - - public class WireMockQueryServiceResource implements QuarkusTestResourceLifecycleManager { - -diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/pom.xml b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/pom.xml -index 322691ea6..4b6b3b701 100644 ---- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/pom.xml -@@ -11,14 +11,14 @@ - query-service - Kogito Example :: Serverless Workflow Query and Answer :: Query Service - -- 2.16.10.Final -+ 3.0.0.Final - io.quarkus - quarkus-bom -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -- 1.0.1 -+ 3.0.0-SNAPSHOT -+ 2.0.2 - 2.3.0 - - -diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/CloudEventsCustomizer.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/CloudEventsCustomizer.java -index 84561dc71..783ae01ec 100644 ---- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/CloudEventsCustomizer.java -+++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/CloudEventsCustomizer.java -@@ -16,7 +16,7 @@ - - package org.acme; - --import javax.inject.Singleton; -+import jakarta.inject.Singleton; - - import com.fasterxml.jackson.databind.ObjectMapper; - -diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/InMemoryQueryRequestRepository.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/InMemoryQueryRequestRepository.java -index c3c6e0708..e9adf4054 100644 ---- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/InMemoryQueryRequestRepository.java -+++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/InMemoryQueryRequestRepository.java -@@ -21,9 +21,9 @@ import java.util.List; - import java.util.Map; - import java.util.concurrent.ConcurrentHashMap; - --import javax.annotation.PostConstruct; --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - -+import jakarta.annotation.PostConstruct; - import org.slf4j.Logger; - import org.slf4j.LoggerFactory; - -diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/PostgreSqlQueryRequestRepository.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/PostgreSqlQueryRequestRepository.java -index 2614c4418..c1cde7d88 100644 ---- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/PostgreSqlQueryRequestRepository.java -+++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/PostgreSqlQueryRequestRepository.java -@@ -20,10 +20,9 @@ import java.util.List; - import java.util.stream.Stream; - import java.util.stream.StreamSupport; - --import javax.annotation.PostConstruct; --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -- -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; -+import jakarta.annotation.PostConstruct; - import org.slf4j.Logger; - import org.slf4j.LoggerFactory; - -diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/QueryServiceResource.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/QueryServiceResource.java -index b9cd6ca68..711ab3d1e 100644 ---- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/QueryServiceResource.java -+++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/QueryServiceResource.java -@@ -21,15 +21,15 @@ import java.time.OffsetDateTime; - import java.util.List; - import java.util.UUID; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; --import javax.ws.rs.Consumes; --import javax.ws.rs.GET; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; --import javax.ws.rs.core.Response; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.GET; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.Response; - - import org.eclipse.microprofile.reactive.messaging.Channel; - import org.eclipse.microprofile.reactive.messaging.Emitter; -diff --git a/serverless-workflow-examples/serverless-workflow-saga-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-saga-quarkus/pom.xml -index ddc08d91b..4fcd0924a 100644 ---- a/serverless-workflow-examples/serverless-workflow-saga-quarkus/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-saga-quarkus/pom.xml -@@ -10,13 +10,13 @@ - How to implement Saga with a Serverless Workflow - - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 11 - 3.22.0 -diff --git a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/MockService.java b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/MockService.java -index db3c576e3..8ed950990 100644 ---- a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/MockService.java -+++ b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/MockService.java -@@ -19,7 +19,7 @@ import java.util.Objects; - import java.util.Optional; - import java.util.UUID; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.slf4j.Logger; - import org.slf4j.LoggerFactory; -diff --git a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/OrderService.java b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/OrderService.java -index 111555e29..b8b0113c6 100644 ---- a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/OrderService.java -+++ b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/OrderService.java -@@ -15,7 +15,7 @@ - */ - package org.kie.kogito.examples; - --import javax.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.context.ApplicationScoped; - - import org.slf4j.Logger; - import org.slf4j.LoggerFactory; -diff --git a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/PaymentService.java b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/PaymentService.java -index 350341fa0..8b688a1ee 100644 ---- a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/PaymentService.java -+++ b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/PaymentService.java -@@ -15,8 +15,8 @@ - */ - package org.kie.kogito.examples; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; - - import org.slf4j.Logger; - import org.slf4j.LoggerFactory; -diff --git a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/ShippingService.java b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/ShippingService.java -index d8c06baa8..71fa50c61 100644 ---- a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/ShippingService.java -+++ b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/ShippingService.java -@@ -15,8 +15,8 @@ - */ - package org.kie.kogito.examples; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; - - import org.slf4j.Logger; - import org.slf4j.LoggerFactory; -diff --git a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/StockService.java b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/StockService.java -index eb3f3d82c..dc25daab8 100644 ---- a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/StockService.java -+++ b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/StockService.java -@@ -15,8 +15,8 @@ - */ - package org.kie.kogito.examples; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; - - import org.slf4j.Logger; - import org.slf4j.LoggerFactory; -diff --git a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/pom.xml -index d15fe8e64..8b3f1d9d3 100644 ---- a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/pom.xml -@@ -10,13 +10,13 @@ - Kogito Example :: Serverless Workflow Service Calls :: Quarkus - Kogito Serverless Workflow Example - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 11 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/main/java/org/kogito/serverless/examples/CountriesClassifierResource.java b/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/main/java/org/kogito/serverless/examples/CountriesClassifierResource.java -index 3917c23b4..2d64f52f3 100644 ---- a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/main/java/org/kogito/serverless/examples/CountriesClassifierResource.java -+++ b/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/main/java/org/kogito/serverless/examples/CountriesClassifierResource.java -@@ -19,11 +19,11 @@ import java.util.Collections; - import java.util.LinkedHashMap; - import java.util.Set; - --import javax.ws.rs.Consumes; --import javax.ws.rs.GET; --import javax.ws.rs.Path; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.GET; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; - - import org.jboss.logging.Logger; - -diff --git a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/test/java/org/kogito/serverless/examples/CountryServiceWorkflowTest.java b/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/test/java/org/kogito/serverless/examples/CountryServiceWorkflowTest.java -index f49df157e..b6a6a617a 100644 ---- a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/test/java/org/kogito/serverless/examples/CountryServiceWorkflowTest.java -+++ b/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/test/java/org/kogito/serverless/examples/CountryServiceWorkflowTest.java -@@ -18,8 +18,8 @@ package org.kogito.serverless.examples; - import java.util.HashMap; - import java.util.Map; - --import javax.inject.Inject; --import javax.inject.Named; -+import jakarta.inject.Inject; -+import jakarta.inject.Named; - - import org.junit.jupiter.api.Test; - import org.kie.kogito.Model; -diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/src/main/java/org/acme/FakeStockPriceResource.java b/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/src/main/java/org/acme/FakeStockPriceResource.java -index 336414272..76521feee 100644 ---- a/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/src/main/java/org/acme/FakeStockPriceResource.java -+++ b/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/src/main/java/org/acme/FakeStockPriceResource.java -@@ -15,9 +15,9 @@ - */ - package org.acme; - --import javax.ws.rs.GET; --import javax.ws.rs.Path; --import javax.ws.rs.PathParam; -+import jakarta.ws.rs.GET; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.PathParam; - import java.math.BigDecimal; - import java.util.Map; - -diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/pom.xml b/serverless-workflow-examples/serverless-workflow-stock-profit/pom.xml -index 730e56f86..d7531a2f2 100644 ---- a/serverless-workflow-examples/serverless-workflow-stock-profit/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-stock-profit/pom.xml -@@ -14,13 +14,13 @@ - fake-stock-service - - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 11 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/java/org/acme/RealStockPriceResource.java b/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/java/org/acme/RealStockPriceResource.java -index 219f20cd6..26b3a8c66 100644 ---- a/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/java/org/acme/RealStockPriceResource.java -+++ b/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/java/org/acme/RealStockPriceResource.java -@@ -15,11 +15,11 @@ - */ - package org.acme; - --import javax.ws.rs.GET; --import javax.ws.rs.Path; --import javax.ws.rs.PathParam; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; -+import jakarta.ws.rs.GET; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.PathParam; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; - import java.math.BigDecimal; - import java.math.RoundingMode; - import java.security.SecureRandom; -diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/main/java/org/acme/ProfitResource.java b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/main/java/org/acme/ProfitResource.java -index 28f7461ba..f0e4fd61d 100644 ---- a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/main/java/org/acme/ProfitResource.java -+++ b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/main/java/org/acme/ProfitResource.java -@@ -15,10 +15,10 @@ - */ - package org.acme; - --import javax.ws.rs.GET; --import javax.ws.rs.Path; --import javax.ws.rs.PathParam; --import javax.ws.rs.QueryParam; -+import jakarta.ws.rs.GET; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.PathParam; -+import jakarta.ws.rs.QueryParam; - import java.math.BigDecimal; - import java.math.RoundingMode; - import java.text.NumberFormat; -diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/pom.xml b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/pom.xml -index f3ee8d2f9..d1e45b1ff 100644 ---- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/pom.xml -@@ -10,13 +10,13 @@ - conversion-workflow-full - Kogito Example :: Serverless Workflow Temperature Conversion :: Conversion Full Service - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 11 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/pom.xml b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/pom.xml -index a0a03fe0b..e7f5ac799 100644 ---- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/pom.xml -@@ -10,13 +10,13 @@ - conversion-workflow-function - Kogito Example :: Serverless Workflow Temperature Conversion :: Conversion Function Service - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 11 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/pom.xml b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/pom.xml -index 8db50c271..9e56146b4 100644 ---- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/pom.xml -@@ -10,13 +10,13 @@ - conversion-workflow-spec - Kogito Example :: Serverless Workflow Temperature Conversion :: Conversion Spec Service - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 11 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/pom.xml b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/pom.xml -index 29686f3ca..1a4352b34 100644 ---- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/pom.xml -@@ -10,13 +10,13 @@ - conversion-workflow - Kogito Example :: Serverless Workflow Temperature Conversion :: Conversion Service - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 3.8.1 - 11 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/pom.xml b/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/pom.xml -index 5d9b652af..7f0331124 100644 ---- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/pom.xml -@@ -10,10 +10,10 @@ - multiplication-service - Kogito Example :: Serverless Workflow Temperature Conversion :: Multiplication Service - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - 3.8.1 - 11 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/src/main/java/org/kie/kogito/examples/sw/temp/multiplication/OperationResource.java b/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/src/main/java/org/kie/kogito/examples/sw/temp/multiplication/OperationResource.java -index b88993082..2cd120fc4 100644 ---- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/src/main/java/org/kie/kogito/examples/sw/temp/multiplication/OperationResource.java -+++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/src/main/java/org/kie/kogito/examples/sw/temp/multiplication/OperationResource.java -@@ -15,13 +15,13 @@ - */ - package org.kie.kogito.examples.sw.temp.multiplication; - --import javax.validation.constraints.NotNull; --import javax.ws.rs.Consumes; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; --import javax.ws.rs.core.Response; -+import jakarta.validation.constraints.NotNull; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.Response; - - import org.eclipse.microprofile.openapi.annotations.responses.APIResponseSchema; - -diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/pom.xml b/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/pom.xml -index 50157e0d9..33bb58bbc 100644 ---- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/pom.xml -@@ -10,10 +10,10 @@ - subtraction-service - Kogito Example :: Serverless Workflow Temperature Conversion :: Subtraction Service - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - 3.8.1 - 11 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/src/main/java/org/kie/kogito/examples/sw/temp/subtraction/OperationResource.java b/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/src/main/java/org/kie/kogito/examples/sw/temp/subtraction/OperationResource.java -index fbddc22c5..671a17c91 100644 ---- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/src/main/java/org/kie/kogito/examples/sw/temp/subtraction/OperationResource.java -+++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/src/main/java/org/kie/kogito/examples/sw/temp/subtraction/OperationResource.java -@@ -15,13 +15,13 @@ - */ - package org.kie.kogito.examples.sw.temp.subtraction; - --import javax.validation.constraints.NotNull; --import javax.ws.rs.Consumes; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; --import javax.ws.rs.core.Response; -+import jakarta.validation.constraints.NotNull; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.Response; - - import org.eclipse.microprofile.openapi.annotations.responses.APIResponseSchema; - -diff --git a/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/pom.xml b/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/pom.xml -index 29a3d7a38..57f37d0a2 100644 ---- a/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/pom.xml -@@ -11,13 +11,13 @@ - Kogito Example :: Serverless Workflow Testing with REST Assured :: Quarkus - Kogito Serverless Workflow Example - Quarkus - -- 2.16.10.Final -+ 3.0.0.Final - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 11 - 3.8.1 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/pom.xml b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/pom.xml -index 9ecc52d5a..d8a9582be 100644 ---- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/pom.xml -@@ -13,10 +13,10 @@ - UTF-8 - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 11 - 3.8.1 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/java/org/kie/kogito/examples/EventsProducerResource.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/java/org/kie/kogito/examples/EventsProducerResource.java -index 85ecdad6e..8a3b7a2cf 100644 ---- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/java/org/kie/kogito/examples/EventsProducerResource.java -+++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/java/org/kie/kogito/examples/EventsProducerResource.java -@@ -20,15 +20,15 @@ import java.net.URI; - import java.time.OffsetDateTime; - import java.util.UUID; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; --import javax.ws.rs.Consumes; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.PathParam; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; --import javax.ws.rs.core.Response; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.PathParam; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.Response; - - import org.eclipse.microprofile.reactive.messaging.Channel; - import org.eclipse.microprofile.reactive.messaging.Emitter; -diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/java/org/kie/kogito/examples/VertxRouter.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/java/org/kie/kogito/examples/VertxRouter.java -index b1f5f1026..153009579 100644 ---- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/java/org/kie/kogito/examples/VertxRouter.java -+++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/java/org/kie/kogito/examples/VertxRouter.java -@@ -1,7 +1,7 @@ - package org.kie.kogito.examples; - --import javax.enterprise.context.ApplicationScoped; --import javax.enterprise.event.Observes; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.event.Observes; - - import io.vertx.core.http.HttpMethod; - import io.vertx.ext.web.Router; -diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/pom.xml b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/pom.xml -index 1d26d223f..bb27a5aa8 100644 ---- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/pom.xml -@@ -13,10 +13,10 @@ - UTF-8 - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 11 - 3.8.1 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/java/org/kie/kogito/examples/EventsProducerResource.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/java/org/kie/kogito/examples/EventsProducerResource.java -index 3be5d1511..546c55c33 100644 ---- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/java/org/kie/kogito/examples/EventsProducerResource.java -+++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/java/org/kie/kogito/examples/EventsProducerResource.java -@@ -20,16 +20,16 @@ import java.net.URI; - import java.time.OffsetDateTime; - import java.util.UUID; - --import javax.enterprise.context.ApplicationScoped; --import javax.enterprise.event.Observes; --import javax.inject.Inject; --import javax.ws.rs.Consumes; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.PathParam; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; --import javax.ws.rs.core.Response; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.event.Observes; -+import jakarta.inject.Inject; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.PathParam; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.Response; - - import io.vertx.core.http.HttpMethod; - import io.vertx.ext.web.Router; -diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/java/org/kie/kogito/examples/VertxRouter.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/java/org/kie/kogito/examples/VertxRouter.java -index b1f5f1026..153009579 100644 ---- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/java/org/kie/kogito/examples/VertxRouter.java -+++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/java/org/kie/kogito/examples/VertxRouter.java -@@ -1,7 +1,7 @@ - package org.kie.kogito.examples; - --import javax.enterprise.context.ApplicationScoped; --import javax.enterprise.event.Observes; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.event.Observes; - - import io.vertx.core.http.HttpMethod; - import io.vertx.ext.web.Router; -diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/pom.xml b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/pom.xml -index d4cc05f68..600c3e642 100644 ---- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/pom.xml -@@ -13,10 +13,10 @@ - UTF-8 - quarkus-bom - io.quarkus -- 2.16.10.Final -+ 3.0.0.Final - org.kie.kogito - kogito-bom -- 2.0.0-SNAPSHOT -+ 3.0.0-SNAPSHOT - 11 - 3.8.1 - 3.0.0-M7 -diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/CallbackStateTimeoutsClient.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/CallbackStateTimeoutsClient.java -index 9b5f2cf6f..5ed665c99 100644 ---- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/CallbackStateTimeoutsClient.java -+++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/CallbackStateTimeoutsClient.java -@@ -18,17 +18,17 @@ package org.kie.kogito.examples; - - import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; - --import javax.ws.rs.Consumes; --import javax.ws.rs.DefaultValue; --import javax.ws.rs.GET; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.Produces; --import javax.ws.rs.QueryParam; --import javax.ws.rs.core.Context; --import javax.ws.rs.core.HttpHeaders; --import javax.ws.rs.core.MediaType; --import javax.ws.rs.core.Response; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.DefaultValue; -+import jakarta.ws.rs.GET; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.QueryParam; -+import jakarta.ws.rs.core.Context; -+import jakarta.ws.rs.core.HttpHeaders; -+import jakarta.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.Response; - - import static org.kie.kogito.examples.CallbackStateTimeoutsClient.CONFIG_KEY; - -diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/CloudEventsCustomizer.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/CloudEventsCustomizer.java -index a67f7efc0..ea197f10c 100644 ---- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/CloudEventsCustomizer.java -+++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/CloudEventsCustomizer.java -@@ -20,7 +20,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; - import io.cloudevents.jackson.JsonFormat; - import io.quarkus.jackson.ObjectMapperCustomizer; - --import javax.inject.Singleton; -+import jakarta.inject.Singleton; - - /** - * Ensure the registration of the CloudEvent jackson module according to the Quarkus suggested procedure. -diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/EventStateTimeoutsClient.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/EventStateTimeoutsClient.java -index 9e12d47b9..16d01ec1a 100644 ---- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/EventStateTimeoutsClient.java -+++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/EventStateTimeoutsClient.java -@@ -18,17 +18,17 @@ package org.kie.kogito.examples; - - import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; - --import javax.ws.rs.Consumes; --import javax.ws.rs.DefaultValue; --import javax.ws.rs.GET; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.Produces; --import javax.ws.rs.QueryParam; --import javax.ws.rs.core.Context; --import javax.ws.rs.core.HttpHeaders; --import javax.ws.rs.core.MediaType; --import javax.ws.rs.core.Response; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.DefaultValue; -+import jakarta.ws.rs.GET; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.QueryParam; -+import jakarta.ws.rs.core.Context; -+import jakarta.ws.rs.core.HttpHeaders; -+import jakarta.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.Response; - - import static org.kie.kogito.examples.EventStateTimeoutsClient.CONFIG_KEY; - -diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/EventsProducerResource.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/EventsProducerResource.java -index 01a195f51..2760caeb0 100644 ---- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/EventsProducerResource.java -+++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/EventsProducerResource.java -@@ -22,15 +22,15 @@ import io.cloudevents.core.builder.CloudEventBuilder; - import io.cloudevents.jackson.JsonCloudEventData; - import org.eclipse.microprofile.rest.client.inject.RestClient; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; --import javax.ws.rs.Consumes; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.PathParam; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; --import javax.ws.rs.core.Response; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.PathParam; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.Response; - import java.net.URI; - import java.time.OffsetDateTime; - import java.util.UUID; -diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/SwitchStateTimeoutsClient.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/SwitchStateTimeoutsClient.java -index 85a7e991a..aa15813a8 100644 ---- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/SwitchStateTimeoutsClient.java -+++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/SwitchStateTimeoutsClient.java -@@ -18,17 +18,17 @@ package org.kie.kogito.examples; - - import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; - --import javax.ws.rs.Consumes; --import javax.ws.rs.DefaultValue; --import javax.ws.rs.GET; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.Produces; --import javax.ws.rs.QueryParam; --import javax.ws.rs.core.Context; --import javax.ws.rs.core.HttpHeaders; --import javax.ws.rs.core.MediaType; --import javax.ws.rs.core.Response; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.DefaultValue; -+import jakarta.ws.rs.GET; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.QueryParam; -+import jakarta.ws.rs.core.Context; -+import jakarta.ws.rs.core.HttpHeaders; -+import jakarta.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.Response; - - import static org.kie.kogito.examples.SwitchStateTimeoutsClient.CONFIG_KEY; - -diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/VertxRouter.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/VertxRouter.java -index 668f08bb7..fa084b5e4 100644 ---- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/VertxRouter.java -+++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/VertxRouter.java -@@ -16,8 +16,8 @@ - - package org.kie.kogito.examples; - --import javax.enterprise.context.ApplicationScoped; --import javax.enterprise.event.Observes; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.enterprise.event.Observes; - - import io.vertx.core.http.HttpMethod; - import io.vertx.ext.web.Router; -diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/WorkflowClient.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/WorkflowClient.java -index 5f900abda..095a64993 100644 ---- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/WorkflowClient.java -+++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/WorkflowClient.java -@@ -18,12 +18,12 @@ package org.kie.kogito.examples; - - import org.eclipse.microprofile.rest.client.annotation.ClientHeaderParam; - --import javax.ws.rs.Consumes; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.Produces; --import javax.ws.rs.core.MediaType; --import javax.ws.rs.core.Response; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.Response; - - public interface WorkflowClient { - -diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/WorkflowTimeoutsClient.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/WorkflowTimeoutsClient.java -index 71bdf45d5..3427446d8 100644 ---- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/WorkflowTimeoutsClient.java -+++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/WorkflowTimeoutsClient.java -@@ -18,17 +18,17 @@ package org.kie.kogito.examples; - - import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; - --import javax.ws.rs.Consumes; --import javax.ws.rs.DefaultValue; --import javax.ws.rs.GET; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.Produces; --import javax.ws.rs.QueryParam; --import javax.ws.rs.core.Context; --import javax.ws.rs.core.HttpHeaders; --import javax.ws.rs.core.MediaType; --import javax.ws.rs.core.Response; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.DefaultValue; -+import jakarta.ws.rs.GET; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.QueryParam; -+import jakarta.ws.rs.core.Context; -+import jakarta.ws.rs.core.HttpHeaders; -+import jakarta.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.Response; - - import static org.kie.kogito.examples.WorkflowTimeoutsClient.CONFIG_KEY; - -diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/WorkflowsProxyResource.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/WorkflowsProxyResource.java -index afee9f062..a49fa7232 100644 ---- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/WorkflowsProxyResource.java -+++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/WorkflowsProxyResource.java -@@ -18,19 +18,19 @@ package org.kie.kogito.examples; - - import org.eclipse.microprofile.rest.client.inject.RestClient; - --import javax.enterprise.context.ApplicationScoped; --import javax.inject.Inject; --import javax.ws.rs.Consumes; --import javax.ws.rs.DefaultValue; --import javax.ws.rs.GET; --import javax.ws.rs.POST; --import javax.ws.rs.Path; --import javax.ws.rs.Produces; --import javax.ws.rs.QueryParam; --import javax.ws.rs.core.Context; --import javax.ws.rs.core.HttpHeaders; --import javax.ws.rs.core.MediaType; --import javax.ws.rs.core.Response; -+import jakarta.enterprise.context.ApplicationScoped; -+import jakarta.inject.Inject; -+import jakarta.ws.rs.Consumes; -+import jakarta.ws.rs.DefaultValue; -+import jakarta.ws.rs.GET; -+import jakarta.ws.rs.POST; -+import jakarta.ws.rs.Path; -+import jakarta.ws.rs.Produces; -+import jakarta.ws.rs.QueryParam; -+import jakarta.ws.rs.core.Context; -+import jakarta.ws.rs.core.HttpHeaders; -+import jakarta.ws.rs.core.MediaType; -+import jakarta.ws.rs.core.Response; - - /** - * The objective of this class is to provide a simple proxy for the invocations from the UI to the SWs, and avoid diff --git a/.ci/environments/quarkus-3/patches/0002_spring_boot_localserverport.patch b/.ci/environments/quarkus-3/patches/0002_spring_boot_localserverport.patch deleted file mode 100644 index efaa9e3045..0000000000 --- a/.ci/environments/quarkus-3/patches/0002_spring_boot_localserverport.patch +++ /dev/null @@ -1,489 +0,0 @@ -diff --git a/kogito-springboot-examples/decisiontable-springboot-example/src/test/java/org/kie/kogito/decisiontable/springboot/RestQueryTest.java b/kogito-springboot-examples/decisiontable-springboot-example/src/test/java/org/kie/kogito/decisiontable/springboot/RestQueryTest.java -index 30860d23f..4e3121e9b 100644 ---- a/kogito-springboot-examples/decisiontable-springboot-example/src/test/java/org/kie/kogito/decisiontable/springboot/RestQueryTest.java -+++ b/kogito-springboot-examples/decisiontable-springboot-example/src/test/java/org/kie/kogito/decisiontable/springboot/RestQueryTest.java -@@ -19,7 +19,7 @@ import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.kie.kogito.queries.KogitoSpringbootApplication; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.annotation.DirtiesContext; - - import io.restassured.RestAssured; -diff --git a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/DashboardsListTest.java b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/DashboardsListTest.java -index a0ae9e8eb..dccbf1c39 100644 ---- a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/DashboardsListTest.java -+++ b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/DashboardsListTest.java -@@ -22,7 +22,7 @@ import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.springframework.boot.test.autoconfigure.actuate.metrics.AutoConfigureMetrics; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - - import io.restassured.RestAssured; - import io.restassured.http.ContentType; -diff --git a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/DroolsMetricsTest.java b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/DroolsMetricsTest.java -index abebfb6da..b4b1f7870 100644 ---- a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/DroolsMetricsTest.java -+++ b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/DroolsMetricsTest.java -@@ -19,7 +19,7 @@ import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.springframework.boot.test.autoconfigure.actuate.metrics.AutoConfigureMetrics; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.annotation.DirtiesContext; - - import io.restassured.RestAssured; -diff --git a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/LoanEligibilityTest.java b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/LoanEligibilityTest.java -index 894f46759..ba697254c 100644 ---- a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/LoanEligibilityTest.java -+++ b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/LoanEligibilityTest.java -@@ -19,7 +19,7 @@ import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.springframework.boot.test.autoconfigure.actuate.metrics.AutoConfigureMetrics; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - - import io.restassured.RestAssured; - import io.restassured.http.ContentType; -diff --git a/kogito-springboot-examples/dmn-listener-springboot/src/test/java/org/kie/kogito/dmn/springboot/example/listener/TrafficViolationListenerTest.java b/kogito-springboot-examples/dmn-listener-springboot/src/test/java/org/kie/kogito/dmn/springboot/example/listener/TrafficViolationListenerTest.java -index a17dfd4c2..0239fcae0 100644 ---- a/kogito-springboot-examples/dmn-listener-springboot/src/test/java/org/kie/kogito/dmn/springboot/example/listener/TrafficViolationListenerTest.java -+++ b/kogito-springboot-examples/dmn-listener-springboot/src/test/java/org/kie/kogito/dmn/springboot/example/listener/TrafficViolationListenerTest.java -@@ -27,7 +27,7 @@ import org.kie.kogito.decision.DecisionEventListenerConfig; - import org.kie.kogito.dmn.springboot.example.mock.MockDMNRuntimeEventListener; - import org.springframework.beans.factory.annotation.Autowired; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.annotation.DirtiesContext; - - import io.restassured.RestAssured; -diff --git a/kogito-springboot-examples/dmn-listener-springboot/src/test/java/org/kie/kogito/dmn/springboot/example/listener/TrafficViolationTest.java b/kogito-springboot-examples/dmn-listener-springboot/src/test/java/org/kie/kogito/dmn/springboot/example/listener/TrafficViolationTest.java -index d440b2f91..18dcf9eba 100644 ---- a/kogito-springboot-examples/dmn-listener-springboot/src/test/java/org/kie/kogito/dmn/springboot/example/listener/TrafficViolationTest.java -+++ b/kogito-springboot-examples/dmn-listener-springboot/src/test/java/org/kie/kogito/dmn/springboot/example/listener/TrafficViolationTest.java -@@ -18,7 +18,7 @@ package org.kie.kogito.dmn.springboot.example.listener; - import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.annotation.DirtiesContext; - - import io.restassured.RestAssured; -diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNMiningModelTest.java b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNMiningModelTest.java -index 3d9de5cda..4dbc61d2f 100644 ---- a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNMiningModelTest.java -+++ b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNMiningModelTest.java -@@ -18,7 +18,7 @@ package org.kie.kogito.dmn.pmml.springboot.example; - import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.annotation.DirtiesContext; - - import io.restassured.RestAssured; -diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNRegressionTest.java b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNRegressionTest.java -index 0db95dc71..6fbda4ff5 100644 ---- a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNRegressionTest.java -+++ b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNRegressionTest.java -@@ -18,7 +18,7 @@ package org.kie.kogito.dmn.pmml.springboot.example; - import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.annotation.DirtiesContext; - - import io.restassured.RestAssured; -diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNScoreCardTest.java b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNScoreCardTest.java -index 6287eaa2a..4320fc756 100644 ---- a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNScoreCardTest.java -+++ b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNScoreCardTest.java -@@ -18,7 +18,7 @@ package org.kie.kogito.dmn.pmml.springboot.example; - import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.annotation.DirtiesContext; - - import io.restassured.RestAssured; -diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNTreeTest.java b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNTreeTest.java -index 3885a8b88..ee1064bb4 100644 ---- a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNTreeTest.java -+++ b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNTreeTest.java -@@ -18,7 +18,7 @@ package org.kie.kogito.dmn.pmml.springboot.example; - import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.annotation.DirtiesContext; - - import io.restassured.RestAssured; -diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DecisionTreeTest.java b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DecisionTreeTest.java -index 617b87735..d39fd3534 100644 ---- a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DecisionTreeTest.java -+++ b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DecisionTreeTest.java -@@ -21,7 +21,7 @@ import java.util.Map; - import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.annotation.DirtiesContext; - - import io.restassured.RestAssured; -diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/LinRegTest.java b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/LinRegTest.java -index 24ff9ec0c..37a9d745b 100644 ---- a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/LinRegTest.java -+++ b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/LinRegTest.java -@@ -21,7 +21,7 @@ import java.util.Map; - import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.annotation.DirtiesContext; - - import io.restassured.RestAssured; -diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/MiningModelTest.java b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/MiningModelTest.java -index 0c57345b4..95452775f 100644 ---- a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/MiningModelTest.java -+++ b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/MiningModelTest.java -@@ -21,7 +21,7 @@ import java.util.Map; - import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.annotation.DirtiesContext; - - import io.restassured.RestAssured; -diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/ScoreCardTest.java b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/ScoreCardTest.java -index 64a10b51d..655408c6f 100644 ---- a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/ScoreCardTest.java -+++ b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/ScoreCardTest.java -@@ -21,7 +21,7 @@ import java.util.Map; - import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.annotation.DirtiesContext; - - import io.restassured.RestAssured; -diff --git a/kogito-springboot-examples/dmn-springboot-example/src/test/java/org/kie/kogito/dmn/springboot/example/TrafficViolationTest.java b/kogito-springboot-examples/dmn-springboot-example/src/test/java/org/kie/kogito/dmn/springboot/example/TrafficViolationTest.java -index cdd423732..f38894360 100644 ---- a/kogito-springboot-examples/dmn-springboot-example/src/test/java/org/kie/kogito/dmn/springboot/example/TrafficViolationTest.java -+++ b/kogito-springboot-examples/dmn-springboot-example/src/test/java/org/kie/kogito/dmn/springboot/example/TrafficViolationTest.java -@@ -18,7 +18,7 @@ package org.kie.kogito.dmn.springboot.example; - import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.annotation.DirtiesContext; - - import io.restassured.RestAssured; -diff --git a/kogito-springboot-examples/dmn-tracing-springboot/src/test/java/org/kie/kogito/dmn/springboot/tracing/LoanEligibilityIT.java b/kogito-springboot-examples/dmn-tracing-springboot/src/test/java/org/kie/kogito/dmn/springboot/tracing/LoanEligibilityIT.java -index e3db89f92..becc38fc4 100644 ---- a/kogito-springboot-examples/dmn-tracing-springboot/src/test/java/org/kie/kogito/dmn/springboot/tracing/LoanEligibilityIT.java -+++ b/kogito-springboot-examples/dmn-tracing-springboot/src/test/java/org/kie/kogito/dmn/springboot/tracing/LoanEligibilityIT.java -@@ -28,7 +28,7 @@ import org.slf4j.Logger; - import org.slf4j.LoggerFactory; - import org.springframework.beans.factory.annotation.Autowired; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.context.ContextConfiguration; - - import io.restassured.RestAssured; -diff --git a/kogito-springboot-examples/flexible-process-springboot/src/test/java/org/kie/kogito/flexible/example/springboot/ServiceDeskProcessTest.java b/kogito-springboot-examples/flexible-process-springboot/src/test/java/org/kie/kogito/flexible/example/springboot/ServiceDeskProcessTest.java -index cdcfba2ad..a0843eb7b 100644 ---- a/kogito-springboot-examples/flexible-process-springboot/src/test/java/org/kie/kogito/flexible/example/springboot/ServiceDeskProcessTest.java -+++ b/kogito-springboot-examples/flexible-process-springboot/src/test/java/org/kie/kogito/flexible/example/springboot/ServiceDeskProcessTest.java -@@ -27,7 +27,7 @@ import org.kie.kogito.flexible.example.model.SupportCase; - import org.kie.kogito.flexible.example.service.TriageService; - import org.kie.kogito.tests.KogitoSpringbootApplication; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.annotation.DirtiesContext; - import org.springframework.test.annotation.DirtiesContext.ClassMode; - -diff --git a/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/WorkItemHandlerConfig.java b/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/WorkItemHandlerConfig.java -index 674769d92..02c0f90a2 100644 ---- a/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/WorkItemHandlerConfig.java -+++ b/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/WorkItemHandlerConfig.java -@@ -15,7 +15,6 @@ - */ - package org.kie.kogito.examples; - --import jakarta.annotation.PostConstruct; - import java.util.ArrayList; - import java.util.Arrays; - import java.util.Collection; -@@ -34,6 +33,8 @@ import org.springframework.beans.factory.annotation.Autowired; - import org.springframework.beans.factory.annotation.Value; - import org.springframework.stereotype.Component; - -+import jakarta.annotation.PostConstruct; -+ - @Component - public class WorkItemHandlerConfig extends DefaultWorkItemHandlerConfig { - -diff --git a/kogito-springboot-examples/onboarding-springboot/src/test/java/org/kie/kogito/examples/onboarding/OnboardingEndpointIT.java b/kogito-springboot-examples/onboarding-springboot/src/test/java/org/kie/kogito/examples/onboarding/OnboardingEndpointIT.java -index 03279f764..4a7dc01e2 100644 ---- a/kogito-springboot-examples/onboarding-springboot/src/test/java/org/kie/kogito/examples/onboarding/OnboardingEndpointIT.java -+++ b/kogito-springboot-examples/onboarding-springboot/src/test/java/org/kie/kogito/examples/onboarding/OnboardingEndpointIT.java -@@ -34,7 +34,7 @@ import org.kie.kogito.process.ProcessConfig; - import org.kie.kogito.testcontainers.springboot.InfinispanSpringBootTestResource; - import org.springframework.beans.factory.annotation.Autowired; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.context.ContextConfiguration; - import org.springframework.test.context.junit.jupiter.SpringExtension; - -diff --git a/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/LinRegTest.java b/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/LinRegTest.java -index e2be1f17a..ea8ec3850 100644 ---- a/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/LinRegTest.java -+++ b/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/LinRegTest.java -@@ -21,7 +21,7 @@ import java.util.Map; - import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.annotation.DirtiesContext; - - import io.restassured.RestAssured; -diff --git a/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/MiningModelTest.java b/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/MiningModelTest.java -index 875c7a2f1..cf0d651c6 100644 ---- a/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/MiningModelTest.java -+++ b/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/MiningModelTest.java -@@ -21,7 +21,7 @@ import java.util.Map; - import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.annotation.DirtiesContext; - - import io.restassured.RestAssured; -diff --git a/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/SampleMineTest.java b/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/SampleMineTest.java -index 686593bf2..af14c7aec 100644 ---- a/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/SampleMineTest.java -+++ b/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/SampleMineTest.java -@@ -21,7 +21,7 @@ import java.util.Map; - import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.annotation.DirtiesContext; - - import io.restassured.RestAssured; -diff --git a/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/SimpleScorecardTest.java b/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/SimpleScorecardTest.java -index 0ab88633a..58852e3c4 100644 ---- a/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/SimpleScorecardTest.java -+++ b/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/SimpleScorecardTest.java -@@ -21,7 +21,7 @@ import java.util.Map; - import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.annotation.DirtiesContext; - - import io.restassured.RestAssured; -diff --git a/kogito-springboot-examples/process-decisions-rules-springboot/src/test/java/org.kie.kogito.traffic/TrafficProcessIT.java b/kogito-springboot-examples/process-decisions-rules-springboot/src/test/java/org.kie.kogito.traffic/TrafficProcessIT.java -index 35fe70cf4..a28941480 100644 ---- a/kogito-springboot-examples/process-decisions-rules-springboot/src/test/java/org.kie.kogito.traffic/TrafficProcessIT.java -+++ b/kogito-springboot-examples/process-decisions-rules-springboot/src/test/java/org.kie.kogito.traffic/TrafficProcessIT.java -@@ -22,7 +22,7 @@ import java.util.Map; - import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - - import io.restassured.RestAssured; - import io.restassured.http.ContentType; -diff --git a/kogito-springboot-examples/process-decisions-springboot/src/test/java/org.kie.kogito.traffic/TrafficProcessIT.java b/kogito-springboot-examples/process-decisions-springboot/src/test/java/org.kie.kogito.traffic/TrafficProcessIT.java -index b3e8048df..69c650592 100644 ---- a/kogito-springboot-examples/process-decisions-springboot/src/test/java/org.kie.kogito.traffic/TrafficProcessIT.java -+++ b/kogito-springboot-examples/process-decisions-springboot/src/test/java/org.kie.kogito.traffic/TrafficProcessIT.java -@@ -22,7 +22,7 @@ import java.util.Map; - import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - - import io.restassured.RestAssured; - import io.restassured.http.ContentType; -diff --git a/kogito-springboot-examples/process-infinispan-persistence-springboot/src/test/java/org/acme/deals/DealsRestIT.java b/kogito-springboot-examples/process-infinispan-persistence-springboot/src/test/java/org/acme/deals/DealsRestIT.java -index 6495d06f8..79875699d 100644 ---- a/kogito-springboot-examples/process-infinispan-persistence-springboot/src/test/java/org/acme/deals/DealsRestIT.java -+++ b/kogito-springboot-examples/process-infinispan-persistence-springboot/src/test/java/org/acme/deals/DealsRestIT.java -@@ -21,7 +21,7 @@ import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.kie.kogito.testcontainers.springboot.InfinispanSpringBootTestResource; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.context.ContextConfiguration; - - import io.restassured.RestAssured; -diff --git a/kogito-springboot-examples/process-mongodb-persistence-springboot/src/test/java/org/acme/deals/DealsRestIT.java b/kogito-springboot-examples/process-mongodb-persistence-springboot/src/test/java/org/acme/deals/DealsRestIT.java -index 66682d68d..0b88d67e7 100644 ---- a/kogito-springboot-examples/process-mongodb-persistence-springboot/src/test/java/org/acme/deals/DealsRestIT.java -+++ b/kogito-springboot-examples/process-mongodb-persistence-springboot/src/test/java/org/acme/deals/DealsRestIT.java -@@ -20,7 +20,7 @@ import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.kie.kogito.testcontainers.springboot.MongoDBSpringBootTestResource; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.context.ContextConfiguration; - - import io.restassured.RestAssured; -diff --git a/kogito-springboot-examples/process-monitoring-springboot/src/test/java/org/kie/kogito/examples/springboot/DashboardGenerationTest.java b/kogito-springboot-examples/process-monitoring-springboot/src/test/java/org/kie/kogito/examples/springboot/DashboardGenerationTest.java -index abc62570f..a4b22b143 100644 ---- a/kogito-springboot-examples/process-monitoring-springboot/src/test/java/org/kie/kogito/examples/springboot/DashboardGenerationTest.java -+++ b/kogito-springboot-examples/process-monitoring-springboot/src/test/java/org/kie/kogito/examples/springboot/DashboardGenerationTest.java -@@ -23,7 +23,7 @@ import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.junit.jupiter.api.extension.ExtendWith; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.context.junit.jupiter.SpringExtension; - - import io.restassured.RestAssured; -diff --git a/kogito-springboot-examples/process-monitoring-springboot/src/test/java/org/kie/kogito/examples/springboot/ProcessMetricsTest.java b/kogito-springboot-examples/process-monitoring-springboot/src/test/java/org/kie/kogito/examples/springboot/ProcessMetricsTest.java -index 67e78bfa5..489d18b49 100644 ---- a/kogito-springboot-examples/process-monitoring-springboot/src/test/java/org/kie/kogito/examples/springboot/ProcessMetricsTest.java -+++ b/kogito-springboot-examples/process-monitoring-springboot/src/test/java/org/kie/kogito/examples/springboot/ProcessMetricsTest.java -@@ -25,7 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired; - import org.springframework.beans.factory.annotation.Qualifier; - import org.springframework.boot.test.autoconfigure.actuate.metrics.AutoConfigureMetrics; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.context.junit.jupiter.SpringExtension; - - import io.restassured.RestAssured; -diff --git a/kogito-springboot-examples/process-postgresql-persistence-springboot/src/test/java/org/acme/deals/DealsRestIT.java b/kogito-springboot-examples/process-postgresql-persistence-springboot/src/test/java/org/acme/deals/DealsRestIT.java -index 2cd9176a6..83e8ecd7c 100644 ---- a/kogito-springboot-examples/process-postgresql-persistence-springboot/src/test/java/org/acme/deals/DealsRestIT.java -+++ b/kogito-springboot-examples/process-postgresql-persistence-springboot/src/test/java/org/acme/deals/DealsRestIT.java -@@ -20,7 +20,7 @@ import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.kie.kogito.testcontainers.springboot.PostgreSqlSpringBootTestResource; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.context.ContextConfiguration; - - import io.restassured.RestAssured; -diff --git a/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/OrdersRestIT.java b/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/OrdersRestIT.java -index 975926ef5..209a7245a 100644 ---- a/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/OrdersRestIT.java -+++ b/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/OrdersRestIT.java -@@ -26,7 +26,7 @@ import org.kie.kogito.testcontainers.springboot.KafkaSpringBootTestResource; - import org.springframework.beans.factory.annotation.Autowired; - import org.springframework.beans.factory.annotation.Qualifier; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.context.ContextConfiguration; - import org.springframework.test.context.junit.jupiter.SpringExtension; - -diff --git a/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/PersonsRestIT.java b/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/PersonsRestIT.java -index ca00f4a9b..b31ac9498 100644 ---- a/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/PersonsRestIT.java -+++ b/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/PersonsRestIT.java -@@ -27,7 +27,7 @@ import org.kie.kogito.testcontainers.springboot.KafkaSpringBootTestResource; - import org.springframework.beans.factory.annotation.Autowired; - import org.springframework.beans.factory.annotation.Qualifier; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.context.ContextConfiguration; - import org.springframework.test.context.junit.jupiter.SpringExtension; - -diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/test/java/org/acme/travels/ApprovalsRestIT.java b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/test/java/org/acme/travels/ApprovalsRestIT.java -index e45fefd32..b39fb4769 100644 ---- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/test/java/org/acme/travels/ApprovalsRestIT.java -+++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/test/java/org/acme/travels/ApprovalsRestIT.java -@@ -25,7 +25,7 @@ import org.kie.kogito.testcontainers.springboot.KafkaSpringBootTestResource; - import org.kie.kogito.testcontainers.springboot.KeycloakSpringBootTestResource; - import org.springframework.beans.factory.annotation.Value; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.context.ContextConfiguration; - import org.springframework.test.context.junit.jupiter.SpringExtension; - -diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/java/org/acme/travels/ApprovalsRestIT.java b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/java/org/acme/travels/ApprovalsRestIT.java -index 32f63e398..37d1a3bd9 100644 ---- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/java/org/acme/travels/ApprovalsRestIT.java -+++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/java/org/acme/travels/ApprovalsRestIT.java -@@ -23,7 +23,7 @@ import org.kie.kogito.springboot.KogitoSpringbootApplication; - import org.kie.kogito.testcontainers.springboot.KeycloakSpringBootTestResource; - import org.springframework.beans.factory.annotation.Value; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.context.ContextConfiguration; - import org.springframework.test.context.junit.jupiter.SpringExtension; - -diff --git a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/test/java/org/acme/travels/security/springboot/ApprovalsRestTest.java b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/test/java/org/acme/travels/security/springboot/ApprovalsRestTest.java -index 18d52fdca..8ec6a8a98 100644 ---- a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/test/java/org/acme/travels/security/springboot/ApprovalsRestTest.java -+++ b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/test/java/org/acme/travels/security/springboot/ApprovalsRestTest.java -@@ -20,7 +20,7 @@ import org.junit.jupiter.api.Test; - import org.junit.jupiter.api.extension.ExtendWith; - import org.kie.kogito.tests.KogitoInfinispanSpringbootApplication; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.annotation.DirtiesContext; - import org.springframework.test.annotation.DirtiesContext.ClassMode; - import org.springframework.test.context.junit.jupiter.SpringExtension; -diff --git a/kogito-springboot-examples/rules-legacy-springboot-example/src/test/java/org/kie/kogito/RestQueryTest.java b/kogito-springboot-examples/rules-legacy-springboot-example/src/test/java/org/kie/kogito/RestQueryTest.java -index cd61a4ad9..17ea83ca0 100644 ---- a/kogito-springboot-examples/rules-legacy-springboot-example/src/test/java/org/kie/kogito/RestQueryTest.java -+++ b/kogito-springboot-examples/rules-legacy-springboot-example/src/test/java/org/kie/kogito/RestQueryTest.java -@@ -19,7 +19,7 @@ import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.kie.kogito.legacy.KogitoSpringbootApplication; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.annotation.DirtiesContext; - - import io.restassured.RestAssured; -diff --git a/kogito-springboot-examples/ruleunit-springboot-example/src/test/java/org/kie/kogito/decisiontable/springboot/ruleunit/RestQueryTest.java b/kogito-springboot-examples/ruleunit-springboot-example/src/test/java/org/kie/kogito/decisiontable/springboot/ruleunit/RestQueryTest.java -index 8f54299cf..9a94bc193 100644 ---- a/kogito-springboot-examples/ruleunit-springboot-example/src/test/java/org/kie/kogito/decisiontable/springboot/ruleunit/RestQueryTest.java -+++ b/kogito-springboot-examples/ruleunit-springboot-example/src/test/java/org/kie/kogito/decisiontable/springboot/ruleunit/RestQueryTest.java -@@ -19,7 +19,7 @@ import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.kie.kogito.queries.KogitoSpringbootApplication; - import org.springframework.boot.test.context.SpringBootTest; --import org.springframework.boot.web.server.LocalServerPort; -+import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.annotation.DirtiesContext; - - import io.restassured.RestAssured; diff --git a/.ci/environments/quarkus-3/patches/0003_wiremock_update.patch b/.ci/environments/quarkus-3/patches/0003_wiremock_update.patch deleted file mode 100644 index b04922bfe7..0000000000 --- a/.ci/environments/quarkus-3/patches/0003_wiremock_update.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/pom.xml b/serverless-workflow-examples/serverless-workflow-stock-profit/pom.xml -index 130b10318..b4cb6502e 100644 ---- a/serverless-workflow-examples/serverless-workflow-stock-profit/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-stock-profit/pom.xml -@@ -25,7 +25,7 @@ - 11 - 3.0.0-M7 - ${version.surefire.plugin} -- 2.33.2 -+ 3.0.0-beta-8 - - - -diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/pom.xml b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/pom.xml -index a0b150421..b5d070238 100644 ---- a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/pom.xml -@@ -41,7 +41,7 @@ - - - com.github.tomakehurst -- wiremock-jre8 -+ wiremock - ${version.com.github.tomakehurst.wiremock} - test - diff --git a/.ci/environments/quarkus-3/patches/0004_spring_boot_remove_keycloak_adapter.patch b/.ci/environments/quarkus-3/patches/0004_spring_boot_remove_keycloak_adapter.patch deleted file mode 100644 index d416f36f9d..0000000000 --- a/.ci/environments/quarkus-3/patches/0004_spring_boot_remove_keycloak_adapter.patch +++ /dev/null @@ -1,605 +0,0 @@ -diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docker-compose/docker-compose.yml b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docker-compose/docker-compose.yml -index a9167a60e..a4d8633e6 100755 ---- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docker-compose/docker-compose.yml -+++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docker-compose/docker-compose.yml -@@ -115,19 +115,3 @@ services: - environment: - KOGITO_DATAINDEX_HTTP_URL: http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8180/graphql - KOGITO_TASK_CONSOLE_PROPS: -Dkogito.consoles.keycloak.config.url=http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8480/auth -Dkogito.consoles.keycloak.config.health-check-url=http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8480/auth/realms/kogito/.well-known/openid-configuration -- -- process-usertasks-with-security-oidc-springboot-with-console: -- container_name: process-usertasks-with-security-oidc-springboot-with-console -- image: org.kie.kogito.examples/process-usertasks-with-security-oidc-springboot-with-console:1.0 -- ports: -- - 8080:8080 -- depends_on: -- infinispan: -- condition: service_healthy -- data-index: -- condition: service_started -- environment: -- MANAGEMENT_ENDPOINTS_WEB_CORS_ALLOWED_ORIGINS: "/.*/" -- INFINISPAN_REMOTE_SERVER_LIST: infinispan:11222 -- SPRING_KAFKA_BOOTSTRAP_SERVERS: kafka:29092 -- KEYCLOAK_AUTH_SERVER_URL: http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8480/auth -\ No newline at end of file -diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/pom.xml b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/pom.xml -index 0e39fbaa0..312ec0080 100644 ---- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/pom.xml -+++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/pom.xml -@@ -28,13 +28,6 @@ - pom - import - -- -- org.keycloak.bom -- keycloak-adapter-bom -- ${version.org.keycloak} -- pom -- import -- - - org.infinispan - infinispan-bom -@@ -65,8 +58,8 @@ - spring-boot-starter-security - - -- org.keycloak -- keycloak-spring-boot-starter -+ org.springframework.security -+ spring-security-oauth2-authorization-server - - - -@@ -79,7 +72,7 @@ - - - org.infinispan -- infinispan-spring-boot-starter-remote -+ infinispan-spring-boot3-starter-remote - - - org.kie.kogito -diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/kie/kogito/springboot/DefaultWebSecurityConfig.java b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/kie/kogito/springboot/DefaultWebSecurityConfig.java -index d72bb6a17..b7bae3369 100644 ---- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/kie/kogito/springboot/DefaultWebSecurityConfig.java -+++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/kie/kogito/springboot/DefaultWebSecurityConfig.java -@@ -15,50 +15,26 @@ - */ - package org.kie.kogito.springboot; - --import org.keycloak.adapters.springsecurity.KeycloakConfiguration; --import org.keycloak.adapters.springsecurity.KeycloakSecurityComponents; --import org.keycloak.adapters.springsecurity.authentication.KeycloakAuthenticationProvider; --import org.keycloak.adapters.springsecurity.config.KeycloakWebSecurityConfigurerAdapter; --import org.springframework.beans.factory.annotation.Autowired; - import org.springframework.context.annotation.Bean; --import org.springframework.context.annotation.ComponentScan; --import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; -+import org.springframework.context.annotation.Configuration; - import org.springframework.security.config.annotation.web.builders.HttpSecurity; --import org.springframework.security.core.authority.mapping.SimpleAuthorityMapper; --import org.springframework.security.core.session.SessionRegistryImpl; --import org.springframework.security.web.authentication.session.RegisterSessionAuthenticationStrategy; --import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy; -+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; -+import org.springframework.security.web.SecurityFilterChain; - --@KeycloakConfiguration --@ComponentScan(basePackageClasses = KeycloakSecurityComponents.class) --class DefaultWebSecurityConfig extends KeycloakWebSecurityConfigurerAdapter { -- -- @Autowired -- public void configureGlobal(AuthenticationManagerBuilder auth) { -- SimpleAuthorityMapper grantedAuthorityMapper = new SimpleAuthorityMapper(); -- grantedAuthorityMapper.setPrefix("ROLE_"); -- -- KeycloakAuthenticationProvider keycloakAuthenticationProvider = keycloakAuthenticationProvider(); -- keycloakAuthenticationProvider.setGrantedAuthoritiesMapper(grantedAuthorityMapper); -- -- auth.authenticationProvider(keycloakAuthenticationProvider); -- } -+@Configuration -+@EnableWebSecurity -+class DefaultWebSecurityConfig { - - @Bean -- @Override -- protected SessionAuthenticationStrategy sessionAuthenticationStrategy() { -- return new RegisterSessionAuthenticationStrategy( -- new SessionRegistryImpl()); -- } -- -- @Override -- protected void configure(HttpSecurity http) throws Exception { -- super.configure(http); -- http.authorizeRequests() -+ public SecurityFilterChain configure(HttpSecurity http) throws Exception { -+ http.authorizeHttpRequests() - .anyRequest() -- .permitAll(); -+ .authenticated() -+ .and() -+ .oauth2ResourceServer().jwt(); - http.cors() - .and() - .csrf().disable(); -+ return http.build(); - } - } -diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/kie/kogito/springboot/KeycloakResolverConfig.java b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/kie/kogito/springboot/KeycloakResolverConfig.java -deleted file mode 100644 -index add510733..000000000 ---- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/kie/kogito/springboot/KeycloakResolverConfig.java -+++ /dev/null -@@ -1,30 +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.springboot; -- --import org.keycloak.adapters.springboot.KeycloakSpringBootConfigResolver; --import org.springframework.context.annotation.Bean; --import org.springframework.context.annotation.Configuration; -- --@Configuration --public class KeycloakResolverConfig { -- -- @Bean -- public KeycloakSpringBootConfigResolver KeycloakConfigResolver() { -- return new KeycloakSpringBootConfigResolver(); -- } --} -diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/resources/application.properties b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/resources/application.properties -index 171e1bc03..3d3238bea 100644 ---- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/resources/application.properties -+++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/resources/application.properties -@@ -1,22 +1,7 @@ - server.address=0.0.0.0 - infinispan.remote.server-list=127.0.0.1:11222 - --keycloak.auth-server-url=http://localhost:8480/auth -- --keycloak.realm=kogito --keycloak.resource=kogito-app --keycloak.credentials.secret=secret --keycloak.cors=true --keycloak.ssl-required=external --keycloak.bearer-only=true --keycloak.use-resource-role-mappings=true -- --kogito.dataindex.http.url=http://localhost:8180 --kogito.service.url=http://localhost:8080 --kogito.persistence.type=infinispan -- --spring.kafka.bootstrap-servers=localhost:9092 -- -+spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:8480/auth/realms/kogito - - #mp.messaging.outgoing.kogito-processinstances-events.bootstrap.servers=localhost:9092 - mp.messaging.outgoing.kogito-processinstances-events.connector=smallrye-kafka -diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/test/java/org/acme/travels/ApprovalsRestIT.java b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/test/java/org/acme/travels/ApprovalsRestIT.java -index b39fb4769..1ec08b142 100644 ---- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/test/java/org/acme/travels/ApprovalsRestIT.java -+++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/test/java/org/acme/travels/ApprovalsRestIT.java -@@ -15,10 +15,11 @@ - */ - package org.acme.travels; - -+import io.restassured.RestAssured; -+import io.restassured.http.ContentType; - import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.junit.jupiter.api.extension.ExtendWith; --import org.keycloak.representations.AccessTokenResponse; - import org.kie.kogito.springboot.KogitoSpringbootApplication; - import org.kie.kogito.testcontainers.springboot.InfinispanSpringBootTestResource; - import org.kie.kogito.testcontainers.springboot.KafkaSpringBootTestResource; -@@ -29,16 +30,13 @@ import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.context.ContextConfiguration; - import org.springframework.test.context.junit.jupiter.SpringExtension; - --import io.restassured.RestAssured; --import io.restassured.http.ContentType; -- - import static io.restassured.RestAssured.given; - import static org.hamcrest.CoreMatchers.is; - import static org.hamcrest.CoreMatchers.notNullValue; - - @ExtendWith(SpringExtension.class) - @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = KogitoSpringbootApplication.class) --@ContextConfiguration(initializers = { KeycloakSpringBootTestResource.class, InfinispanSpringBootTestResource.Conditional.class, KafkaSpringBootTestResource.class }) -+@ContextConfiguration(initializers = {KeycloakSpringBootTestResource.class, InfinispanSpringBootTestResource.Conditional.class, KafkaSpringBootTestResource.class}) - public class ApprovalsRestIT { - - @LocalServerPort -@@ -60,8 +58,7 @@ public class ApprovalsRestIT { - .when() - .post("/approvals") - .then() -- .statusCode(400); -- -+ .statusCode(401); - } - - @Test -@@ -96,7 +93,7 @@ public class ApprovalsRestIT { - .get("/approvals/" + id + "/tasks?user=admin&group=managers") - .then() - .statusCode(200) -- .body("$.size", is(1)) -+ .body("size()", is(1)) - .body("[0].name", is("firstLineApproval")) - .extract() - .path("[0].id"); -@@ -135,8 +132,8 @@ public class ApprovalsRestIT { - .param("client_secret", "secret") - .when() - .post(keycloakUrl + "/realms/kogito/protocol/openid-connect/token") -- .as(AccessTokenResponse.class).getToken(); -- -+ .then() -+ .extract() -+ .path("access_token"); - } -- - } -diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/test/resources/application.properties b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/test/resources/application.properties -index 7740348dd..a1451ed66 100644 ---- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/test/resources/application.properties -+++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/test/resources/application.properties -@@ -1,8 +1,5 @@ - --keycloak.realm=kogito --keycloak.resource=kogito-app --keycloak.credentials.secret=secret --keycloak.bearer-only=true -+spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:8480/auth/realms/kogito - - spring.main.allow-bean-definition-overriding=true - -diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/pom.xml b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/pom.xml -index ea037b1f8..7b71f28df 100644 ---- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/pom.xml -+++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/pom.xml -@@ -27,13 +27,6 @@ - pom - import - -- -- org.keycloak.bom -- keycloak-adapter-bom -- ${version.org.keycloak} -- pom -- import -- - - - -@@ -47,8 +40,8 @@ - spring-boot-starter-security - - -- org.keycloak -- keycloak-spring-boot-starter -+ org.springframework.security -+ spring-security-oauth2-authorization-server - - - -diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/kie/kogito/springboot/DefaultWebSecurityConfig.java b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/kie/kogito/springboot/DefaultWebSecurityConfig.java -index e1e9fc439..b7bae3369 100644 ---- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/kie/kogito/springboot/DefaultWebSecurityConfig.java -+++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/kie/kogito/springboot/DefaultWebSecurityConfig.java -@@ -15,50 +15,26 @@ - */ - package org.kie.kogito.springboot; - --import org.keycloak.adapters.springsecurity.KeycloakConfiguration; --import org.keycloak.adapters.springsecurity.KeycloakSecurityComponents; --import org.keycloak.adapters.springsecurity.authentication.KeycloakAuthenticationProvider; --import org.keycloak.adapters.springsecurity.config.KeycloakWebSecurityConfigurerAdapter; --import org.springframework.beans.factory.annotation.Autowired; - import org.springframework.context.annotation.Bean; --import org.springframework.context.annotation.ComponentScan; --import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; -+import org.springframework.context.annotation.Configuration; - import org.springframework.security.config.annotation.web.builders.HttpSecurity; --import org.springframework.security.core.authority.mapping.SimpleAuthorityMapper; --import org.springframework.security.core.session.SessionRegistryImpl; --import org.springframework.security.web.authentication.session.RegisterSessionAuthenticationStrategy; --import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy; -+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; -+import org.springframework.security.web.SecurityFilterChain; - --@KeycloakConfiguration --@ComponentScan(basePackageClasses = KeycloakSecurityComponents.class) --class DefaultWebSecurityConfig extends KeycloakWebSecurityConfigurerAdapter { -- -- @Autowired -- public void configureGlobal(AuthenticationManagerBuilder auth) { -- SimpleAuthorityMapper grantedAuthorityMapper = new SimpleAuthorityMapper(); -- grantedAuthorityMapper.setPrefix("ROLE_"); -- -- KeycloakAuthenticationProvider keycloakAuthenticationProvider = keycloakAuthenticationProvider(); -- keycloakAuthenticationProvider.setGrantedAuthoritiesMapper(grantedAuthorityMapper); -- -- auth.authenticationProvider(keycloakAuthenticationProvider); -- } -+@Configuration -+@EnableWebSecurity -+class DefaultWebSecurityConfig { - - @Bean -- @Override -- protected SessionAuthenticationStrategy sessionAuthenticationStrategy() { -- return new RegisterSessionAuthenticationStrategy( -- new SessionRegistryImpl()); -- } -- -- @Override -- protected void configure(HttpSecurity http) throws Exception { -- super.configure(http); -- http.csrf().disable() -- .authorizeRequests() -- .antMatchers("/approvals/**") -+ public SecurityFilterChain configure(HttpSecurity http) throws Exception { -+ http.authorizeHttpRequests() -+ .anyRequest() - .authenticated() -- .antMatchers("/docs/**").permitAll() -- .anyRequest().permitAll(); -+ .and() -+ .oauth2ResourceServer().jwt(); -+ http.cors() -+ .and() -+ .csrf().disable(); -+ return http.build(); - } - } -diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/kie/kogito/springboot/KeycloakResolverConfig.java b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/kie/kogito/springboot/KeycloakResolverConfig.java -deleted file mode 100644 -index add510733..000000000 ---- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/kie/kogito/springboot/KeycloakResolverConfig.java -+++ /dev/null -@@ -1,30 +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.springboot; -- --import org.keycloak.adapters.springboot.KeycloakSpringBootConfigResolver; --import org.springframework.context.annotation.Bean; --import org.springframework.context.annotation.Configuration; -- --@Configuration --public class KeycloakResolverConfig { -- -- @Bean -- public KeycloakSpringBootConfigResolver KeycloakConfigResolver() { -- return new KeycloakSpringBootConfigResolver(); -- } --} -diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/resources/application.properties b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/resources/application.properties -index 05c02cbc0..245366542 100644 ---- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/resources/application.properties -+++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/resources/application.properties -@@ -2,10 +2,6 @@ server.address=0.0.0.0 - - spring.main.allow-bean-definition-overriding=true - --keycloak.auth-server-url=http://localhost:8281/auth --keycloak.realm=kogito --keycloak.resource=kogito-app --keycloak.credentials.secret=secret --keycloak.bearer-only=true -+spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:8281/auth/realms/kogito - - -diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/java/org/acme/travels/ApprovalsRestIT.java b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/java/org/acme/travels/ApprovalsRestIT.java -index 37d1a3bd9..193d703af 100644 ---- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/java/org/acme/travels/ApprovalsRestIT.java -+++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/java/org/acme/travels/ApprovalsRestIT.java -@@ -15,10 +15,11 @@ - */ - package org.acme.travels; - -+import io.restassured.RestAssured; -+import io.restassured.http.ContentType; - import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.junit.jupiter.api.extension.ExtendWith; --import org.keycloak.representations.AccessTokenResponse; - import org.kie.kogito.springboot.KogitoSpringbootApplication; - import org.kie.kogito.testcontainers.springboot.KeycloakSpringBootTestResource; - import org.springframework.beans.factory.annotation.Value; -@@ -27,9 +28,6 @@ import org.springframework.boot.test.web.server.LocalServerPort; - import org.springframework.test.context.ContextConfiguration; - import org.springframework.test.context.junit.jupiter.SpringExtension; - --import io.restassured.RestAssured; --import io.restassured.http.ContentType; -- - import static io.restassured.RestAssured.given; - import static org.hamcrest.CoreMatchers.is; - import static org.hamcrest.CoreMatchers.notNullValue; -@@ -59,7 +57,6 @@ public class ApprovalsRestIT { - .post("/approvals") - .then() - .statusCode(401); -- - } - - @Test -@@ -83,7 +80,7 @@ public class ApprovalsRestIT { - .get("/approvals") - .then() - .statusCode(200) -- .body("$.size()", is(1), "[0].id", is(id)); -+ .body("size()", is(1), "[0].id", is(id)); - - // get just started approval - given() -@@ -105,7 +102,7 @@ public class ApprovalsRestIT { - .get("/approvals/" + id + "/tasks?user=admin&group=managers") - .then() - .statusCode(200) -- .body("$.size", is(1)) -+ .body("size()", is(1)) - .body("[0].name", is("firstLineApproval")) - .extract() - .path("[0].id"); -@@ -144,8 +141,8 @@ public class ApprovalsRestIT { - .param("client_secret", "secret") - .when() - .post(keycloakUrl + "/realms/kogito/protocol/openid-connect/token") -- .as(AccessTokenResponse.class).getToken(); -- -+ .then() -+ .extract() -+ .path("access_token"); - } -- - } -diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/resources/application.properties b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/resources/application.properties -index a2dac0b06..3be2ed592 100644 ---- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/resources/application.properties -+++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/resources/application.properties -@@ -1,7 +1,3 @@ --keycloak.auth-server-url=http://localhost:8281/auth --keycloak.realm=kogito --keycloak.resource=kogito-app --keycloak.credentials.secret=secret --keycloak.bearer-only=true -+spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:8281/auth/realms/kogito - - spring.main.allow-bean-definition-overriding=true -\ No newline at end of file -diff --git a/kogito-springboot-examples/process-usertasks-with-security-springboot/pom.xml b/kogito-springboot-examples/process-usertasks-with-security-springboot/pom.xml -index 375818c87..17f4bb156 100644 ---- a/kogito-springboot-examples/process-usertasks-with-security-springboot/pom.xml -+++ b/kogito-springboot-examples/process-usertasks-with-security-springboot/pom.xml -@@ -45,6 +45,12 @@ - org.kie.kogito - kogito-processes-spring-boot-starter - -+ -+ -+ com.fasterxml.jackson.datatype -+ jackson-datatype-jakarta-jsonp -+ -+ - - org.springframework.boot - spring-boot-starter-test -diff --git a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/kie/kogito/tests/DefaultWebSecurityConfig.java b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/kie/kogito/tests/DefaultWebSecurityConfig.java -index 714b155cb..0c1092cd3 100644 ---- a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/kie/kogito/tests/DefaultWebSecurityConfig.java -+++ b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/kie/kogito/tests/DefaultWebSecurityConfig.java -@@ -21,22 +21,24 @@ import org.springframework.context.annotation.Configuration; - import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; - import org.springframework.security.config.annotation.web.builders.HttpSecurity; - import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; --import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; - import org.springframework.security.crypto.password.NoOpPasswordEncoder; - import org.springframework.security.crypto.password.PasswordEncoder; -+import org.springframework.security.web.SecurityFilterChain; - --@Configuration("kieServerSecurity") -+@Configuration - @EnableWebSecurity --public class DefaultWebSecurityConfig extends WebSecurityConfigurerAdapter { -+public class DefaultWebSecurityConfig { - -- @Override -- protected void configure(HttpSecurity http) throws Exception { -+ @Bean -+ public SecurityFilterChain configure(HttpSecurity http) throws Exception { - http - .csrf().disable() -- .authorizeRequests() -- .antMatchers("/**").authenticated() -+ .authorizeHttpRequests() -+ .requestMatchers("/**").authenticated() - .and() - .httpBasic(); -+ -+ return http.build(); - } - - @Autowired -diff --git a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/kie/kogito/tests/LogEventPublisher.java b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/kie/kogito/tests/LogEventPublisher.java -index 882c0ef2e..017ae966b 100644 ---- a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/kie/kogito/tests/LogEventPublisher.java -+++ b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/kie/kogito/tests/LogEventPublisher.java -@@ -19,6 +19,7 @@ import java.util.Collection; - - import org.kie.kogito.event.DataEvent; - import org.kie.kogito.event.EventPublisher; -+import org.springframework.beans.factory.annotation.Autowired; - import org.springframework.stereotype.Component; - - import com.fasterxml.jackson.core.JsonProcessingException; -@@ -27,7 +28,12 @@ import com.fasterxml.jackson.databind.ObjectMapper; - @Component - public class LogEventPublisher implements EventPublisher { - -- ObjectMapper json = new ObjectMapper(); -+ private ObjectMapper json; -+ -+ @Autowired -+ public void setMapper(ObjectMapper json) { -+ this.json = json; -+ } - - @Override - public void publish(DataEvent event) { -diff --git a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/test/java/org/acme/travels/security/springboot/ApprovalsRestTest.java b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/test/java/org/acme/travels/security/springboot/ApprovalsRestTest.java -index 8ec6a8a98..d9cca3c9a 100644 ---- a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/test/java/org/acme/travels/security/springboot/ApprovalsRestTest.java -+++ b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/test/java/org/acme/travels/security/springboot/ApprovalsRestTest.java -@@ -15,6 +15,8 @@ - */ - package org.acme.travels.security.springboot; - -+import org.hamcrest.Description; -+import org.hamcrest.Matcher; - import org.junit.jupiter.api.BeforeEach; - import org.junit.jupiter.api.Test; - import org.junit.jupiter.api.extension.ExtendWith; -@@ -99,7 +101,7 @@ public class ApprovalsRestTest { - .get("/approvals/" + id + "/tasks?user=admin&group=managers") - .then() - .statusCode(200) -- .body("$.size", is(1)) -+ .body("size()", is(1)) - .body("[0].name", is("firstLineApproval")) - .extract() - .path("[0].id"); diff --git a/.ci/environments/quarkus-3/project-recipe.yml b/.ci/environments/quarkus-3/project-recipe.yml deleted file mode 100644 index bf7bbcd17b..0000000000 --- a/.ci/environments/quarkus-3/project-recipe.yml +++ /dev/null @@ -1,29 +0,0 @@ -# -# 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. -# ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.kie.kogito.Quarkus3Migration -displayName: All Quarkus 3 Migration for Kogito Runtimes project -recipeList: - # TODO to update to Final version once available - - org.openrewrite.maven.ChangePropertyValue: - key: version.org.apache.camel.quarkus - newValue: 3.0.0-M1 - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: org.springdoc - oldArtifactId: springdoc-openapi-ui - newGroupId: org.springdoc - newArtifactId: springdoc-openapi-starter-webmvc-ui diff --git a/.ci/environments/quarkus-3/quarkus3-base-recipe.yml b/.ci/environments/quarkus-3/quarkus3-base-recipe.yml deleted file mode 100644 index 06f4b906da..0000000000 --- a/.ci/environments/quarkus-3/quarkus3-base-recipe.yml +++ /dev/null @@ -1,3379 +0,0 @@ -# -# 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. -# - -##### -# Rules coming from https://github.com/openrewrite/rewrite-migrate-java/blob/main/src/main/resources/META-INF/rewrite/jakarta-ee-9.yml -# modified to: -# - use the Jakarta EE 10 versions (except for JPA as we are waiting for the Hibernate ORM 6 upgrade) -# - not add new dependencies but transform them -##### - -##### -# Update the Quarkiverse extensions -##### ---- -type: specs.openrewrite.org/v1beta/recipe -name: io.quarkus.updates.core.quarkus30.UpgradeQuarkiverse -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkus.bot - artifactId: 'build-reporter-*' - newVersion: 3.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.vault - artifactId: '*' - newVersion: 3.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.amazonservices - artifactId: '*' - newVersion: 2.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.cxf - artifactId: '*' - newVersion: 2.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.jsch - artifactId: '*' - newVersion: 3.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.jberet - artifactId: '*' - newVersion: 2.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.artemis - artifactId: '*' - newVersion: 3.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.config - artifactId: '*' - newVersion: 2.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.freemarker - artifactId: '*' - newVersion: 1.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.githubapp - artifactId: '*' - newVersion: 2.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.mybatis - artifactId: '*' - newVersion: 2.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.messaginghub - artifactId: '*' - newVersion: 2.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.prettytime - artifactId: '*' - newVersion: 2.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.xmlsec - artifactId: '*' - newVersion: 2.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.jef - artifactId: '*' - newVersion: 3.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.githubaction - artifactId: '*' - newVersion: 2.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.hibernatesearchextras - artifactId: '*' - newVersion: 2.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.jackson-jq - artifactId: '*' - newVersion: 2.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.jdbc - artifactId: '*' - newVersion: 3.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.microprofile - artifactId: '*' - newVersion: 3.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.minio - artifactId: '*' - newVersion: 3.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.pact - artifactId: '*' - newVersion: 1.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.poi - artifactId: '*' - newVersion: 2.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.primefaces - artifactId: '*' - newVersion: 3.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.reactivemessaging.http - artifactId: '*' - newVersion: 2.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.renarde - artifactId: '*' - newVersion: 3.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.quarkiverse.shardingsphere - artifactId: '*' - newVersion: 2.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxActivationMigrationToJakartaActivation -displayName: Migrate deprecated `javax.activation` packages to `jakarta.activation` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -tags: - - activation - - javax - - jakarta - -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.activation - artifactId: jakarta.activation-api - newVersion: 2.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.activation - newPackageName: jakarta.activation - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.activation - oldArtifactId: javax.activation-api - newGroupId: jakarta.activation - newArtifactId: jakarta.activation-api - newVersion: 2.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxAnnotationMigrationToJakartaAnnotation -displayName: Migrate deprecated `javax.annotation` packages to `jakarta.annotation` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -tags: - - annotation - - javax - - jakarta - -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.annotation - artifactId: jakarta.annotation-api - newVersion: 2.x - - org.openrewrite.java.migrate.jakarta.ChangeJavaxAnnotationToJakarta - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.annotation - oldArtifactId: javax.annotation-api - newGroupId: jakarta.annotation - newArtifactId: jakarta.annotation-api - newVersion: 2.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.ChangeJavaxAnnotationToJakarta -displayName: Migrate deprecated `javax.annotation` packages to `jakarta.annotation` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. Excludes `javax.annotation.processing`. -tags: - - batch - - javax - - jakarta - -recipeList: - - org.openrewrite.java.migrate.jakarta.JavaxAnnotationPackageToJakarta - - org.openrewrite.java.migrate.jakarta.JavaxAnnotationSecurityPackageToJakarta - - org.openrewrite.java.migrate.jakarta.JavaxAnnotationSqlPackageToJakarta - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxAnnotationPackageToJakarta -displayName: Migrate deprecated `javax.annotation` packages to `jakarta.annotation` -description: Change type of classes in the `javax.annotation` package to jakarta. -tags: - - batch - - javax - - jakarta - -recipeList: - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: javax.annotation.Generated - newFullyQualifiedTypeName: jakarta.annotation.Generated - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: javax.annotation.ManagedBean - newFullyQualifiedTypeName: jakarta.annotation.ManagedBean - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: javax.annotation.PostConstruct - newFullyQualifiedTypeName: jakarta.annotation.PostConstruct - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: javax.annotation.PreDestroy - newFullyQualifiedTypeName: jakarta.annotation.PreDestroy - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: javax.annotation.Priority - newFullyQualifiedTypeName: jakarta.annotation.Priority - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: javax.annotation.Resource - newFullyQualifiedTypeName: jakarta.annotation.Resource - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: javax.annotation.Resources - newFullyQualifiedTypeName: jakarta.annotation.Resources - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxAnnotationSecurityPackageToJakarta -displayName: Migrate deprecated `javax.annotation.security` packages to `jakarta.annotation.security` -description: Change type of classes in the `javax.annotation.security` package to jakarta. -tags: - - batch - - javax - - jakarta - -recipeList: - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: javax.annotation.security.DeclareRoles - newFullyQualifiedTypeName: jakarta.annotation.security.DeclareRoles - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: javax.annotation.security.DenyAll - newFullyQualifiedTypeName: jakarta.annotation.security.DenyAll - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: javax.annotation.security.PermitAll - newFullyQualifiedTypeName: jakarta.annotation.security.PermitAll - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: javax.annotation.security.RolesAllowed - newFullyQualifiedTypeName: jakarta.annotation.security.RolesAllowed - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: javax.annotation.security.RunAs - newFullyQualifiedTypeName: jakarta.annotation.security.RunAs - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxAnnotationSqlPackageToJakarta -displayName: Migrate deprecated `javax.annotation.sql` packages to `jakarta.annotation.sql` -description: Change type of classes in the `javax.annotation.sql` package to jakarta. -tags: - - batch - - javax - - jakarta - -recipeList: - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: javax.annotation.sql.DataSourceDefinition - newFullyQualifiedTypeName: jakarta.annotation.sql.DataSourceDefinition - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: javax.annotation.sql.DataSourceDefinitions - newFullyQualifiedTypeName: jakarta.annotation.sql.DataSourceDefinitions - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxAuthenticationMigrationToJakartaAuthentication -displayName: Migrate deprecated `javax.security.auth.message` packages to `jakarta.security.auth.message` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -tags: - - authentication - - security - - javax - - jakarta - -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.authorization - artifactId: jakarta.authorization-api - newVersion: 2.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.authentication - artifactId: jakarta.authentication-api - newVersion: 2.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.security.auth.message - newPackageName: jakarta.security.auth.message - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.security.auth.message - oldArtifactId: javax.security.auth.message-api - newGroupId: jakarta.authentication - newArtifactId: jakarta.authentication-api - newVersion: 2.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxAuthorizationMigrationToJakartaAuthorization -displayName: Migrate deprecated `javax.security.jacc` packages to `jakarta.security.jacc` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -tags: - - authorization - - security - - javax - - jakarta - -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.authorization - artifactId: jakarta.authorization-api - newVersion: 2.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.security.jacc - newPackageName: jakarta.security.jacc - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.security.jacc - oldArtifactId: javax.security.jacc-api - newGroupId: jakarta.authorization - newArtifactId: jakarta.authorization-api - newVersion: 2.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxBatchMigrationToJakartaBatch -displayName: Migrate deprecated `javax.batch` packages to `jakarta.batch` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -tags: - - batch - - javax - - jakarta - -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.batch - artifactId: jakarta.batch-api - newVersion: 2.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.batch - newPackageName: jakarta.batch - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.batch - oldArtifactId: javax.batch-api - newGroupId: jakarta.batch - newArtifactId: jakarta.batch-api - newVersion: 2.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxValidationMigrationToJakartaValidation -displayName: Migrate deprecated `javax.validation` packages to `jakarta.validation` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -tags: - - validation - - javax - - jakarta - -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.validation - artifactId: jakarta.validation-api - newVersion: 3.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.validation - newPackageName: jakarta.validation - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.validation - oldArtifactId: validation-api - newGroupId: jakarta.validation - newArtifactId: jakarta.validation-api - newVersion: 3.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxDecoratorToJakartaDecorator -displayName: Migrate deprecated `javax.decorator` packages to `jakarta.decorator` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.enterprise - artifactId: jakarta.enterprise.cdi-api - newVersion: 4.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.decorator - newPackageName: jakarta.decorator - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.enterprise - oldArtifactId: cdi-api - newGroupId: jakarta.enterprise - newArtifactId: jakarta.enterprise.cdi-api - newVersion: 4.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxEjbToJakartaEjb -displayName: Migrate deprecated `javax.ejb` packages to `jakarta.ejb` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.ejb - artifactId: jakarta.ejb-api - newVersion: 4.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.ejb - newPackageName: jakarta.ejb - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.ejb - oldArtifactId: javax.ejb-api - newGroupId: jakarta.ejb - newArtifactId: jakarta.ejb-api - newVersion: 4.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxElToJakartaEl -displayName: Migrate deprecated `javax.el` packages to `jakarta.el` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.el - artifactId: jakarta.el-api - newVersion: 4.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.el - newPackageName: jakarta.el - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.el - oldArtifactId: javax.el-api - newGroupId: jakarta.el - newArtifactId: jakarta.el-api - newVersion: 4.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxEnterpriseToJakartaEnterprise -displayName: Migrate deprecated `javax.enterprise` packages to `jakarta.enterprise` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.enterprise - artifactId: jakarta.enterprise.cdi-api - newVersion: 4.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.enterprise - newPackageName: jakarta.enterprise - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.enterprise - oldArtifactId: cdi-api - newGroupId: jakarta.enterprise - newArtifactId: jakarta.enterprise.cdi-api - newVersion: 4.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxFacesToJakartaFaces -displayName: Migrate deprecated `javax.faces` packages to `jakarta.faces` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.faces - artifactId: jakarta.faces-api - newVersion: 4.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.faces - newPackageName: jakarta.faces - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.faces - oldArtifactId: javax.faces-api - newGroupId: jakarta.faces - newArtifactId: jakarta.faces-api - newVersion: 4.x - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - groupId: org.glassfish - artifactId: javax.faces - newGroupId: org.glassfish - newArtifactId: jakarta.faces - newVersion: 4.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxInjectMigrationToJakartaInject -displayName: Migrate deprecated `javax.inject` packages to `jakarta.inject` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -tags: - - inject - - javax - - jakarta - -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.inject - artifactId: jakarta.inject-api - newVersion: 2.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.inject - newPackageName: jakarta.inject - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.inject - oldArtifactId: javax.inject-api - newGroupId: jakarta.inject - newArtifactId: jakarta.inject-api - newVersion: 2.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxInterceptorToJakartaInterceptor -displayName: Migrate deprecated `javax.interceptor` packages to `jakarta.interceptor` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.interceptor - artifactId: jakarta.interceptor-api - newVersion: 2.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.interceptor - newPackageName: jakarta.interceptor - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.interceptor - oldArtifactId: javax.interceptor-api - newGroupId: jakarta.interceptor - newArtifactId: jakarta.interceptor-api - newVersion: 2.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxJmsToJakartaJms -displayName: Migrate deprecated `javax.jms` packages to `jakarta.jms` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.jms - artifactId: jakarta.jms-api - newVersion: 3.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.jms - newPackageName: jakarta.jms - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.jms - oldArtifactId: javax.jms-api - newGroupId: jakarta.jms - newArtifactId: jakarta.jms-api - newVersion: 3.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxJsonToJakartaJson -displayName: Migrate deprecated `javax.json` packages to `jakarta.json` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.json - artifactId: jakarta.json-api - newVersion: 2.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.json - newPackageName: jakarta.json - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.json - oldArtifactId: javax.json-api - newGroupId: jakarta.json - newArtifactId: jakarta.json-api - newVersion: 2.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxJwsToJakartaJws -displayName: Migrate deprecated `javax.jws` packages to `jakarta.jws` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.jws - artifactId: jakarta.jws-api - newVersion: 3.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.jws - newPackageName: jakarta.jws - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.jws - oldArtifactId: javax.jws-api - newGroupId: jakarta.jws - newArtifactId: jakarta.jws-api - newVersion: 3.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxMailToJakartaMail -displayName: Migrate deprecated `javax.mail` packages to `jakarta.mail` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.mail - artifactId: jakarta.mail-api - newVersion: 2.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.mail - newPackageName: jakarta.mail - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.mail - oldArtifactId: javax.mail-api - newGroupId: jakarta.mail - newArtifactId: jakarta.mail-api - newVersion: 2.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxPersistenceToJakartaPersistence -displayName: Migrate deprecated `javax.persistence` packages to `jakarta.persistence` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.persistence - artifactId: jakarta.persistence-api - # TODO upgrade this to 3.x once we have Hibernate ORM 6 - newVersion: 3.0.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.persistence - newPackageName: jakarta.persistence - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.persistence - oldArtifactId: javax.persistence - newGroupId: jakarta.persistence - newArtifactId: jakarta.persistence-api - # TODO upgrade this to 3.x once we have Hibernate ORM 6 - newVersion: 3.0.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxResourceToJakartaResource -displayName: Migrate deprecated `javax.resource` packages to `jakarta.resource` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.resource - artifactId: jakarta.resource-api - newVersion: 2.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.resource - newPackageName: jakarta.resource - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.resource - oldArtifactId: javax.resource-api - newGroupId: jakarta.resource - newArtifactId: jakarta.resource-api - newVersion: 2.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxSecurityToJakartaSecurity -displayName: Migrate deprecated `javax.security.enterprise` packages to `jakarta.security.enterprise` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.security.enterprise - artifactId: jakarta.security.enterprise-api - newVersion: 3.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.security.enterprise - newPackageName: jakarta.security.enterprise - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.security.enterprise - oldArtifactId: javax.security.enterprise-api - newGroupId: jakarta.security.enterprise - newArtifactId: jakarta.security.enterprise-api - newVersion: 3.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxServletToJakartaServlet -displayName: Migrate deprecated `javax.servlet` packages to `jakarta.servlet` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.servlet - artifactId: jakarta.servlet-api - newVersion: 6.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.servlet - newPackageName: jakarta.servlet - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.servlet - oldArtifactId: javax.servlet-api - newGroupId: jakarta.servlet - newArtifactId: jakarta.servlet-api - newVersion: 6.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxTransactionMigrationToJakartaTransaction -displayName: Migrate deprecated `javax.transaction` packages to `jakarta.transaction` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -tags: - - transaction - - javax - - jakarta - -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.transaction - artifactId: jakarta.transaction-api - newVersion: 2.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.transaction - newPackageName: jakarta.transaction - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.transaction - oldArtifactId: javax.transaction-api - newGroupId: jakarta.transaction - newArtifactId: jakarta.transaction-api - newVersion: 2.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxWebsocketToJakartaWebsocket -displayName: Migrate deprecated `javax.websocket` packages to `jakarta.websocket` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.websocket - artifactId: jakarta.websocket-api - newVersion: 2.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.websocket - newPackageName: jakarta.websocket - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.websocket - oldArtifactId: javax.websocket-api - newGroupId: jakarta.websocket - newArtifactId: jakarta.websocket-api - newVersion: 2.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxWsToJakartaWs -displayName: Migrate deprecated `javax.ws` packages to `jakarta.ws` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.ws.rs - artifactId: jakarta.ws.rs-api - newVersion: 3.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.ws - newPackageName: jakarta.ws - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.ws.rs - oldArtifactId: javax.ws.rs-api - newGroupId: jakarta.ws.rs - newArtifactId: jakarta.ws.rs-api - newVersion: 3.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxXmlBindMigrationToJakartaXmlBind -displayName: Migrate deprecated `javax.xml.bind` packages to `jakarta.xml.bind` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -tags: - - jaxb - - javax - - jakarta - -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.xml.bind - artifactId: jakarta.xml.bind-api - newVersion: 4.x - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: org.glassfish.jaxb - artifactId: jaxb-runtime - newVersion: 4.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.xml.bind - newPackageName: jakarta.xml.bind - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.xml.bind - oldArtifactId: jaxb-api - newGroupId: jakarta.xml.bind - newArtifactId: jakarta.xml.bind-api - newVersion: 4.x - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: com.sun.xml.bind - oldArtifactId: jaxb-impl - newGroupId: org.glassfish.jaxb - newArtifactId: jaxb-runtime - newVersion: 4.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxXmlSoapToJakartaXmlSoap -displayName: Migrate deprecated `javax.soap` packages to `jakarta.soap` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.xml.soap - artifactId: jakarta.xml.soap-api - newVersion: 3.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.xml.soap - newPackageName: jakarta.xml.soap - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.xml.soap - oldArtifactId: javax.xml.soap-api - newGroupId: jakarta.xml.soap - newArtifactId: jakarta.xml.soap-api - newVersion: 3.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxXmlWsMigrationToJakartaXmlWs -displayName: Migrate deprecated `javax.xml.ws` packages to `jakarta.xml.ws` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -tags: - - jaxws - - javax - - jakarta - -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: jakarta.xml.ws - artifactId: jakarta.xml.ws-api - newVersion: 4.x - - org.openrewrite.java.ChangePackage: - oldPackageName: javax.xml.ws - newPackageName: jakarta.xml.ws - recursive: true - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: javax.xml.ws - oldArtifactId: jaxws-api - newGroupId: jakarta.xml.ws - newArtifactId: jakarta.xml.ws-api - newVersion: 4.x - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxPersistenceXmlToJakartaPersistenceXml -displayName: Migrate xmlns entries in `persistence.xml` files -description: Java EE has been rebranded to Jakarta EE, necessitating an XML namespace relocation. - -recipeList: - # TODO upgrade for JPA 3.1 - - org.openrewrite.xml.ChangeTagAttribute: - attributeName: name - elementName: //property - oldValue: javax.persistence - newValue: jakarta.persistence - fileMatcher: "**/persistence.xml" - - org.openrewrite.xml.ChangeTagAttribute: - attributeName: version - elementName: persistence - newValue: 3.0 - fileMatcher: "**/persistence.xml" - - org.openrewrite.xml.ChangeTagAttribute: - attributeName: xmlns - elementName: persistence - oldValue: http://xmlns.jcp.org - newValue: https://jakarta.ee - fileMatcher: "**/persistence.xml" - - org.openrewrite.xml.ChangeTagAttribute: - attributeName: xsi:schemaLocation - elementName: persistence - newValue: https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd - fileMatcher: "**/persistence.xml" - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JacksonJavaxToJakarta -displayName: Migrate Jackson from javax to jakarta namespace -description: > - Java EE has been rebranded to Jakarta EE. This recipe replaces existing Jackson dependencies with their counterparts - that are compatible with Jakarta EE. - -recipeList: - # JAXB annotations support - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: com.fasterxml.jackson.module - oldArtifactId: jackson-module-jaxb-annotations - newGroupId: com.fasterxml.jackson.module - newArtifactId: jackson-module-jakarta-xmlbind-annotations - - org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: - oldGroupId: com.fasterxml.jackson.module - oldArtifactId: jackson-module-jaxb-annotations - newGroupId: com.fasterxml.jackson.module - newArtifactId: jackson-module-jakarta-xmlbind-annotations - # JAXRS providers - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: com.fasterxml.jackson.jaxrs - oldArtifactId: jackson-jaxrs-cbor-provider - newGroupId: com.fasterxml.jackson.jakarta.rs - newArtifactId: jackson-jakarta-rs-cbor-provider - - org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: - oldGroupId: com.fasterxml.jackson.jaxrs - oldArtifactId: jackson-jaxrs-cbor-provider - newGroupId: com.fasterxml.jackson.jakarta.rs - newArtifactId: jackson-jakarta-rs-cbor-provider - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: com.fasterxml.jackson.jaxrs - oldArtifactId: jackson-jaxrs-json-provider - newGroupId: com.fasterxml.jackson.jakarta.rs - newArtifactId: jackson-jakarta-rs-json-provider - - org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: - oldGroupId: com.fasterxml.jackson.jaxrs - oldArtifactId: jackson-jaxrs-json-provider - newGroupId: com.fasterxml.jackson.jakarta.rs - newArtifactId: jackson-jakarta-rs-json-provider - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: com.fasterxml.jackson.jaxrs - oldArtifactId: jackson-jaxrs-smile-provider - newGroupId: com.fasterxml.jackson.jakarta.rs - newArtifactId: jackson-jakarta-rs-smile-provider - - org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: - oldGroupId: com.fasterxml.jackson.jaxrs - oldArtifactId: jackson-jaxrs-smile-provider - newGroupId: com.fasterxml.jackson.jakarta.rs - newArtifactId: jackson-jakarta-rs-smile-provider - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: com.fasterxml.jackson.jaxrs - oldArtifactId: jackson-jaxrs-xml-provider - newGroupId: com.fasterxml.jackson.jakarta.rs - newArtifactId: jackson-jakarta-rs-xml-provider - - org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: - oldGroupId: com.fasterxml.jackson.jaxrs - oldArtifactId: jackson-jaxrs-xml-provider - newGroupId: com.fasterxml.jackson.jakarta.rs - newArtifactId: jackson-jakarta-rs-xml-provider - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: com.fasterxml.jackson.jaxrs - oldArtifactId: jackson-jaxrs-yaml-provider - newGroupId: com.fasterxml.jackson.jakarta.rs - newArtifactId: jackson-jakarta-rs-yaml-provider - - org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: - oldGroupId: com.fasterxml.jackson.jaxrs - oldArtifactId: jackson-jaxrs-yaml-provider - newGroupId: com.fasterxml.jackson.jakarta.rs - newArtifactId: jackson-jakarta-rs-yaml-provider - # JSONP datatypes - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: com.fasterxml.jackson.datatype - oldArtifactId: jackson-datatype-jsr353 - newGroupId: com.fasterxml.jackson.datatype - newArtifactId: jackson-datatype-jakarta-jsonp - - org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: - oldGroupId: com.fasterxml.jackson.datatype - oldArtifactId: jackson-datatype-jsr353 - newGroupId: com.fasterxml.jackson.datatype - newArtifactId: jackson-datatype-jakarta-jsonp - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: org.glassfish - oldArtifactId: javax.json - newGroupId: org.eclipse.parsson - newArtifactId: parsson - - org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: - oldGroupId: org.glassfish - oldArtifactId: javax.json - newGroupId: org.eclipse.parsson - newArtifactId: parsson - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: org.glassfish - oldArtifactId: jakarta.json - newGroupId: org.eclipse.parsson - newArtifactId: parsson - - org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: - oldGroupId: org.glassfish - oldArtifactId: jakarta.json - newGroupId: org.eclipse.parsson - newArtifactId: parsson - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: com.fasterxml.jackson.datatype.jsr353.JSR353Module - newFullyQualifiedTypeName: com.fasterxml.jackson.datatype.jsonp.JSONPModule - - org.openrewrite.java.ChangePackage: - oldPackageName: com.fasterxml.jackson.jaxrs - newPackageName: com.fasterxml.jackson.jakarta.rs - recursive: true - ---- -# Currently this recipe is only updating the artifacts to a version that is compatible with J2EE 9. There still may be -# breaking changes to the Rest Assured API that need to be addressed. -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.RestAssuredJavaxToJakarta -displayName: Migrate RestAssured from javax to jakarta namespace by upgrading to a version compatible with J2EE9 -description: > - Java EE has been rebranded to Jakarta EE. This recipe replaces existing RestAssured dependencies with their - counterparts that are compatible with Jakarta EE. -recipeList: - - org.openrewrite.maven.UpgradeDependencyVersion: - groupId: io.rest-assured - artifactId: "*" - newVersion: 5.x -##### -# Additional rules coming from our Quarkus Jakarta migration and feedback from the field -##### ---- -type: specs.openrewrite.org/v1beta/recipe -name: io.quarkus.updates.core.quarkus30.JavaxToJakartaAdditionalMigration -recipeList: - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: org.glassfish - oldArtifactId: jakarta.el - newGroupId: org.glassfish.expressly - newArtifactId: expressly - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: org.hibernate - oldArtifactId: hibernate-core - newGroupId: org.hibernate.orm - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: org.hibernate - oldArtifactId: hibernate-envers - newGroupId: org.hibernate.orm - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: org.hibernate - oldArtifactId: hibernate-jpamodelgen - newGroupId: org.hibernate.orm - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: org.hibernate - oldArtifactId: hibernate-spatial - newGroupId: org.hibernate.orm - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: org.hibernate - oldArtifactId: hibernate-testing - newGroupId: org.hibernate.orm - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: org.hibernate - oldArtifactId: hibernate-micrometer - newGroupId: org.hibernate.orm - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: org.hibernate - oldArtifactId: hibernate-jcache - newGroupId: org.hibernate.orm - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: org.hibernate - oldArtifactId: hibernate-infinispan - newGroupId: org.hibernate.orm - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: org.hibernate - oldArtifactId: hibernate-ehcache - newGroupId: org.hibernate.orm - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: org.hibernate.search - oldArtifactId: hibernate-search-mapper-orm-coordination-outbox-polling - newGroupId: org.hibernate.search - newArtifactId: hibernate-search-mapper-orm-coordination-outbox-polling-jakarta - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: org.hibernate.search - oldArtifactId: hibernate-search-mapper-orm - newGroupId: org.hibernate.search - newArtifactId: hibernate-search-mapper-orm-jakarta - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: org.hibernate - oldArtifactId: quarkus-local-cache - newGroupId: org.hibernate - newArtifactId: quarkus-local-cache-jakarta - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: org.jboss.spec.javax.ws.rs - oldArtifactId: jboss-jaxrs-api_2.1_spec - newGroupId: jakarta.ws.rs - newArtifactId: jakarta.ws.rs-api - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: org.jboss.spec.javax.xml.bind - oldArtifactId: jboss-jaxb-api_2.3_spec - newGroupId: jakarta.xml.bind - newArtifactId: jakarta.xml.bind-api - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: org.jboss.spec.javax.transaction - oldArtifactId: jboss-transaction-api_1.3_spec - newGroupId: jakarta.transaction - newArtifactId: jakarta.transaction-api - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: com.sun.activation - oldArtifactId: jakarta.activation - newGroupId: org.eclipse.angus - newArtifactId: angus-activation - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: com.sun.activation - oldArtifactId: javax.activation - newGroupId: org.eclipse.angus - newArtifactId: angus-activation - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: org.jboss.spec.javax.ejb - oldArtifactId: jboss-ejb-api_3.1_spec - newGroupId: jakarta.ejb - newArtifactId: jakarta.ejb-api - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: org.keycloak - oldArtifactId: keycloak-admin-client - newGroupId: org.keycloak - newArtifactId: keycloak-admin-client-jakarta - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: - oldGroupId: org.keycloak - oldArtifactId: keycloak-admin-client - newGroupId: org.keycloak - newArtifactId: keycloak-admin-client-jakarta -# Commented for now as OpenRewrite doesn't reload the model and adds the exclusions -# even when the artifacts are not transitive dependencies in Quarkus 3 -# - org.openrewrite.maven.ExcludeDependency: -# groupId: com.sun.activation -# artifactId: jakarta.activation -# - org.openrewrite.maven.ExcludeDependency: -# groupId: com.sun.activation -# artifactId: javax.activation -# - org.openrewrite.maven.ExcludeDependency: -# groupId: org.glassfish -# artifactId: jakarta.el - -#### -# Rename javax service files -#### ---- -type: specs.openrewrite.org/v1beta/recipe -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' - fileName: jakarta.ws.rs.ext.Providers - - org.openrewrite.RenameFile: - 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' - fileName: jakarta.ws.rs.sse.SseEventSource$Builder - -##### -# Additional recipes for Quarkus 3 not related to the Jakarta migration -##### ---- -type: specs.openrewrite.org/v1beta/recipe -name: io.quarkus.updates.core.quarkus30.AdditionalChanges -recipeList: - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: org.jboss.resteasy.reactive.server.core.multipart.MultipartFormDataOutput - newFullyQualifiedTypeName: org.jboss.resteasy.reactive.server.multipart.MultipartFormDataOutput - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: org.jboss.resteasy.reactive.server.core.multipart.PartItem - newFullyQualifiedTypeName: org.jboss.resteasy.reactive.server.multipart.PartItem - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: org.jboss.resteasy.reactive.server.core.multipart.FormData.FormValue - newFullyQualifiedTypeName: org.jboss.resteasy.reactive.server.multipart.FormValue - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: io.quarkus.test.junit.NativeImageTest - newFullyQualifiedTypeName: io.quarkus.test.junit.QuarkusIntegrationTest - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: io.quarkus.test.junit.DisabledOnNativeImage - newFullyQualifiedTypeName: io.quarkus.test.junit.DisabledOnIntegrationTest - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: org.jboss.resteasy.reactive.MultipartForm - newFullyQualifiedTypeName: jakarta.ws.rs.BeanParam - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: io.smallrye.reactive.messaging.providers.connectors.InMemoryConnector - newFullyQualifiedTypeName: io.smallrye.reactive.messaging.memory.InMemoryConnector - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: io.quarkus.hibernate.reactive.panache.common.runtime.ReactiveTransactional - newFullyQualifiedTypeName: io.quarkus.hibernate.reactive.panache.common.WithTransaction - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: io.quarkus.arc.Priority - newFullyQualifiedTypeName: jakarta.annotation.Priority - - org.openrewrite.text.FindAndReplace: - find: quarkus-bootstrap-maven-plugin - replace: quarkus-extension-maven-plugin - fileMatcher: '**/pom.xml' - -##### -# Adjust properties in application.properties -##### ---- -type: specs.openrewrite.org/v1beta/recipe -name: io.quarkus.updates.core.quarkus30.ApplicationProperties -applicability: - singleSource: - - org.openrewrite.FindSourceFiles: - filePattern: "**/application*.properties" -recipeList: - - org.openrewrite.properties.ChangePropertyKey: - oldPropertyKey: quarkus.kubernetes.expose - newPropertyKey: quarkus.kubernetes.ingress.expose - - org.openrewrite.properties.ChangePropertyKey: - oldPropertyKey: quarkus.openshift.expose - newPropertyKey: quarkus.openshift.route.expose - - org.openrewrite.properties.ChangePropertyKey: - oldPropertyKey: quarkus.kubernetes.host - newPropertyKey: quarkus.kubernetes.ingress.host - - org.openrewrite.properties.ChangePropertyKey: - oldPropertyKey: quarkus.openshift.host - newPropertyKey: quarkus.openshift.route.host - - org.openrewrite.properties.ChangePropertyKey: - oldPropertyKey: quarkus.kubernetes.group - newPropertyKey: quarkus.kubernetes.part-of - - org.openrewrite.properties.ChangePropertyKey: - oldPropertyKey: quarkus.openshift.group - newPropertyKey: quarkus.openshift.part-of - - org.openrewrite.properties.ChangePropertyKey: - oldPropertyKey: quarkus.jib.labels - newPropertyKey: quarkus.container-image.labels - -##### -# Adjust properties in application.yml -##### ---- -type: specs.openrewrite.org/v1beta/recipe -name: io.quarkus.updates.core.quarkus30.ApplicationYml -applicability: - singleSource: - - org.openrewrite.FindSourceFiles: - filePattern: "**/application*.yml" -recipeList: - - org.openrewrite.yaml.ChangePropertyKey: - oldPropertyKey: quarkus.kubernetes.expose - newPropertyKey: quarkus.kubernetes.ingress.expose - - org.openrewrite.yaml.ChangePropertyKey: - oldPropertyKey: quarkus.openshift.expose - newPropertyKey: quarkus.openshift.route.expose - - org.openrewrite.yaml.ChangePropertyKey: - oldPropertyKey: quarkus.kubernetes.host - newPropertyKey: quarkus.kubernetes.ingress.host - - org.openrewrite.yaml.ChangePropertyKey: - oldPropertyKey: quarkus.openshift.host - newPropertyKey: quarkus.openshift.route.host - - org.openrewrite.yaml.ChangePropertyKey: - oldPropertyKey: quarkus.kubernetes.group - newPropertyKey: quarkus.kubernetes.part-of - - org.openrewrite.yaml.ChangePropertyKey: - oldPropertyKey: quarkus.openshift.group - newPropertyKey: quarkus.openshift.part-of - - org.openrewrite.properties.ChangePropertyKey: - oldPropertyKey: quarkus.jib.labels - newPropertyKey: quarkus.container-image.labels - -##### -# Adjust properties in application.yaml -##### ---- -type: specs.openrewrite.org/v1beta/recipe -name: io.quarkus.updates.core.quarkus30.ApplicationYaml -applicability: - singleSource: - - org.openrewrite.FindSourceFiles: - filePattern: "**/application*.yaml" -recipeList: - - org.openrewrite.yaml.ChangePropertyKey: - oldPropertyKey: quarkus.kubernetes.expose - newPropertyKey: quarkus.kubernetes.ingress.expose - - org.openrewrite.yaml.ChangePropertyKey: - oldPropertyKey: quarkus.openshift.expose - newPropertyKey: quarkus.openshift.route.expose - - org.openrewrite.yaml.ChangePropertyKey: - oldPropertyKey: quarkus.kubernetes.host - newPropertyKey: quarkus.kubernetes.ingress.host - - org.openrewrite.yaml.ChangePropertyKey: - oldPropertyKey: quarkus.openshift.host - newPropertyKey: quarkus.openshift.route.host - - org.openrewrite.yaml.ChangePropertyKey: - oldPropertyKey: quarkus.kubernetes.group - newPropertyKey: quarkus.kubernetes.part-of - - org.openrewrite.yaml.ChangePropertyKey: - oldPropertyKey: quarkus.openshift.group - newPropertyKey: quarkus.openshift.part-of - - org.openrewrite.properties.ChangePropertyKey: - oldPropertyKey: quarkus.jib.labels - newPropertyKey: quarkus.container-image.labels - -##### -# Generated by PropertiesToRecipe.java from jakarta-renames.properties -##### ---- -type: specs.openrewrite.org/v1beta/recipe -name: io.quarkus.updates.core.quarkus30.JavaxToJakartaDocumentationAdoc -applicability: - singleSource: - - org.openrewrite.FindSourceFiles: - filePattern: "**/*.adoc" -recipeList: - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.config. - replace: jakarta.json.bind.config. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.soap. - replace: jakarta.xml.soap. - - org.openrewrite.text.FindAndReplace: - find: javax.security.jacc. - replace: jakarta.security.jacc. - - org.openrewrite.text.FindAndReplace: - find: javax.mail.internet. - replace: jakarta.mail.internet. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api.chunk. - replace: jakarta.batch.api.chunk. - - org.openrewrite.text.FindAndReplace: - find: javax.json.spi. - replace: jakarta.json.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.resource. - replace: jakarta.resource. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.spi.work. - replace: jakarta.resource.spi.work. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.annotation.adapters. - replace: jakarta.xml.bind.annotation.adapters. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.webapp. - replace: jakarta.faces.webapp. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.application. - replace: jakarta.faces.application. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.util. - replace: jakarta.xml.bind.util. - - org.openrewrite.text.FindAndReplace: - find: javax.persistence.criteria. - replace: jakarta.persistence.criteria. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.event. - replace: jakarta.faces.event. - - org.openrewrite.text.FindAndReplace: - find: javax.activation. - replace: jakarta.activation. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.flow.builder. - replace: jakarta.faces.flow.builder. - - org.openrewrite.text.FindAndReplace: - find: javax.websocket. - replace: jakarta.websocket. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.serializer. - replace: jakarta.json.bind.serializer. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject.se. - replace: jakarta.enterprise.inject.se. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.cci. - replace: jakarta.resource.cci. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.spi. - replace: jakarta.validation.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.transaction. - replace: jakarta.transaction. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.attachment. - replace: jakarta.xml.bind.attachment. - - org.openrewrite.text.FindAndReplace: - find: javax.interceptor. - replace: jakarta.interceptor. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.helpers. - replace: jakarta.xml.bind.helpers. - - org.openrewrite.text.FindAndReplace: - find: javax.ejb.embeddable. - replace: jakarta.ejb.embeddable. - - org.openrewrite.text.FindAndReplace: - find: javax.persistence. - replace: jakarta.persistence. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject. - replace: jakarta.enterprise.inject. - - org.openrewrite.text.FindAndReplace: - find: javax.mail.event. - replace: jakarta.mail.event. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.spi.endpoint. - replace: jakarta.resource.spi.endpoint. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component.visit. - replace: jakarta.faces.component.visit. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl. - replace: jakarta.servlet.jsp.jstl. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.el. - replace: jakarta.servlet.jsp.el. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.el. - replace: jakarta.faces.el. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind. - replace: jakarta.xml.bind. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.adapter. - replace: jakarta.json.bind.adapter. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.valueextraction. - replace: jakarta.validation.valueextraction. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.view.facelets. - replace: jakarta.faces.view.facelets. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.flow. - replace: jakarta.faces.flow. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.render. - replace: jakarta.faces.render. - - org.openrewrite.text.FindAndReplace: - find: javax.mail.util. - replace: jakarta.mail.util. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.runtime.context. - replace: jakarta.batch.runtime.context. - - org.openrewrite.text.FindAndReplace: - find: javax.annotation.security. - replace: jakarta.annotation.security. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component. - replace: jakarta.faces.component. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl.fmt. - replace: jakarta.servlet.jsp.jstl.fmt. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.spi. - replace: jakarta.json.bind.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet. - replace: jakarta.servlet. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.operations. - replace: jakarta.batch.operations. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.push. - replace: jakarta.faces.push. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.descriptor. - replace: jakarta.servlet.descriptor. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.handler.soap. - replace: jakarta.xml.ws.handler.soap. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.executable. - replace: jakarta.validation.executable. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component.behavior. - replace: jakarta.faces.component.behavior. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.annotation. - replace: jakarta.xml.bind.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.runtime. - replace: jakarta.batch.runtime. - - org.openrewrite.text.FindAndReplace: - find: javax.json.stream. - replace: jakarta.json.stream. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.annotation. - replace: jakarta.servlet.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.resources. - replace: jakarta.servlet.resources. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.http. - replace: jakarta.servlet.http. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.spi.http. - replace: jakarta.xml.ws.spi.http. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.container. - replace: jakarta.ws.rs.container. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws. - replace: jakarta.xml.ws. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.context.spi. - replace: jakarta.enterprise.context.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.spi. - replace: jakarta.resource.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.validator. - replace: jakarta.faces.validator. - - org.openrewrite.text.FindAndReplace: - find: javax.jws. - replace: jakarta.jws. - - org.openrewrite.text.FindAndReplace: - find: javax.annotation. - replace: jakarta.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component.search. - replace: jakarta.faces.component.search. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind. - replace: jakarta.json.bind. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl.tlv. - replace: jakarta.servlet.jsp.jstl.tlv. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl.core. - replace: jakarta.servlet.jsp.jstl.core. - - org.openrewrite.text.FindAndReplace: - find: javax.decorator. - replace: jakarta.decorator. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.bean. - replace: jakarta.faces.bean. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.sse. - replace: jakarta.ws.rs.sse. - - org.openrewrite.text.FindAndReplace: - find: javax.persistence.metamodel. - replace: jakarta.persistence.metamodel. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.context. - replace: jakarta.enterprise.context. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.spi. - replace: jakarta.xml.ws.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api. - replace: jakarta.batch.api. - - org.openrewrite.text.FindAndReplace: - find: javax.el. - replace: jakarta.el. - - org.openrewrite.text.FindAndReplace: - find: javax.json. - replace: jakarta.json. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api.chunk.listener. - replace: jakarta.batch.api.chunk.listener. - - org.openrewrite.text.FindAndReplace: - find: javax.persistence.spi. - replace: jakarta.persistence.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.handler. - replace: jakarta.xml.ws.handler. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl.sql. - replace: jakarta.servlet.jsp.jstl.sql. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject.literal. - replace: jakarta.enterprise.inject.literal. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.ext. - replace: jakarta.ws.rs.ext. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.constraints. - replace: jakarta.validation.constraints. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.resources. - replace: jakarta.servlet.jsp.resources. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.constraintvalidation. - replace: jakarta.validation.constraintvalidation. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.lifecycle. - replace: jakarta.faces.lifecycle. - - org.openrewrite.text.FindAndReplace: - find: javax.security.auth.message.callback. - replace: jakarta.security.auth.message.callback. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs. - replace: jakarta.ws.rs. - - org.openrewrite.text.FindAndReplace: - find: javax.security.auth.message.config. - replace: jakarta.security.auth.message.config. - - org.openrewrite.text.FindAndReplace: - find: javax.websocket.server. - replace: jakarta.websocket.server. - - org.openrewrite.text.FindAndReplace: - find: javax.security.enterprise.authentication.mechanism.http. - replace: jakarta.security.enterprise.authentication.mechanism.http. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.event. - replace: jakarta.enterprise.event. - - org.openrewrite.text.FindAndReplace: - find: javax.inject. - replace: jakarta.inject. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api.listener. - replace: jakarta.batch.api.listener. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.http. - replace: jakarta.xml.ws.http. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.soap. - replace: jakarta.xml.ws.soap. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject.spi. - replace: jakarta.enterprise.inject.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.faces. - replace: jakarta.faces. - - org.openrewrite.text.FindAndReplace: - find: javax.jms. - replace: jakarta.jms. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.wsaddressing. - replace: jakarta.xml.ws.wsaddressing. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.bootstrap. - replace: jakarta.validation.bootstrap. - - org.openrewrite.text.FindAndReplace: - find: javax.ejb.spi. - replace: jakarta.ejb.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.metadata. - replace: jakarta.validation.metadata. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp. - replace: jakarta.servlet.jsp. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.convert. - replace: jakarta.faces.convert. - - org.openrewrite.text.FindAndReplace: - find: javax.mail. - replace: jakarta.mail. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.concurrent. - replace: jakarta.enterprise.concurrent. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api.partition. - replace: jakarta.batch.api.partition. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component.html. - replace: jakarta.faces.component.html. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject.spi.configurator. - replace: jakarta.enterprise.inject.spi.configurator. - - org.openrewrite.text.FindAndReplace: - find: javax.security.enterprise.credential. - replace: jakarta.security.enterprise.credential. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.context.control. - replace: jakarta.enterprise.context.control. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.annotation. - replace: jakarta.json.bind.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.mail.search. - replace: jakarta.mail.search. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.util. - replace: jakarta.enterprise.util. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.client. - replace: jakarta.ws.rs.client. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.model. - replace: jakarta.faces.model. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.spi.security. - replace: jakarta.resource.spi.security. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.view. - replace: jakarta.faces.view. - - org.openrewrite.text.FindAndReplace: - find: javax.security.enterprise. - replace: jakarta.security.enterprise. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.tagext. - replace: jakarta.servlet.jsp.tagext. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.core. - replace: jakarta.ws.rs.core. - - org.openrewrite.text.FindAndReplace: - find: javax.security.auth.message.module. - replace: jakarta.security.auth.message.module. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.context. - replace: jakarta.faces.context. - - org.openrewrite.text.FindAndReplace: - find: javax.security.auth.message. - replace: jakarta.security.auth.message. - - org.openrewrite.text.FindAndReplace: - find: javax.annotation.sql. - replace: jakarta.annotation.sql. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.annotation. - replace: jakarta.faces.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.groups. - replace: jakarta.validation.groups. - - org.openrewrite.text.FindAndReplace: - find: javax.jws.soap. - replace: jakarta.jws.soap. - - org.openrewrite.text.FindAndReplace: - find: javax.ejb. - replace: jakarta.ejb. - - org.openrewrite.text.FindAndReplace: - find: javax.security.enterprise.identitystore. - replace: jakarta.security.enterprise.identitystore. - - org.openrewrite.text.FindAndReplace: - find: javax.validation. - replace: jakarta.validation. ---- -type: specs.openrewrite.org/v1beta/recipe -name: io.quarkus.updates.core.quarkus30.JavaxToJakartaDocumentationMd -applicability: - singleSource: - - org.openrewrite.FindSourceFiles: - filePattern: "**/*.md" -recipeList: - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.config. - replace: jakarta.json.bind.config. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.soap. - replace: jakarta.xml.soap. - - org.openrewrite.text.FindAndReplace: - find: javax.security.jacc. - replace: jakarta.security.jacc. - - org.openrewrite.text.FindAndReplace: - find: javax.mail.internet. - replace: jakarta.mail.internet. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api.chunk. - replace: jakarta.batch.api.chunk. - - org.openrewrite.text.FindAndReplace: - find: javax.json.spi. - replace: jakarta.json.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.resource. - replace: jakarta.resource. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.spi.work. - replace: jakarta.resource.spi.work. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.annotation.adapters. - replace: jakarta.xml.bind.annotation.adapters. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.webapp. - replace: jakarta.faces.webapp. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.application. - replace: jakarta.faces.application. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.util. - replace: jakarta.xml.bind.util. - - org.openrewrite.text.FindAndReplace: - find: javax.persistence.criteria. - replace: jakarta.persistence.criteria. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.event. - replace: jakarta.faces.event. - - org.openrewrite.text.FindAndReplace: - find: javax.activation. - replace: jakarta.activation. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.flow.builder. - replace: jakarta.faces.flow.builder. - - org.openrewrite.text.FindAndReplace: - find: javax.websocket. - replace: jakarta.websocket. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.serializer. - replace: jakarta.json.bind.serializer. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject.se. - replace: jakarta.enterprise.inject.se. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.cci. - replace: jakarta.resource.cci. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.spi. - replace: jakarta.validation.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.transaction. - replace: jakarta.transaction. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.attachment. - replace: jakarta.xml.bind.attachment. - - org.openrewrite.text.FindAndReplace: - find: javax.interceptor. - replace: jakarta.interceptor. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.helpers. - replace: jakarta.xml.bind.helpers. - - org.openrewrite.text.FindAndReplace: - find: javax.ejb.embeddable. - replace: jakarta.ejb.embeddable. - - org.openrewrite.text.FindAndReplace: - find: javax.persistence. - replace: jakarta.persistence. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject. - replace: jakarta.enterprise.inject. - - org.openrewrite.text.FindAndReplace: - find: javax.mail.event. - replace: jakarta.mail.event. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.spi.endpoint. - replace: jakarta.resource.spi.endpoint. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component.visit. - replace: jakarta.faces.component.visit. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl. - replace: jakarta.servlet.jsp.jstl. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.el. - replace: jakarta.servlet.jsp.el. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.el. - replace: jakarta.faces.el. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind. - replace: jakarta.xml.bind. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.adapter. - replace: jakarta.json.bind.adapter. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.valueextraction. - replace: jakarta.validation.valueextraction. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.view.facelets. - replace: jakarta.faces.view.facelets. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.flow. - replace: jakarta.faces.flow. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.render. - replace: jakarta.faces.render. - - org.openrewrite.text.FindAndReplace: - find: javax.mail.util. - replace: jakarta.mail.util. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.runtime.context. - replace: jakarta.batch.runtime.context. - - org.openrewrite.text.FindAndReplace: - find: javax.annotation.security. - replace: jakarta.annotation.security. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component. - replace: jakarta.faces.component. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl.fmt. - replace: jakarta.servlet.jsp.jstl.fmt. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.spi. - replace: jakarta.json.bind.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet. - replace: jakarta.servlet. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.operations. - replace: jakarta.batch.operations. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.push. - replace: jakarta.faces.push. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.descriptor. - replace: jakarta.servlet.descriptor. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.handler.soap. - replace: jakarta.xml.ws.handler.soap. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.executable. - replace: jakarta.validation.executable. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component.behavior. - replace: jakarta.faces.component.behavior. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.annotation. - replace: jakarta.xml.bind.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.runtime. - replace: jakarta.batch.runtime. - - org.openrewrite.text.FindAndReplace: - find: javax.json.stream. - replace: jakarta.json.stream. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.annotation. - replace: jakarta.servlet.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.resources. - replace: jakarta.servlet.resources. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.http. - replace: jakarta.servlet.http. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.spi.http. - replace: jakarta.xml.ws.spi.http. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.container. - replace: jakarta.ws.rs.container. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws. - replace: jakarta.xml.ws. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.context.spi. - replace: jakarta.enterprise.context.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.spi. - replace: jakarta.resource.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.validator. - replace: jakarta.faces.validator. - - org.openrewrite.text.FindAndReplace: - find: javax.jws. - replace: jakarta.jws. - - org.openrewrite.text.FindAndReplace: - find: javax.annotation. - replace: jakarta.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component.search. - replace: jakarta.faces.component.search. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind. - replace: jakarta.json.bind. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl.tlv. - replace: jakarta.servlet.jsp.jstl.tlv. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl.core. - replace: jakarta.servlet.jsp.jstl.core. - - org.openrewrite.text.FindAndReplace: - find: javax.decorator. - replace: jakarta.decorator. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.bean. - replace: jakarta.faces.bean. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.sse. - replace: jakarta.ws.rs.sse. - - org.openrewrite.text.FindAndReplace: - find: javax.persistence.metamodel. - replace: jakarta.persistence.metamodel. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.context. - replace: jakarta.enterprise.context. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.spi. - replace: jakarta.xml.ws.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api. - replace: jakarta.batch.api. - - org.openrewrite.text.FindAndReplace: - find: javax.el. - replace: jakarta.el. - - org.openrewrite.text.FindAndReplace: - find: javax.json. - replace: jakarta.json. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api.chunk.listener. - replace: jakarta.batch.api.chunk.listener. - - org.openrewrite.text.FindAndReplace: - find: javax.persistence.spi. - replace: jakarta.persistence.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.handler. - replace: jakarta.xml.ws.handler. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl.sql. - replace: jakarta.servlet.jsp.jstl.sql. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject.literal. - replace: jakarta.enterprise.inject.literal. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.ext. - replace: jakarta.ws.rs.ext. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.constraints. - replace: jakarta.validation.constraints. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.resources. - replace: jakarta.servlet.jsp.resources. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.constraintvalidation. - replace: jakarta.validation.constraintvalidation. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.lifecycle. - replace: jakarta.faces.lifecycle. - - org.openrewrite.text.FindAndReplace: - find: javax.security.auth.message.callback. - replace: jakarta.security.auth.message.callback. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs. - replace: jakarta.ws.rs. - - org.openrewrite.text.FindAndReplace: - find: javax.security.auth.message.config. - replace: jakarta.security.auth.message.config. - - org.openrewrite.text.FindAndReplace: - find: javax.websocket.server. - replace: jakarta.websocket.server. - - org.openrewrite.text.FindAndReplace: - find: javax.security.enterprise.authentication.mechanism.http. - replace: jakarta.security.enterprise.authentication.mechanism.http. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.event. - replace: jakarta.enterprise.event. - - org.openrewrite.text.FindAndReplace: - find: javax.inject. - replace: jakarta.inject. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api.listener. - replace: jakarta.batch.api.listener. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.http. - replace: jakarta.xml.ws.http. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.soap. - replace: jakarta.xml.ws.soap. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject.spi. - replace: jakarta.enterprise.inject.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.faces. - replace: jakarta.faces. - - org.openrewrite.text.FindAndReplace: - find: javax.jms. - replace: jakarta.jms. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.wsaddressing. - replace: jakarta.xml.ws.wsaddressing. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.bootstrap. - replace: jakarta.validation.bootstrap. - - org.openrewrite.text.FindAndReplace: - find: javax.ejb.spi. - replace: jakarta.ejb.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.metadata. - replace: jakarta.validation.metadata. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp. - replace: jakarta.servlet.jsp. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.convert. - replace: jakarta.faces.convert. - - org.openrewrite.text.FindAndReplace: - find: javax.mail. - replace: jakarta.mail. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.concurrent. - replace: jakarta.enterprise.concurrent. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api.partition. - replace: jakarta.batch.api.partition. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component.html. - replace: jakarta.faces.component.html. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject.spi.configurator. - replace: jakarta.enterprise.inject.spi.configurator. - - org.openrewrite.text.FindAndReplace: - find: javax.security.enterprise.credential. - replace: jakarta.security.enterprise.credential. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.context.control. - replace: jakarta.enterprise.context.control. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.annotation. - replace: jakarta.json.bind.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.mail.search. - replace: jakarta.mail.search. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.util. - replace: jakarta.enterprise.util. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.client. - replace: jakarta.ws.rs.client. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.model. - replace: jakarta.faces.model. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.spi.security. - replace: jakarta.resource.spi.security. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.view. - replace: jakarta.faces.view. - - org.openrewrite.text.FindAndReplace: - find: javax.security.enterprise. - replace: jakarta.security.enterprise. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.tagext. - replace: jakarta.servlet.jsp.tagext. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.core. - replace: jakarta.ws.rs.core. - - org.openrewrite.text.FindAndReplace: - find: javax.security.auth.message.module. - replace: jakarta.security.auth.message.module. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.context. - replace: jakarta.faces.context. - - org.openrewrite.text.FindAndReplace: - find: javax.security.auth.message. - replace: jakarta.security.auth.message. - - org.openrewrite.text.FindAndReplace: - find: javax.annotation.sql. - replace: jakarta.annotation.sql. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.annotation. - replace: jakarta.faces.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.groups. - replace: jakarta.validation.groups. - - org.openrewrite.text.FindAndReplace: - find: javax.jws.soap. - replace: jakarta.jws.soap. - - org.openrewrite.text.FindAndReplace: - find: javax.ejb. - replace: jakarta.ejb. - - org.openrewrite.text.FindAndReplace: - find: javax.security.enterprise.identitystore. - replace: jakarta.security.enterprise.identitystore. - - org.openrewrite.text.FindAndReplace: - find: javax.validation. - replace: jakarta.validation. ---- -type: specs.openrewrite.org/v1beta/recipe -name: io.quarkus.updates.core.quarkus30.JavaxToJakartaCodestarts -applicability: - singleSource: - - org.openrewrite.FindSourceFiles: - filePattern: "**/src/main/codestarts/**/*.java" -recipeList: - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.config. - replace: jakarta.json.bind.config. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.soap. - replace: jakarta.xml.soap. - - org.openrewrite.text.FindAndReplace: - find: javax.security.jacc. - replace: jakarta.security.jacc. - - org.openrewrite.text.FindAndReplace: - find: javax.mail.internet. - replace: jakarta.mail.internet. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api.chunk. - replace: jakarta.batch.api.chunk. - - org.openrewrite.text.FindAndReplace: - find: javax.json.spi. - replace: jakarta.json.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.resource. - replace: jakarta.resource. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.spi.work. - replace: jakarta.resource.spi.work. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.annotation.adapters. - replace: jakarta.xml.bind.annotation.adapters. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.webapp. - replace: jakarta.faces.webapp. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.application. - replace: jakarta.faces.application. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.util. - replace: jakarta.xml.bind.util. - - org.openrewrite.text.FindAndReplace: - find: javax.persistence.criteria. - replace: jakarta.persistence.criteria. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.event. - replace: jakarta.faces.event. - - org.openrewrite.text.FindAndReplace: - find: javax.activation. - replace: jakarta.activation. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.flow.builder. - replace: jakarta.faces.flow.builder. - - org.openrewrite.text.FindAndReplace: - find: javax.websocket. - replace: jakarta.websocket. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.serializer. - replace: jakarta.json.bind.serializer. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject.se. - replace: jakarta.enterprise.inject.se. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.cci. - replace: jakarta.resource.cci. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.spi. - replace: jakarta.validation.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.transaction. - replace: jakarta.transaction. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.attachment. - replace: jakarta.xml.bind.attachment. - - org.openrewrite.text.FindAndReplace: - find: javax.interceptor. - replace: jakarta.interceptor. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.helpers. - replace: jakarta.xml.bind.helpers. - - org.openrewrite.text.FindAndReplace: - find: javax.ejb.embeddable. - replace: jakarta.ejb.embeddable. - - org.openrewrite.text.FindAndReplace: - find: javax.persistence. - replace: jakarta.persistence. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject. - replace: jakarta.enterprise.inject. - - org.openrewrite.text.FindAndReplace: - find: javax.mail.event. - replace: jakarta.mail.event. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.spi.endpoint. - replace: jakarta.resource.spi.endpoint. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component.visit. - replace: jakarta.faces.component.visit. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl. - replace: jakarta.servlet.jsp.jstl. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.el. - replace: jakarta.servlet.jsp.el. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.el. - replace: jakarta.faces.el. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind. - replace: jakarta.xml.bind. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.adapter. - replace: jakarta.json.bind.adapter. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.valueextraction. - replace: jakarta.validation.valueextraction. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.view.facelets. - replace: jakarta.faces.view.facelets. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.flow. - replace: jakarta.faces.flow. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.render. - replace: jakarta.faces.render. - - org.openrewrite.text.FindAndReplace: - find: javax.mail.util. - replace: jakarta.mail.util. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.runtime.context. - replace: jakarta.batch.runtime.context. - - org.openrewrite.text.FindAndReplace: - find: javax.annotation.security. - replace: jakarta.annotation.security. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component. - replace: jakarta.faces.component. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl.fmt. - replace: jakarta.servlet.jsp.jstl.fmt. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.spi. - replace: jakarta.json.bind.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet. - replace: jakarta.servlet. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.operations. - replace: jakarta.batch.operations. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.push. - replace: jakarta.faces.push. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.descriptor. - replace: jakarta.servlet.descriptor. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.handler.soap. - replace: jakarta.xml.ws.handler.soap. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.executable. - replace: jakarta.validation.executable. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component.behavior. - replace: jakarta.faces.component.behavior. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.annotation. - replace: jakarta.xml.bind.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.runtime. - replace: jakarta.batch.runtime. - - org.openrewrite.text.FindAndReplace: - find: javax.json.stream. - replace: jakarta.json.stream. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.annotation. - replace: jakarta.servlet.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.resources. - replace: jakarta.servlet.resources. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.http. - replace: jakarta.servlet.http. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.spi.http. - replace: jakarta.xml.ws.spi.http. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.container. - replace: jakarta.ws.rs.container. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws. - replace: jakarta.xml.ws. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.context.spi. - replace: jakarta.enterprise.context.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.spi. - replace: jakarta.resource.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.validator. - replace: jakarta.faces.validator. - - org.openrewrite.text.FindAndReplace: - find: javax.jws. - replace: jakarta.jws. - - org.openrewrite.text.FindAndReplace: - find: javax.annotation. - replace: jakarta.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component.search. - replace: jakarta.faces.component.search. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind. - replace: jakarta.json.bind. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl.tlv. - replace: jakarta.servlet.jsp.jstl.tlv. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl.core. - replace: jakarta.servlet.jsp.jstl.core. - - org.openrewrite.text.FindAndReplace: - find: javax.decorator. - replace: jakarta.decorator. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.bean. - replace: jakarta.faces.bean. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.sse. - replace: jakarta.ws.rs.sse. - - org.openrewrite.text.FindAndReplace: - find: javax.persistence.metamodel. - replace: jakarta.persistence.metamodel. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.context. - replace: jakarta.enterprise.context. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.spi. - replace: jakarta.xml.ws.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api. - replace: jakarta.batch.api. - - org.openrewrite.text.FindAndReplace: - find: javax.el. - replace: jakarta.el. - - org.openrewrite.text.FindAndReplace: - find: javax.json. - replace: jakarta.json. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api.chunk.listener. - replace: jakarta.batch.api.chunk.listener. - - org.openrewrite.text.FindAndReplace: - find: javax.persistence.spi. - replace: jakarta.persistence.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.handler. - replace: jakarta.xml.ws.handler. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl.sql. - replace: jakarta.servlet.jsp.jstl.sql. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject.literal. - replace: jakarta.enterprise.inject.literal. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.ext. - replace: jakarta.ws.rs.ext. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.constraints. - replace: jakarta.validation.constraints. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.resources. - replace: jakarta.servlet.jsp.resources. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.constraintvalidation. - replace: jakarta.validation.constraintvalidation. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.lifecycle. - replace: jakarta.faces.lifecycle. - - org.openrewrite.text.FindAndReplace: - find: javax.security.auth.message.callback. - replace: jakarta.security.auth.message.callback. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs. - replace: jakarta.ws.rs. - - org.openrewrite.text.FindAndReplace: - find: javax.security.auth.message.config. - replace: jakarta.security.auth.message.config. - - org.openrewrite.text.FindAndReplace: - find: javax.websocket.server. - replace: jakarta.websocket.server. - - org.openrewrite.text.FindAndReplace: - find: javax.security.enterprise.authentication.mechanism.http. - replace: jakarta.security.enterprise.authentication.mechanism.http. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.event. - replace: jakarta.enterprise.event. - - org.openrewrite.text.FindAndReplace: - find: javax.inject. - replace: jakarta.inject. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api.listener. - replace: jakarta.batch.api.listener. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.http. - replace: jakarta.xml.ws.http. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.soap. - replace: jakarta.xml.ws.soap. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject.spi. - replace: jakarta.enterprise.inject.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.faces. - replace: jakarta.faces. - - org.openrewrite.text.FindAndReplace: - find: javax.jms. - replace: jakarta.jms. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.wsaddressing. - replace: jakarta.xml.ws.wsaddressing. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.bootstrap. - replace: jakarta.validation.bootstrap. - - org.openrewrite.text.FindAndReplace: - find: javax.ejb.spi. - replace: jakarta.ejb.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.metadata. - replace: jakarta.validation.metadata. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp. - replace: jakarta.servlet.jsp. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.convert. - replace: jakarta.faces.convert. - - org.openrewrite.text.FindAndReplace: - find: javax.mail. - replace: jakarta.mail. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.concurrent. - replace: jakarta.enterprise.concurrent. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api.partition. - replace: jakarta.batch.api.partition. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component.html. - replace: jakarta.faces.component.html. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject.spi.configurator. - replace: jakarta.enterprise.inject.spi.configurator. - - org.openrewrite.text.FindAndReplace: - find: javax.security.enterprise.credential. - replace: jakarta.security.enterprise.credential. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.context.control. - replace: jakarta.enterprise.context.control. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.annotation. - replace: jakarta.json.bind.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.mail.search. - replace: jakarta.mail.search. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.util. - replace: jakarta.enterprise.util. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.client. - replace: jakarta.ws.rs.client. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.model. - replace: jakarta.faces.model. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.spi.security. - replace: jakarta.resource.spi.security. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.view. - replace: jakarta.faces.view. - - org.openrewrite.text.FindAndReplace: - find: javax.security.enterprise. - replace: jakarta.security.enterprise. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.tagext. - replace: jakarta.servlet.jsp.tagext. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.core. - replace: jakarta.ws.rs.core. - - org.openrewrite.text.FindAndReplace: - find: javax.security.auth.message.module. - replace: jakarta.security.auth.message.module. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.context. - replace: jakarta.faces.context. - - org.openrewrite.text.FindAndReplace: - find: javax.security.auth.message. - replace: jakarta.security.auth.message. - - org.openrewrite.text.FindAndReplace: - find: javax.annotation.sql. - replace: jakarta.annotation.sql. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.annotation. - replace: jakarta.faces.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.groups. - replace: jakarta.validation.groups. - - org.openrewrite.text.FindAndReplace: - find: javax.jws.soap. - replace: jakarta.jws.soap. - - org.openrewrite.text.FindAndReplace: - find: javax.ejb. - replace: jakarta.ejb. - - org.openrewrite.text.FindAndReplace: - find: javax.security.enterprise.identitystore. - replace: jakarta.security.enterprise.identitystore. - - org.openrewrite.text.FindAndReplace: - find: javax.validation. - replace: jakarta.validation. ---- -type: specs.openrewrite.org/v1beta/recipe -name: io.quarkus.updates.core.quarkus30.JavaxToJakartaCodestartsTests -applicability: - singleSource: - - org.openrewrite.FindSourceFiles: - filePattern: "**/src/test/resources/__snapshots__/**/*.java" -recipeList: - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.config. - replace: jakarta.json.bind.config. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.soap. - replace: jakarta.xml.soap. - - org.openrewrite.text.FindAndReplace: - find: javax.security.jacc. - replace: jakarta.security.jacc. - - org.openrewrite.text.FindAndReplace: - find: javax.mail.internet. - replace: jakarta.mail.internet. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api.chunk. - replace: jakarta.batch.api.chunk. - - org.openrewrite.text.FindAndReplace: - find: javax.json.spi. - replace: jakarta.json.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.resource. - replace: jakarta.resource. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.spi.work. - replace: jakarta.resource.spi.work. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.annotation.adapters. - replace: jakarta.xml.bind.annotation.adapters. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.webapp. - replace: jakarta.faces.webapp. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.application. - replace: jakarta.faces.application. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.util. - replace: jakarta.xml.bind.util. - - org.openrewrite.text.FindAndReplace: - find: javax.persistence.criteria. - replace: jakarta.persistence.criteria. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.event. - replace: jakarta.faces.event. - - org.openrewrite.text.FindAndReplace: - find: javax.activation. - replace: jakarta.activation. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.flow.builder. - replace: jakarta.faces.flow.builder. - - org.openrewrite.text.FindAndReplace: - find: javax.websocket. - replace: jakarta.websocket. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.serializer. - replace: jakarta.json.bind.serializer. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject.se. - replace: jakarta.enterprise.inject.se. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.cci. - replace: jakarta.resource.cci. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.spi. - replace: jakarta.validation.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.transaction. - replace: jakarta.transaction. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.attachment. - replace: jakarta.xml.bind.attachment. - - org.openrewrite.text.FindAndReplace: - find: javax.interceptor. - replace: jakarta.interceptor. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.helpers. - replace: jakarta.xml.bind.helpers. - - org.openrewrite.text.FindAndReplace: - find: javax.ejb.embeddable. - replace: jakarta.ejb.embeddable. - - org.openrewrite.text.FindAndReplace: - find: javax.persistence. - replace: jakarta.persistence. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject. - replace: jakarta.enterprise.inject. - - org.openrewrite.text.FindAndReplace: - find: javax.mail.event. - replace: jakarta.mail.event. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.spi.endpoint. - replace: jakarta.resource.spi.endpoint. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component.visit. - replace: jakarta.faces.component.visit. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl. - replace: jakarta.servlet.jsp.jstl. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.el. - replace: jakarta.servlet.jsp.el. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.el. - replace: jakarta.faces.el. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind. - replace: jakarta.xml.bind. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.adapter. - replace: jakarta.json.bind.adapter. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.valueextraction. - replace: jakarta.validation.valueextraction. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.view.facelets. - replace: jakarta.faces.view.facelets. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.flow. - replace: jakarta.faces.flow. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.render. - replace: jakarta.faces.render. - - org.openrewrite.text.FindAndReplace: - find: javax.mail.util. - replace: jakarta.mail.util. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.runtime.context. - replace: jakarta.batch.runtime.context. - - org.openrewrite.text.FindAndReplace: - find: javax.annotation.security. - replace: jakarta.annotation.security. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component. - replace: jakarta.faces.component. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl.fmt. - replace: jakarta.servlet.jsp.jstl.fmt. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.spi. - replace: jakarta.json.bind.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet. - replace: jakarta.servlet. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.operations. - replace: jakarta.batch.operations. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.push. - replace: jakarta.faces.push. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.descriptor. - replace: jakarta.servlet.descriptor. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.handler.soap. - replace: jakarta.xml.ws.handler.soap. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.executable. - replace: jakarta.validation.executable. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component.behavior. - replace: jakarta.faces.component.behavior. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.annotation. - replace: jakarta.xml.bind.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.runtime. - replace: jakarta.batch.runtime. - - org.openrewrite.text.FindAndReplace: - find: javax.json.stream. - replace: jakarta.json.stream. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.annotation. - replace: jakarta.servlet.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.resources. - replace: jakarta.servlet.resources. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.http. - replace: jakarta.servlet.http. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.spi.http. - replace: jakarta.xml.ws.spi.http. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.container. - replace: jakarta.ws.rs.container. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws. - replace: jakarta.xml.ws. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.context.spi. - replace: jakarta.enterprise.context.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.spi. - replace: jakarta.resource.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.validator. - replace: jakarta.faces.validator. - - org.openrewrite.text.FindAndReplace: - find: javax.jws. - replace: jakarta.jws. - - org.openrewrite.text.FindAndReplace: - find: javax.annotation. - replace: jakarta.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component.search. - replace: jakarta.faces.component.search. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind. - replace: jakarta.json.bind. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl.tlv. - replace: jakarta.servlet.jsp.jstl.tlv. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl.core. - replace: jakarta.servlet.jsp.jstl.core. - - org.openrewrite.text.FindAndReplace: - find: javax.decorator. - replace: jakarta.decorator. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.bean. - replace: jakarta.faces.bean. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.sse. - replace: jakarta.ws.rs.sse. - - org.openrewrite.text.FindAndReplace: - find: javax.persistence.metamodel. - replace: jakarta.persistence.metamodel. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.context. - replace: jakarta.enterprise.context. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.spi. - replace: jakarta.xml.ws.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api. - replace: jakarta.batch.api. - - org.openrewrite.text.FindAndReplace: - find: javax.el. - replace: jakarta.el. - - org.openrewrite.text.FindAndReplace: - find: javax.json. - replace: jakarta.json. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api.chunk.listener. - replace: jakarta.batch.api.chunk.listener. - - org.openrewrite.text.FindAndReplace: - find: javax.persistence.spi. - replace: jakarta.persistence.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.handler. - replace: jakarta.xml.ws.handler. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl.sql. - replace: jakarta.servlet.jsp.jstl.sql. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject.literal. - replace: jakarta.enterprise.inject.literal. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.ext. - replace: jakarta.ws.rs.ext. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.constraints. - replace: jakarta.validation.constraints. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.resources. - replace: jakarta.servlet.jsp.resources. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.constraintvalidation. - replace: jakarta.validation.constraintvalidation. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.lifecycle. - replace: jakarta.faces.lifecycle. - - org.openrewrite.text.FindAndReplace: - find: javax.security.auth.message.callback. - replace: jakarta.security.auth.message.callback. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs. - replace: jakarta.ws.rs. - - org.openrewrite.text.FindAndReplace: - find: javax.security.auth.message.config. - replace: jakarta.security.auth.message.config. - - org.openrewrite.text.FindAndReplace: - find: javax.websocket.server. - replace: jakarta.websocket.server. - - org.openrewrite.text.FindAndReplace: - find: javax.security.enterprise.authentication.mechanism.http. - replace: jakarta.security.enterprise.authentication.mechanism.http. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.event. - replace: jakarta.enterprise.event. - - org.openrewrite.text.FindAndReplace: - find: javax.inject. - replace: jakarta.inject. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api.listener. - replace: jakarta.batch.api.listener. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.http. - replace: jakarta.xml.ws.http. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.soap. - replace: jakarta.xml.ws.soap. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject.spi. - replace: jakarta.enterprise.inject.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.faces. - replace: jakarta.faces. - - org.openrewrite.text.FindAndReplace: - find: javax.jms. - replace: jakarta.jms. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.wsaddressing. - replace: jakarta.xml.ws.wsaddressing. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.bootstrap. - replace: jakarta.validation.bootstrap. - - org.openrewrite.text.FindAndReplace: - find: javax.ejb.spi. - replace: jakarta.ejb.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.metadata. - replace: jakarta.validation.metadata. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp. - replace: jakarta.servlet.jsp. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.convert. - replace: jakarta.faces.convert. - - org.openrewrite.text.FindAndReplace: - find: javax.mail. - replace: jakarta.mail. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.concurrent. - replace: jakarta.enterprise.concurrent. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api.partition. - replace: jakarta.batch.api.partition. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component.html. - replace: jakarta.faces.component.html. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject.spi.configurator. - replace: jakarta.enterprise.inject.spi.configurator. - - org.openrewrite.text.FindAndReplace: - find: javax.security.enterprise.credential. - replace: jakarta.security.enterprise.credential. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.context.control. - replace: jakarta.enterprise.context.control. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.annotation. - replace: jakarta.json.bind.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.mail.search. - replace: jakarta.mail.search. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.util. - replace: jakarta.enterprise.util. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.client. - replace: jakarta.ws.rs.client. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.model. - replace: jakarta.faces.model. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.spi.security. - replace: jakarta.resource.spi.security. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.view. - replace: jakarta.faces.view. - - org.openrewrite.text.FindAndReplace: - find: javax.security.enterprise. - replace: jakarta.security.enterprise. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.tagext. - replace: jakarta.servlet.jsp.tagext. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.core. - replace: jakarta.ws.rs.core. - - org.openrewrite.text.FindAndReplace: - find: javax.security.auth.message.module. - replace: jakarta.security.auth.message.module. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.context. - replace: jakarta.faces.context. - - org.openrewrite.text.FindAndReplace: - find: javax.security.auth.message. - replace: jakarta.security.auth.message. - - org.openrewrite.text.FindAndReplace: - find: javax.annotation.sql. - replace: jakarta.annotation.sql. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.annotation. - replace: jakarta.faces.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.groups. - replace: jakarta.validation.groups. - - org.openrewrite.text.FindAndReplace: - find: javax.jws.soap. - replace: jakarta.jws.soap. - - org.openrewrite.text.FindAndReplace: - find: javax.ejb. - replace: jakarta.ejb. - - org.openrewrite.text.FindAndReplace: - find: javax.security.enterprise.identitystore. - replace: jakarta.security.enterprise.identitystore. - - org.openrewrite.text.FindAndReplace: - find: javax.validation. - replace: jakarta.validation. ---- -type: specs.openrewrite.org/v1beta/recipe -name: io.quarkus.updates.core.quarkus30.JavaxToJakartaKotlin -applicability: - singleSource: - - org.openrewrite.FindSourceFiles: - filePattern: "**/*.kt" -recipeList: - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.config. - replace: jakarta.json.bind.config. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.soap. - replace: jakarta.xml.soap. - - org.openrewrite.text.FindAndReplace: - find: javax.security.jacc. - replace: jakarta.security.jacc. - - org.openrewrite.text.FindAndReplace: - find: javax.mail.internet. - replace: jakarta.mail.internet. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api.chunk. - replace: jakarta.batch.api.chunk. - - org.openrewrite.text.FindAndReplace: - find: javax.json.spi. - replace: jakarta.json.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.resource. - replace: jakarta.resource. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.spi.work. - replace: jakarta.resource.spi.work. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.annotation.adapters. - replace: jakarta.xml.bind.annotation.adapters. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.webapp. - replace: jakarta.faces.webapp. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.application. - replace: jakarta.faces.application. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.util. - replace: jakarta.xml.bind.util. - - org.openrewrite.text.FindAndReplace: - find: javax.persistence.criteria. - replace: jakarta.persistence.criteria. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.event. - replace: jakarta.faces.event. - - org.openrewrite.text.FindAndReplace: - find: javax.activation. - replace: jakarta.activation. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.flow.builder. - replace: jakarta.faces.flow.builder. - - org.openrewrite.text.FindAndReplace: - find: javax.websocket. - replace: jakarta.websocket. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.serializer. - replace: jakarta.json.bind.serializer. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject.se. - replace: jakarta.enterprise.inject.se. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.cci. - replace: jakarta.resource.cci. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.spi. - replace: jakarta.validation.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.transaction. - replace: jakarta.transaction. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.attachment. - replace: jakarta.xml.bind.attachment. - - org.openrewrite.text.FindAndReplace: - find: javax.interceptor. - replace: jakarta.interceptor. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.helpers. - replace: jakarta.xml.bind.helpers. - - org.openrewrite.text.FindAndReplace: - find: javax.ejb.embeddable. - replace: jakarta.ejb.embeddable. - - org.openrewrite.text.FindAndReplace: - find: javax.persistence. - replace: jakarta.persistence. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject. - replace: jakarta.enterprise.inject. - - org.openrewrite.text.FindAndReplace: - find: javax.mail.event. - replace: jakarta.mail.event. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.spi.endpoint. - replace: jakarta.resource.spi.endpoint. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component.visit. - replace: jakarta.faces.component.visit. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl. - replace: jakarta.servlet.jsp.jstl. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.el. - replace: jakarta.servlet.jsp.el. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.el. - replace: jakarta.faces.el. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind. - replace: jakarta.xml.bind. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.adapter. - replace: jakarta.json.bind.adapter. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.valueextraction. - replace: jakarta.validation.valueextraction. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.view.facelets. - replace: jakarta.faces.view.facelets. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.flow. - replace: jakarta.faces.flow. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.render. - replace: jakarta.faces.render. - - org.openrewrite.text.FindAndReplace: - find: javax.mail.util. - replace: jakarta.mail.util. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.runtime.context. - replace: jakarta.batch.runtime.context. - - org.openrewrite.text.FindAndReplace: - find: javax.annotation.security. - replace: jakarta.annotation.security. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component. - replace: jakarta.faces.component. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl.fmt. - replace: jakarta.servlet.jsp.jstl.fmt. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.spi. - replace: jakarta.json.bind.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet. - replace: jakarta.servlet. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.operations. - replace: jakarta.batch.operations. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.push. - replace: jakarta.faces.push. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.descriptor. - replace: jakarta.servlet.descriptor. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.handler.soap. - replace: jakarta.xml.ws.handler.soap. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.executable. - replace: jakarta.validation.executable. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component.behavior. - replace: jakarta.faces.component.behavior. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.bind.annotation. - replace: jakarta.xml.bind.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.runtime. - replace: jakarta.batch.runtime. - - org.openrewrite.text.FindAndReplace: - find: javax.json.stream. - replace: jakarta.json.stream. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.annotation. - replace: jakarta.servlet.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.resources. - replace: jakarta.servlet.resources. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.http. - replace: jakarta.servlet.http. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.spi.http. - replace: jakarta.xml.ws.spi.http. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.container. - replace: jakarta.ws.rs.container. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws. - replace: jakarta.xml.ws. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.context.spi. - replace: jakarta.enterprise.context.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.spi. - replace: jakarta.resource.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.validator. - replace: jakarta.faces.validator. - - org.openrewrite.text.FindAndReplace: - find: javax.jws. - replace: jakarta.jws. - - org.openrewrite.text.FindAndReplace: - find: javax.annotation. - replace: jakarta.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component.search. - replace: jakarta.faces.component.search. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind. - replace: jakarta.json.bind. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl.tlv. - replace: jakarta.servlet.jsp.jstl.tlv. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl.core. - replace: jakarta.servlet.jsp.jstl.core. - - org.openrewrite.text.FindAndReplace: - find: javax.decorator. - replace: jakarta.decorator. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.bean. - replace: jakarta.faces.bean. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.sse. - replace: jakarta.ws.rs.sse. - - org.openrewrite.text.FindAndReplace: - find: javax.persistence.metamodel. - replace: jakarta.persistence.metamodel. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.context. - replace: jakarta.enterprise.context. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.spi. - replace: jakarta.xml.ws.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api. - replace: jakarta.batch.api. - - org.openrewrite.text.FindAndReplace: - find: javax.el. - replace: jakarta.el. - - org.openrewrite.text.FindAndReplace: - find: javax.json. - replace: jakarta.json. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api.chunk.listener. - replace: jakarta.batch.api.chunk.listener. - - org.openrewrite.text.FindAndReplace: - find: javax.persistence.spi. - replace: jakarta.persistence.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.handler. - replace: jakarta.xml.ws.handler. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.jstl.sql. - replace: jakarta.servlet.jsp.jstl.sql. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject.literal. - replace: jakarta.enterprise.inject.literal. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.ext. - replace: jakarta.ws.rs.ext. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.constraints. - replace: jakarta.validation.constraints. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.resources. - replace: jakarta.servlet.jsp.resources. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.constraintvalidation. - replace: jakarta.validation.constraintvalidation. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.lifecycle. - replace: jakarta.faces.lifecycle. - - org.openrewrite.text.FindAndReplace: - find: javax.security.auth.message.callback. - replace: jakarta.security.auth.message.callback. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs. - replace: jakarta.ws.rs. - - org.openrewrite.text.FindAndReplace: - find: javax.security.auth.message.config. - replace: jakarta.security.auth.message.config. - - org.openrewrite.text.FindAndReplace: - find: javax.websocket.server. - replace: jakarta.websocket.server. - - org.openrewrite.text.FindAndReplace: - find: javax.security.enterprise.authentication.mechanism.http. - replace: jakarta.security.enterprise.authentication.mechanism.http. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.event. - replace: jakarta.enterprise.event. - - org.openrewrite.text.FindAndReplace: - find: javax.inject. - replace: jakarta.inject. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api.listener. - replace: jakarta.batch.api.listener. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.http. - replace: jakarta.xml.ws.http. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.soap. - replace: jakarta.xml.ws.soap. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject.spi. - replace: jakarta.enterprise.inject.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.faces. - replace: jakarta.faces. - - org.openrewrite.text.FindAndReplace: - find: javax.jms. - replace: jakarta.jms. - - org.openrewrite.text.FindAndReplace: - find: javax.xml.ws.wsaddressing. - replace: jakarta.xml.ws.wsaddressing. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.bootstrap. - replace: jakarta.validation.bootstrap. - - org.openrewrite.text.FindAndReplace: - find: javax.ejb.spi. - replace: jakarta.ejb.spi. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.metadata. - replace: jakarta.validation.metadata. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp. - replace: jakarta.servlet.jsp. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.convert. - replace: jakarta.faces.convert. - - org.openrewrite.text.FindAndReplace: - find: javax.mail. - replace: jakarta.mail. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.concurrent. - replace: jakarta.enterprise.concurrent. - - org.openrewrite.text.FindAndReplace: - find: javax.batch.api.partition. - replace: jakarta.batch.api.partition. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.component.html. - replace: jakarta.faces.component.html. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.inject.spi.configurator. - replace: jakarta.enterprise.inject.spi.configurator. - - org.openrewrite.text.FindAndReplace: - find: javax.security.enterprise.credential. - replace: jakarta.security.enterprise.credential. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.context.control. - replace: jakarta.enterprise.context.control. - - org.openrewrite.text.FindAndReplace: - find: javax.json.bind.annotation. - replace: jakarta.json.bind.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.mail.search. - replace: jakarta.mail.search. - - org.openrewrite.text.FindAndReplace: - find: javax.enterprise.util. - replace: jakarta.enterprise.util. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.client. - replace: jakarta.ws.rs.client. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.model. - replace: jakarta.faces.model. - - org.openrewrite.text.FindAndReplace: - find: javax.resource.spi.security. - replace: jakarta.resource.spi.security. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.view. - replace: jakarta.faces.view. - - org.openrewrite.text.FindAndReplace: - find: javax.security.enterprise. - replace: jakarta.security.enterprise. - - org.openrewrite.text.FindAndReplace: - find: javax.servlet.jsp.tagext. - replace: jakarta.servlet.jsp.tagext. - - org.openrewrite.text.FindAndReplace: - find: javax.ws.rs.core. - replace: jakarta.ws.rs.core. - - org.openrewrite.text.FindAndReplace: - find: javax.security.auth.message.module. - replace: jakarta.security.auth.message.module. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.context. - replace: jakarta.faces.context. - - org.openrewrite.text.FindAndReplace: - find: javax.security.auth.message. - replace: jakarta.security.auth.message. - - org.openrewrite.text.FindAndReplace: - find: javax.annotation.sql. - replace: jakarta.annotation.sql. - - org.openrewrite.text.FindAndReplace: - find: javax.faces.annotation. - replace: jakarta.faces.annotation. - - org.openrewrite.text.FindAndReplace: - find: javax.validation.groups. - replace: jakarta.validation.groups. - - org.openrewrite.text.FindAndReplace: - find: javax.jws.soap. - replace: jakarta.jws.soap. - - org.openrewrite.text.FindAndReplace: - find: javax.ejb. - replace: jakarta.ejb. - - org.openrewrite.text.FindAndReplace: - find: javax.security.enterprise.identitystore. - replace: jakarta.security.enterprise.identitystore. - - org.openrewrite.text.FindAndReplace: - find: javax.validation. - replace: jakarta.validation. diff --git a/.ci/environments/quarkus-3/quarkus3.yml b/.ci/environments/quarkus-3/quarkus3.yml deleted file mode 100644 index f3f31c1638..0000000000 --- a/.ci/environments/quarkus-3/quarkus3.yml +++ /dev/null @@ -1,4656 +0,0 @@ -name: io.quarkus.openrewrite.Quarkus -description: Update Quarkus version and refactor imports and resources if needed. -type: specs.openrewrite.org/v1beta/recipe -recipeList: -- org.openrewrite.maven.ChangePropertyValue: { - newValue: 3.0.0.Final, - key: quarkus-plugin.version - } -- org.openrewrite.maven.ChangePropertyValue: { - newValue: 3.0.0.Final, - key: quarkus.platform.version - } -- org.openrewrite.maven.ChangePropertyValue: { - newValue: 9.44.0-SNAPSHOT, - key: version.org.drools - } -- org.openrewrite.maven.ChangePropertyValue: { - newValue: 3.0.0-SNAPSHOT, - key: version.org.kie.kogito - } -- org.openrewrite.maven.ChangePropertyValue: { - newValue: 3.0.0-SNAPSHOT, - key: kogito.bom.version - } -- org.kie.kogito.Quarkus3Migration -- org.kie.ManagedDependencies -- io.quarkus.updates.core.quarkus30.UpgradeQuarkiverse -- org.openrewrite.java.migrate.jakarta.JavaxActivationMigrationToJakartaActivation -- org.openrewrite.java.migrate.jakarta.JavaxAnnotationMigrationToJakartaAnnotation -- org.openrewrite.java.migrate.jakarta.ChangeJavaxAnnotationToJakarta -- org.openrewrite.java.migrate.jakarta.JavaxAnnotationPackageToJakarta -- org.openrewrite.java.migrate.jakarta.JavaxAnnotationSecurityPackageToJakarta -- org.openrewrite.java.migrate.jakarta.JavaxAnnotationSqlPackageToJakarta -- org.openrewrite.java.migrate.jakarta.JavaxAuthenticationMigrationToJakartaAuthentication -- org.openrewrite.java.migrate.jakarta.JavaxAuthorizationMigrationToJakartaAuthorization -- org.openrewrite.java.migrate.jakarta.JavaxBatchMigrationToJakartaBatch -- org.openrewrite.java.migrate.jakarta.JavaxValidationMigrationToJakartaValidation -- org.openrewrite.java.migrate.jakarta.JavaxDecoratorToJakartaDecorator -- org.openrewrite.java.migrate.jakarta.JavaxEjbToJakartaEjb -- org.openrewrite.java.migrate.jakarta.JavaxElToJakartaEl -- org.openrewrite.java.migrate.jakarta.JavaxEnterpriseToJakartaEnterprise -- org.openrewrite.java.migrate.jakarta.JavaxFacesToJakartaFaces -- org.openrewrite.java.migrate.jakarta.JavaxInjectMigrationToJakartaInject -- org.openrewrite.java.migrate.jakarta.JavaxInterceptorToJakartaInterceptor -- org.openrewrite.java.migrate.jakarta.JavaxJmsToJakartaJms -- org.openrewrite.java.migrate.jakarta.JavaxJsonToJakartaJson -- org.openrewrite.java.migrate.jakarta.JavaxJwsToJakartaJws -- org.openrewrite.java.migrate.jakarta.JavaxMailToJakartaMail -- org.openrewrite.java.migrate.jakarta.JavaxPersistenceToJakartaPersistence -- org.openrewrite.java.migrate.jakarta.JavaxResourceToJakartaResource -- org.openrewrite.java.migrate.jakarta.JavaxSecurityToJakartaSecurity -- org.openrewrite.java.migrate.jakarta.JavaxServletToJakartaServlet -- org.openrewrite.java.migrate.jakarta.JavaxTransactionMigrationToJakartaTransaction -- org.openrewrite.java.migrate.jakarta.JavaxWebsocketToJakartaWebsocket -- org.openrewrite.java.migrate.jakarta.JavaxWsToJakartaWs -- org.openrewrite.java.migrate.jakarta.JavaxXmlBindMigrationToJakartaXmlBind -- org.openrewrite.java.migrate.jakarta.JavaxXmlSoapToJakartaXmlSoap -- org.openrewrite.java.migrate.jakarta.JavaxXmlWsMigrationToJakartaXmlWs -- org.openrewrite.java.migrate.jakarta.JavaxPersistenceXmlToJakartaPersistenceXml -- org.openrewrite.java.migrate.jakarta.JacksonJavaxToJakarta -- org.openrewrite.java.migrate.jakarta.RestAssuredJavaxToJakarta -- io.quarkus.updates.core.quarkus30.JavaxToJakartaAdditionalMigration -- io.quarkus.updates.core.quarkus30.RenameJavaxServiceFiles -- io.quarkus.updates.core.quarkus30.AdditionalChanges -- io.quarkus.updates.core.quarkus30.ApplicationProperties -- io.quarkus.updates.core.quarkus30.ApplicationYml -- io.quarkus.updates.core.quarkus30.ApplicationYaml -- io.quarkus.updates.core.quarkus30.JavaxToJakartaDocumentationAdoc -- io.quarkus.updates.core.quarkus30.JavaxToJakartaDocumentationMd -- io.quarkus.updates.core.quarkus30.JavaxToJakartaCodestarts -- io.quarkus.updates.core.quarkus30.JavaxToJakartaCodestartsTests -- io.quarkus.updates.core.quarkus30.JavaxToJakartaKotlin -displayName: Migrate quarkus project to a new version -tags: [ - quarkus -] ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.kie.kogito.Quarkus3Migration -displayName: All Quarkus 3 Migration for Kogito Runtimes project -recipeList: -- org.openrewrite.maven.ChangePropertyValue: { - key: version.org.apache.camel.quarkus, - newValue: 3.0.0-M1 - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: org.springdoc, - oldArtifactId: springdoc-openapi-ui, - newGroupId: org.springdoc, - newArtifactId: springdoc-openapi-starter-webmvc-ui - } ---- -displayName: Update Managed Dependencies -recipeList: -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.activation, - oldArtifactId: javax.activation-api, - newGroupId: jakarta.activation, - newArtifactId: jakarta.activation-api, - newVersion: 2.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.annotation, - oldArtifactId: javax.annotation-api, - newGroupId: jakarta.annotation, - newArtifactId: jakarta.annotation-api, - newVersion: 2.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.security.auth.message, - oldArtifactId: javax.security.auth.message-api, - newGroupId: jakarta.authentication, - newArtifactId: jakarta.authentication-api, - newVersion: 2.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.security.jacc, - oldArtifactId: javax.security.jacc-api, - newGroupId: jakarta.authorization, - newArtifactId: jakarta.authorization-api, - newVersion: 2.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.batch, - oldArtifactId: javax.batch-api, - newGroupId: jakarta.batch, - newArtifactId: jakarta.batch-api, - newVersion: 2.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.validation, - oldArtifactId: validation-api, - newGroupId: jakarta.validation, - newArtifactId: jakarta.validation-api, - newVersion: 3.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.enterprise, - oldArtifactId: cdi-api, - newGroupId: jakarta.enterprise, - newArtifactId: jakarta.enterprise.cdi-api, - newVersion: 4.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.ejb, - oldArtifactId: javax.ejb-api, - newGroupId: jakarta.ejb, - newArtifactId: jakarta.ejb-api, - newVersion: 4.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.el, - oldArtifactId: javax.el-api, - newGroupId: jakarta.el, - newArtifactId: jakarta.el-api, - newVersion: 4.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.enterprise, - oldArtifactId: cdi-api, - newGroupId: jakarta.enterprise, - newArtifactId: jakarta.enterprise.cdi-api, - newVersion: 4.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.faces, - oldArtifactId: javax.faces-api, - newGroupId: jakarta.faces, - newArtifactId: jakarta.faces-api, - newVersion: 4.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - groupId: org.glassfish, - artifactId: javax.faces, - newGroupId: org.glassfish, - newArtifactId: jakarta.faces, - newVersion: 4.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.inject, - oldArtifactId: javax.inject-api, - newGroupId: jakarta.inject, - newArtifactId: jakarta.inject-api, - newVersion: 2.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.interceptor, - oldArtifactId: javax.interceptor-api, - newGroupId: jakarta.interceptor, - newArtifactId: jakarta.interceptor-api, - newVersion: 2.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.jms, - oldArtifactId: javax.jms-api, - newGroupId: jakarta.jms, - newArtifactId: jakarta.jms-api, - newVersion: 3.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.json, - oldArtifactId: javax.json-api, - newGroupId: jakarta.json, - newArtifactId: jakarta.json-api, - newVersion: 2.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.jws, - oldArtifactId: javax.jws-api, - newGroupId: jakarta.jws, - newArtifactId: jakarta.jws-api, - newVersion: 3.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.mail, - oldArtifactId: javax.mail-api, - newGroupId: jakarta.mail, - newArtifactId: jakarta.mail-api, - newVersion: 2.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.persistence, - oldArtifactId: javax.persistence, - newGroupId: jakarta.persistence, - newArtifactId: jakarta.persistence-api, - newVersion: 3.0.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.resource, - oldArtifactId: javax.resource-api, - newGroupId: jakarta.resource, - newArtifactId: jakarta.resource-api, - newVersion: 2.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.security.enterprise, - oldArtifactId: javax.security.enterprise-api, - newGroupId: jakarta.security.enterprise, - newArtifactId: jakarta.security.enterprise-api, - newVersion: 3.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.servlet, - oldArtifactId: javax.servlet-api, - newGroupId: jakarta.servlet, - newArtifactId: jakarta.servlet-api, - newVersion: 6.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.transaction, - oldArtifactId: javax.transaction-api, - newGroupId: jakarta.transaction, - newArtifactId: jakarta.transaction-api, - newVersion: 2.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.websocket, - oldArtifactId: javax.websocket-api, - newGroupId: jakarta.websocket, - newArtifactId: jakarta.websocket-api, - newVersion: 2.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.ws.rs, - oldArtifactId: javax.ws.rs-api, - newGroupId: jakarta.ws.rs, - newArtifactId: jakarta.ws.rs-api, - newVersion: 3.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.xml.bind, - oldArtifactId: jaxb-api, - newGroupId: jakarta.xml.bind, - newArtifactId: jakarta.xml.bind-api, - newVersion: 4.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: com.sun.xml.bind, - oldArtifactId: jaxb-impl, - newGroupId: org.glassfish.jaxb, - newArtifactId: jaxb-runtime, - newVersion: 4.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.xml.soap, - oldArtifactId: javax.xml.soap-api, - newGroupId: jakarta.xml.soap, - newArtifactId: jakarta.xml.soap-api, - newVersion: 3.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: javax.xml.ws, - oldArtifactId: jaxws-api, - newGroupId: jakarta.xml.ws, - newArtifactId: jakarta.xml.ws-api, - newVersion: 4.x - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: com.fasterxml.jackson.module, - oldArtifactId: jackson-module-jaxb-annotations, - newGroupId: com.fasterxml.jackson.module, - newArtifactId: jackson-module-jakarta-xmlbind-annotations - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: com.fasterxml.jackson.jaxrs, - oldArtifactId: jackson-jaxrs-cbor-provider, - newGroupId: com.fasterxml.jackson.jakarta.rs, - newArtifactId: jackson-jakarta-rs-cbor-provider - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: com.fasterxml.jackson.jaxrs, - oldArtifactId: jackson-jaxrs-json-provider, - newGroupId: com.fasterxml.jackson.jakarta.rs, - newArtifactId: jackson-jakarta-rs-json-provider - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: com.fasterxml.jackson.jaxrs, - oldArtifactId: jackson-jaxrs-smile-provider, - newGroupId: com.fasterxml.jackson.jakarta.rs, - newArtifactId: jackson-jakarta-rs-smile-provider - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: com.fasterxml.jackson.jaxrs, - oldArtifactId: jackson-jaxrs-xml-provider, - newGroupId: com.fasterxml.jackson.jakarta.rs, - newArtifactId: jackson-jakarta-rs-xml-provider - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: com.fasterxml.jackson.jaxrs, - oldArtifactId: jackson-jaxrs-yaml-provider, - newGroupId: com.fasterxml.jackson.jakarta.rs, - newArtifactId: jackson-jakarta-rs-yaml-provider - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: com.fasterxml.jackson.datatype, - oldArtifactId: jackson-datatype-jsr353, - newGroupId: com.fasterxml.jackson.datatype, - newArtifactId: jackson-datatype-jakarta-jsonp - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: org.glassfish, - oldArtifactId: javax.json, - newGroupId: org.eclipse.parsson, - newArtifactId: parsson - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: org.glassfish, - oldArtifactId: jakarta.json, - newGroupId: org.eclipse.parsson, - newArtifactId: parsson - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: org.glassfish, - oldArtifactId: jakarta.el, - newGroupId: org.glassfish.expressly, - newArtifactId: expressly - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: org.hibernate, - oldArtifactId: hibernate-core, - newGroupId: org.hibernate.orm, - newArtifactId: hibernate-core - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: org.hibernate, - oldArtifactId: hibernate-envers, - newGroupId: org.hibernate.orm, - newArtifactId: hibernate-envers - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: org.hibernate, - oldArtifactId: hibernate-jpamodelgen, - newGroupId: org.hibernate.orm, - newArtifactId: hibernate-jpamodelgen - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: org.hibernate, - oldArtifactId: hibernate-spatial, - newGroupId: org.hibernate.orm, - newArtifactId: hibernate-spatial - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: org.hibernate, - oldArtifactId: hibernate-testing, - newGroupId: org.hibernate.orm, - newArtifactId: hibernate-testing - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: org.hibernate, - oldArtifactId: hibernate-micrometer, - newGroupId: org.hibernate.orm, - newArtifactId: hibernate-micrometer - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: org.hibernate, - oldArtifactId: hibernate-jcache, - newGroupId: org.hibernate.orm, - newArtifactId: hibernate-jcache - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: org.hibernate, - oldArtifactId: hibernate-infinispan, - newGroupId: org.hibernate.orm, - newArtifactId: hibernate-infinispan - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: org.hibernate, - oldArtifactId: hibernate-ehcache, - newGroupId: org.hibernate.orm, - newArtifactId: hibernate-ehcache - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: org.hibernate.search, - oldArtifactId: hibernate-search-mapper-orm-coordination-outbox-polling, - newGroupId: org.hibernate.search, - newArtifactId: hibernate-search-mapper-orm-coordination-outbox-polling-jakarta - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: org.hibernate.search, - oldArtifactId: hibernate-search-mapper-orm, - newGroupId: org.hibernate.search, - newArtifactId: hibernate-search-mapper-orm-jakarta - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: org.hibernate, - oldArtifactId: quarkus-local-cache, - newGroupId: org.hibernate, - newArtifactId: quarkus-local-cache-jakarta - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: org.jboss.spec.javax.ws.rs, - oldArtifactId: jboss-jaxrs-api_2.1_spec, - newGroupId: jakarta.ws.rs, - newArtifactId: jakarta.ws.rs-api - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: org.jboss.spec.javax.xml.bind, - oldArtifactId: jboss-jaxb-api_2.3_spec, - newGroupId: jakarta.xml.bind, - newArtifactId: jakarta.xml.bind-api - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: org.jboss.spec.javax.transaction, - oldArtifactId: jboss-transaction-api_1.3_spec, - newGroupId: jakarta.transaction, - newArtifactId: jakarta.transaction-api - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: com.sun.activation, - oldArtifactId: jakarta.activation, - newGroupId: org.eclipse.angus, - newArtifactId: angus-activation - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: com.sun.activation, - oldArtifactId: javax.activation, - newGroupId: org.eclipse.angus, - newArtifactId: angus-activation - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: org.jboss.spec.javax.ejb, - oldArtifactId: jboss-ejb-api_3.1_spec, - newGroupId: jakarta.ejb, - newArtifactId: jakarta.ejb-api - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: org.keycloak, - oldArtifactId: keycloak-admin-client, - newGroupId: org.keycloak, - newArtifactId: keycloak-admin-client-jakarta - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: org.keycloak, - oldArtifactId: keycloak-admin-client, - newGroupId: org.keycloak, - newArtifactId: keycloak-admin-client-jakarta - } -type: specs.openrewrite.org/v1beta/recipe -description: Update all managed dependencies based on dependency updates from Quarkus. -name: org.kie.ManagedDependencies ---- -type: specs.openrewrite.org/v1beta/recipe -name: io.quarkus.updates.core.quarkus30.UpgradeQuarkiverse -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkus.bot, - artifactId: build-reporter-*, - newVersion: 3.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.vault, - artifactId: '*', - newVersion: 3.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.amazonservices, - artifactId: '*', - newVersion: 2.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.cxf, - artifactId: '*', - newVersion: 2.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.jsch, - artifactId: '*', - newVersion: 3.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.jberet, - artifactId: '*', - newVersion: 2.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.artemis, - artifactId: '*', - newVersion: 3.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.config, - artifactId: '*', - newVersion: 2.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.freemarker, - artifactId: '*', - newVersion: 1.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.githubapp, - artifactId: '*', - newVersion: 2.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.mybatis, - artifactId: '*', - newVersion: 2.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.messaginghub, - artifactId: '*', - newVersion: 2.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.prettytime, - artifactId: '*', - newVersion: 2.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.xmlsec, - artifactId: '*', - newVersion: 2.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.jef, - artifactId: '*', - newVersion: 3.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.githubaction, - artifactId: '*', - newVersion: 2.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.hibernatesearchextras, - artifactId: '*', - newVersion: 2.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.jackson-jq, - artifactId: '*', - newVersion: 2.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.jdbc, - artifactId: '*', - newVersion: 3.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.microprofile, - artifactId: '*', - newVersion: 3.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.minio, - artifactId: '*', - newVersion: 3.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.pact, - artifactId: '*', - newVersion: 1.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.poi, - artifactId: '*', - newVersion: 2.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.primefaces, - artifactId: '*', - newVersion: 3.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.reactivemessaging.http, - artifactId: '*', - newVersion: 2.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.renarde, - artifactId: '*', - newVersion: 3.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.quarkiverse.shardingsphere, - artifactId: '*', - newVersion: 2.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxActivationMigrationToJakartaActivation -displayName: Migrate deprecated `javax.activation` packages to `jakarta.activation` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -tags: [ - activation, - javax, - jakarta -] -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.activation, - artifactId: jakarta.activation-api, - newVersion: 2.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.activation, - newPackageName: jakarta.activation, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.activation, - oldArtifactId: javax.activation-api, - newGroupId: jakarta.activation, - newArtifactId: jakarta.activation-api, - newVersion: 2.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxAnnotationMigrationToJakartaAnnotation -displayName: Migrate deprecated `javax.annotation` packages to `jakarta.annotation` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -tags: [ - annotation, - javax, - jakarta -] -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.annotation, - artifactId: jakarta.annotation-api, - newVersion: 2.x - } -- org.openrewrite.java.migrate.jakarta.ChangeJavaxAnnotationToJakarta -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.annotation, - oldArtifactId: javax.annotation-api, - newGroupId: jakarta.annotation, - newArtifactId: jakarta.annotation-api, - newVersion: 2.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.ChangeJavaxAnnotationToJakarta -displayName: Migrate deprecated `javax.annotation` packages to `jakarta.annotation` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. - Excludes `javax.annotation.processing`. -tags: [ - batch, - javax, - jakarta -] -recipeList: [ - org.openrewrite.java.migrate.jakarta.JavaxAnnotationPackageToJakarta, - org.openrewrite.java.migrate.jakarta.JavaxAnnotationSecurityPackageToJakarta, - org.openrewrite.java.migrate.jakarta.JavaxAnnotationSqlPackageToJakarta -] ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxAnnotationPackageToJakarta -displayName: Migrate deprecated `javax.annotation` packages to `jakarta.annotation` -description: Change type of classes in the `javax.annotation` package to jakarta. -tags: [ - batch, - javax, - jakarta -] -recipeList: -- org.openrewrite.java.ChangeType: { - oldFullyQualifiedTypeName: javax.annotation.Generated, - newFullyQualifiedTypeName: jakarta.annotation.Generated - } -- org.openrewrite.java.ChangeType: { - oldFullyQualifiedTypeName: javax.annotation.ManagedBean, - newFullyQualifiedTypeName: jakarta.annotation.ManagedBean - } -- org.openrewrite.java.ChangeType: { - oldFullyQualifiedTypeName: javax.annotation.PostConstruct, - newFullyQualifiedTypeName: jakarta.annotation.PostConstruct - } -- org.openrewrite.java.ChangeType: { - oldFullyQualifiedTypeName: javax.annotation.PreDestroy, - newFullyQualifiedTypeName: jakarta.annotation.PreDestroy - } -- org.openrewrite.java.ChangeType: { - oldFullyQualifiedTypeName: javax.annotation.Priority, - newFullyQualifiedTypeName: jakarta.annotation.Priority - } -- org.openrewrite.java.ChangeType: { - oldFullyQualifiedTypeName: javax.annotation.Resource, - newFullyQualifiedTypeName: jakarta.annotation.Resource - } -- org.openrewrite.java.ChangeType: { - oldFullyQualifiedTypeName: javax.annotation.Resources, - newFullyQualifiedTypeName: jakarta.annotation.Resources - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxAnnotationSecurityPackageToJakarta -displayName: Migrate deprecated `javax.annotation.security` packages to `jakarta.annotation.security` -description: Change type of classes in the `javax.annotation.security` package to - jakarta. -tags: [ - batch, - javax, - jakarta -] -recipeList: -- org.openrewrite.java.ChangeType: { - oldFullyQualifiedTypeName: javax.annotation.security.DeclareRoles, - newFullyQualifiedTypeName: jakarta.annotation.security.DeclareRoles - } -- org.openrewrite.java.ChangeType: { - oldFullyQualifiedTypeName: javax.annotation.security.DenyAll, - newFullyQualifiedTypeName: jakarta.annotation.security.DenyAll - } -- org.openrewrite.java.ChangeType: { - oldFullyQualifiedTypeName: javax.annotation.security.PermitAll, - newFullyQualifiedTypeName: jakarta.annotation.security.PermitAll - } -- org.openrewrite.java.ChangeType: { - oldFullyQualifiedTypeName: javax.annotation.security.RolesAllowed, - newFullyQualifiedTypeName: jakarta.annotation.security.RolesAllowed - } -- org.openrewrite.java.ChangeType: { - oldFullyQualifiedTypeName: javax.annotation.security.RunAs, - newFullyQualifiedTypeName: jakarta.annotation.security.RunAs - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxAnnotationSqlPackageToJakarta -displayName: Migrate deprecated `javax.annotation.sql` packages to `jakarta.annotation.sql` -description: Change type of classes in the `javax.annotation.sql` package to jakarta. -tags: [ - batch, - javax, - jakarta -] -recipeList: -- org.openrewrite.java.ChangeType: { - oldFullyQualifiedTypeName: javax.annotation.sql.DataSourceDefinition, - newFullyQualifiedTypeName: jakarta.annotation.sql.DataSourceDefinition - } -- org.openrewrite.java.ChangeType: { - oldFullyQualifiedTypeName: javax.annotation.sql.DataSourceDefinitions, - newFullyQualifiedTypeName: jakarta.annotation.sql.DataSourceDefinitions - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxAuthenticationMigrationToJakartaAuthentication -displayName: Migrate deprecated `javax.security.auth.message` packages to `jakarta.security.auth.message` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -tags: [ - authentication, - security, - javax, - jakarta -] -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.authorization, - artifactId: jakarta.authorization-api, - newVersion: 2.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.authentication, - artifactId: jakarta.authentication-api, - newVersion: 2.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.security.auth.message, - newPackageName: jakarta.security.auth.message, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.security.auth.message, - oldArtifactId: javax.security.auth.message-api, - newGroupId: jakarta.authentication, - newArtifactId: jakarta.authentication-api, - newVersion: 2.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxAuthorizationMigrationToJakartaAuthorization -displayName: Migrate deprecated `javax.security.jacc` packages to `jakarta.security.jacc` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -tags: [ - authorization, - security, - javax, - jakarta -] -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.authorization, - artifactId: jakarta.authorization-api, - newVersion: 2.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.security.jacc, - newPackageName: jakarta.security.jacc, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.security.jacc, - oldArtifactId: javax.security.jacc-api, - newGroupId: jakarta.authorization, - newArtifactId: jakarta.authorization-api, - newVersion: 2.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxBatchMigrationToJakartaBatch -displayName: Migrate deprecated `javax.batch` packages to `jakarta.batch` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -tags: [ - batch, - javax, - jakarta -] -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.batch, - artifactId: jakarta.batch-api, - newVersion: 2.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.batch, - newPackageName: jakarta.batch, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.batch, - oldArtifactId: javax.batch-api, - newGroupId: jakarta.batch, - newArtifactId: jakarta.batch-api, - newVersion: 2.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxValidationMigrationToJakartaValidation -displayName: Migrate deprecated `javax.validation` packages to `jakarta.validation` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -tags: [ - validation, - javax, - jakarta -] -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.validation, - artifactId: jakarta.validation-api, - newVersion: 3.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.validation, - newPackageName: jakarta.validation, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.validation, - oldArtifactId: validation-api, - newGroupId: jakarta.validation, - newArtifactId: jakarta.validation-api, - newVersion: 3.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxDecoratorToJakartaDecorator -displayName: Migrate deprecated `javax.decorator` packages to `jakarta.decorator` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.enterprise, - artifactId: jakarta.enterprise.cdi-api, - newVersion: 4.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.decorator, - newPackageName: jakarta.decorator, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.enterprise, - oldArtifactId: cdi-api, - newGroupId: jakarta.enterprise, - newArtifactId: jakarta.enterprise.cdi-api, - newVersion: 4.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxEjbToJakartaEjb -displayName: Migrate deprecated `javax.ejb` packages to `jakarta.ejb` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.ejb, - artifactId: jakarta.ejb-api, - newVersion: 4.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.ejb, - newPackageName: jakarta.ejb, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.ejb, - oldArtifactId: javax.ejb-api, - newGroupId: jakarta.ejb, - newArtifactId: jakarta.ejb-api, - newVersion: 4.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxElToJakartaEl -displayName: Migrate deprecated `javax.el` packages to `jakarta.el` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.el, - artifactId: jakarta.el-api, - newVersion: 4.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.el, - newPackageName: jakarta.el, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.el, - oldArtifactId: javax.el-api, - newGroupId: jakarta.el, - newArtifactId: jakarta.el-api, - newVersion: 4.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxEnterpriseToJakartaEnterprise -displayName: Migrate deprecated `javax.enterprise` packages to `jakarta.enterprise` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.enterprise, - artifactId: jakarta.enterprise.cdi-api, - newVersion: 4.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.enterprise, - newPackageName: jakarta.enterprise, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.enterprise, - oldArtifactId: cdi-api, - newGroupId: jakarta.enterprise, - newArtifactId: jakarta.enterprise.cdi-api, - newVersion: 4.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxFacesToJakartaFaces -displayName: Migrate deprecated `javax.faces` packages to `jakarta.faces` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.faces, - artifactId: jakarta.faces-api, - newVersion: 4.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.faces, - newPackageName: jakarta.faces, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.faces, - oldArtifactId: javax.faces-api, - newGroupId: jakarta.faces, - newArtifactId: jakarta.faces-api, - newVersion: 4.x - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - groupId: org.glassfish, - artifactId: javax.faces, - newGroupId: org.glassfish, - newArtifactId: jakarta.faces, - newVersion: 4.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxInjectMigrationToJakartaInject -displayName: Migrate deprecated `javax.inject` packages to `jakarta.inject` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -tags: [ - inject, - javax, - jakarta -] -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.inject, - artifactId: jakarta.inject-api, - newVersion: 2.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.inject, - newPackageName: jakarta.inject, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.inject, - oldArtifactId: javax.inject-api, - newGroupId: jakarta.inject, - newArtifactId: jakarta.inject-api, - newVersion: 2.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxInterceptorToJakartaInterceptor -displayName: Migrate deprecated `javax.interceptor` packages to `jakarta.interceptor` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.interceptor, - artifactId: jakarta.interceptor-api, - newVersion: 2.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.interceptor, - newPackageName: jakarta.interceptor, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.interceptor, - oldArtifactId: javax.interceptor-api, - newGroupId: jakarta.interceptor, - newArtifactId: jakarta.interceptor-api, - newVersion: 2.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxJmsToJakartaJms -displayName: Migrate deprecated `javax.jms` packages to `jakarta.jms` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.jms, - artifactId: jakarta.jms-api, - newVersion: 3.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.jms, - newPackageName: jakarta.jms, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.jms, - oldArtifactId: javax.jms-api, - newGroupId: jakarta.jms, - newArtifactId: jakarta.jms-api, - newVersion: 3.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxJsonToJakartaJson -displayName: Migrate deprecated `javax.json` packages to `jakarta.json` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.json, - artifactId: jakarta.json-api, - newVersion: 2.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.json, - newPackageName: jakarta.json, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.json, - oldArtifactId: javax.json-api, - newGroupId: jakarta.json, - newArtifactId: jakarta.json-api, - newVersion: 2.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxJwsToJakartaJws -displayName: Migrate deprecated `javax.jws` packages to `jakarta.jws` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.jws, - artifactId: jakarta.jws-api, - newVersion: 3.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.jws, - newPackageName: jakarta.jws, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.jws, - oldArtifactId: javax.jws-api, - newGroupId: jakarta.jws, - newArtifactId: jakarta.jws-api, - newVersion: 3.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxMailToJakartaMail -displayName: Migrate deprecated `javax.mail` packages to `jakarta.mail` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.mail, - artifactId: jakarta.mail-api, - newVersion: 2.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.mail, - newPackageName: jakarta.mail, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.mail, - oldArtifactId: javax.mail-api, - newGroupId: jakarta.mail, - newArtifactId: jakarta.mail-api, - newVersion: 2.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxPersistenceToJakartaPersistence -displayName: Migrate deprecated `javax.persistence` packages to `jakarta.persistence` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.persistence, - artifactId: jakarta.persistence-api, - newVersion: 3.0.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.persistence, - newPackageName: jakarta.persistence, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.persistence, - oldArtifactId: javax.persistence, - newGroupId: jakarta.persistence, - newArtifactId: jakarta.persistence-api, - newVersion: 3.0.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxResourceToJakartaResource -displayName: Migrate deprecated `javax.resource` packages to `jakarta.resource` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.resource, - artifactId: jakarta.resource-api, - newVersion: 2.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.resource, - newPackageName: jakarta.resource, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.resource, - oldArtifactId: javax.resource-api, - newGroupId: jakarta.resource, - newArtifactId: jakarta.resource-api, - newVersion: 2.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxSecurityToJakartaSecurity -displayName: Migrate deprecated `javax.security.enterprise` packages to `jakarta.security.enterprise` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.security.enterprise, - artifactId: jakarta.security.enterprise-api, - newVersion: 3.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.security.enterprise, - newPackageName: jakarta.security.enterprise, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.security.enterprise, - oldArtifactId: javax.security.enterprise-api, - newGroupId: jakarta.security.enterprise, - newArtifactId: jakarta.security.enterprise-api, - newVersion: 3.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxServletToJakartaServlet -displayName: Migrate deprecated `javax.servlet` packages to `jakarta.servlet` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.servlet, - artifactId: jakarta.servlet-api, - newVersion: 6.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.servlet, - newPackageName: jakarta.servlet, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.servlet, - oldArtifactId: javax.servlet-api, - newGroupId: jakarta.servlet, - newArtifactId: jakarta.servlet-api, - newVersion: 6.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxTransactionMigrationToJakartaTransaction -displayName: Migrate deprecated `javax.transaction` packages to `jakarta.transaction` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -tags: [ - transaction, - javax, - jakarta -] -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.transaction, - artifactId: jakarta.transaction-api, - newVersion: 2.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.transaction, - newPackageName: jakarta.transaction, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.transaction, - oldArtifactId: javax.transaction-api, - newGroupId: jakarta.transaction, - newArtifactId: jakarta.transaction-api, - newVersion: 2.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxWebsocketToJakartaWebsocket -displayName: Migrate deprecated `javax.websocket` packages to `jakarta.websocket` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.websocket, - artifactId: jakarta.websocket-api, - newVersion: 2.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.websocket, - newPackageName: jakarta.websocket, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.websocket, - oldArtifactId: javax.websocket-api, - newGroupId: jakarta.websocket, - newArtifactId: jakarta.websocket-api, - newVersion: 2.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxWsToJakartaWs -displayName: Migrate deprecated `javax.ws` packages to `jakarta.ws` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.ws.rs, - artifactId: jakarta.ws.rs-api, - newVersion: 3.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.ws, - newPackageName: jakarta.ws, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.ws.rs, - oldArtifactId: javax.ws.rs-api, - newGroupId: jakarta.ws.rs, - newArtifactId: jakarta.ws.rs-api, - newVersion: 3.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxXmlBindMigrationToJakartaXmlBind -displayName: Migrate deprecated `javax.xml.bind` packages to `jakarta.xml.bind` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -tags: [ - jaxb, - javax, - jakarta -] -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.xml.bind, - artifactId: jakarta.xml.bind-api, - newVersion: 4.x - } -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: org.glassfish.jaxb, - artifactId: jaxb-runtime, - newVersion: 4.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.xml.bind, - newPackageName: jakarta.xml.bind, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.xml.bind, - oldArtifactId: jaxb-api, - newGroupId: jakarta.xml.bind, - newArtifactId: jakarta.xml.bind-api, - newVersion: 4.x - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: com.sun.xml.bind, - oldArtifactId: jaxb-impl, - newGroupId: org.glassfish.jaxb, - newArtifactId: jaxb-runtime, - newVersion: 4.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxXmlSoapToJakartaXmlSoap -displayName: Migrate deprecated `javax.soap` packages to `jakarta.soap` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.xml.soap, - artifactId: jakarta.xml.soap-api, - newVersion: 3.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.xml.soap, - newPackageName: jakarta.xml.soap, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.xml.soap, - oldArtifactId: javax.xml.soap-api, - newGroupId: jakarta.xml.soap, - newArtifactId: jakarta.xml.soap-api, - newVersion: 3.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxXmlWsMigrationToJakartaXmlWs -displayName: Migrate deprecated `javax.xml.ws` packages to `jakarta.xml.ws` -description: Java EE has been rebranded to Jakarta EE, necessitating a package relocation. -tags: [ - jaxws, - javax, - jakarta -] -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: jakarta.xml.ws, - artifactId: jakarta.xml.ws-api, - newVersion: 4.x - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: javax.xml.ws, - newPackageName: jakarta.xml.ws, - recursive: true - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: javax.xml.ws, - oldArtifactId: jaxws-api, - newGroupId: jakarta.xml.ws, - newArtifactId: jakarta.xml.ws-api, - newVersion: 4.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JavaxPersistenceXmlToJakartaPersistenceXml -displayName: Migrate xmlns entries in `persistence.xml` files -description: Java EE has been rebranded to Jakarta EE, necessitating an XML namespace - relocation. -recipeList: -- org.openrewrite.xml.ChangeTagAttribute: { - attributeName: name, - elementName: //property, - oldValue: javax.persistence, - newValue: jakarta.persistence, - fileMatcher: '**/persistence.xml' - } -- org.openrewrite.xml.ChangeTagAttribute: { - attributeName: version, - elementName: persistence, - newValue: 3.0, - fileMatcher: '**/persistence.xml' - } -- org.openrewrite.xml.ChangeTagAttribute: { - attributeName: xmlns, - elementName: persistence, - oldValue: 'http://xmlns.jcp.org', - newValue: 'https://jakarta.ee', - fileMatcher: '**/persistence.xml' - } -- org.openrewrite.xml.ChangeTagAttribute: { - attributeName: 'xsi:schemaLocation', - elementName: persistence, - newValue: 'https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd', - fileMatcher: '**/persistence.xml' - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.JacksonJavaxToJakarta -displayName: Migrate Jackson from javax to jakarta namespace -description: | - Java EE has been rebranded to Jakarta EE. This recipe replaces existing Jackson dependencies with their counterparts that are compatible with Jakarta EE. -recipeList: -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: com.fasterxml.jackson.module, - oldArtifactId: jackson-module-jaxb-annotations, - newGroupId: com.fasterxml.jackson.module, - newArtifactId: jackson-module-jakarta-xmlbind-annotations - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: com.fasterxml.jackson.module, - oldArtifactId: jackson-module-jaxb-annotations, - newGroupId: com.fasterxml.jackson.module, - newArtifactId: jackson-module-jakarta-xmlbind-annotations - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: com.fasterxml.jackson.jaxrs, - oldArtifactId: jackson-jaxrs-cbor-provider, - newGroupId: com.fasterxml.jackson.jakarta.rs, - newArtifactId: jackson-jakarta-rs-cbor-provider - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: com.fasterxml.jackson.jaxrs, - oldArtifactId: jackson-jaxrs-cbor-provider, - newGroupId: com.fasterxml.jackson.jakarta.rs, - newArtifactId: jackson-jakarta-rs-cbor-provider - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: com.fasterxml.jackson.jaxrs, - oldArtifactId: jackson-jaxrs-json-provider, - newGroupId: com.fasterxml.jackson.jakarta.rs, - newArtifactId: jackson-jakarta-rs-json-provider - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: com.fasterxml.jackson.jaxrs, - oldArtifactId: jackson-jaxrs-json-provider, - newGroupId: com.fasterxml.jackson.jakarta.rs, - newArtifactId: jackson-jakarta-rs-json-provider - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: com.fasterxml.jackson.jaxrs, - oldArtifactId: jackson-jaxrs-smile-provider, - newGroupId: com.fasterxml.jackson.jakarta.rs, - newArtifactId: jackson-jakarta-rs-smile-provider - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: com.fasterxml.jackson.jaxrs, - oldArtifactId: jackson-jaxrs-smile-provider, - newGroupId: com.fasterxml.jackson.jakarta.rs, - newArtifactId: jackson-jakarta-rs-smile-provider - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: com.fasterxml.jackson.jaxrs, - oldArtifactId: jackson-jaxrs-xml-provider, - newGroupId: com.fasterxml.jackson.jakarta.rs, - newArtifactId: jackson-jakarta-rs-xml-provider - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: com.fasterxml.jackson.jaxrs, - oldArtifactId: jackson-jaxrs-xml-provider, - newGroupId: com.fasterxml.jackson.jakarta.rs, - newArtifactId: jackson-jakarta-rs-xml-provider - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: com.fasterxml.jackson.jaxrs, - oldArtifactId: jackson-jaxrs-yaml-provider, - newGroupId: com.fasterxml.jackson.jakarta.rs, - newArtifactId: jackson-jakarta-rs-yaml-provider - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: com.fasterxml.jackson.jaxrs, - oldArtifactId: jackson-jaxrs-yaml-provider, - newGroupId: com.fasterxml.jackson.jakarta.rs, - newArtifactId: jackson-jakarta-rs-yaml-provider - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: com.fasterxml.jackson.datatype, - oldArtifactId: jackson-datatype-jsr353, - newGroupId: com.fasterxml.jackson.datatype, - newArtifactId: jackson-datatype-jakarta-jsonp - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: com.fasterxml.jackson.datatype, - oldArtifactId: jackson-datatype-jsr353, - newGroupId: com.fasterxml.jackson.datatype, - newArtifactId: jackson-datatype-jakarta-jsonp - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: org.glassfish, - oldArtifactId: javax.json, - newGroupId: org.eclipse.parsson, - newArtifactId: parsson - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: org.glassfish, - oldArtifactId: javax.json, - newGroupId: org.eclipse.parsson, - newArtifactId: parsson - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: org.glassfish, - oldArtifactId: jakarta.json, - newGroupId: org.eclipse.parsson, - newArtifactId: parsson - } -- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: { - oldGroupId: org.glassfish, - oldArtifactId: jakarta.json, - newGroupId: org.eclipse.parsson, - newArtifactId: parsson - } -- org.openrewrite.java.ChangeType: { - oldFullyQualifiedTypeName: com.fasterxml.jackson.datatype.jsr353.JSR353Module, - newFullyQualifiedTypeName: com.fasterxml.jackson.datatype.jsonp.JSONPModule - } -- org.openrewrite.java.ChangePackage: { - oldPackageName: com.fasterxml.jackson.jaxrs, - newPackageName: com.fasterxml.jackson.jakarta.rs, - recursive: true - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.java.migrate.jakarta.RestAssuredJavaxToJakarta -displayName: Migrate RestAssured from javax to jakarta namespace by upgrading to a - version compatible with J2EE9 -description: | - Java EE has been rebranded to Jakarta EE. This recipe replaces existing RestAssured dependencies with their counterparts that are compatible with Jakarta EE. -recipeList: -- org.openrewrite.maven.UpgradeDependencyVersion: { - groupId: io.rest-assured, - artifactId: '*', - newVersion: 5.x - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: io.quarkus.updates.core.quarkus30.JavaxToJakartaAdditionalMigration -recipeList: -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: org.glassfish, - oldArtifactId: jakarta.el, - newGroupId: org.glassfish.expressly, - newArtifactId: expressly - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: org.hibernate, - oldArtifactId: hibernate-core, - newGroupId: org.hibernate.orm, - newArtifactId: hibernate-core - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: org.hibernate, - oldArtifactId: hibernate-envers, - newGroupId: org.hibernate.orm, - newArtifactId: hibernate-envers - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: org.hibernate, - oldArtifactId: hibernate-jpamodelgen, - newGroupId: org.hibernate.orm, - newArtifactId: hibernate-jpamodelgen - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: org.hibernate, - oldArtifactId: hibernate-spatial, - newGroupId: org.hibernate.orm, - newArtifactId: hibernate-spatial - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: org.hibernate, - oldArtifactId: hibernate-testing, - newGroupId: org.hibernate.orm, - newArtifactId: hibernate-testing - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: org.hibernate, - oldArtifactId: hibernate-micrometer, - newGroupId: org.hibernate.orm, - newArtifactId: hibernate-micrometer - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: org.hibernate, - oldArtifactId: hibernate-jcache, - newGroupId: org.hibernate.orm, - newArtifactId: hibernate-jcache - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: org.hibernate, - oldArtifactId: hibernate-infinispan, - newGroupId: org.hibernate.orm, - newArtifactId: hibernate-infinispan - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: org.hibernate, - oldArtifactId: hibernate-ehcache, - newGroupId: org.hibernate.orm, - newArtifactId: hibernate-ehcache - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: org.hibernate.search, - oldArtifactId: hibernate-search-mapper-orm-coordination-outbox-polling, - newGroupId: org.hibernate.search, - newArtifactId: hibernate-search-mapper-orm-coordination-outbox-polling-jakarta - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: org.hibernate.search, - oldArtifactId: hibernate-search-mapper-orm, - newGroupId: org.hibernate.search, - newArtifactId: hibernate-search-mapper-orm-jakarta - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: org.hibernate, - oldArtifactId: quarkus-local-cache, - newGroupId: org.hibernate, - newArtifactId: quarkus-local-cache-jakarta - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: org.jboss.spec.javax.ws.rs, - oldArtifactId: jboss-jaxrs-api_2.1_spec, - newGroupId: jakarta.ws.rs, - newArtifactId: jakarta.ws.rs-api - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: org.jboss.spec.javax.xml.bind, - oldArtifactId: jboss-jaxb-api_2.3_spec, - newGroupId: jakarta.xml.bind, - newArtifactId: jakarta.xml.bind-api - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: org.jboss.spec.javax.transaction, - oldArtifactId: jboss-transaction-api_1.3_spec, - newGroupId: jakarta.transaction, - newArtifactId: jakarta.transaction-api - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: com.sun.activation, - oldArtifactId: jakarta.activation, - newGroupId: org.eclipse.angus, - newArtifactId: angus-activation - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: com.sun.activation, - oldArtifactId: javax.activation, - newGroupId: org.eclipse.angus, - newArtifactId: angus-activation - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: org.jboss.spec.javax.ejb, - oldArtifactId: jboss-ejb-api_3.1_spec, - newGroupId: jakarta.ejb, - newArtifactId: jakarta.ejb-api - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: org.keycloak, - oldArtifactId: keycloak-admin-client, - newGroupId: org.keycloak, - newArtifactId: keycloak-admin-client-jakarta - } -- org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: { - oldGroupId: org.keycloak, - oldArtifactId: keycloak-admin-client, - newGroupId: org.keycloak, - newArtifactId: keycloak-admin-client-jakarta - } ---- -type: specs.openrewrite.org/v1beta/recipe -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', - fileName: jakarta.ws.rs.ext.Providers - } -- org.openrewrite.RenameFile: { - 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', - fileName: jakarta.ws.rs.sse.SseEventSource$Builder - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: io.quarkus.updates.core.quarkus30.AdditionalChanges -recipeList: -- org.openrewrite.java.ChangeType: { - oldFullyQualifiedTypeName: org.jboss.resteasy.reactive.server.core.multipart.MultipartFormDataOutput, - newFullyQualifiedTypeName: org.jboss.resteasy.reactive.server.multipart.MultipartFormDataOutput - } -- org.openrewrite.java.ChangeType: { - oldFullyQualifiedTypeName: org.jboss.resteasy.reactive.server.core.multipart.PartItem, - newFullyQualifiedTypeName: org.jboss.resteasy.reactive.server.multipart.PartItem - } -- org.openrewrite.java.ChangeType: { - oldFullyQualifiedTypeName: org.jboss.resteasy.reactive.server.core.multipart.FormData.FormValue, - newFullyQualifiedTypeName: org.jboss.resteasy.reactive.server.multipart.FormValue - } -- org.openrewrite.java.ChangeType: { - oldFullyQualifiedTypeName: io.quarkus.test.junit.NativeImageTest, - newFullyQualifiedTypeName: io.quarkus.test.junit.QuarkusIntegrationTest - } -- org.openrewrite.java.ChangeType: { - oldFullyQualifiedTypeName: io.quarkus.test.junit.DisabledOnNativeImage, - newFullyQualifiedTypeName: io.quarkus.test.junit.DisabledOnIntegrationTest - } -- org.openrewrite.java.ChangeType: { - oldFullyQualifiedTypeName: org.jboss.resteasy.reactive.MultipartForm, - newFullyQualifiedTypeName: jakarta.ws.rs.BeanParam - } -- org.openrewrite.java.ChangeType: { - oldFullyQualifiedTypeName: io.smallrye.reactive.messaging.providers.connectors.InMemoryConnector, - newFullyQualifiedTypeName: io.smallrye.reactive.messaging.memory.InMemoryConnector - } -- org.openrewrite.java.ChangeType: { - oldFullyQualifiedTypeName: io.quarkus.hibernate.reactive.panache.common.runtime.ReactiveTransactional, - newFullyQualifiedTypeName: io.quarkus.hibernate.reactive.panache.common.WithTransaction - } -- org.openrewrite.java.ChangeType: { - oldFullyQualifiedTypeName: io.quarkus.arc.Priority, - newFullyQualifiedTypeName: jakarta.annotation.Priority - } -- org.openrewrite.text.FindAndReplace: { - find: quarkus-bootstrap-maven-plugin, - replace: quarkus-extension-maven-plugin, - fileMatcher: '**/pom.xml' - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: io.quarkus.updates.core.quarkus30.ApplicationProperties -applicability: - singleSource: - - org.openrewrite.FindSourceFiles: { - filePattern: '**/application*.properties' - } -recipeList: -- org.openrewrite.properties.ChangePropertyKey: { - oldPropertyKey: quarkus.kubernetes.expose, - newPropertyKey: quarkus.kubernetes.ingress.expose - } -- org.openrewrite.properties.ChangePropertyKey: { - oldPropertyKey: quarkus.openshift.expose, - newPropertyKey: quarkus.openshift.route.expose - } -- org.openrewrite.properties.ChangePropertyKey: { - oldPropertyKey: quarkus.kubernetes.host, - newPropertyKey: quarkus.kubernetes.ingress.host - } -- org.openrewrite.properties.ChangePropertyKey: { - oldPropertyKey: quarkus.openshift.host, - newPropertyKey: quarkus.openshift.route.host - } -- org.openrewrite.properties.ChangePropertyKey: { - oldPropertyKey: quarkus.kubernetes.group, - newPropertyKey: quarkus.kubernetes.part-of - } -- org.openrewrite.properties.ChangePropertyKey: { - oldPropertyKey: quarkus.openshift.group, - newPropertyKey: quarkus.openshift.part-of - } -- org.openrewrite.properties.ChangePropertyKey: { - oldPropertyKey: quarkus.jib.labels, - newPropertyKey: quarkus.container-image.labels - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: io.quarkus.updates.core.quarkus30.ApplicationYml -applicability: - singleSource: - - org.openrewrite.FindSourceFiles: { - filePattern: '**/application*.yml' - } -recipeList: -- org.openrewrite.yaml.ChangePropertyKey: { - oldPropertyKey: quarkus.kubernetes.expose, - newPropertyKey: quarkus.kubernetes.ingress.expose - } -- org.openrewrite.yaml.ChangePropertyKey: { - oldPropertyKey: quarkus.openshift.expose, - newPropertyKey: quarkus.openshift.route.expose - } -- org.openrewrite.yaml.ChangePropertyKey: { - oldPropertyKey: quarkus.kubernetes.host, - newPropertyKey: quarkus.kubernetes.ingress.host - } -- org.openrewrite.yaml.ChangePropertyKey: { - oldPropertyKey: quarkus.openshift.host, - newPropertyKey: quarkus.openshift.route.host - } -- org.openrewrite.yaml.ChangePropertyKey: { - oldPropertyKey: quarkus.kubernetes.group, - newPropertyKey: quarkus.kubernetes.part-of - } -- org.openrewrite.yaml.ChangePropertyKey: { - oldPropertyKey: quarkus.openshift.group, - newPropertyKey: quarkus.openshift.part-of - } -- org.openrewrite.properties.ChangePropertyKey: { - oldPropertyKey: quarkus.jib.labels, - newPropertyKey: quarkus.container-image.labels - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: io.quarkus.updates.core.quarkus30.ApplicationYaml -applicability: - singleSource: - - org.openrewrite.FindSourceFiles: { - filePattern: '**/application*.yaml' - } -recipeList: -- org.openrewrite.yaml.ChangePropertyKey: { - oldPropertyKey: quarkus.kubernetes.expose, - newPropertyKey: quarkus.kubernetes.ingress.expose - } -- org.openrewrite.yaml.ChangePropertyKey: { - oldPropertyKey: quarkus.openshift.expose, - newPropertyKey: quarkus.openshift.route.expose - } -- org.openrewrite.yaml.ChangePropertyKey: { - oldPropertyKey: quarkus.kubernetes.host, - newPropertyKey: quarkus.kubernetes.ingress.host - } -- org.openrewrite.yaml.ChangePropertyKey: { - oldPropertyKey: quarkus.openshift.host, - newPropertyKey: quarkus.openshift.route.host - } -- org.openrewrite.yaml.ChangePropertyKey: { - oldPropertyKey: quarkus.kubernetes.group, - newPropertyKey: quarkus.kubernetes.part-of - } -- org.openrewrite.yaml.ChangePropertyKey: { - oldPropertyKey: quarkus.openshift.group, - newPropertyKey: quarkus.openshift.part-of - } -- org.openrewrite.properties.ChangePropertyKey: { - oldPropertyKey: quarkus.jib.labels, - newPropertyKey: quarkus.container-image.labels - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: io.quarkus.updates.core.quarkus30.JavaxToJakartaDocumentationAdoc -applicability: - singleSource: - - org.openrewrite.FindSourceFiles: { - filePattern: '**/*.adoc' - } -recipeList: -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.config., - replace: jakarta.json.bind.config. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.soap., - replace: jakarta.xml.soap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.jacc., - replace: jakarta.security.jacc. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail.internet., - replace: jakarta.mail.internet. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api.chunk., - replace: jakarta.batch.api.chunk. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.spi., - replace: jakarta.json.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource., - replace: jakarta.resource. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.spi.work., - replace: jakarta.resource.spi.work. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.annotation.adapters., - replace: jakarta.xml.bind.annotation.adapters. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.webapp., - replace: jakarta.faces.webapp. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.application., - replace: jakarta.faces.application. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.util., - replace: jakarta.xml.bind.util. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.persistence.criteria., - replace: jakarta.persistence.criteria. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.event., - replace: jakarta.faces.event. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.activation., - replace: jakarta.activation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.flow.builder., - replace: jakarta.faces.flow.builder. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.websocket., - replace: jakarta.websocket. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.serializer., - replace: jakarta.json.bind.serializer. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject.se., - replace: jakarta.enterprise.inject.se. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.cci., - replace: jakarta.resource.cci. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.spi., - replace: jakarta.validation.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.transaction., - replace: jakarta.transaction. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.attachment., - replace: jakarta.xml.bind.attachment. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.interceptor., - replace: jakarta.interceptor. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.helpers., - replace: jakarta.xml.bind.helpers. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ejb.embeddable., - replace: jakarta.ejb.embeddable. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.persistence., - replace: jakarta.persistence. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject., - replace: jakarta.enterprise.inject. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail.event., - replace: jakarta.mail.event. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.spi.endpoint., - replace: jakarta.resource.spi.endpoint. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component.visit., - replace: jakarta.faces.component.visit. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl., - replace: jakarta.servlet.jsp.jstl. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.el., - replace: jakarta.servlet.jsp.el. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.el., - replace: jakarta.faces.el. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind., - replace: jakarta.xml.bind. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.adapter., - replace: jakarta.json.bind.adapter. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.valueextraction., - replace: jakarta.validation.valueextraction. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.view.facelets., - replace: jakarta.faces.view.facelets. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.flow., - replace: jakarta.faces.flow. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.render., - replace: jakarta.faces.render. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail.util., - replace: jakarta.mail.util. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.runtime.context., - replace: jakarta.batch.runtime.context. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.annotation.security., - replace: jakarta.annotation.security. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component., - replace: jakarta.faces.component. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl.fmt., - replace: jakarta.servlet.jsp.jstl.fmt. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.spi., - replace: jakarta.json.bind.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet., - replace: jakarta.servlet. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.operations., - replace: jakarta.batch.operations. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.push., - replace: jakarta.faces.push. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.descriptor., - replace: jakarta.servlet.descriptor. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.handler.soap., - replace: jakarta.xml.ws.handler.soap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.executable., - replace: jakarta.validation.executable. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component.behavior., - replace: jakarta.faces.component.behavior. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.annotation., - replace: jakarta.xml.bind.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.runtime., - replace: jakarta.batch.runtime. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.stream., - replace: jakarta.json.stream. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.annotation., - replace: jakarta.servlet.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.resources., - replace: jakarta.servlet.resources. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.http., - replace: jakarta.servlet.http. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.spi.http., - replace: jakarta.xml.ws.spi.http. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.container., - replace: jakarta.ws.rs.container. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws., - replace: jakarta.xml.ws. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.context.spi., - replace: jakarta.enterprise.context.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.spi., - replace: jakarta.resource.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.validator., - replace: jakarta.faces.validator. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.jws., - replace: jakarta.jws. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.annotation., - replace: jakarta.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component.search., - replace: jakarta.faces.component.search. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind., - replace: jakarta.json.bind. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl.tlv., - replace: jakarta.servlet.jsp.jstl.tlv. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl.core., - replace: jakarta.servlet.jsp.jstl.core. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.decorator., - replace: jakarta.decorator. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.bean., - replace: jakarta.faces.bean. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.sse., - replace: jakarta.ws.rs.sse. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.persistence.metamodel., - replace: jakarta.persistence.metamodel. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.context., - replace: jakarta.enterprise.context. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.spi., - replace: jakarta.xml.ws.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api., - replace: jakarta.batch.api. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.el., - replace: jakarta.el. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json., - replace: jakarta.json. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api.chunk.listener., - replace: jakarta.batch.api.chunk.listener. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.persistence.spi., - replace: jakarta.persistence.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.handler., - replace: jakarta.xml.ws.handler. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl.sql., - replace: jakarta.servlet.jsp.jstl.sql. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject.literal., - replace: jakarta.enterprise.inject.literal. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.ext., - replace: jakarta.ws.rs.ext. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.constraints., - replace: jakarta.validation.constraints. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.resources., - replace: jakarta.servlet.jsp.resources. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.constraintvalidation., - replace: jakarta.validation.constraintvalidation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.lifecycle., - replace: jakarta.faces.lifecycle. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.auth.message.callback., - replace: jakarta.security.auth.message.callback. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs., - replace: jakarta.ws.rs. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.auth.message.config., - replace: jakarta.security.auth.message.config. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.websocket.server., - replace: jakarta.websocket.server. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.enterprise.authentication.mechanism.http., - replace: jakarta.security.enterprise.authentication.mechanism.http. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.event., - replace: jakarta.enterprise.event. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.inject., - replace: jakarta.inject. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api.listener., - replace: jakarta.batch.api.listener. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.http., - replace: jakarta.xml.ws.http. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.soap., - replace: jakarta.xml.ws.soap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject.spi., - replace: jakarta.enterprise.inject.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces., - replace: jakarta.faces. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.jms., - replace: jakarta.jms. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.wsaddressing., - replace: jakarta.xml.ws.wsaddressing. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.bootstrap., - replace: jakarta.validation.bootstrap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ejb.spi., - replace: jakarta.ejb.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.metadata., - replace: jakarta.validation.metadata. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp., - replace: jakarta.servlet.jsp. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.convert., - replace: jakarta.faces.convert. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail., - replace: jakarta.mail. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.concurrent., - replace: jakarta.enterprise.concurrent. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api.partition., - replace: jakarta.batch.api.partition. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component.html., - replace: jakarta.faces.component.html. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject.spi.configurator., - replace: jakarta.enterprise.inject.spi.configurator. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.enterprise.credential., - replace: jakarta.security.enterprise.credential. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.context.control., - replace: jakarta.enterprise.context.control. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.annotation., - replace: jakarta.json.bind.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail.search., - replace: jakarta.mail.search. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.util., - replace: jakarta.enterprise.util. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.client., - replace: jakarta.ws.rs.client. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.model., - replace: jakarta.faces.model. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.spi.security., - replace: jakarta.resource.spi.security. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.view., - replace: jakarta.faces.view. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.enterprise., - replace: jakarta.security.enterprise. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.tagext., - replace: jakarta.servlet.jsp.tagext. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.core., - replace: jakarta.ws.rs.core. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.auth.message.module., - replace: jakarta.security.auth.message.module. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.context., - replace: jakarta.faces.context. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.auth.message., - replace: jakarta.security.auth.message. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.annotation.sql., - replace: jakarta.annotation.sql. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.annotation., - replace: jakarta.faces.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.groups., - replace: jakarta.validation.groups. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.jws.soap., - replace: jakarta.jws.soap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ejb., - replace: jakarta.ejb. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.enterprise.identitystore., - replace: jakarta.security.enterprise.identitystore. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation., - replace: jakarta.validation. - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: io.quarkus.updates.core.quarkus30.JavaxToJakartaDocumentationMd -applicability: - singleSource: - - org.openrewrite.FindSourceFiles: { - filePattern: '**/*.md' - } -recipeList: -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.config., - replace: jakarta.json.bind.config. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.soap., - replace: jakarta.xml.soap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.jacc., - replace: jakarta.security.jacc. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail.internet., - replace: jakarta.mail.internet. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api.chunk., - replace: jakarta.batch.api.chunk. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.spi., - replace: jakarta.json.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource., - replace: jakarta.resource. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.spi.work., - replace: jakarta.resource.spi.work. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.annotation.adapters., - replace: jakarta.xml.bind.annotation.adapters. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.webapp., - replace: jakarta.faces.webapp. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.application., - replace: jakarta.faces.application. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.util., - replace: jakarta.xml.bind.util. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.persistence.criteria., - replace: jakarta.persistence.criteria. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.event., - replace: jakarta.faces.event. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.activation., - replace: jakarta.activation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.flow.builder., - replace: jakarta.faces.flow.builder. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.websocket., - replace: jakarta.websocket. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.serializer., - replace: jakarta.json.bind.serializer. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject.se., - replace: jakarta.enterprise.inject.se. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.cci., - replace: jakarta.resource.cci. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.spi., - replace: jakarta.validation.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.transaction., - replace: jakarta.transaction. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.attachment., - replace: jakarta.xml.bind.attachment. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.interceptor., - replace: jakarta.interceptor. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.helpers., - replace: jakarta.xml.bind.helpers. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ejb.embeddable., - replace: jakarta.ejb.embeddable. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.persistence., - replace: jakarta.persistence. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject., - replace: jakarta.enterprise.inject. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail.event., - replace: jakarta.mail.event. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.spi.endpoint., - replace: jakarta.resource.spi.endpoint. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component.visit., - replace: jakarta.faces.component.visit. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl., - replace: jakarta.servlet.jsp.jstl. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.el., - replace: jakarta.servlet.jsp.el. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.el., - replace: jakarta.faces.el. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind., - replace: jakarta.xml.bind. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.adapter., - replace: jakarta.json.bind.adapter. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.valueextraction., - replace: jakarta.validation.valueextraction. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.view.facelets., - replace: jakarta.faces.view.facelets. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.flow., - replace: jakarta.faces.flow. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.render., - replace: jakarta.faces.render. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail.util., - replace: jakarta.mail.util. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.runtime.context., - replace: jakarta.batch.runtime.context. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.annotation.security., - replace: jakarta.annotation.security. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component., - replace: jakarta.faces.component. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl.fmt., - replace: jakarta.servlet.jsp.jstl.fmt. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.spi., - replace: jakarta.json.bind.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet., - replace: jakarta.servlet. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.operations., - replace: jakarta.batch.operations. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.push., - replace: jakarta.faces.push. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.descriptor., - replace: jakarta.servlet.descriptor. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.handler.soap., - replace: jakarta.xml.ws.handler.soap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.executable., - replace: jakarta.validation.executable. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component.behavior., - replace: jakarta.faces.component.behavior. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.annotation., - replace: jakarta.xml.bind.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.runtime., - replace: jakarta.batch.runtime. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.stream., - replace: jakarta.json.stream. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.annotation., - replace: jakarta.servlet.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.resources., - replace: jakarta.servlet.resources. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.http., - replace: jakarta.servlet.http. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.spi.http., - replace: jakarta.xml.ws.spi.http. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.container., - replace: jakarta.ws.rs.container. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws., - replace: jakarta.xml.ws. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.context.spi., - replace: jakarta.enterprise.context.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.spi., - replace: jakarta.resource.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.validator., - replace: jakarta.faces.validator. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.jws., - replace: jakarta.jws. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.annotation., - replace: jakarta.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component.search., - replace: jakarta.faces.component.search. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind., - replace: jakarta.json.bind. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl.tlv., - replace: jakarta.servlet.jsp.jstl.tlv. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl.core., - replace: jakarta.servlet.jsp.jstl.core. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.decorator., - replace: jakarta.decorator. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.bean., - replace: jakarta.faces.bean. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.sse., - replace: jakarta.ws.rs.sse. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.persistence.metamodel., - replace: jakarta.persistence.metamodel. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.context., - replace: jakarta.enterprise.context. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.spi., - replace: jakarta.xml.ws.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api., - replace: jakarta.batch.api. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.el., - replace: jakarta.el. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json., - replace: jakarta.json. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api.chunk.listener., - replace: jakarta.batch.api.chunk.listener. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.persistence.spi., - replace: jakarta.persistence.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.handler., - replace: jakarta.xml.ws.handler. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl.sql., - replace: jakarta.servlet.jsp.jstl.sql. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject.literal., - replace: jakarta.enterprise.inject.literal. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.ext., - replace: jakarta.ws.rs.ext. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.constraints., - replace: jakarta.validation.constraints. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.resources., - replace: jakarta.servlet.jsp.resources. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.constraintvalidation., - replace: jakarta.validation.constraintvalidation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.lifecycle., - replace: jakarta.faces.lifecycle. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.auth.message.callback., - replace: jakarta.security.auth.message.callback. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs., - replace: jakarta.ws.rs. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.auth.message.config., - replace: jakarta.security.auth.message.config. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.websocket.server., - replace: jakarta.websocket.server. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.enterprise.authentication.mechanism.http., - replace: jakarta.security.enterprise.authentication.mechanism.http. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.event., - replace: jakarta.enterprise.event. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.inject., - replace: jakarta.inject. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api.listener., - replace: jakarta.batch.api.listener. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.http., - replace: jakarta.xml.ws.http. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.soap., - replace: jakarta.xml.ws.soap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject.spi., - replace: jakarta.enterprise.inject.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces., - replace: jakarta.faces. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.jms., - replace: jakarta.jms. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.wsaddressing., - replace: jakarta.xml.ws.wsaddressing. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.bootstrap., - replace: jakarta.validation.bootstrap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ejb.spi., - replace: jakarta.ejb.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.metadata., - replace: jakarta.validation.metadata. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp., - replace: jakarta.servlet.jsp. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.convert., - replace: jakarta.faces.convert. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail., - replace: jakarta.mail. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.concurrent., - replace: jakarta.enterprise.concurrent. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api.partition., - replace: jakarta.batch.api.partition. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component.html., - replace: jakarta.faces.component.html. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject.spi.configurator., - replace: jakarta.enterprise.inject.spi.configurator. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.enterprise.credential., - replace: jakarta.security.enterprise.credential. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.context.control., - replace: jakarta.enterprise.context.control. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.annotation., - replace: jakarta.json.bind.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail.search., - replace: jakarta.mail.search. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.util., - replace: jakarta.enterprise.util. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.client., - replace: jakarta.ws.rs.client. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.model., - replace: jakarta.faces.model. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.spi.security., - replace: jakarta.resource.spi.security. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.view., - replace: jakarta.faces.view. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.enterprise., - replace: jakarta.security.enterprise. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.tagext., - replace: jakarta.servlet.jsp.tagext. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.core., - replace: jakarta.ws.rs.core. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.auth.message.module., - replace: jakarta.security.auth.message.module. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.context., - replace: jakarta.faces.context. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.auth.message., - replace: jakarta.security.auth.message. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.annotation.sql., - replace: jakarta.annotation.sql. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.annotation., - replace: jakarta.faces.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.groups., - replace: jakarta.validation.groups. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.jws.soap., - replace: jakarta.jws.soap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ejb., - replace: jakarta.ejb. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.enterprise.identitystore., - replace: jakarta.security.enterprise.identitystore. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation., - replace: jakarta.validation. - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: io.quarkus.updates.core.quarkus30.JavaxToJakartaCodestarts -applicability: - singleSource: - - org.openrewrite.FindSourceFiles: { - filePattern: '**/src/main/codestarts/**/*.java' - } -recipeList: -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.config., - replace: jakarta.json.bind.config. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.soap., - replace: jakarta.xml.soap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.jacc., - replace: jakarta.security.jacc. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail.internet., - replace: jakarta.mail.internet. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api.chunk., - replace: jakarta.batch.api.chunk. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.spi., - replace: jakarta.json.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource., - replace: jakarta.resource. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.spi.work., - replace: jakarta.resource.spi.work. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.annotation.adapters., - replace: jakarta.xml.bind.annotation.adapters. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.webapp., - replace: jakarta.faces.webapp. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.application., - replace: jakarta.faces.application. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.util., - replace: jakarta.xml.bind.util. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.persistence.criteria., - replace: jakarta.persistence.criteria. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.event., - replace: jakarta.faces.event. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.activation., - replace: jakarta.activation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.flow.builder., - replace: jakarta.faces.flow.builder. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.websocket., - replace: jakarta.websocket. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.serializer., - replace: jakarta.json.bind.serializer. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject.se., - replace: jakarta.enterprise.inject.se. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.cci., - replace: jakarta.resource.cci. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.spi., - replace: jakarta.validation.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.transaction., - replace: jakarta.transaction. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.attachment., - replace: jakarta.xml.bind.attachment. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.interceptor., - replace: jakarta.interceptor. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.helpers., - replace: jakarta.xml.bind.helpers. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ejb.embeddable., - replace: jakarta.ejb.embeddable. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.persistence., - replace: jakarta.persistence. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject., - replace: jakarta.enterprise.inject. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail.event., - replace: jakarta.mail.event. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.spi.endpoint., - replace: jakarta.resource.spi.endpoint. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component.visit., - replace: jakarta.faces.component.visit. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl., - replace: jakarta.servlet.jsp.jstl. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.el., - replace: jakarta.servlet.jsp.el. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.el., - replace: jakarta.faces.el. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind., - replace: jakarta.xml.bind. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.adapter., - replace: jakarta.json.bind.adapter. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.valueextraction., - replace: jakarta.validation.valueextraction. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.view.facelets., - replace: jakarta.faces.view.facelets. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.flow., - replace: jakarta.faces.flow. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.render., - replace: jakarta.faces.render. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail.util., - replace: jakarta.mail.util. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.runtime.context., - replace: jakarta.batch.runtime.context. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.annotation.security., - replace: jakarta.annotation.security. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component., - replace: jakarta.faces.component. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl.fmt., - replace: jakarta.servlet.jsp.jstl.fmt. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.spi., - replace: jakarta.json.bind.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet., - replace: jakarta.servlet. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.operations., - replace: jakarta.batch.operations. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.push., - replace: jakarta.faces.push. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.descriptor., - replace: jakarta.servlet.descriptor. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.handler.soap., - replace: jakarta.xml.ws.handler.soap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.executable., - replace: jakarta.validation.executable. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component.behavior., - replace: jakarta.faces.component.behavior. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.annotation., - replace: jakarta.xml.bind.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.runtime., - replace: jakarta.batch.runtime. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.stream., - replace: jakarta.json.stream. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.annotation., - replace: jakarta.servlet.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.resources., - replace: jakarta.servlet.resources. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.http., - replace: jakarta.servlet.http. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.spi.http., - replace: jakarta.xml.ws.spi.http. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.container., - replace: jakarta.ws.rs.container. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws., - replace: jakarta.xml.ws. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.context.spi., - replace: jakarta.enterprise.context.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.spi., - replace: jakarta.resource.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.validator., - replace: jakarta.faces.validator. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.jws., - replace: jakarta.jws. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.annotation., - replace: jakarta.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component.search., - replace: jakarta.faces.component.search. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind., - replace: jakarta.json.bind. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl.tlv., - replace: jakarta.servlet.jsp.jstl.tlv. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl.core., - replace: jakarta.servlet.jsp.jstl.core. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.decorator., - replace: jakarta.decorator. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.bean., - replace: jakarta.faces.bean. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.sse., - replace: jakarta.ws.rs.sse. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.persistence.metamodel., - replace: jakarta.persistence.metamodel. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.context., - replace: jakarta.enterprise.context. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.spi., - replace: jakarta.xml.ws.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api., - replace: jakarta.batch.api. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.el., - replace: jakarta.el. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json., - replace: jakarta.json. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api.chunk.listener., - replace: jakarta.batch.api.chunk.listener. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.persistence.spi., - replace: jakarta.persistence.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.handler., - replace: jakarta.xml.ws.handler. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl.sql., - replace: jakarta.servlet.jsp.jstl.sql. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject.literal., - replace: jakarta.enterprise.inject.literal. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.ext., - replace: jakarta.ws.rs.ext. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.constraints., - replace: jakarta.validation.constraints. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.resources., - replace: jakarta.servlet.jsp.resources. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.constraintvalidation., - replace: jakarta.validation.constraintvalidation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.lifecycle., - replace: jakarta.faces.lifecycle. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.auth.message.callback., - replace: jakarta.security.auth.message.callback. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs., - replace: jakarta.ws.rs. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.auth.message.config., - replace: jakarta.security.auth.message.config. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.websocket.server., - replace: jakarta.websocket.server. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.enterprise.authentication.mechanism.http., - replace: jakarta.security.enterprise.authentication.mechanism.http. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.event., - replace: jakarta.enterprise.event. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.inject., - replace: jakarta.inject. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api.listener., - replace: jakarta.batch.api.listener. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.http., - replace: jakarta.xml.ws.http. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.soap., - replace: jakarta.xml.ws.soap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject.spi., - replace: jakarta.enterprise.inject.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces., - replace: jakarta.faces. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.jms., - replace: jakarta.jms. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.wsaddressing., - replace: jakarta.xml.ws.wsaddressing. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.bootstrap., - replace: jakarta.validation.bootstrap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ejb.spi., - replace: jakarta.ejb.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.metadata., - replace: jakarta.validation.metadata. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp., - replace: jakarta.servlet.jsp. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.convert., - replace: jakarta.faces.convert. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail., - replace: jakarta.mail. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.concurrent., - replace: jakarta.enterprise.concurrent. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api.partition., - replace: jakarta.batch.api.partition. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component.html., - replace: jakarta.faces.component.html. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject.spi.configurator., - replace: jakarta.enterprise.inject.spi.configurator. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.enterprise.credential., - replace: jakarta.security.enterprise.credential. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.context.control., - replace: jakarta.enterprise.context.control. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.annotation., - replace: jakarta.json.bind.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail.search., - replace: jakarta.mail.search. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.util., - replace: jakarta.enterprise.util. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.client., - replace: jakarta.ws.rs.client. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.model., - replace: jakarta.faces.model. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.spi.security., - replace: jakarta.resource.spi.security. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.view., - replace: jakarta.faces.view. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.enterprise., - replace: jakarta.security.enterprise. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.tagext., - replace: jakarta.servlet.jsp.tagext. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.core., - replace: jakarta.ws.rs.core. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.auth.message.module., - replace: jakarta.security.auth.message.module. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.context., - replace: jakarta.faces.context. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.auth.message., - replace: jakarta.security.auth.message. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.annotation.sql., - replace: jakarta.annotation.sql. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.annotation., - replace: jakarta.faces.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.groups., - replace: jakarta.validation.groups. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.jws.soap., - replace: jakarta.jws.soap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ejb., - replace: jakarta.ejb. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.enterprise.identitystore., - replace: jakarta.security.enterprise.identitystore. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation., - replace: jakarta.validation. - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: io.quarkus.updates.core.quarkus30.JavaxToJakartaCodestartsTests -applicability: - singleSource: - - org.openrewrite.FindSourceFiles: { - filePattern: '**/src/test/resources/__snapshots__/**/*.java' - } -recipeList: -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.config., - replace: jakarta.json.bind.config. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.soap., - replace: jakarta.xml.soap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.jacc., - replace: jakarta.security.jacc. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail.internet., - replace: jakarta.mail.internet. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api.chunk., - replace: jakarta.batch.api.chunk. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.spi., - replace: jakarta.json.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource., - replace: jakarta.resource. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.spi.work., - replace: jakarta.resource.spi.work. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.annotation.adapters., - replace: jakarta.xml.bind.annotation.adapters. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.webapp., - replace: jakarta.faces.webapp. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.application., - replace: jakarta.faces.application. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.util., - replace: jakarta.xml.bind.util. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.persistence.criteria., - replace: jakarta.persistence.criteria. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.event., - replace: jakarta.faces.event. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.activation., - replace: jakarta.activation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.flow.builder., - replace: jakarta.faces.flow.builder. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.websocket., - replace: jakarta.websocket. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.serializer., - replace: jakarta.json.bind.serializer. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject.se., - replace: jakarta.enterprise.inject.se. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.cci., - replace: jakarta.resource.cci. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.spi., - replace: jakarta.validation.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.transaction., - replace: jakarta.transaction. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.attachment., - replace: jakarta.xml.bind.attachment. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.interceptor., - replace: jakarta.interceptor. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.helpers., - replace: jakarta.xml.bind.helpers. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ejb.embeddable., - replace: jakarta.ejb.embeddable. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.persistence., - replace: jakarta.persistence. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject., - replace: jakarta.enterprise.inject. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail.event., - replace: jakarta.mail.event. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.spi.endpoint., - replace: jakarta.resource.spi.endpoint. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component.visit., - replace: jakarta.faces.component.visit. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl., - replace: jakarta.servlet.jsp.jstl. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.el., - replace: jakarta.servlet.jsp.el. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.el., - replace: jakarta.faces.el. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind., - replace: jakarta.xml.bind. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.adapter., - replace: jakarta.json.bind.adapter. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.valueextraction., - replace: jakarta.validation.valueextraction. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.view.facelets., - replace: jakarta.faces.view.facelets. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.flow., - replace: jakarta.faces.flow. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.render., - replace: jakarta.faces.render. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail.util., - replace: jakarta.mail.util. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.runtime.context., - replace: jakarta.batch.runtime.context. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.annotation.security., - replace: jakarta.annotation.security. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component., - replace: jakarta.faces.component. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl.fmt., - replace: jakarta.servlet.jsp.jstl.fmt. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.spi., - replace: jakarta.json.bind.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet., - replace: jakarta.servlet. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.operations., - replace: jakarta.batch.operations. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.push., - replace: jakarta.faces.push. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.descriptor., - replace: jakarta.servlet.descriptor. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.handler.soap., - replace: jakarta.xml.ws.handler.soap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.executable., - replace: jakarta.validation.executable. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component.behavior., - replace: jakarta.faces.component.behavior. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.annotation., - replace: jakarta.xml.bind.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.runtime., - replace: jakarta.batch.runtime. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.stream., - replace: jakarta.json.stream. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.annotation., - replace: jakarta.servlet.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.resources., - replace: jakarta.servlet.resources. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.http., - replace: jakarta.servlet.http. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.spi.http., - replace: jakarta.xml.ws.spi.http. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.container., - replace: jakarta.ws.rs.container. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws., - replace: jakarta.xml.ws. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.context.spi., - replace: jakarta.enterprise.context.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.spi., - replace: jakarta.resource.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.validator., - replace: jakarta.faces.validator. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.jws., - replace: jakarta.jws. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.annotation., - replace: jakarta.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component.search., - replace: jakarta.faces.component.search. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind., - replace: jakarta.json.bind. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl.tlv., - replace: jakarta.servlet.jsp.jstl.tlv. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl.core., - replace: jakarta.servlet.jsp.jstl.core. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.decorator., - replace: jakarta.decorator. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.bean., - replace: jakarta.faces.bean. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.sse., - replace: jakarta.ws.rs.sse. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.persistence.metamodel., - replace: jakarta.persistence.metamodel. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.context., - replace: jakarta.enterprise.context. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.spi., - replace: jakarta.xml.ws.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api., - replace: jakarta.batch.api. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.el., - replace: jakarta.el. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json., - replace: jakarta.json. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api.chunk.listener., - replace: jakarta.batch.api.chunk.listener. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.persistence.spi., - replace: jakarta.persistence.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.handler., - replace: jakarta.xml.ws.handler. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl.sql., - replace: jakarta.servlet.jsp.jstl.sql. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject.literal., - replace: jakarta.enterprise.inject.literal. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.ext., - replace: jakarta.ws.rs.ext. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.constraints., - replace: jakarta.validation.constraints. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.resources., - replace: jakarta.servlet.jsp.resources. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.constraintvalidation., - replace: jakarta.validation.constraintvalidation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.lifecycle., - replace: jakarta.faces.lifecycle. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.auth.message.callback., - replace: jakarta.security.auth.message.callback. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs., - replace: jakarta.ws.rs. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.auth.message.config., - replace: jakarta.security.auth.message.config. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.websocket.server., - replace: jakarta.websocket.server. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.enterprise.authentication.mechanism.http., - replace: jakarta.security.enterprise.authentication.mechanism.http. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.event., - replace: jakarta.enterprise.event. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.inject., - replace: jakarta.inject. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api.listener., - replace: jakarta.batch.api.listener. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.http., - replace: jakarta.xml.ws.http. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.soap., - replace: jakarta.xml.ws.soap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject.spi., - replace: jakarta.enterprise.inject.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces., - replace: jakarta.faces. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.jms., - replace: jakarta.jms. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.wsaddressing., - replace: jakarta.xml.ws.wsaddressing. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.bootstrap., - replace: jakarta.validation.bootstrap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ejb.spi., - replace: jakarta.ejb.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.metadata., - replace: jakarta.validation.metadata. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp., - replace: jakarta.servlet.jsp. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.convert., - replace: jakarta.faces.convert. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail., - replace: jakarta.mail. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.concurrent., - replace: jakarta.enterprise.concurrent. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api.partition., - replace: jakarta.batch.api.partition. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component.html., - replace: jakarta.faces.component.html. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject.spi.configurator., - replace: jakarta.enterprise.inject.spi.configurator. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.enterprise.credential., - replace: jakarta.security.enterprise.credential. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.context.control., - replace: jakarta.enterprise.context.control. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.annotation., - replace: jakarta.json.bind.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail.search., - replace: jakarta.mail.search. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.util., - replace: jakarta.enterprise.util. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.client., - replace: jakarta.ws.rs.client. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.model., - replace: jakarta.faces.model. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.spi.security., - replace: jakarta.resource.spi.security. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.view., - replace: jakarta.faces.view. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.enterprise., - replace: jakarta.security.enterprise. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.tagext., - replace: jakarta.servlet.jsp.tagext. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.core., - replace: jakarta.ws.rs.core. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.auth.message.module., - replace: jakarta.security.auth.message.module. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.context., - replace: jakarta.faces.context. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.auth.message., - replace: jakarta.security.auth.message. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.annotation.sql., - replace: jakarta.annotation.sql. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.annotation., - replace: jakarta.faces.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.groups., - replace: jakarta.validation.groups. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.jws.soap., - replace: jakarta.jws.soap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ejb., - replace: jakarta.ejb. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.enterprise.identitystore., - replace: jakarta.security.enterprise.identitystore. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation., - replace: jakarta.validation. - } ---- -type: specs.openrewrite.org/v1beta/recipe -name: io.quarkus.updates.core.quarkus30.JavaxToJakartaKotlin -applicability: - singleSource: - - org.openrewrite.FindSourceFiles: { - filePattern: '**/*.kt' - } -recipeList: -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.config., - replace: jakarta.json.bind.config. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.soap., - replace: jakarta.xml.soap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.jacc., - replace: jakarta.security.jacc. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail.internet., - replace: jakarta.mail.internet. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api.chunk., - replace: jakarta.batch.api.chunk. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.spi., - replace: jakarta.json.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource., - replace: jakarta.resource. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.spi.work., - replace: jakarta.resource.spi.work. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.annotation.adapters., - replace: jakarta.xml.bind.annotation.adapters. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.webapp., - replace: jakarta.faces.webapp. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.application., - replace: jakarta.faces.application. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.util., - replace: jakarta.xml.bind.util. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.persistence.criteria., - replace: jakarta.persistence.criteria. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.event., - replace: jakarta.faces.event. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.activation., - replace: jakarta.activation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.flow.builder., - replace: jakarta.faces.flow.builder. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.websocket., - replace: jakarta.websocket. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.serializer., - replace: jakarta.json.bind.serializer. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject.se., - replace: jakarta.enterprise.inject.se. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.cci., - replace: jakarta.resource.cci. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.spi., - replace: jakarta.validation.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.transaction., - replace: jakarta.transaction. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.attachment., - replace: jakarta.xml.bind.attachment. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.interceptor., - replace: jakarta.interceptor. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.helpers., - replace: jakarta.xml.bind.helpers. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ejb.embeddable., - replace: jakarta.ejb.embeddable. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.persistence., - replace: jakarta.persistence. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject., - replace: jakarta.enterprise.inject. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail.event., - replace: jakarta.mail.event. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.spi.endpoint., - replace: jakarta.resource.spi.endpoint. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component.visit., - replace: jakarta.faces.component.visit. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl., - replace: jakarta.servlet.jsp.jstl. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.el., - replace: jakarta.servlet.jsp.el. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.el., - replace: jakarta.faces.el. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind., - replace: jakarta.xml.bind. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.adapter., - replace: jakarta.json.bind.adapter. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.valueextraction., - replace: jakarta.validation.valueextraction. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.view.facelets., - replace: jakarta.faces.view.facelets. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.flow., - replace: jakarta.faces.flow. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.render., - replace: jakarta.faces.render. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail.util., - replace: jakarta.mail.util. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.runtime.context., - replace: jakarta.batch.runtime.context. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.annotation.security., - replace: jakarta.annotation.security. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component., - replace: jakarta.faces.component. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl.fmt., - replace: jakarta.servlet.jsp.jstl.fmt. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.spi., - replace: jakarta.json.bind.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet., - replace: jakarta.servlet. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.operations., - replace: jakarta.batch.operations. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.push., - replace: jakarta.faces.push. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.descriptor., - replace: jakarta.servlet.descriptor. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.handler.soap., - replace: jakarta.xml.ws.handler.soap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.executable., - replace: jakarta.validation.executable. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component.behavior., - replace: jakarta.faces.component.behavior. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.bind.annotation., - replace: jakarta.xml.bind.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.runtime., - replace: jakarta.batch.runtime. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.stream., - replace: jakarta.json.stream. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.annotation., - replace: jakarta.servlet.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.resources., - replace: jakarta.servlet.resources. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.http., - replace: jakarta.servlet.http. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.spi.http., - replace: jakarta.xml.ws.spi.http. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.container., - replace: jakarta.ws.rs.container. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws., - replace: jakarta.xml.ws. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.context.spi., - replace: jakarta.enterprise.context.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.spi., - replace: jakarta.resource.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.validator., - replace: jakarta.faces.validator. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.jws., - replace: jakarta.jws. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.annotation., - replace: jakarta.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component.search., - replace: jakarta.faces.component.search. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind., - replace: jakarta.json.bind. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl.tlv., - replace: jakarta.servlet.jsp.jstl.tlv. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl.core., - replace: jakarta.servlet.jsp.jstl.core. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.decorator., - replace: jakarta.decorator. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.bean., - replace: jakarta.faces.bean. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.sse., - replace: jakarta.ws.rs.sse. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.persistence.metamodel., - replace: jakarta.persistence.metamodel. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.context., - replace: jakarta.enterprise.context. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.spi., - replace: jakarta.xml.ws.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api., - replace: jakarta.batch.api. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.el., - replace: jakarta.el. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json., - replace: jakarta.json. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api.chunk.listener., - replace: jakarta.batch.api.chunk.listener. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.persistence.spi., - replace: jakarta.persistence.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.handler., - replace: jakarta.xml.ws.handler. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.jstl.sql., - replace: jakarta.servlet.jsp.jstl.sql. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject.literal., - replace: jakarta.enterprise.inject.literal. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.ext., - replace: jakarta.ws.rs.ext. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.constraints., - replace: jakarta.validation.constraints. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.resources., - replace: jakarta.servlet.jsp.resources. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.constraintvalidation., - replace: jakarta.validation.constraintvalidation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.lifecycle., - replace: jakarta.faces.lifecycle. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.auth.message.callback., - replace: jakarta.security.auth.message.callback. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs., - replace: jakarta.ws.rs. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.auth.message.config., - replace: jakarta.security.auth.message.config. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.websocket.server., - replace: jakarta.websocket.server. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.enterprise.authentication.mechanism.http., - replace: jakarta.security.enterprise.authentication.mechanism.http. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.event., - replace: jakarta.enterprise.event. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.inject., - replace: jakarta.inject. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api.listener., - replace: jakarta.batch.api.listener. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.http., - replace: jakarta.xml.ws.http. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.soap., - replace: jakarta.xml.ws.soap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject.spi., - replace: jakarta.enterprise.inject.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces., - replace: jakarta.faces. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.jms., - replace: jakarta.jms. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.xml.ws.wsaddressing., - replace: jakarta.xml.ws.wsaddressing. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.bootstrap., - replace: jakarta.validation.bootstrap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ejb.spi., - replace: jakarta.ejb.spi. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.metadata., - replace: jakarta.validation.metadata. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp., - replace: jakarta.servlet.jsp. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.convert., - replace: jakarta.faces.convert. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail., - replace: jakarta.mail. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.concurrent., - replace: jakarta.enterprise.concurrent. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.batch.api.partition., - replace: jakarta.batch.api.partition. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.component.html., - replace: jakarta.faces.component.html. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.inject.spi.configurator., - replace: jakarta.enterprise.inject.spi.configurator. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.enterprise.credential., - replace: jakarta.security.enterprise.credential. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.context.control., - replace: jakarta.enterprise.context.control. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.json.bind.annotation., - replace: jakarta.json.bind.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.mail.search., - replace: jakarta.mail.search. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.enterprise.util., - replace: jakarta.enterprise.util. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.client., - replace: jakarta.ws.rs.client. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.model., - replace: jakarta.faces.model. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.resource.spi.security., - replace: jakarta.resource.spi.security. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.view., - replace: jakarta.faces.view. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.enterprise., - replace: jakarta.security.enterprise. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.servlet.jsp.tagext., - replace: jakarta.servlet.jsp.tagext. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ws.rs.core., - replace: jakarta.ws.rs.core. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.auth.message.module., - replace: jakarta.security.auth.message.module. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.context., - replace: jakarta.faces.context. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.auth.message., - replace: jakarta.security.auth.message. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.annotation.sql., - replace: jakarta.annotation.sql. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.faces.annotation., - replace: jakarta.faces.annotation. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation.groups., - replace: jakarta.validation.groups. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.jws.soap., - replace: jakarta.jws.soap. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.ejb., - replace: jakarta.ejb. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.security.enterprise.identitystore., - replace: jakarta.security.enterprise.identitystore. - } -- org.openrewrite.text.FindAndReplace: { - find: javax.validation., - replace: jakarta.validation. - } diff --git a/.ci/environments/quarkus-branch/before.sh b/.ci/environments/quarkus-branch/before.sh deleted file mode 100755 index d2cf2e71c0..0000000000 --- a/.ci/environments/quarkus-branch/before.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -set -euo pipefail - -script_dir_path=$(cd `dirname "${BASH_SOURCE[0]}"`; pwd -P) - -"${script_dir_path}"/../common/update_quarkus.sh diff --git a/.ci/environments/quarkus-lts/README.md b/.ci/environments/quarkus-lts/README.md deleted file mode 100644 index 2c8fd03bf0..0000000000 --- a/.ci/environments/quarkus-lts/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# How to create a patch from a revert commit ? - -**NOTE:** Execute those commands at the root of your project - -First, set the variables to be used (change the values): - -``` bash -commit_id={COMMIT_HASH} -patch_name={ANY_MEANINGFUL_NAME} -``` - -Finally, create the patch file: - -``` bash -git revert --no-commit ${commit_id} -git commit -m "Revert ${patch_name}" -git show $(git rev-parse HEAD) > .ci/environments/quarkus-lts/patches/${patch_name} -git reset HEAD~1 --hard -``` diff --git a/.ci/environments/quarkus-lts/before.sh b/.ci/environments/quarkus-lts/before.sh deleted file mode 100755 index d2cf2e71c0..0000000000 --- a/.ci/environments/quarkus-lts/before.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -set -euo pipefail - -script_dir_path=$(cd `dirname "${BASH_SOURCE[0]}"`; pwd -P) - -"${script_dir_path}"/../common/update_quarkus.sh diff --git a/.ci/environments/quarkus-lts/patches/0001_align-protobuf-and-grpc.patch b/.ci/environments/quarkus-lts/patches/0001_align-protobuf-and-grpc.patch deleted file mode 100644 index 88e78df996..0000000000 --- a/.ci/environments/quarkus-lts/patches/0001_align-protobuf-and-grpc.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-server-rpc-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-server-rpc-quarkus/pom.xml -index c2ca6f930..a50429305 100644 ---- a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-server-rpc-quarkus/pom.xml -+++ b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-server-rpc-quarkus/pom.xml -@@ -15,8 +15,9 @@ - 3.8.1 - 11 - 3.0.0-M7 -- 3.22.0 -- 1.51.1 -+ -+ 3.21.1 -+ 1.49.0 - 1.6.0 - 0.6.1 - 3.3.0 diff --git a/.ci/environments/quarkus-main/before.sh b/.ci/environments/quarkus-main/before.sh deleted file mode 100755 index d2cf2e71c0..0000000000 --- a/.ci/environments/quarkus-main/before.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -set -euo pipefail - -script_dir_path=$(cd `dirname "${BASH_SOURCE[0]}"`; pwd -P) - -"${script_dir_path}"/../common/update_quarkus.sh 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..1c15ded579 --- /dev/null +++ b/.ci/jenkins/Jenkinsfile @@ -0,0 +1,46 @@ +@Library('jenkins-pipeline-shared-libraries')_ + +pr_check_script = null + +pipeline { + agent { + label util.avoidFaultyNodes('ubuntu') + } + options { + timestamps() + timeout(time: 480, unit: 'MINUTES') + disableConcurrentBuilds(abortPrevious: true) + } + environment { + BUILDCHAIN_PROJECT = 'apache/incubator-kie-kogito-examples' + + KOGITO_EXAMPLES_BUILD_MVN_OPTS = '-Dvalidate-formatting' + } + stages { + stage('Initialize') { + steps { + 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 1ca5c5d20c..17f5aa52b2 100644 --- a/.ci/jenkins/Jenkinsfile.deploy +++ b/.ci/jenkins/Jenkinsfile.deploy @@ -2,7 +2,6 @@ import org.jenkinsci.plugins.workflow.libs.Library @Library('jenkins-pipeline-shared-libraries')_ import org.kie.jenkins.MavenCommand -import org.kie.jenkins.MavenStagingHelper deployProperties = [:] @@ -10,12 +9,11 @@ examplesHelper = null 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 + label util.avoidFaultyNodes() + } } options { @@ -23,27 +21,17 @@ pipeline { timeout(time: 180, 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' - PR_BRANCH_HASH = "${util.generateHash(10)}" - MAVEN_DEPLOY_LOCAL_DIR = "${WORKSPACE}/maven_deploy_dir" } stages { stage('Initialize') { steps { script { - cleanWs() + cleanWs(disableDeferredWipeout: true) checkout scm examplesHelper = load '.ci/jenkins/helper_scripts/examples.groovy' @@ -88,7 +76,7 @@ pipeline { script { dir(getRepoName()) { if (githubscm.isBranchExist('origin',getPRBranch())) { - githubscm.removeRemoteBranch('origin', getPRBranch()) + githubscm.removeRemoteBranch('origin', getPRBranch(), getGitAuthorPushCredsId()) } githubscm.createBranch(getPRBranch()) } @@ -104,11 +92,28 @@ pipeline { dir(getRepoName()) { def oldKogitoVersion = readMavenPom(file: 'pom.xml').version echo "Got old Kogito version ${oldKogitoVersion}" - - maven.mvnVersionsUpdateParentAndChildModules(getMavenCommand(), getProjectVersion(), true) - maven.mvnSetVersionProperty(getMavenCommand(), 'version.org.kie.kogito', getProjectVersion()) - maven.mvnSetVersionProperty(getMavenCommand(), 'kogito.bom.version', getProjectVersion()) - maven.mvnSetVersionProperty(getMavenCommand(), 'version.org.drools', getDroolsVersion()) + configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){ + maven.mvnVersionsUpdateParentAndChildModules( + getMavenCommand().withSettingsXmlFile(MAVEN_SETTINGS_FILE), + getProjectVersion(), + true + ) + maven.mvnSetVersionProperty( + getMavenCommand().withSettingsXmlFile(MAVEN_SETTINGS_FILE), + 'version.org.kie.kogito', + getProjectVersion() + ) + maven.mvnSetVersionProperty( + getMavenCommand().withSettingsXmlFile(MAVEN_SETTINGS_FILE), + 'kogito.bom.version', + getProjectVersion() + ) + maven.mvnSetVersionProperty( + getMavenCommand().withSettingsXmlFile(MAVEN_SETTINGS_FILE), + 'version.org.drools', + getDroolsVersion() + ) + } if (getProjectVersion() != oldKogitoVersion) { def status = sh(script: "grep -ir '${oldKogitoVersion}' --include='pom.xml'", returnStatus: true) @@ -123,16 +128,17 @@ pipeline { stage('Build kogito-examples') { steps { script { - dir(getRepoName()) { - def mvnCmd = getMavenCommand() - .withOptions(env.BUILD_MVN_OPTS_CURRENT ? [ env.BUILD_MVN_OPTS_CURRENT ] : []) - .withOptions(env.KOGITO_EXAMPLES_BUILD_MVN_OPTS ? [ env.KOGITO_EXAMPLES_BUILD_MVN_OPTS ] : []) - .withProperty('maven.test.failure.ignore', true) - - if (params.SKIP_TESTS) { - mvnCmd.skipTests() // Conflict somehow with Python testing. If `skipTests={anyvalue}` is set, then exec plugin is not executed ... - } - util.runWithPythonVirtualEnv(mvnCmd.getFullRunCommand('clean install'), 'swf') + def mvnCmd = getMavenCommand() + .withOptions(env.BUILD_MVN_OPTS_CURRENT ? [ env.BUILD_MVN_OPTS_CURRENT ] : []) + .withOptions(env.KOGITO_EXAMPLES_BUILD_MVN_OPTS ? [ env.KOGITO_EXAMPLES_BUILD_MVN_OPTS ] : []) + .withProperty('maven.test.failure.ignore', true) + if (params.SKIP_TESTS) { + mvnCmd.skipTests() // Conflict somehow with Python testing. If `skipTests={anyvalue}` is set, then exec plugin is not executed ... + } + configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){ + mvnCmd + .withSettingsXmlFile(MAVEN_SETTINGS_FILE) + .run('clean install') } } } @@ -145,37 +151,22 @@ pipeline { } } } - stage('Deploy kogito-examples locally') { - steps { - script { - dir(getRepoName()) { - runMavenDeploy(true) - } - } - } - } - stage('Upload artifacts to given repository') { - when { - expression { return !isRelease() && shouldDeployToRepository() } - } - steps { - script { - dir(getRepoName()) { - // Deploy to specific repository with credentials - maven.uploadLocalArtifacts(env.MAVEN_REPO_CREDS_ID, getLocalDeploymentFolder(), getMavenRepoZipUrl()) - } - } - } - } - stage('Stage artifacts') { + stage('Deploy parent poms') { when { - expression { return shouldStageArtifacts() } + expression { shouldDeployToRepository() } } steps { script { - dir(getRepoName()) { - // Stage release artifacts - runMavenStage() + withCredentials([usernamePassword(credentialsId: env.MAVEN_REPO_CREDS_ID, usernameVariable: 'REPOSITORY_USER', passwordVariable: 'REPOSITORY_TOKEN')]) { + configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){ + getMavenCommand() + .withOptions(env.BUILD_MVN_OPTS_CURRENT ? [ env.BUILD_MVN_OPTS_CURRENT ] : []) + .withOptions(env.KOGITO_EXAMPLES_BUILD_MVN_OPTS ? [ env.KOGITO_EXAMPLES_BUILD_MVN_OPTS ] : []) + .withOptions("-pl .,kogito-quarkus-examples,kogito-springboot-examples,serverless-workflow-examples") + .skipTests(true) + .withSettingsXmlFile(MAVEN_SETTINGS_FILE) + .run("deploy -DdeployAtEnd -Dapache.repository.username=${REPOSITORY_USER} -Dapache.repository.password=${REPOSITORY_TOKEN} -DretryFailedDeploymentCount=5") + } } } } @@ -211,7 +202,7 @@ pipeline { } cleanup { script { - util.cleanNode('docker') + util.cleanNode() } } } @@ -231,7 +222,7 @@ void saveReports() { void checkoutRepo() { deleteDir() - checkout(githubscm.resolveRepository(getRepoName(), getGitAuthor(), getBuildBranch(), false)) + checkout(githubscm.resolveRepository(getRepoName(), getGitAuthor(), getBuildBranch(), false, getGitAuthorCredsId())) } void addNotIgnoredPoms() { @@ -259,23 +250,16 @@ void commitAndCreatePR() { prBody += '\nPlease review and merge.' } // Not using githubscm.commitChanges() because globbing won't work. - // See: https://github.com/kiegroup/kogito-runtimes/pull/570#discussion_r449268738 + // See: https://github.com/apache/incubator-kie-kogito-runtimes/pull/570#discussion_r449268738 addNotIgnoredPoms() + githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId()) sh "git commit -m '${commitMsg}'" - githubscm.pushObject('origin', getPRBranch(), getGitAuthorCredsID()) - deployProperties["${getRepoName()}.pr.link"] = githubscm.createPRWithLabels(commitMsg, prBody, getBuildBranch(), ['skip-ci'] as String[], getGitAuthorCredsID()) -} - -boolean isSpecificArtifactsUpload() { - return env.MAVEN_DEPLOY_REPOSITORY && env.MAVEN_REPO_CREDS_ID -} - -boolean shouldStageArtifacts() { - return isRelease() + githubscm.pushObject('origin', getPRBranch(), getGitAuthorPushCredsId()) + deployProperties["${getRepoName()}.pr.link"] = githubscm.createPRWithLabels(commitMsg, prBody, getBuildBranch(), ['skip-ci'] as String[], getGitAuthorCredsId()) } 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() { @@ -311,8 +295,12 @@ String getPRBranch() { return params.KOGITO_PR_BRANCH } -String getGitAuthorCredsID() { - return env.AUTHOR_CREDS_ID +String getGitAuthorCredsId() { + return env.GIT_AUTHOR_CREDS_ID +} + +String getGitAuthorPushCredsId() { + return env.GIT_AUTHOR_PUSH_CREDS_ID } void setDeployPropertyIfNeeded(String key, def value) { @@ -321,51 +309,14 @@ void setDeployPropertyIfNeeded(String key, def value) { } } -MavenCommand getMavenCommand() { +MavenCommand getMavenCommand(String directory = '') { + directory = directory ?: getRepoName() MavenCommand mvnCmd = new MavenCommand(this, ['-fae', '-ntp']) - .withSettingsXmlId(env.MAVEN_SETTINGS_CONFIG_FILE_ID) .withOptions(env.BUILD_MVN_OPTS ? [ env.BUILD_MVN_OPTS ] : []) + .inDirectory(directory) .withProperty('full') if (env.MAVEN_DEPENDENCIES_REPOSITORY) { mvnCmd.withDependencyRepositoryInSettings('deps-repo', env.MAVEN_DEPENDENCIES_REPOSITORY) } return mvnCmd } - -void runMavenDeploy(boolean localDeployment = false) { - mvnCmd = getMavenCommand() - .withOptions(env.BUILD_MVN_OPTS_CURRENT ? [ env.BUILD_MVN_OPTS_CURRENT ] : []) - .withOptions(env.KOGITO_EXAMPLES_BUILD_MVN_OPTS ? [ env.KOGITO_EXAMPLES_BUILD_MVN_OPTS ] : []) - - if (localDeployment) { - mvnCmd.withLocalDeployFolder(getLocalDeploymentFolder()) - } else if (env.MAVEN_DEPLOY_REPOSITORY) { - mvnCmd.withDeployRepository(env.MAVEN_DEPLOY_REPOSITORY) - } - - mvnCmd.withOptions(examplesHelper.getDeployableArtifactIds().collect { "-pl :${it} "}) - - mvnCmd.skipTests(true).run('clean deploy') - - util.runWithPythonVirtualEnv(mvnCmd.skipTests(true).getFullRunCommand('clean deploy'), 'swf') -} - -void runMavenStage() { - MavenStagingHelper stagingHelper = getStagingHelper() - 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()) - .withNexusReleaseUrl(env.NEXUS_RELEASE_URL) - .withNexusReleaseRepositoryId(env.NEXUS_RELEASE_REPOSITORY_ID) -} - -String getLocalDeploymentFolder() { - return "${env.MAVEN_DEPLOY_LOCAL_DIR}/${getRepoName()}" -} - -String getMavenRepoZipUrl() { - return "${env.MAVEN_DEPLOY_REPOSITORY.replaceAll('/content/', '/service/local/').replaceFirst('/*$', '')}/content-compressed" -} diff --git a/.ci/jenkins/Jenkinsfile.post-release b/.ci/jenkins/Jenkinsfile.post-release index afcfebd3bf..de39b435fa 100644 --- a/.ci/jenkins/Jenkinsfile.post-release +++ b/.ci/jenkins/Jenkinsfile.post-release @@ -3,12 +3,11 @@ import org.jenkinsci.plugins.workflow.libs.Library 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 + label util.avoidFaultyNodes() + } } options { @@ -19,14 +18,13 @@ pipeline { environment { CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}") - GITHUB_CLI_VERSION = '0.11.1' } stages { stage('Initialization') { steps { script { - cleanWs() + cleanWs(disableDeferredWipeout: true) if (params.DISPLAY_NAME) { currentBuild.displayName = params.DISPLAY_NAME @@ -34,10 +32,7 @@ pipeline { // Verify version is set and if on right release branch assert getProjectVersion() - assert getBuildBranch() == util.getReleaseBranchFromVersion(getProjectVersion()) - - installGithubCLI() } } } @@ -59,7 +54,7 @@ pipeline { } cleanup { script { - util.cleanNode('docker') + util.cleanNode() } } } @@ -97,8 +92,16 @@ 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 getGitAuthorPushTokenCredsId() { + return env.GIT_AUTHOR_PUSH_TOKEN_CREDS_ID } ////////////////////////////////////////////////////////////////////////////// @@ -107,22 +110,13 @@ String getGitAuthorCredsID() { void checkoutTag(String repo, String tagName, String localBranchName = tagName) { deleteDir() - checkout(githubscm.resolveRepository(repo, getGitAuthor(), getBuildBranch(), false, getGitAuthorCredsID())) + checkout(githubscm.resolveRepository(repo, getGitAuthor(), getBuildBranch(), false, getGitAuthorCredsId())) // Need to manually checkout branch since we are in 'detached HEAD' state after the git checkout command. sh "git checkout tags/${tagName} -b ${localBranchName}" } -void installGithubCLI() { - sh """ - wget https://github.com/cli/cli/releases/download/v${env.GITHUB_CLI_VERSION}/gh_${env.GITHUB_CLI_VERSION}_linux_amd64.tar.gz - tar xzf gh_${env.GITHUB_CLI_VERSION}_linux_amd64.tar.gz - mv gh_${env.GITHUB_CLI_VERSION}_linux_amd64/bin/gh . - rm -r gh_${env.GITHUB_CLI_VERSION}_linux_amd64* - """ -} - void setDefaultBranch(String defaultBranch) { - withCredentials([string(credentialsId: env.GITHUB_TOKEN_CREDS_ID, variable: 'GITHUB_TOKEN')]) { + withCredentials([string(credentialsId: getGitAuthorPushTokenCredsId(), variable: 'GITHUB_TOKEN')]) { // gh command from https://github.com/cli/cli/issues/929#issuecomment-629253585 def newDefaultBranch = sh(script: "../gh api -XPATCH 'repos/${getGitAuthor()}/${getRepoName()}' -f default_branch=${defaultBranch} | jq '.default_branch'", returnStdout: true).trim() if (newDefaultBranch == "\"${defaultBranch}\"") { @@ -135,7 +129,7 @@ void setDefaultBranch(String defaultBranch) { void forcePushProtectedBranch(String defaultBranch, String tempBranch) { setDefaultBranch(tempBranch) - withCredentials([usernamePassword(credentialsId: getGitAuthorCredsID(), usernameVariable: 'GIT_USERNAME', passwordVariable: 'GIT_PASSWORD')]) { + withCredentials([usernamePassword(credentialsId: getGitAuthorPushCredsId(), usernameVariable: 'GIT_USERNAME', passwordVariable: 'GIT_PASSWORD')]) { sh """ git config --local credential.helper \"!f() { echo username=\\$GIT_USERNAME; echo password=\\$GIT_PASSWORD; }; f\" git push --delete origin ${defaultBranch} diff --git a/.ci/jenkins/Jenkinsfile.promote b/.ci/jenkins/Jenkinsfile.promote index 541473a129..50caf0dd78 100644 --- a/.ci/jenkins/Jenkinsfile.promote +++ b/.ci/jenkins/Jenkinsfile.promote @@ -8,7 +8,11 @@ examplesHelper = null pipeline { agent { - label 'rhel8 && !built-in' + docker { + image env.AGENT_DOCKER_BUILDER_IMAGE + args env.AGENT_DOCKER_BUILDER_ARGS + label util.avoidFaultyNodes() + } } options { @@ -24,7 +28,7 @@ pipeline { stage('Initialization') { steps { script { - cleanWs() + cleanWs(disableDeferredWipeout: true) checkout scm examplesHelper = load '.ci/jenkins/helper_scripts/examples.groovy' @@ -45,8 +49,8 @@ pipeline { steps { script { dir(getRepoName()) { + approveAndMergePR(getDeployPrLink()) checkoutRepo() - mergeAndPush(getDeployPrLink()) tagLatest() } } @@ -58,11 +62,11 @@ pipeline { script { dir(getRepoName()) { checkoutRepo() - if (githubscm.isReleaseExist(getGitTag(), getGitAuthorCredsID())) { - githubscm.deleteRelease(getGitTag(), getGitAuthorCredsID()) + if (githubscm.isReleaseExist(getGitTag(), getGitAuthorCredsId())) { + githubscm.deleteRelease(getGitTag(), getGitAuthorPushCredsId()) } - githubscm.createReleaseWithGeneratedReleaseNotes(getGitTag(), getBuildBranch(), githubscm.getPreviousTagFromVersion(getGitTag()), getGitAuthorCredsID()) - githubscm.updateReleaseBody(getGitTag(), getGitAuthorCredsID()) + githubscm.createReleaseWithGeneratedReleaseNotes(getGitTag(), getBuildBranch(), githubscm.getPreviousTagFromVersion(getGitTag()), getGitAuthorPushCredsId()) + githubscm.updateReleaseBody(getGitTag(), getGitAuthorPushCredsId()) } } } @@ -74,7 +78,7 @@ pipeline { } cleanup { script { - util.cleanNode('docker') + util.cleanNode() } } } @@ -151,8 +155,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() { @@ -165,21 +173,21 @@ 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()) +void approveAndMergePR(String prLink) { + if (prLink?.trim()) { + githubscm.approvePR(prLink, getGitAuthorPushCredsId()) + githubscm.mergePR(prLink, 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 deleted file mode 100644 index d194a76d3c..0000000000 --- a/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.pr +++ /dev/null @@ -1,102 +0,0 @@ -@Library('jenkins-pipeline-shared-libraries')_ - -import org.kie.jenkins.MavenCommand - -changeAuthor = env.ghprbAuthorRepoGitUrl ? util.getGroup(env.ghprbAuthorRepoGitUrl) : (env.ghprbPullAuthorLogin ?: CHANGE_AUTHOR) -changeBranch = env.ghprbSourceBranch ?: CHANGE_BRANCH -changeTarget = env.ghprbTargetBranch ?: CHANGE_TARGET - -pipeline { - agent { - label 'kie-rhel8 && docker && kie-mem16g && !built-in' - } - tools { - maven env.BUILD_MAVEN_TOOL - jdk env.BUILD_JDK_TOOL - } - options { - timestamps() - timeout(time: 180, unit: 'MINUTES') - } - stages { - stage('Initialization') { - steps { - script { - cleanWs() - - sh 'printenv > env_props' - archiveArtifacts artifacts: 'env_props' - - dir(getRepoName()) { - checkout(githubscm.resolveRepository(getRepoName(), changeAuthor, changeBranch, false)) - // need to manually checkout branch since on a detached branch after checkout command - sh "git checkout ${changeBranch}" - } - } - } - } - stage('Build upstream projects') { - steps { - script { - [ 'drools', 'kogito-runtimes', 'kogito-apps' ].each { project -> - dir(project) { - githubscm.checkoutIfExists(project, changeAuthor, changeBranch, 'kiegroup', changeTarget, true) - sh '.ci/environments/update.sh quarkus-3' - getMavenCommand().withProperty('quickly').run('clean install') - } - } - } - } - } - stage('Generate rewrite patch') { - steps { - script { - dir(getRepoName()) { - configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]) { - env.BUILD_MVN_OPTS = "${env.BUILD_MVN_OPTS ?: ''} -s ${MAVEN_SETTINGS_FILE} -Dmaven.wagon.http.ssl.insecure=true -Dmaven.test.failure.ignore=true" - echo "BUILD_MVN_OPTS = ${BUILD_MVN_OPTS}" - - util.runWithPythonVirtualEnv('.ci/environments/quarkus-3/before.sh rewrite', 'swf') - } - } - } - } - } - stage('Push changes') { - steps { - script { - dir(getRepoName()) { - githubscm.pushObject('origin', changeBranch, getGitAuthorCredsId()) - } - } - } - } - } - post { - always { - script { - cleanWs() - } - } - unsuccessful { - script { - pullrequest.postComment(util.getMarkdownTestSummary('Rewrite quarkus-3 before.sh patch file', '', "${BUILD_URL}", 'GITHUB')) - } - } - } -} - -String getRepoName() { - return env.REPO_NAME -} - -String getGitAuthorCredsId() { - return env.AUTHOR_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 deleted file mode 100644 index 4a038baac7..0000000000 --- a/.ci/jenkins/Jenkinsfile.quarkus-3.rewrite.standalone +++ /dev/null @@ -1,182 +0,0 @@ -import org.jenkinsci.plugins.workflow.libs.Library -@Library('jenkins-pipeline-shared-libraries')_ - -import org.kie.jenkins.MavenCommand - -previousHash = '' - -pipeline { - agent { - label 'kie-rhel8 && docker && kie-mem16g && !built-in' - } - - tools { - maven env.BUILD_MAVEN_TOOL - jdk env.BUILD_JDK_TOOL - } - - options { - timestamps() - timeout(time: 180, unit: 'MINUTES') - } - - environment { - KOGITO_CI_EMAIL_TO = credentials("${JENKINS_EMAIL_CREDS_ID}") - - PR_BRANCH_HASH = "${util.generateHash(10)}" - } - - stages { - stage('Initialize') { - steps { - script { - clean() - - if (params.DISPLAY_NAME) { - currentBuild.displayName = params.DISPLAY_NAME - } - dir(getRepoName()) { - checkoutRepo(getRepoName(), getBuildBranch()) - } - } - } - } - stage('Prepare for PR') { - when { - expression { !isPRSourceBranch() } - } - steps { - script { - dir(getRepoName()) { - githubscm.createBranch(getPRBranch()) - previousHash = githubscm.getCommitHash() - } - } - } - } - stage('Build upstream projects') { - steps { - script { - [ 'drools', 'kogito-runtimes', 'kogito-apps' ].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') - } - } - } - } - } - stage('Generate rewrite patch') { - steps { - script { - dir(getRepoName()) { - configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]) { - env.BUILD_MVN_OPTS = "${env.BUILD_MVN_OPTS ?: ''} -s ${MAVEN_SETTINGS_FILE} -Dmaven.wagon.http.ssl.insecure=true -Dmaven.test.failure.ignore=true" - echo "BUILD_MVN_OPTS = ${BUILD_MVN_OPTS}" - - util.runWithPythonVirtualEnv('.ci/environments/quarkus-3/before.sh rewrite', 'swf') - } - } - } - } - } - stage('Push changes') { - steps { - script { - dir(getRepoName()) { - githubscm.pushObject('origin', isPRSourceBranch() ? getBuildBranch() : getPRBranch(), getGitAuthorCredsId()) - } - } - } - } - stage('Create PR') { - when { - expression { !isPRSourceBranch() } - } - steps { - script { - dir(getRepoName()) { - if (githubscm.getCommitHash() != previousHash) { - def prTitle = '[Quarkus 3 migration] Updated Openrewrite patch' - def prBody = "Please review and merge.\n\nGenerated by build ${BUILD_TAG}: ${BUILD_URL}." - prLink = githubscm.createPR(prTitle, prBody, getBuildBranch(), getGitAuthorCredsId()) - sendNotification("PR to update Quarkus 3 environment has been created.\nHere is the PR link: ${prLink}") - } - } - } - } - } - } - post { - unsuccessful { - sendErrorNotification() - } - cleanup { - script { - clean() - } - } - } -} - -void clean() { - sh 'rm -rf ~/.rewrite-cache/' - util.cleanNode('docker') -} - -void sendErrorNotification() { - mailer.sendMarkdownTestSummaryNotification('quarkus-3', "[${getBuildBranch()}] Kogito Examples", [env.KOGITO_CI_EMAIL_TO]) -} - -void sendNotification(String body) { - emailext body: "${body}", - subject: "[${getBuildBranch()}] Kogito Examples - quarkus-3", - to: env.KOGITO_CI_EMAIL_TO -} - -void checkoutRepo(String repository, String branch) { - checkout(githubscm.resolveRepository(repository, getGitAuthor(), branch, false)) - // need to manually checkout branch since on a detached branch after checkout command - sh "git checkout ${branch}" -} - -String getRepoName() { - return env.REPO_NAME -} - -String getGitAuthor() { - // GIT_AUTHOR can be env or param - return "${GIT_AUTHOR}" -} - -String getBuildBranch() { - return params.BUILD_BRANCH_NAME -} - -String getBaseAuthor() { - return env.BASE_AUTHOR -} - -String getBaseBranch() { - return env.BASE_BRANCH -} - -boolean isPRSourceBranch() { - return params.IS_PR_SOURCE_BRANCH -} - -String getGitAuthorCredsId() { - return env.AUTHOR_CREDS_ID -} - -String getPRBranch() { - return "${getBuildBranch()}-${env.PR_BRANCH_HASH}" -} - -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 43004d809d..ad3eba6a76 100644 --- a/.ci/jenkins/Jenkinsfile.setup-branch +++ b/.ci/jenkins/Jenkinsfile.setup-branch @@ -5,18 +5,17 @@ import org.kie.jenkins.MavenCommand examplesHelper = null -droolsRepo = 'drools' -kogitoRuntimesRepo = 'kogito-runtimes' -kogitoAppsRepo = 'kogito-apps' +droolsRepo = 'incubator-kie-drools' +kogitoRuntimesRepo = 'incubator-kie-kogito-runtimes' +kogitoAppsRepo = 'incubator-kie-kogito-apps' 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 + label util.avoidFaultyNodes() + } } options { @@ -24,24 +23,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) checkout scm examplesHelper = load '.ci/jenkins/helper_scripts/examples.groovy' @@ -50,7 +40,7 @@ pipeline { currentBuild.displayName = params.DISPLAY_NAME } - checkoutRepo(droolsRepo, getDroolsTargetBranch()) + checkoutRepo(droolsRepo, getBuildBranch()) checkoutRepo(kogitoRuntimesRepo, getBuildBranch()) checkoutRepo(kogitoAppsRepo, getBuildBranch()) checkoutRepo(getRepoName(), getBuildBranch()) @@ -60,33 +50,42 @@ 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('Build Kogito Apps') { steps { script { - getMavenCommand(kogitoAppsRepo) - .withOptions(env.BUILD_MVN_OPTS_UPSTREAM ? [ env.BUILD_MVN_OPTS_UPSTREAM ] : []) - .withOptions(env.KOGITO_APPS_BUILD_MVN_OPTS_UPSTREAM ? [ env.KOGITO_APPS_BUILD_MVN_OPTS_UPSTREAM ] : []) - .withProperty('quickly') - .run('clean install') + configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){ + getMavenCommand(kogitoAppsRepo) + .withOptions(env.BUILD_MVN_OPTS_UPSTREAM ? [ env.BUILD_MVN_OPTS_UPSTREAM ] : []) + .withOptions(env.KOGITO_APPS_BUILD_MVN_OPTS_UPSTREAM ? [ env.KOGITO_APPS_BUILD_MVN_OPTS_UPSTREAM ] : []) + .withProperty('quickly') + .withSettingsXmlFile(MAVEN_SETTINGS_FILE) + .run('clean install') + } } } } @@ -96,11 +95,28 @@ pipeline { dir(getRepoName()) { def oldKogitoVersion = readMavenPom(file: 'pom.xml').version echo "Got old Kogito version ${oldKogitoVersion}" - - maven.mvnVersionsUpdateParentAndChildModules(getMavenCommand(), getKogitoVersion(), true) - maven.mvnSetVersionProperty(getMavenCommand(), 'version.org.kie.kogito', getKogitoVersion()) - maven.mvnSetVersionProperty(getMavenCommand(), 'kogito.bom.version', getKogitoVersion()) - maven.mvnSetVersionProperty(getMavenCommand(), 'version.org.drools', getDroolsVersion()) + configFileProvider([configFile(fileId: env.MAVEN_SETTINGS_CONFIG_FILE_ID, variable: 'MAVEN_SETTINGS_FILE')]){ + maven.mvnVersionsUpdateParentAndChildModules( + getMavenCommand().withSettingsXmlFile(MAVEN_SETTINGS_FILE), + getKogitoVersion(), + true + ) + maven.mvnSetVersionProperty( + getMavenCommand().withSettingsXmlFile(MAVEN_SETTINGS_FILE), + 'version.org.kie.kogito', + getKogitoVersion() + ) + maven.mvnSetVersionProperty( + getMavenCommand().withSettingsXmlFile(MAVEN_SETTINGS_FILE), + 'kogito.bom.version', + getKogitoVersion() + ) + maven.mvnSetVersionProperty( + getMavenCommand().withSettingsXmlFile(MAVEN_SETTINGS_FILE), + 'version.org.drools', + getDroolsVersion() + ) + } if (getKogitoVersion() != oldKogitoVersion) { def status = sh(script: "grep -ir '${oldKogitoVersion}' --include='pom.xml'", returnStatus: true) @@ -133,8 +149,9 @@ pipeline { if (githubscm.isThereAnyChanges()) { def commitMsg = "Update version to Kogito ${getKogitoVersion()} / Drools ${getDroolsVersion()}" + githubscm.setUserConfigFromCreds(getGitAuthorPushCredsId()) githubscm.commitChanges(commitMsg) - githubscm.pushObject('origin', getBuildBranch(), getGitAuthorCredsID()) + githubscm.pushObject('origin', getBuildBranch(), getGitAuthorPushCredsId()) } else { println '[WARN] no changes to commit' } @@ -149,7 +166,7 @@ pipeline { } cleanup { script { - util.cleanNode('docker') + util.cleanNode() } } } @@ -166,16 +183,12 @@ 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}" } } -String getDroolsTargetBranch() { - return util.calculateTargetReleaseBranch(getBuildBranch(), 7) -} - String getRepoName() { return env.REPO_NAME } @@ -197,13 +210,16 @@ String getDroolsVersion() { return params.DROOLS_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 = '') { def mvnCmd = new MavenCommand(this, ['-fae', '-ntp']) - .withSettingsXmlId(env.MAVEN_SETTINGS_CONFIG_FILE_ID) .withOptions(env.BUILD_MVN_OPTS ? [ env.BUILD_MVN_OPTS ] : []) if (directory) { mvnCmd.inDirectory(directory) diff --git a/.ci/jenkins/dsl/jobs.groovy b/.ci/jenkins/dsl/jobs.groovy index 826ae91b40..fafdda74f4 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 @@ -67,7 +85,7 @@ List getExamplesBuildMvnOptions(JenkinsFolder jobFolder) { } // PR checks -KogitoJobUtils.createAllEnvironmentsPerRepoPRJobs(this) { jobFolder -> getMultijobPRConfig(jobFolder) } +Utils.isMainBranch(this) && KogitoJobTemplate.createPullRequestMultibranchPipelineJob(this, "${jenkins_path}/Jenkinsfile") // Init branch createSetupBranchJob() @@ -78,13 +96,15 @@ Closure setup4AMCronTriggerJobParamsGetter = { script -> jobParams.triggers = [ cron: 'H 4 * * *' ] return jobParams } +Closure setupAdditionalTimeoutForDefaultNightly = { script -> + def jobParams = JobParamsUtils.DEFAULT_PARAMS_GETTER(script) + jobParams.env.put('ADDITIONAL_TIMEOUT', '480') + return jobParams +} + Closure nightlyJobParamsGetter = isMainStream() ? JobParamsUtils.DEFAULT_PARAMS_GETTER : setup4AMCronTriggerJobParamsGetter -KogitoJobUtils.createNightlyBuildChainBuildAndDeployJobForCurrentRepo(this, '', true) +KogitoJobUtils.createNightlyBuildChainBuildAndDeployJobForCurrentRepo(this, '', true, setupAdditionalTimeoutForDefaultNightly) setupSpecificBuildChainNightlyJob('native', nightlyJobParamsGetter) -setupNightlyQuarkusIntegrationJob('quarkus-main', nightlyJobParamsGetter) -setupNightlyQuarkusIntegrationJob('quarkus-branch', nightlyJobParamsGetter) -setupNightlyQuarkusIntegrationJob('quarkus-lts', nightlyJobParamsGetter) -setupNightlyQuarkusIntegrationJob('native-lts', nightlyJobParamsGetter) // Release jobs setupReleaseDeployJob() @@ -95,12 +115,6 @@ if (isMainStream()) { KogitoJobUtils.createQuarkusUpdateToolsJob(this, 'kogito-examples', [ properties: [ 'quarkus-plugin.version', 'quarkus.platform.version' ], ]) - - // Quarkus 3 - if (EnvUtils.isEnvironmentEnabled(this, 'quarkus-3')) { - setupPrQuarkus3RewriteJob() - setupStandaloneQuarkus3RewriteJob() - } } ///////////////////////////////////////////////////////////////// @@ -117,12 +131,13 @@ void setupSpecificBuildChainNightlyJob(String envName, Closure defaultJobParamsG void createSetupBranchJob() { def jobParams = JobParamsUtils.getBasicJobParams(this, 'kogito-examples', JobType.SETUP_BRANCH, "${jenkins_path}/Jenkinsfile.setup-branch", 'Kogito Examples 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}", @@ -144,7 +159,7 @@ void createSetupBranchJob() { void setupReleaseDeployJob() { def jobParams = JobParamsUtils.getBasicJobParams(this, 'kogito-examples-deploy', JobType.RELEASE, "${jenkins_path}/Jenkinsfile.deploy", 'Kogito Examples Deploy') - JobParamsUtils.setupJobParamsDefaultMavenConfiguration(this, jobParams) + JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams) jobParams.env.putAll([ PROPERTIES_FILE_NAME: 'deployment.properties', @@ -152,18 +167,13 @@ void setupReleaseDeployJob() { 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}", MAVEN_DEPLOY_REPOSITORY: "${MAVEN_ARTIFACTS_UPLOAD_REPOSITORY_URL}", MAVEN_REPO_CREDS_ID: "${MAVEN_ARTIFACTS_UPLOAD_REPOSITORY_CREDS_ID}", - - NEXUS_RELEASE_URL: "${MAVEN_NEXUS_RELEASE_URL}", - NEXUS_RELEASE_REPOSITORY_ID: "${MAVEN_NEXUS_RELEASE_REPOSITORY}", - NEXUS_STAGING_PROFILE_ID: "${MAVEN_NEXUS_STAGING_PROFILE_ID}", - NEXUS_BUILD_PROMOTION_PROFILE_ID: "${MAVEN_NEXUS_BUILD_PROMOTION_PROFILE_ID}", ]) KogitoJobTemplate.createPipelineJob(this, jobParams)?.with { parameters { @@ -186,7 +196,7 @@ void setupReleaseDeployJob() { void setupReleasePromoteJob() { def jobParams = JobParamsUtils.getBasicJobParams(this, 'kogito-examples-promote', JobType.RELEASE, "${jenkins_path}/Jenkinsfile.promote", 'Kogito Examples Promote') - JobParamsUtils.setupJobParamsDefaultMavenConfiguration(this, jobParams) + JobParamsUtils.setupJobParamsAgentDockerBuilderImageConfiguration(this, jobParams) jobParams.env.putAll([ PROPERTIES_FILE_NAME: 'deployment.properties', @@ -194,8 +204,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}", @@ -222,13 +232,14 @@ void setupReleasePromoteJob() { void setupPostReleaseJob() { def jobParams = JobParamsUtils.getBasicJobParams(this, 'kogito-examples-post-release', JobType.RELEASE, "${jenkins_path}/Jenkinsfile.post-release", 'Kogito Examples Post Release') - 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}", + GIT_AUTHOR_PUSH_TOKEN_CREDS_ID: "${GIT_AUTHOR_PUSH_TOKEN_CREDENTIALS_ID}", ]) KogitoJobTemplate.createPipelineJob(this, jobParams)?.with { parameters { @@ -242,45 +253,4 @@ void setupPostReleaseJob() { booleanParam('SEND_NOTIFICATION', true, 'In case you want the pipeline to send a notification on CI channel for this run.') } } -} - -void setupPrQuarkus3RewriteJob() { - def jobParams = JobParamsUtils.getBasicJobParamsWithEnv(this, 'kogito-examples.rewrite', JobType.PULL_REQUEST, 'quarkus-3', "${jenkins_path}/Jenkinsfile.quarkus-3.rewrite.pr", 'Kogito Examples Quarkus 3 rewrite patch regeneration') - JobParamsUtils.setupJobParamsDefaultMavenConfiguration(this, jobParams) - jobParams.jenkinsfile = "${jenkins_path}/Jenkinsfile.quarkus-3.rewrite.pr" - jobParams.pr.putAll([ - run_only_for_branches: [ "${GIT_BRANCH}" ], - disable_status_message_error: true, - disable_status_message_failure: true, - trigger_phrase: '.*[j|J]enkins,?.*(rewrite|write) [Q|q]uarkus-3.*', - trigger_phrase_only: true, - commitContext: 'Quarkus 3 rewrite', - ]) - jobParams.env.putAll([ - AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}", - MAVEN_SETTINGS_CONFIG_FILE_ID: "${MAVEN_SETTINGS_FILE_ID}", - ]) - KogitoJobTemplate.createPRJob(this, jobParams) -} - -void setupStandaloneQuarkus3RewriteJob() { - def jobParams = JobParamsUtils.getBasicJobParams(this, 'kogito-examples.quarkus-3.rewrite', JobType.TOOLS, "${jenkins_path}/Jenkinsfile.quarkus-3.rewrite.standalone", 'Kogito Examples Quarkus 3 rewrite patch regeneration') - jobParams.env.putAll(EnvUtils.getEnvironmentEnvVars(this, 'quarkus-3')) - JobParamsUtils.setupJobParamsDefaultMavenConfiguration(this, jobParams) - jobParams.env.putAll([ - AUTHOR_CREDS_ID: "${GIT_AUTHOR_CREDENTIALS_ID}", - JENKINS_EMAIL_CREDS_ID: "${JENKINS_EMAIL_CREDS_ID}", - BASE_BRANCH: Utils.getGitBranch(this), - BASE_AUTHOR: Utils.getGitAuthor(this), - MAVEN_SETTINGS_CONFIG_FILE_ID: "${MAVEN_SETTINGS_FILE_ID}", - ]) - KogitoJobTemplate.createPipelineJob(this, jobParams)?.with { - parameters { - stringParam('DISPLAY_NAME', '', 'Setup a specific build display name') - stringParam('GIT_AUTHOR', "${GIT_AUTHOR_NAME}", 'Set the Git author to checkout') - stringParam('BUILD_BRANCH_NAME', "${GIT_BRANCH}", 'Set the Git branch to checkout') - booleanParam('IS_PR_SOURCE_BRANCH', false, 'Set to true if you are launching the job for a PR source branch') - booleanParam('SEND_NOTIFICATION', false, 'In case you want the pipeline to send a notification on CI channel for this run.') - } - } -} +} \ No newline at end of file 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/.ci/jenkins/helper_scripts/examples.groovy b/.ci/jenkins/helper_scripts/examples.groovy index 8a71e5c2c3..b191e5928c 100644 --- a/.ci/jenkins/helper_scripts/examples.groovy +++ b/.ci/jenkins/helper_scripts/examples.groovy @@ -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 groovy.util.XmlSlurper List getDeployableArtifactIds() { diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index f9ff7a1801..e3ac70c34d 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -4,7 +4,7 @@ Please make sure that your PR meets the following requirements: **WARNING! Please make sure you are opening your PR against `main` branch!** -- [ ] 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/pr-backporting.yml b/.github/workflows/pr-backporting.yml index 62b31d56de..5a763c70da 100644 --- a/.github/workflows/pr-backporting.yml +++ b/.github/workflows/pr-backporting.yml @@ -17,7 +17,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 +34,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-jenkins.yml b/.github/workflows/pr-jenkins.yml index f0ca27557a..79c7fcc854 100644 --- a/.github/workflows/pr-jenkins.yml +++ b/.github/workflows/pr-jenkins.yml @@ -16,8 +16,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-examples.yml b/.github/workflows/pr-kogito-examples.yml index 1c19c8f5dd..162af4fa7b 100644 --- a/.github/workflows/pr-kogito-examples.yml +++ b/.github/workflows/pr-kogito-examples.yml @@ -22,44 +22,44 @@ jobs: matrix: job_name: [ kogito-quarkus-examples, kogito-springboot-examples, serverless-workflow-examples ] os: [ubuntu-latest] - java-version: [11] - maven-version: ['3.8.7'] + java-version: [17] + maven-version: ['3.9.3'] 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 env: KOGITO_EXAMPLES_SUBFOLDER_POM: ${{ matrix.env_KOGITO_EXAMPLES_SUBFOLDER_POM }} with: annotations-prefix: ${{ runner.os }}-${{ matrix.java-version }}/${{ matrix.maven-version }} github-token: "${{ secrets.GITHUB_TOKEN }}" - 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 - 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/Makefile b/Makefile index 6875fbef32..9d013627a6 100644 --- a/Makefile +++ b/Makefile @@ -2,9 +2,9 @@ mvn_opts= mvn_cmd=mvn $(mvn_opts) build_chain_branch=$(shell git branch --show-current) -build_chain_file='https://raw.githubusercontent.com/kiegroup/kogito-pipelines/main/.ci/pull-request-config.yaml' -build_chain_group='kiegroup' -build_chain_project='kiegroup/kogito-examples' +build_chain_file='https://raw.githubusercontent.com/apache/incubator-kie-kogito-pipelines/main/.ci/pull-request-config.yaml' +build_chain_group='apache' +build_chain_project='apache/incubator-kie-kogito-examples' default: help @@ -21,7 +21,7 @@ build-quickly: .PHONY: build-upstream ## (build-chain) Build upstream projects from the same branch. If needed, you can modify the `build_chain_file`, `build_chain_group` and `build_chain_branch`. See `build_chain_file` for setting correct environment variables build-upstream: build-chain - build-chain build cross_pr -f ${build_chain_file} -o /tmp/bc -p ${build_chain_project} -b ${build_chain_branch} -g ${build_chain_group} --skipParallelCheckout --skipProjectExecution kiegroup/kogito-examples --skipProjectCheckout kiegroup/kogito-examples + build-chain build cross_pr -f ${build_chain_file} -o /tmp/bc -p ${build_chain_project} -b ${build_chain_branch} -g ${build_chain_group} --skipParallelCheckout --skipProjectExecution apache/incubator-kie-kogito-examples --skipProjectCheckout apache/incubator-kie-kogito-examples .PHONY: build-pr pr_link= diff --git a/README.md b/README.md index 286d111dd9..4cc8f4fb1d 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ This module contains a number of examples that you can take a look at and try ou Since Kogito aims at supporting both Quarkus and Spring Boot each example usually provides both type of projects. - Default branch is `stable`, pointing to the latest released version. -- **[You can also check all versions by looking at releases.](https://github.com/kiegroup/kogito-examples/releases/latest)** +- **[You can also check all versions by looking at releases.](https://github.com/apache/incubator-kie-kogito-examples/releases/latest)** ## Use alternative Quarkus platforms @@ -148,14 +148,7 @@ A Serverless Workflow service that works as a Github bot application, which reac - Rules on Quarkus with Unit: see [README.md](kogito-quarkus-examples/ruleunit-quarkus-example/README.md) - Process on Quarkus: see [README.md](kogito-quarkus-examples/process-quarkus-example/README.md) - Process on Spring Boot: see [README.md](kogito-springboot-examples/process-springboot-example/README.md) -- Trusty on Quarkus: see [README.md](kogito-quarkus-examples/trusty-demonstration/README.md) -- Trusty on Quarkus (DevUI integration): see [README.md](kogito-quarkus-examples/trusty-tracing-devservices/README.md) - -## Trying the examples with the Kogito Operator - -Most examples have a directory named `operator` including the YAML files to deploy it using the Kogito Operator in an OpenShift cluster. -Please refer to the [Kogito Documentation](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift) -of how to install the operator to your environment in order to try it there. +- Trusty on Quarkus: see [README.md](kogito-quarkus-examples/trusty-tracing-devservices/README.md) ## Getting Help ### Issues diff --git a/kogito-quarkus-examples/decisiontable-quarkus-example/README.md b/kogito-quarkus-examples/decisiontable-quarkus-example/README.md index 9f63e42f63..320877eb78 100644 --- a/kogito-quarkus-examples/decisiontable-quarkus-example/README.md +++ b/kogito-quarkus-examples/decisiontable-quarkus-example/README.md @@ -15,9 +15,9 @@ REST endpoints are generated from query rules. You can insert `LoanApplication` ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVM 19.3.1](https://github.com/graalvm/graalvm-ce-builds/releases/tag/vm-19.3.1) installed @@ -161,7 +161,3 @@ Example response: } ] ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-quarkus-examples/decisiontable-quarkus-example/operator/decisiontable-quarkus-example.yaml b/kogito-quarkus-examples/decisiontable-quarkus-example/operator/decisiontable-quarkus-example.yaml deleted file mode 100644 index dd8719a8da..0000000000 --- a/kogito-quarkus-examples/decisiontable-quarkus-example/operator/decisiontable-quarkus-example.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: decisiontable-quarkus-example -spec: - type: RemoteSource - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/decisiontable-quarkus-example - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: decisiontable-quarkus-example - diff --git a/kogito-quarkus-examples/decisiontable-quarkus-example/pom.xml b/kogito-quarkus-examples/decisiontable-quarkus-example/pom.xml index c584434b69..f0881a9b75 100644 --- a/kogito-quarkus-examples/decisiontable-quarkus-example/pom.xml +++ b/kogito-quarkus-examples/decisiontable-quarkus-example/pom.xml @@ -1,24 +1,44 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT decisiontable-quarkus-example Kogito Example :: Decision Table - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT - 8.44.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -47,8 +67,8 @@ - org.kie.kogito - kogito-quarkus-rules + org.drools + drools-quarkus-rules io.quarkus diff --git a/kogito-quarkus-examples/decisiontable-quarkus-example/src/main/java/org/kie/kogito/queries/Applicant.java b/kogito-quarkus-examples/decisiontable-quarkus-example/src/main/java/org/kie/kogito/queries/Applicant.java index 175d3a98d5..25d1c54e64 100644 --- a/kogito-quarkus-examples/decisiontable-quarkus-example/src/main/java/org/kie/kogito/queries/Applicant.java +++ b/kogito-quarkus-examples/decisiontable-quarkus-example/src/main/java/org/kie/kogito/queries/Applicant.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.queries; diff --git a/kogito-quarkus-examples/decisiontable-quarkus-example/src/main/java/org/kie/kogito/queries/LoanApplication.java b/kogito-quarkus-examples/decisiontable-quarkus-example/src/main/java/org/kie/kogito/queries/LoanApplication.java index 70eec1c4e3..8697730bd3 100644 --- a/kogito-quarkus-examples/decisiontable-quarkus-example/src/main/java/org/kie/kogito/queries/LoanApplication.java +++ b/kogito-quarkus-examples/decisiontable-quarkus-example/src/main/java/org/kie/kogito/queries/LoanApplication.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.queries; diff --git a/kogito-quarkus-examples/decisiontable-quarkus-example/src/main/java/org/kie/kogito/queries/LoanUnit.java b/kogito-quarkus-examples/decisiontable-quarkus-example/src/main/java/org/kie/kogito/queries/LoanUnit.java index 3d35a77609..0aa2234202 100644 --- a/kogito-quarkus-examples/decisiontable-quarkus-example/src/main/java/org/kie/kogito/queries/LoanUnit.java +++ b/kogito-quarkus-examples/decisiontable-quarkus-example/src/main/java/org/kie/kogito/queries/LoanUnit.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.queries; diff --git a/kogito-quarkus-examples/decisiontable-quarkus-example/src/main/resources/application.properties b/kogito-quarkus-examples/decisiontable-quarkus-example/src/main/resources/application.properties index 35b7e32bea..a76c2a39bb 100644 --- a/kogito-quarkus-examples/decisiontable-quarkus-example/src/main/resources/application.properties +++ b/kogito-quarkus-examples/decisiontable-quarkus-example/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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/decisiontable-quarkus-example/src/test/java/org/kie/kogito/decisiontable/quarkus/NativeRestQueryIT.java b/kogito-quarkus-examples/decisiontable-quarkus-example/src/test/java/org/kie/kogito/decisiontable/quarkus/NativeRestQueryIT.java index eb6ce553f6..c412b1c2dc 100644 --- a/kogito-quarkus-examples/decisiontable-quarkus-example/src/test/java/org/kie/kogito/decisiontable/quarkus/NativeRestQueryIT.java +++ b/kogito-quarkus-examples/decisiontable-quarkus-example/src/test/java/org/kie/kogito/decisiontable/quarkus/NativeRestQueryIT.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.decisiontable.quarkus; -import io.quarkus.test.junit.NativeImageTest; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@NativeImageTest +@QuarkusIntegrationTest public class NativeRestQueryIT extends RestQueryTest { // Execute the same tests but in native mode. diff --git a/kogito-quarkus-examples/decisiontable-quarkus-example/src/test/java/org/kie/kogito/decisiontable/quarkus/RestQueryTest.java b/kogito-quarkus-examples/decisiontable-quarkus-example/src/test/java/org/kie/kogito/decisiontable/quarkus/RestQueryTest.java index 2b88b46469..ab30115e50 100644 --- a/kogito-quarkus-examples/decisiontable-quarkus-example/src/test/java/org/kie/kogito/decisiontable/quarkus/RestQueryTest.java +++ b/kogito-quarkus-examples/decisiontable-quarkus-example/src/test/java/org/kie/kogito/decisiontable/quarkus/RestQueryTest.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.decisiontable.quarkus; diff --git a/kogito-quarkus-examples/decisiontable-quarkus-example/src/test/resources/application.properties b/kogito-quarkus-examples/decisiontable-quarkus-example/src/test/resources/application.properties index 3c17236931..a047ea13ba 100644 --- a/kogito-quarkus-examples/decisiontable-quarkus-example/src/test/resources/application.properties +++ b/kogito-quarkus-examples/decisiontable-quarkus-example/src/test/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. +# + # Quarkus quarkus.http.test-port=0 \ No newline at end of file diff --git a/kogito-quarkus-examples/dmn-15-quarkus-example/README.md b/kogito-quarkus-examples/dmn-15-quarkus-example/README.md new file mode 100644 index 0000000000..bbdc502cc2 --- /dev/null +++ b/kogito-quarkus-examples/dmn-15-quarkus-example/README.md @@ -0,0 +1,496 @@ + +# DMN 1.5 + Quarkus example + +## Description + +Multiple DMN services to evaluate new features of the DMN 1.5 version + +Demonstrates DMN on Kogito capabilities, including REST interface code generation. +It also demonstrates the usage models imported through external jar resources. + +In this case, the models are contained in the `org.kie:kie-dmn-test-resources` artifact, and the referenced ones are extracted with the following maven configuration +```xml + + org.apache.maven.plugins + maven-dependency-plugin + ${dependency-plugin.version} + + + unpack + generate-resources + + unpack + + + + + org.kie + kie-dmn-test-resources + ${project.version} + tests + jar + true + ${project.build.directory}/generated-resources + valid_models/DMNv1_5/**/AllowedValuesChecksInsideCollection.dmn, + valid_models/DMNv1_5/**/TypeConstraintsChecks.dmn, + valid_models/DMNv1_5/**/Imported_Model_Unamed.dmn, + valid_models/DMNv1_5/**/Importing_EmptyNamed_Model_With_Href_Namespace.dmn + + + + + + + +``` + +Extracted models could be found under `target/generated-resources/valid_models.DMNv1_5` directory. + +This example also features the `org.kie.dmn.runtime.typecheck` enviropnment variable, to enforce constraint checks + +```xml + + org.codehaus.mojo + properties-maven-plugin + + + + set-system-properties + + + + + org.kie.dmn.runtime.typecheck + ${enable.runtime.typecheck} + + + + + + +``` + +## Installing and Running + +### Prerequisites + +You will need: + - Java 17+ installed + - Environment variable JAVA_HOME set accordingly + - Maven 3.9.6+ installed + +When using native image compilation, you will also need: + - [GraalVM 19.3.1](https://github.com/oracle/graal/releases/tag/vm-19.3.1) installed + - Environment variable GRAALVM_HOME set accordingly + - Note that GraalVM native image compilation typically requires other packages (glibc-devel, zlib-devel and gcc) to be installed too. You also need 'native-image' installed in GraalVM (using 'gu install native-image'). Please refer to [GraalVM installation documentation](https://www.graalvm.org/docs/reference-manual/aot-compilation/#prerequisites) for more details. + +### Compile and Run in Local Dev Mode + +``` +mvn clean compile quarkus:dev +``` + +### Package and Run in JVM mode + +``` +mvn clean package +java -jar target/quarkus-app/quarkus-run.jar +``` + +or on Windows + +``` +mvn clean package +java -jar target\quarkus-app\quarkus-run.jar +``` + +### Package and Run using Local Native Image +Note that this requires GRAALVM_HOME to point to a valid GraalVM installation + +``` +mvn clean package -Pnative +``` + +To run the generated native executable, generated in `target/`, execute + +``` +./target/dmn-quarkus-example-runner +``` + +Note: This does not yet work on Windows, GraalVM and Quarkus should be rolling out support for Windows soon. + +## OpenAPI (Swagger) documentation +[Specification at swagger.io](https://swagger.io/docs/specification/about/) + +You can take a look at the [OpenAPI definition](http://localhost:8080/openapi?format=json) - automatically generated and included in this service - to determine all available operations exposed by this service. For easy readability you can visualize the OpenAPI definition file using a UI tool like for example available [Swagger UI](https://editor.swagger.io). + +In addition, various clients to interact with this service can be easily generated using this OpenAPI definition. + +When running in either Quarkus Development or Native mode, we also leverage the [Quarkus OpenAPI extension](https://quarkus.io/guides/openapi-swaggerui#use-swagger-ui-for-development) that exposes [Swagger UI](http://localhost:8080/q/swagger-ui/) that you can use to look at available REST endpoints and send test requests. + +## Test DMN Model using Maven + +Validate the functionality of DMN models before deploying them into a production environment by defining test scenarios in Test Scenario Editor. + +To define test scenarios you need to create a .scesim file inside your project and link it to the DMN model you want to be tested. Run all Test Scenarios, executing: + +```sh +mvn clean test +``` +See results in surefire test report `target/surefire-reports` + +## Example Usage + +Once the service is up and running, multiple services will be available + +### POST /AllowedValuesChecksInsideCollection + +Demonstrates usage of `allowedValues`constraint (to be used as comparison with the `ConstraintsChecks`) + +Given inputs: + +```json +{ + "p1": { + "Name": "string", + "Interests": [ + "Golf" + ] + } +} +``` + +Curl command (using the JSON object above): + +```sh +curl -X 'POST' \ + 'http://localhost:8080/AllowedValuesChecksInsideCollection' \ + -H 'accept: application/json' \ + -H 'Content-Type: application/json' \ + -d '{ + "p1": { + "Name": "string", + "Interests": [ + "Golf" + ] + } +}' +``` +or on Windows: + +```sh +curl -X 'POST' \ + 'http://localhost:8080/AllowedValuesChecksInsideCollection' \ + -H 'accept: application/json' \ + -H 'Content-Type: application/json' \ + -d "{ + \"p1\": { + \"Name\": \"string\", + \"Interests\": [ + \"Golf\" + ] + } +}" +``` + +As response, the interests information is returned. + +Example response: + +```json +{ + "p1": { + "Interests": [ + "Golf" + ], + "Name": "string" + }, + "MyDecision": "The Person string likes 1 thing(s)." +} +``` + + + +### POST /TypeConstraintsChecks + +Demonstrates usage of `typeConstraint` constraint. + +Given inputs: + +```json +{ + "p1": { + "Name": "string", + "Interests": [ + "anything" + ] + } +} +``` + +Curl command (using the JSON object above): + +```sh +curl -X 'POST' \ + 'http://localhost:8080/TypeConstraintsChecks' \ + -H 'accept: application/json' \ + -H 'Content-Type: application/json' \ + -d '{ + "p1": { + "Name": "string", + "Interests": [ + "anything" + ] + } +}' +``` +or on Windows: + +```sh +curl -X 'POST' \ + 'http://localhost:8080/TypeConstraintsChecks' \ + -H 'accept: application/json' \ + -H 'Content-Type: application/json' \ + -d "{ + \"p1\": { + \"Name\": \"string\", + \"Interests\": [ + \"anything\" + ] + } +}" +}" +``` + +As response, the interests information is returned. + +Example response: + +```json +{ + "p1": { + "Interests": [ + "anything" + ], + "Name": "string" + }, + "MyDecision": "The Person string likes 1 thing(s)." +} +``` + +The following input, on the other side, would rise an error + +```json +{ + "p1": { + "Name": "string", + "Interests": [ + "string", "strong" + ] + } +} +``` + +Curl command (using the JSON object above): + +```sh +curl -X 'POST' \ + 'http://localhost:8080/TypeConstraintsChecks' \ + -H 'accept: application/json' \ + -H 'Content-Type: application/json' \ + -d '{ + "p1": { + "Name": "string", + "Interests": [ + "string", "strong" + ] + } +}' +``` +or on Windows: + +```sh +curl -X 'POST' \ + 'http://localhost:8080/TypeConstraintsChecks' \ + -H 'accept: application/json' \ + -H 'Content-Type: application/json' \ + -d "{ + \"p1\": { + \"Name\": \"string\", + \"Interests\": [ + \"string\", \"strong\" + ] + } +}" +}" +``` + +### POST /Imported Model + +Used to demonstrates usage of `unnamed` import in the `/Importing empty-named Model` service. + +Given inputs: + +```json +{ + "A Person": { + "name": "string", + "age": 0 + }, + "An Imported Person": { + "name": "string", + "age": 0 + } +} +``` + +Curl command (using the JSON object above): + +```sh +curl -X 'POST' \ + 'http://localhost:8080/Imported Model' \ + -H 'accept: application/json' \ + -H 'Content-Type: application/json' \ + -d '{ + "A Person": { + "name": "string", + "age": 0 + }, + "An Imported Person": { + "name": "string", + "age": 0 + } +}' +``` +or on Windows: + +```sh +curl -X 'POST' \ + 'http://localhost:8080/Imported Model' \ + -H 'accept: application/json' \ + -H 'Content-Type: application/json' \ + -d "{ + \"A Person\": { + \"name\": \"string\", + \"age\": 0 + }, + \"An Imported Person\": { + \"name\": \"string\", + \"age\": 0 + } +}" +``` + +As response, the greeting is returned. + +Example response: + +```json +{ + "A Person": { + "name": "string", + "age": 0 + }, + "Say Hello": "function Say Hello( Person )", + "Remote Greeting": "Hello string!", + "An Imported Person": { + "name": "string", + "age": 0 + } +} +``` + +### POST /Importing empty-named Model + +Used to demonstrates usage of `unnamed` import (it refers to the dmn model behind the `/Imported Model` service). + +Given inputs: + +```json +{ + "A Person": { + "name": "string", + "age": 0 + }, + "An Imported Person": { + "name": "string", + "age": 0 + } +} +``` + +Curl command (using the JSON object above): + +```sh +curl -X 'POST' \ + 'http://localhost:8080/Importing empty-named Model' \ + -H 'accept: application/json' \ + -H 'Content-Type: application/json' \ + -d '{ + "A Person": { + "name": "string", + "age": 0 + }, + "An Imported Person": { + "name": "string", + "age": 0 + } +}' +``` +or on Windows: + +```sh +curl -X 'POST' \ + 'http://localhost:8080/Importing empty-named Model' \ + -H 'accept: application/json' \ + -H 'Content-Type: application/json' \ + -d "{ + \"A Person\": { + \"name\": \"string\", + \"age\": 0 + }, + \"An Imported Person\": { + \"name\": \"string\", + \"age\": 0 + } +}" +``` + +As response, both model-local and imported greetings are returned. + +Example response: + +```json +{ + "Local Hello": "function Local Hello( Person )", + "A Person": { + "name": "string", + "age": 0 + }, + "Say Hello": "function Say Hello( Person )", + "Imported Greeting": "Hello string!", + "Local Greeting": "Local Hello string!", + "An Imported Person": { + "name": "string", + "age": 0 + } +} +``` + diff --git a/kogito-quarkus-examples/dmn-15-quarkus-example/pom.xml b/kogito-quarkus-examples/dmn-15-quarkus-example/pom.xml new file mode 100644 index 0000000000..166eb82c55 --- /dev/null +++ b/kogito-quarkus-examples/dmn-15-quarkus-example/pom.xml @@ -0,0 +1,174 @@ + + + 4.0.0 + + org.kie.kogito.examples + kogito-quarkus-examples + 999-SNAPSHOT + + + dmn-15-quarkus-example + Kogito Example :: DMN :: 1.5 Features + + 3.8.4 + quarkus-bom + io.quarkus + 3.8.4 + org.kie.kogito + kogito-bom + 999-SNAPSHOT + 999-SNAPSHOT + 3.6.1 + true + + + + + org.kie + kie-dmn-test-resources + ${project.version} + tests + + + ${quarkus.platform.group-id} + ${quarkus.platform.artifact-id} + ${quarkus.platform.version} + pom + import + + + ${kogito.bom.group-id} + ${kogito.bom.artifact-id} + ${kogito.bom.version} + pom + import + + + + + + org.kie + kie-dmn-test-resources + tests + + + org.drools + drools-quarkus-decisions + + + io.quarkus + quarkus-resteasy + + + io.quarkus + quarkus-arc + + + io.quarkus + quarkus-resteasy-jackson + + + io.quarkus + quarkus-smallrye-openapi + + + io.quarkus + quarkus-junit5 + test + + + io.rest-assured + rest-assured + test + + + org.kie.kogito + kogito-scenario-simulation + test + + + io.quarkus + quarkus-smallrye-health + + + + ${project.artifactId} + + + src/main/resources + + + + ${project.build.directory}/generated-resources + + + + + org.codehaus.mojo + properties-maven-plugin + + + + set-system-properties + + + + + org.kie.dmn.runtime.typecheck + ${enable.runtime.typecheck} + + + + + + + + ${quarkus.platform.group-id} + quarkus-maven-plugin + ${quarkus-plugin.version} + + + + build + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + ${dependency-plugin.version} + + + unpack + generate-resources + + unpack + + + + + org.kie + kie-dmn-test-resources + ${project.version} + tests + jar + true + ${project.build.directory}/generated-resources + valid_models/DMNv1_5/**/AllowedValuesChecksInsideCollection.dmn, + valid_models/DMNv1_5/**/TypeConstraintsChecks.dmn, + valid_models/DMNv1_5/**/Imported_Model_Unamed.dmn, + valid_models/DMNv1_5/**/Importing_EmptyNamed_Model_With_Href_Namespace.dmn + + + + + + + + + + \ No newline at end of file diff --git a/kogito-quarkus-examples/dmn-15-quarkus-example/src/main/resources/application.properties b/kogito-quarkus-examples/dmn-15-quarkus-example/src/main/resources/application.properties new file mode 100644 index 0000000000..727b6c82f1 --- /dev/null +++ b/kogito-quarkus-examples/dmn-15-quarkus-example/src/main/resources/application.properties @@ -0,0 +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. +# + +# Packaging + +quarkus.swagger-ui.always-include=true diff --git a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/README.md b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/README.md index 16ab2989de..83bcec2ecb 100644 --- a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/README.md +++ b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/README.md @@ -7,9 +7,9 @@ This example demonstrates how to enable and consume the runtime metrics monitori ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed - Docker 19+ (only if you want to run the integration tests and/or you want to use the `docker-compose` script provided in this example). ### How to enable the feature @@ -18,8 +18,8 @@ Import the following dependency in your `pom.xml`: ```XML - org.kie.kogito - kogito-addons-quarkus-monitoring-prometheus + org.kie + kie-addons-quarkus-monitoring-prometheus ``` diff --git a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/docker-compose.yml b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/docker-compose.yml index 9743cfbd89..341dac6d62 100644 --- a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/docker-compose.yml +++ b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/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' services: @@ -9,7 +28,7 @@ services: prometheus: image: prom/prometheus:v2.8.0 volumes: - - ./docker-compose/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml + - ./docker compose/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml command: - '--config.file=/etc/prometheus/prometheus.yml' ports: @@ -23,6 +42,6 @@ services: ports: - 3000:3000 volumes: - - ./docker-compose/grafana/provisioning/:/etc/grafana/provisioning/ - - ./docker-compose/grafana/grafana.ini:/etc/grafana/grafana.ini + - ./docker compose/grafana/provisioning/:/etc/grafana/provisioning/ + - ./docker compose/grafana/grafana.ini:/etc/grafana/grafana.ini diff --git a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/docker-compose/grafana/provisioning/dashboards/dashboard.yml b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/docker-compose/grafana/provisioning/dashboards/dashboard.yml index 437d59118f..1c31f32b3b 100644 --- a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/docker-compose/grafana/provisioning/dashboards/dashboard.yml +++ b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/docker-compose/grafana/provisioning/dashboards/dashboard.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. +# + apiVersion: 1 providers: diff --git a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/docker-compose/grafana/provisioning/datasources/datasource.yml b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/docker-compose/grafana/provisioning/datasources/datasource.yml index 4e58703f23..14e5b05c55 100644 --- a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/docker-compose/grafana/provisioning/datasources/datasource.yml +++ b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/docker-compose/grafana/provisioning/datasources/datasource.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. +# + # config file version apiVersion: 1 diff --git a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/docker-compose/prometheus/prometheus.yml b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/docker-compose/prometheus/prometheus.yml index 3bc8783bb2..a86dadc112 100644 --- a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/docker-compose/prometheus/prometheus.yml +++ b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/docker-compose/prometheus/prometheus.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. +# + # A scrape configuration containing exactly one endpoint to scrape: scrape_configs: # The job name is added as a label `job=` to any timeseries scraped from this config. diff --git a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/pom.xml b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/pom.xml index 5edc5ee797..a6bb167843 100755 --- a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/pom.xml +++ b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/pom.xml @@ -1,23 +1,43 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT dmn-drools-quarkus-metrics Kogito Example :: DMN Metrics Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -39,12 +59,12 @@ - org.kie.kogito - kogito-quarkus-rules + org.drools + drools-quarkus-rules - org.kie.kogito - kogito-quarkus-decisions + org.drools + drools-quarkus-decisions io.quarkus @@ -63,8 +83,8 @@ quarkus-smallrye-openapi - org.kie.kogito - kogito-addons-quarkus-monitoring-prometheus + org.kie + kie-addons-quarkus-monitoring-prometheus io.quarkus diff --git a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/java/org/kie/kogito/app/CustomDMNRuntimeEventListener.java b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/java/org/kie/kogito/app/CustomDMNRuntimeEventListener.java index 7744eb66d2..dd78324d23 100644 --- a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/java/org/kie/kogito/app/CustomDMNRuntimeEventListener.java +++ b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/java/org/kie/kogito/app/CustomDMNRuntimeEventListener.java @@ -1,23 +1,23 @@ /* - * 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.app; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; - import org.kie.dmn.api.core.event.AfterEvaluateAllEvent; import org.kie.dmn.api.core.event.AfterEvaluateContextEntryEvent; import org.kie.dmn.api.core.event.AfterEvaluateDecisionEvent; @@ -33,6 +33,9 @@ import io.micrometer.prometheus.PrometheusMeterRegistry; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; + @ApplicationScoped public class CustomDMNRuntimeEventListener implements DMNRuntimeEventListener { diff --git a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/java/org/kie/kogito/app/RuleEventListenerConfig.java b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/java/org/kie/kogito/app/RuleEventListenerConfig.java index de6b18ed73..0fde9b787a 100644 --- a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/java/org/kie/kogito/app/RuleEventListenerConfig.java +++ b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/java/org/kie/kogito/app/RuleEventListenerConfig.java @@ -1,28 +1,31 @@ /* - * 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.app; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; - import org.kie.kogito.drools.core.config.DefaultRuleEventListenerConfig; import org.kie.kogito.examples.CustomRuleEventListener; import io.micrometer.prometheus.PrometheusMeterRegistry; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; + @ApplicationScoped public class RuleEventListenerConfig extends DefaultRuleEventListenerConfig { diff --git a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/java/org/kie/kogito/examples/CustomRuleEventListener.java b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/java/org/kie/kogito/examples/CustomRuleEventListener.java index 39eac40227..05c6d15b20 100644 --- a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/java/org/kie/kogito/examples/CustomRuleEventListener.java +++ b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/java/org/kie/kogito/examples/CustomRuleEventListener.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.examples; diff --git a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/java/org/kie/kogito/examples/Hello.java b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/java/org/kie/kogito/examples/Hello.java index 15e84e9e72..8ca8eee6c3 100644 --- a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/java/org/kie/kogito/examples/Hello.java +++ b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/java/org/kie/kogito/examples/Hello.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.examples; diff --git a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/resources/application.properties b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/resources/application.properties index 05db035d52..7adace48b8 100644 --- a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/resources/application.properties +++ b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/resources/org/kie/kogito/examples/Hello.drl b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/resources/org/kie/kogito/examples/Hello.drl index 7aaacc6c99..6026d730a2 100644 --- a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/resources/org/kie/kogito/examples/Hello.drl +++ b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/main/resources/org/kie/kogito/examples/Hello.drl @@ -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.examples; unit Hello; diff --git a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/filtered-resources/project.properties b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/filtered-resources/project.properties index 301ad794d3..5771872775 100644 --- a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/filtered-resources/project.properties +++ b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/filtered-resources/project.properties @@ -1,17 +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. # + project.version=${project.version} project.artifactId=${project.artifactId} \ No newline at end of file diff --git a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/java/org/kie/kogito/examples/quarkus/DashboardsListIT.java b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/java/org/kie/kogito/examples/quarkus/DashboardsListIT.java index 5921f82a24..d6da290928 100644 --- a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/java/org/kie/kogito/examples/quarkus/DashboardsListIT.java +++ b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/java/org/kie/kogito/examples/quarkus/DashboardsListIT.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.examples.quarkus; diff --git a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/java/org/kie/kogito/examples/quarkus/DroolsMetricsIT.java b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/java/org/kie/kogito/examples/quarkus/DroolsMetricsIT.java index 0af3380e8a..d7bbe74223 100644 --- a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/java/org/kie/kogito/examples/quarkus/DroolsMetricsIT.java +++ b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/java/org/kie/kogito/examples/quarkus/DroolsMetricsIT.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.examples.quarkus; diff --git a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/java/org/kie/kogito/examples/quarkus/GrafanaDockerComposeIT.java b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/java/org/kie/kogito/examples/quarkus/GrafanaDockerComposeIT.java index 635b0008e0..fc0a4a1f76 100644 --- a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/java/org/kie/kogito/examples/quarkus/GrafanaDockerComposeIT.java +++ b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/java/org/kie/kogito/examples/quarkus/GrafanaDockerComposeIT.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.examples.quarkus; diff --git a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/java/org/kie/kogito/examples/quarkus/LoanEligibilityIT.java b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/java/org/kie/kogito/examples/quarkus/LoanEligibilityIT.java index a9d2fca221..52ce78625a 100644 --- a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/java/org/kie/kogito/examples/quarkus/LoanEligibilityIT.java +++ b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/java/org/kie/kogito/examples/quarkus/LoanEligibilityIT.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.examples.quarkus; diff --git a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/java/org/kie/kogito/examples/quarkus/ProjectMetadataProvider.java b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/java/org/kie/kogito/examples/quarkus/ProjectMetadataProvider.java index 8218ebe9e4..cc42f4e7db 100644 --- a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/java/org/kie/kogito/examples/quarkus/ProjectMetadataProvider.java +++ b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/java/org/kie/kogito/examples/quarkus/ProjectMetadataProvider.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.examples.quarkus; diff --git a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/resources/application.properties b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/resources/application.properties index 3c17236931..a047ea13ba 100644 --- a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/resources/application.properties +++ b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/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. +# + # Quarkus quarkus.http.test-port=0 \ No newline at end of file diff --git a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/resources/logback-test.xml b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/resources/logback-test.xml index e8c716f5ef..bb6af4db85 100644 --- a/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/resources/logback-test.xml +++ b/kogito-quarkus-examples/dmn-drools-quarkus-metrics/src/test/resources/logback-test.xml @@ -1,3 +1,23 @@ + diff --git a/kogito-quarkus-examples/dmn-event-driven-quarkus/README.md b/kogito-quarkus-examples/dmn-event-driven-quarkus/README.md index 601d231aa0..97b21f8d06 100644 --- a/kogito-quarkus-examples/dmn-event-driven-quarkus/README.md +++ b/kogito-quarkus-examples/dmn-event-driven-quarkus/README.md @@ -14,9 +14,9 @@ The main goal behind the addon is to allow Kogito DMN services to be used as par ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed - [Docker Engine](https://docs.docker.com/engine/) and [Docker Compose](https://docs.docker.com/compose/) installed When using native image compilation, you will also need: @@ -30,8 +30,8 @@ Like the other Kogito AddOns, the only required step to enable it is to include ```xml - org.kie.kogito - kogito-addons-quarkus-events-decisions + org.kie + kie-addons-quarkus-events-decisions ``` diff --git a/kogito-quarkus-examples/dmn-event-driven-quarkus/docker-compose.yml b/kogito-quarkus-examples/dmn-event-driven-quarkus/docker-compose.yml index f07d3cc400..802976737c 100644 --- a/kogito-quarkus-examples/dmn-event-driven-quarkus/docker-compose.yml +++ b/kogito-quarkus-examples/dmn-event-driven-quarkus/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' services: diff --git a/kogito-quarkus-examples/dmn-event-driven-quarkus/pom.xml b/kogito-quarkus-examples/dmn-event-driven-quarkus/pom.xml index f494fc03e0..3fd53d9405 100644 --- a/kogito-quarkus-examples/dmn-event-driven-quarkus/pom.xml +++ b/kogito-quarkus-examples/dmn-event-driven-quarkus/pom.xml @@ -1,4 +1,24 @@ + @@ -7,19 +27,19 @@ org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT dmn-event-driven-quarkus Kogito Example :: DMN Event-Driven :: Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -41,13 +61,13 @@ - org.kie.kogito - kogito-quarkus-decisions + org.drools + drools-quarkus-decisions - org.kie.kogito - kogito-addons-quarkus-events-decisions + org.kie + kie-addons-quarkus-events-decisions diff --git a/kogito-quarkus-examples/dmn-event-driven-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/dmn-event-driven-quarkus/src/main/resources/application.properties index 8873403099..81eff0ee70 100644 --- a/kogito-quarkus-examples/dmn-event-driven-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/dmn-event-driven-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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/dmn-event-driven-quarkus/src/test/java/org/kie/kogito/examples/DmnEventDrivenIT.java b/kogito-quarkus-examples/dmn-event-driven-quarkus/src/test/java/org/kie/kogito/examples/DmnEventDrivenIT.java index 0b244241da..2b66779aee 100644 --- a/kogito-quarkus-examples/dmn-event-driven-quarkus/src/test/java/org/kie/kogito/examples/DmnEventDrivenIT.java +++ b/kogito-quarkus-examples/dmn-event-driven-quarkus/src/test/java/org/kie/kogito/examples/DmnEventDrivenIT.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.examples; diff --git a/kogito-quarkus-examples/dmn-event-driven-quarkus/src/test/java/org/kie/kogito/examples/NativeDmnEventDrivenIT.java b/kogito-quarkus-examples/dmn-event-driven-quarkus/src/test/java/org/kie/kogito/examples/NativeDmnEventDrivenIT.java index 663d5b38a9..63ffb7a9e7 100644 --- a/kogito-quarkus-examples/dmn-event-driven-quarkus/src/test/java/org/kie/kogito/examples/NativeDmnEventDrivenIT.java +++ b/kogito-quarkus-examples/dmn-event-driven-quarkus/src/test/java/org/kie/kogito/examples/NativeDmnEventDrivenIT.java @@ -1,26 +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.examples; import org.kie.kogito.testcontainers.quarkus.KafkaQuarkusTestResource; import io.quarkus.test.common.QuarkusTestResource; -import io.quarkus.test.junit.NativeImageTest; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@NativeImageTest +@QuarkusIntegrationTest @QuarkusTestResource(KafkaQuarkusTestResource.class) public class NativeDmnEventDrivenIT extends DmnEventDrivenIT { diff --git a/kogito-quarkus-examples/dmn-event-driven-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/dmn-event-driven-quarkus/src/test/resources/application.properties index 4396d4ebfb..4242e6e9c1 100644 --- a/kogito-quarkus-examples/dmn-event-driven-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/dmn-event-driven-quarkus/src/test/resources/application.properties @@ -1 +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. +# + quarkus.kafka.devservices.enabled=false \ No newline at end of file diff --git a/kogito-quarkus-examples/dmn-incubation-api-quarkus/README.md b/kogito-quarkus-examples/dmn-incubation-api-quarkus/README.md index a337b88f53..73d9c10602 100644 --- a/kogito-quarkus-examples/dmn-incubation-api-quarkus/README.md +++ b/kogito-quarkus-examples/dmn-incubation-api-quarkus/README.md @@ -17,9 +17,9 @@ The custom REST endpoint evaluates a DMN that computes Traffic Violation: ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed ### Compile and Run in Local Dev Mode diff --git a/kogito-quarkus-examples/dmn-incubation-api-quarkus/pom.xml b/kogito-quarkus-examples/dmn-incubation-api-quarkus/pom.xml index c5abbd378e..0ecf68af5c 100644 --- a/kogito-quarkus-examples/dmn-incubation-api-quarkus/pom.xml +++ b/kogito-quarkus-examples/dmn-incubation-api-quarkus/pom.xml @@ -1,23 +1,43 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT dmn-incubation-api-quarkus Kogito Example :: DMN Incubation API With Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -47,8 +67,8 @@ quarkus-resteasy-jackson - org.kie.kogito - kogito-quarkus-decisions + org.drools + drools-quarkus-decisions io.quarkus diff --git a/kogito-quarkus-examples/dmn-incubation-api-quarkus/src/main/java/org/acme/CustomRestDecision.java b/kogito-quarkus-examples/dmn-incubation-api-quarkus/src/main/java/org/acme/CustomRestDecision.java index 6b130eb447..b65b5a3f10 100644 --- a/kogito-quarkus-examples/dmn-incubation-api-quarkus/src/main/java/org/acme/CustomRestDecision.java +++ b/kogito-quarkus-examples/dmn-incubation-api-quarkus/src/main/java/org/acme/CustomRestDecision.java @@ -1,35 +1,38 @@ /* - * 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; import java.util.Map; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; - import org.kie.kogito.incubation.application.AppRoot; import org.kie.kogito.incubation.common.DataContext; import org.kie.kogito.incubation.common.MapDataContext; import org.kie.kogito.incubation.decisions.DecisionIds; import org.kie.kogito.incubation.decisions.services.DecisionService; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; + @Path("/custom-rest-decision") public class CustomRestDecision { diff --git a/kogito-quarkus-examples/dmn-incubation-api-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/dmn-incubation-api-quarkus/src/main/resources/application.properties index d0bf0d573d..672256c524 100644 --- a/kogito-quarkus-examples/dmn-incubation-api-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/dmn-incubation-api-quarkus/src/main/resources/application.properties @@ -1 +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. +# + kogito.generate.rest.decisions=false diff --git a/kogito-quarkus-examples/dmn-incubation-api-quarkus/src/test/java/org/acme/CustomRestDecisionTest.java b/kogito-quarkus-examples/dmn-incubation-api-quarkus/src/test/java/org/acme/CustomRestDecisionTest.java index c8ce891d22..64c0dd2f6b 100644 --- a/kogito-quarkus-examples/dmn-incubation-api-quarkus/src/test/java/org/acme/CustomRestDecisionTest.java +++ b/kogito-quarkus-examples/dmn-incubation-api-quarkus/src/test/java/org/acme/CustomRestDecisionTest.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; diff --git a/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/README.md b/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/README.md index 8667b66cef..f6184753f8 100644 --- a/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/README.md +++ b/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/README.md @@ -26,9 +26,9 @@ events. You will need: -- Java 11+ installed +- Java 17+ installed - Environment variable JAVA_HOME set accordingly -- Maven 3.8.6+ installed +- Maven 3.9.6+ installed When using native image compilation, you will also need: @@ -113,7 +113,7 @@ __ ____ __ _____ ___ __ ____ ______ - SubscriberMethod{method:'org.kie.kogito.addon.cloudevents.quarkus.QuarkusCloudEventPublisher#onEvent', incoming:'kogito_incoming_stream'} has no upstream 2021-07-05 17:09:09,892 INFO [org.kie.kog.add.clo.qua.QuarkusKogitoExtensionInitializer] (Quarkus Main Thread) Registered Kogito CloudEvent extension -2021-07-05 17:09:09,902 INFO [io.quarkus] (Quarkus Main Thread) dmn-knative-quickstart-quarkus 2.0.0-SNAPSHOT on JVM (powered by Quarkus 2.0.0.Final) started in 0.610s. Listening on: http://localhost:8080 +2021-07-05 17:09:09,902 INFO [io.quarkus] (Quarkus Main Thread) dmn-knative-quickstart-quarkus 999-SNAPSHOT on JVM (powered by Quarkus 2.0.0.Final) started in 0.610s. Listening on: http://localhost:8080 2021-07-05 17:09:09,903 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated. 2021-07-05 17:09:09,903 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, kogito-decisions, resteasy, resteasy-jackson, servlet, smallrye-context-propagation, smallrye-reactive-messaging, vertx, vertx-web] ``` diff --git a/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/pom.xml b/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/pom.xml index 52abe49c3e..b6acdd7955 100644 --- a/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/pom.xml +++ b/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/pom.xml @@ -1,11 +1,31 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT dmn-knative-quickstart-quarkus @@ -14,14 +34,14 @@ 2.33.2 - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -44,18 +64,18 @@ - org.kie.kogito - kogito-quarkus-decisions + org.drools + drools-quarkus-decisions - org.kie.kogito - kogito-addons-quarkus-events-decisions + org.kie + kie-addons-quarkus-events-decisions - org.kie.kogito - kogito-addons-quarkus-knative-eventing + org.kie + kie-addons-quarkus-knative-eventing diff --git a/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/src/main/resources/application.properties index 8426031183..d71b9dc47d 100644 --- a/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/dmn-knative-quickstart-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. +# + # Packaging # quarkus.package.type=fast-jar quarkus.swagger-ui.always-include=true diff --git a/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/src/test/java/org/kie/kogito/examples/CloudEventListenerTest.java b/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/src/test/java/org/kie/kogito/examples/CloudEventListenerTest.java index d4156050fe..98f67061fe 100644 --- a/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/src/test/java/org/kie/kogito/examples/CloudEventListenerTest.java +++ b/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/src/test/java/org/kie/kogito/examples/CloudEventListenerTest.java @@ -1,24 +1,25 @@ /* - * 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.examples; import java.util.Map; -import javax.ws.rs.core.MediaType; - import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; @@ -31,6 +32,8 @@ import io.quarkus.test.junit.QuarkusTest; import io.restassured.RestAssured; +import jakarta.ws.rs.core.MediaType; + import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; import static com.github.tomakehurst.wiremock.client.WireMock.matchingJsonPath; import static com.github.tomakehurst.wiremock.client.WireMock.post; diff --git a/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/src/test/java/org/kie/kogito/examples/TopicsInformationTest.java b/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/src/test/java/org/kie/kogito/examples/TopicsInformationTest.java index f7ea93becb..2496977b02 100644 --- a/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/src/test/java/org/kie/kogito/examples/TopicsInformationTest.java +++ b/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/src/test/java/org/kie/kogito/examples/TopicsInformationTest.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.examples; diff --git a/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/src/test/resources/application.properties index 9f23c4759e..bb8bd6ceaf 100644 --- a/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/src/test/resources/application.properties @@ -1,5 +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. +# + quarkus.http.test-port=8282 quarkus.log.level=INFO mp.messaging.outgoing.kogito_outgoing_stream.connector=quarkus-http mp.messaging.outgoing.kogito_outgoing_stream.url=http://0.0.0.0:8181 + +kogito.addon.messaging.outgoing.cloudEventMode=structured \ No newline at end of file diff --git a/kogito-quarkus-examples/dmn-listener-dtable/pom.xml b/kogito-quarkus-examples/dmn-listener-dtable/pom.xml index 8b3abdb384..c522192ee5 100644 --- a/kogito-quarkus-examples/dmn-listener-dtable/pom.xml +++ b/kogito-quarkus-examples/dmn-listener-dtable/pom.xml @@ -1,23 +1,43 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT dmn-listener-dtable Kogito Example :: DMN Decision Table listener - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -39,8 +59,8 @@ - org.kie.kogito - kogito-quarkus-decisions + org.drools + drools-quarkus-decisions io.quarkus diff --git a/kogito-quarkus-examples/dmn-listener-dtable/src/main/java/org/kie/kogito/dmn/quarkus/example/dtlistener/ExampleDMNRuntimeEventListener.java b/kogito-quarkus-examples/dmn-listener-dtable/src/main/java/org/kie/kogito/dmn/quarkus/example/dtlistener/ExampleDMNRuntimeEventListener.java index 5c9c238d31..22847fadb7 100644 --- a/kogito-quarkus-examples/dmn-listener-dtable/src/main/java/org/kie/kogito/dmn/quarkus/example/dtlistener/ExampleDMNRuntimeEventListener.java +++ b/kogito-quarkus-examples/dmn-listener-dtable/src/main/java/org/kie/kogito/dmn/quarkus/example/dtlistener/ExampleDMNRuntimeEventListener.java @@ -1,28 +1,31 @@ /* - * 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.dmn.quarkus.example.dtlistener; import java.util.Queue; import java.util.concurrent.ConcurrentLinkedQueue; -import javax.enterprise.context.ApplicationScoped; - import org.kie.dmn.api.core.event.AfterEvaluateDecisionTableEvent; import org.kie.dmn.core.api.event.DefaultDMNRuntimeEventListener; +import jakarta.enterprise.context.ApplicationScoped; + /** * This class demonstrates one possible use of the `AfterEvaluateDecisionTableEvent` asynchronously to the listener. */ diff --git a/kogito-quarkus-examples/dmn-listener-dtable/src/main/java/org/kie/kogito/dmn/quarkus/example/dtlistener/PeriodicJobBean.java b/kogito-quarkus-examples/dmn-listener-dtable/src/main/java/org/kie/kogito/dmn/quarkus/example/dtlistener/PeriodicJobBean.java index 2069192122..fadd909fb1 100644 --- a/kogito-quarkus-examples/dmn-listener-dtable/src/main/java/org/kie/kogito/dmn/quarkus/example/dtlistener/PeriodicJobBean.java +++ b/kogito-quarkus-examples/dmn-listener-dtable/src/main/java/org/kie/kogito/dmn/quarkus/example/dtlistener/PeriodicJobBean.java @@ -1,25 +1,25 @@ /* - * 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.dmn.quarkus.example.dtlistener; import java.util.concurrent.TimeUnit; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; - import org.kie.dmn.api.core.event.AfterEvaluateDecisionTableEvent; import org.kie.dmn.model.api.DecisionTable; import org.kie.kogito.decision.DecisionModels; @@ -28,6 +28,9 @@ import io.quarkus.scheduler.Scheduled; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; + /** * This example periodic Job uses a pre-identified DMN model coordinates. * Alternatively: diff --git a/kogito-quarkus-examples/dmn-listener-dtable/src/main/resources/application.properties b/kogito-quarkus-examples/dmn-listener-dtable/src/main/resources/application.properties index 35b7e32bea..a76c2a39bb 100644 --- a/kogito-quarkus-examples/dmn-listener-dtable/src/main/resources/application.properties +++ b/kogito-quarkus-examples/dmn-listener-dtable/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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/dmn-listener-dtable/src/test/java/org/kie/kogito/dmn/quarkus/example/dtlistener/DecisionTableTest.java b/kogito-quarkus-examples/dmn-listener-dtable/src/test/java/org/kie/kogito/dmn/quarkus/example/dtlistener/DecisionTableTest.java index 58d847b1e7..7167a59245 100644 --- a/kogito-quarkus-examples/dmn-listener-dtable/src/test/java/org/kie/kogito/dmn/quarkus/example/dtlistener/DecisionTableTest.java +++ b/kogito-quarkus-examples/dmn-listener-dtable/src/test/java/org/kie/kogito/dmn/quarkus/example/dtlistener/DecisionTableTest.java @@ -1,30 +1,33 @@ /* - * 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.dmn.quarkus.example.dtlistener; import java.util.concurrent.TimeUnit; -import javax.inject.Inject; - import org.junit.jupiter.api.Test; import io.quarkus.test.junit.QuarkusTest; import io.restassured.RestAssured; import io.restassured.http.ContentType; +import jakarta.inject.Inject; + import static io.restassured.RestAssured.given; import static org.assertj.core.api.Assertions.assertThat; import static org.awaitility.Awaitility.await; diff --git a/kogito-quarkus-examples/dmn-listener-dtable/src/test/resources/application.properties b/kogito-quarkus-examples/dmn-listener-dtable/src/test/resources/application.properties index 3c17236931..a047ea13ba 100644 --- a/kogito-quarkus-examples/dmn-listener-dtable/src/test/resources/application.properties +++ b/kogito-quarkus-examples/dmn-listener-dtable/src/test/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. +# + # Quarkus quarkus.http.test-port=0 \ No newline at end of file diff --git a/kogito-quarkus-examples/dmn-listener-quarkus/README.md b/kogito-quarkus-examples/dmn-listener-quarkus/README.md index 7b901b328a..f70ba3c340 100644 --- a/kogito-quarkus-examples/dmn-listener-quarkus/README.md +++ b/kogito-quarkus-examples/dmn-listener-quarkus/README.md @@ -13,9 +13,9 @@ Listener injection is _optional_. If you don't need it, just ignore it. ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVM 19.3.1](https://github.com/oracle/graal/releases/tag/vm-19.3.1) installed @@ -130,6 +130,3 @@ Example response: } ``` -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-quarkus-examples/dmn-listener-quarkus/operator/dmn-quarkus-example.yaml b/kogito-quarkus-examples/dmn-listener-quarkus/operator/dmn-quarkus-example.yaml deleted file mode 100644 index dd2528a2e7..0000000000 --- a/kogito-quarkus-examples/dmn-listener-quarkus/operator/dmn-quarkus-example.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: dmn-listener-quarkus -spec: - type: RemoteSource - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/dmn-listener-quarkus - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: dmn-listener-quarkus - diff --git a/kogito-quarkus-examples/dmn-listener-quarkus/pom.xml b/kogito-quarkus-examples/dmn-listener-quarkus/pom.xml index df719ac5b3..131a70de01 100644 --- a/kogito-quarkus-examples/dmn-listener-quarkus/pom.xml +++ b/kogito-quarkus-examples/dmn-listener-quarkus/pom.xml @@ -1,23 +1,43 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT dmn-listener-quarkus Kogito Example :: DMN with listeners - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -39,8 +59,8 @@ - org.kie.kogito - kogito-quarkus-decisions + org.drools + drools-quarkus-decisions io.quarkus diff --git a/kogito-quarkus-examples/dmn-listener-quarkus/src/main/java/org/kie/kogito/dmn/quarkus/example/listener/ExampleDMNRuntimeEventListener.java b/kogito-quarkus-examples/dmn-listener-quarkus/src/main/java/org/kie/kogito/dmn/quarkus/example/listener/ExampleDMNRuntimeEventListener.java index 5be5815cd1..7b3ddbbf54 100644 --- a/kogito-quarkus-examples/dmn-listener-quarkus/src/main/java/org/kie/kogito/dmn/quarkus/example/listener/ExampleDMNRuntimeEventListener.java +++ b/kogito-quarkus-examples/dmn-listener-quarkus/src/main/java/org/kie/kogito/dmn/quarkus/example/listener/ExampleDMNRuntimeEventListener.java @@ -1,21 +1,24 @@ /* - * 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.dmn.quarkus.example.listener; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; /** * This class demonstrates one of the two methods offered by Kogito to inject custom diff --git a/kogito-quarkus-examples/dmn-listener-quarkus/src/main/java/org/kie/kogito/dmn/quarkus/example/listener/ExampleDecisionEventListenerConfig.java b/kogito-quarkus-examples/dmn-listener-quarkus/src/main/java/org/kie/kogito/dmn/quarkus/example/listener/ExampleDecisionEventListenerConfig.java index 02e7e6b876..c0873ec558 100644 --- a/kogito-quarkus-examples/dmn-listener-quarkus/src/main/java/org/kie/kogito/dmn/quarkus/example/listener/ExampleDecisionEventListenerConfig.java +++ b/kogito-quarkus-examples/dmn-listener-quarkus/src/main/java/org/kie/kogito/dmn/quarkus/example/listener/ExampleDecisionEventListenerConfig.java @@ -1,24 +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.dmn.quarkus.example.listener; -import javax.enterprise.context.ApplicationScoped; - import org.kie.kogito.dmn.config.CachedDecisionEventListenerConfig; +import jakarta.enterprise.context.ApplicationScoped; + /** * This class demonstrates one of the two methods offered by Kogito to inject custom * {@link org.kie.dmn.api.core.event.DMNRuntimeEventListener}s in its internal {@link org.kie.dmn.api.core.DMNRuntime}. diff --git a/kogito-quarkus-examples/dmn-listener-quarkus/src/main/java/org/kie/kogito/dmn/quarkus/example/listener/LoggingDMNRuntimeEventListener.java b/kogito-quarkus-examples/dmn-listener-quarkus/src/main/java/org/kie/kogito/dmn/quarkus/example/listener/LoggingDMNRuntimeEventListener.java index f2dc00d429..4cb88b828e 100644 --- a/kogito-quarkus-examples/dmn-listener-quarkus/src/main/java/org/kie/kogito/dmn/quarkus/example/listener/LoggingDMNRuntimeEventListener.java +++ b/kogito-quarkus-examples/dmn-listener-quarkus/src/main/java/org/kie/kogito/dmn/quarkus/example/listener/LoggingDMNRuntimeEventListener.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.dmn.quarkus.example.listener; diff --git a/kogito-quarkus-examples/dmn-listener-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/dmn-listener-quarkus/src/main/resources/application.properties index 35b7e32bea..a76c2a39bb 100644 --- a/kogito-quarkus-examples/dmn-listener-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/dmn-listener-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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/listener/NativeTrafficViolationIT.java b/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/listener/NativeTrafficViolationIT.java index a4223fe04b..8bbbf4bf58 100644 --- a/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/listener/NativeTrafficViolationIT.java +++ b/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/listener/NativeTrafficViolationIT.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.dmn.quarkus.example.listener; -import io.quarkus.test.junit.NativeImageTest; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@NativeImageTest +@QuarkusIntegrationTest public class NativeTrafficViolationIT extends TrafficViolationTest { // Execute the same tests but in native mode. diff --git a/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/listener/TrafficViolationListenerTest.java b/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/listener/TrafficViolationListenerTest.java index 207d9e43e7..6e4727c74a 100644 --- a/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/listener/TrafficViolationListenerTest.java +++ b/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/listener/TrafficViolationListenerTest.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.dmn.quarkus.example.listener; @@ -19,8 +22,6 @@ import java.util.Map; import java.util.Optional; -import javax.inject.Inject; - import org.junit.jupiter.api.Test; import org.kie.dmn.api.core.event.DMNRuntimeEventListener; import org.kie.kogito.decision.DecisionConfig; @@ -30,6 +31,8 @@ import io.quarkus.test.junit.QuarkusTest; import io.restassured.http.ContentType; +import jakarta.inject.Inject; + import static io.restassured.RestAssured.given; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; diff --git a/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/listener/TrafficViolationTest.java b/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/listener/TrafficViolationTest.java index fa3361ef6a..0d8a6108a0 100644 --- a/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/listener/TrafficViolationTest.java +++ b/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/listener/TrafficViolationTest.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.dmn.quarkus.example.listener; diff --git a/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/mock/MockDMNRuntimeEventListener.java b/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/mock/MockDMNRuntimeEventListener.java index 427bad341c..a94e598add 100644 --- a/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/mock/MockDMNRuntimeEventListener.java +++ b/kogito-quarkus-examples/dmn-listener-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/example/mock/MockDMNRuntimeEventListener.java @@ -1,29 +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.dmn.quarkus.example.mock; import java.util.HashMap; import java.util.Map; -import javax.enterprise.context.ApplicationScoped; - import org.kie.dmn.api.core.event.AfterEvaluateAllEvent; import org.kie.dmn.api.core.event.BeforeEvaluateAllEvent; import org.kie.dmn.api.core.event.DMNRuntimeEventListener; +import jakarta.enterprise.context.ApplicationScoped; + @ApplicationScoped public class MockDMNRuntimeEventListener implements DMNRuntimeEventListener { diff --git a/kogito-quarkus-examples/dmn-listener-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/dmn-listener-quarkus/src/test/resources/application.properties index 3c17236931..a047ea13ba 100644 --- a/kogito-quarkus-examples/dmn-listener-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/dmn-listener-quarkus/src/test/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. +# + # Quarkus quarkus.http.test-port=0 \ No newline at end of file diff --git a/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/README.md b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/README.md new file mode 100644 index 0000000000..1e861d88ce --- /dev/null +++ b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/README.md @@ -0,0 +1,171 @@ +# DMN + Quarkus example with multiple models + +## Description + +A simple DMN service to evaluate different models (traffic violation, habitability) with also importing feature (traffic violation). + +Demonstrates DMN on Kogito capabilities, including REST interface code generation. + +## Installing and Running + +### Prerequisites + +You will need: + - Java 17+ installed + - Environment variable JAVA_HOME set accordingly + - Maven 3.9.6+ installed + +When using native image compilation, you will also need: + - [GraalVM 19.3.1](https://github.com/oracle/graal/releases/tag/vm-19.3.1) installed + - Environment variable GRAALVM_HOME set accordingly + - Note that GraalVM native image compilation typically requires other packages (glibc-devel, zlib-devel and gcc) to be installed too. You also need 'native-image' installed in GraalVM (using 'gu install native-image'). Please refer to [GraalVM installation documentation](https://www.graalvm.org/docs/reference-manual/aot-compilation/#prerequisites) for more details. + +### Compile and Run in Local Dev Mode + +``` +mvn clean compile quarkus:dev +``` + +### Package and Run in JVM mode + +``` +mvn clean package +java -jar target/quarkus-app/quarkus-run.jar +``` + +or on Windows + +``` +mvn clean package +java -jar target\quarkus-app\quarkus-run.jar +``` + +### Package and Run using Local Native Image +Note that this requires GRAALVM_HOME to point to a valid GraalVM installation + +``` +mvn clean package -Pnative +``` + +To run the generated native executable, generated in `target/`, execute + +``` +./target/dmn-multiple-models-quarkus-example-runner +``` + +Note: This does not yet work on Windows, GraalVM and Quarkus should be rolling out support for Windows soon. + +## OpenAPI (Swagger) documentation +[Specification at swagger.io](https://swagger.io/docs/specification/about/) + +You can take a look at the [OpenAPI definition](http://localhost:8080/openapi?format=json) - automatically generated and included in this service - to determine all available operations exposed by this service. For easy readability you can visualize the OpenAPI definition file using a UI tool like for example available [Swagger UI](https://editor.swagger.io). + +In addition, various clients to interact with this service can be easily generated using this OpenAPI definition. + +When running in either Quarkus Development or Native mode, we also leverage the [Quarkus OpenAPI extension](https://quarkus.io/guides/openapi-swaggerui#use-swagger-ui-for-development) that exposes [Swagger UI](http://localhost:8080/swagger-ui/) that you can use to look at available REST endpoints and send test requests. + +## Test DMN Model using Maven + +Validate the functionality of DMN models before deploying them into a production environment by defining test scenarios in Test Scenario Editor. + +To define test scenarios you need to create a .scesim file inside your project and link it to the DMN model you want to be tested. Run all Test Scenarios, executing: + +```sh +mvn clean test +``` +See results in surefire test report `target/surefire-reports` + +## Example Usage + +Once the service is up and running, you can use the following example to interact with the service. + +### POST /Traffic Violation + +Returns penalty information from the given inputs -- driver and violation: + +Given inputs: + +```json +{ + "Driver":{"Points":2}, + "Violation":{ + "Type":"speed", + "Actual Speed":120, + "Speed Limit":100 + } +} +``` + +Curl command (using the JSON object above): + +```sh +curl -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{"Driver":{"Points":2},"Violation":{"Type":"speed","Actual Speed":120,"Speed Limit":100}}' http://localhost:8080/Traffic%20Violation +``` +or on Windows: + +```sh +curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" -d "{\"Driver\":{\"Points\":2},\"Violation\":{\"Type\":\"speed\",\"Actual Speed\":120,\"Speed Limit\":100}}" http://localhost:8080/Traffic%20Violation +``` + +As response, penalty information is returned. + +Example response: + +```json +{ + "Violation":{ + "Type":"speed", + "Speed Limit":100, + "Actual Speed":120 + }, + "Driver":{ + "Points":2 + }, + "Fine":{ + "Points":3, + "Amount":500 + }, + "Should the driver be suspended?":"No" +} +``` + +The difference from the [dmn-quarkus-example](../dmn-quarkus-example) is that, in the current one, the `Traffic Model` features the import declaration, with definitions coming from the ` Imported Model`. + +### POST /habitability + +Returns habitability information from the given inputs -- oxygen and temperature: + +Given inputs: + +```json +{ + "oxygene": 70, + "temperature": 30 +} +``` + +Curl command (using the JSON object above): + +```sh +curl -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{"oxygene": 70, "temperature": 30}' http://localhost:8080/habitability +``` +or on Windows: + +```sh +curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" -d "{\"oxygene\": 70, \"temperature\": 30}" http://localhost:8080/habitability +``` + +As response, habitability information is returned. + +Example response: + +```json +{ + "oxygene": 70, + "temperature": 30, + "habitability": "somehow doable" +} +``` + + + diff --git a/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/pom.xml b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/pom.xml new file mode 100644 index 0000000000..57252a61f5 --- /dev/null +++ b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/pom.xml @@ -0,0 +1,118 @@ + + + + 4.0.0 + + org.kie.kogito.examples + kogito-quarkus-examples + 999-SNAPSHOT + + dmn-multiple-models-quarkus-example + Kogito Example :: DMN :: Multiple Models + + 3.8.4 + quarkus-bom + io.quarkus + 3.8.4 + org.kie.kogito + kogito-bom + 999-SNAPSHOT + 999-SNAPSHOT + + + + + ${quarkus.platform.group-id} + ${quarkus.platform.artifact-id} + ${quarkus.platform.version} + pom + import + + + ${kogito.bom.group-id} + ${kogito.bom.artifact-id} + ${kogito.bom.version} + pom + import + + + + + + org.drools + drools-quarkus-decisions + + + io.quarkus + quarkus-resteasy + + + io.quarkus + quarkus-arc + + + io.quarkus + quarkus-resteasy-jackson + + + io.quarkus + quarkus-smallrye-openapi + + + io.quarkus + quarkus-junit5 + test + + + io.rest-assured + rest-assured + test + + + org.kie.kogito + kogito-scenario-simulation + test + + + io.quarkus + quarkus-smallrye-health + + + + ${project.artifactId} + + + ${quarkus.platform.group-id} + quarkus-maven-plugin + ${quarkus-plugin.version} + + + + build + + + + + + + diff --git a/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/main/resources/Imported_Model.dmn b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/main/resources/Imported_Model.dmn new file mode 100644 index 0000000000..a4440e3b3d --- /dev/null +++ b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/main/resources/Imported_Model.dmn @@ -0,0 +1,35 @@ + + + + + + + string + + + number + + + string + + + string + + + number + + + diff --git a/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/main/resources/Traffic Violation.dmn b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/main/resources/Traffic Violation.dmn new file mode 100644 index 0000000000..aa798507d8 --- /dev/null +++ b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/main/resources/Traffic Violation.dmn @@ -0,0 +1,221 @@ + + + + + + + string + + + date + + + string + + "speed", "parking", "driving under the influence" + + + + number + + + number + + + + + number + + + number + + + + + + + + + + + + + + Violation.Type + + + + + Violation.Actual Speed - Violation.Speed Limit + + + + + + + "speed" + + + [10..30) + + + 500 + + + 3 + + + + + "speed" + + + >= 30 + + + 1000 + + + 7 + + + + + "parking" + + + - + + + 100 + + + 1 + + + + + "driving under the influence" + + + - + + + 1000 + + + 5 + + + + + + + + + Should the driver be suspended due to points on his license? + "Yes", "No" + + + + + + + + + + + + Driver.Points + Fine.Points + + + + + if Total Points >= 20 then "Yes" else "No" + + + + + + + + + + 50.0 + 254.0 + 329.0 + 119.0 + 100.0 + 186.0 + + + 50.0 + 100.0 + 398.0 + + + 398.0 + + + 398.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/main/resources/application.properties b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/main/resources/application.properties new file mode 100644 index 0000000000..727b6c82f1 --- /dev/null +++ b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/main/resources/application.properties @@ -0,0 +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. +# + +# Packaging + +quarkus.swagger-ui.always-include=true diff --git a/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/main/resources/habitability.dmn b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/main/resources/habitability.dmn new file mode 100644 index 0000000000..5ba2839631 --- /dev/null +++ b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/main/resources/habitability.dmn @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + oxygene + + + + + temperature + + + + + + + [10..100] + + + < 40 + + + "somehow doable" + + + + + + + + <10 + + + < 40 + + + "hardly doable" + + + + + + + + - + + + >= 40 + + + "too hot" + + + + + + + + + + + + + 50 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/test/java/org/kie/kogito/dmn/quarkus/example/HabitabilityTest.java b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/test/java/org/kie/kogito/dmn/quarkus/example/HabitabilityTest.java new file mode 100644 index 0000000000..17e2714dc3 --- /dev/null +++ b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/test/java/org/kie/kogito/dmn/quarkus/example/HabitabilityTest.java @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.dmn.quarkus.example; + +import org.junit.jupiter.api.Test; + +import io.quarkus.test.junit.QuarkusTest; +import io.restassured.http.ContentType; + +import static io.restassured.RestAssured.given; +import static org.hamcrest.Matchers.is; + +@QuarkusTest +public class HabitabilityTest { + + @Test + public void testEvaluateHabitability() { + given() + .body("{\n" + + " \"oxygene\": 70,\n" + + " \"temperature\": 30\n" + + "}") + .contentType(ContentType.JSON) + .when() + .post("/habitability") + .then() + .statusCode(200) + .body("'habitability'", is("somehow doable")); + } +} diff --git a/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/test/java/org/kie/kogito/dmn/quarkus/example/NativeHabitabilityIT.java b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/test/java/org/kie/kogito/dmn/quarkus/example/NativeHabitabilityIT.java new file mode 100644 index 0000000000..6bc4f990d8 --- /dev/null +++ b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/test/java/org/kie/kogito/dmn/quarkus/example/NativeHabitabilityIT.java @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.dmn.quarkus.example; + +import io.quarkus.test.junit.QuarkusIntegrationTest; + +@QuarkusIntegrationTest +public class NativeHabitabilityIT extends HabitabilityTest { + + // Execute the same tests but in native mode. +} \ No newline at end of file diff --git a/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/test/java/org/kie/kogito/dmn/quarkus/example/NativeTrafficViolationIT.java b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/test/java/org/kie/kogito/dmn/quarkus/example/NativeTrafficViolationIT.java new file mode 100644 index 0000000000..b43c7dca80 --- /dev/null +++ b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/test/java/org/kie/kogito/dmn/quarkus/example/NativeTrafficViolationIT.java @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.dmn.quarkus.example; + +import io.quarkus.test.junit.QuarkusIntegrationTest; + +@QuarkusIntegrationTest +public class NativeTrafficViolationIT extends TrafficViolationTest { + + // Execute the same tests but in native mode. +} \ No newline at end of file diff --git a/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/test/java/org/kie/kogito/dmn/quarkus/example/TrafficViolationTest.java b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/test/java/org/kie/kogito/dmn/quarkus/example/TrafficViolationTest.java new file mode 100644 index 0000000000..3c42782c77 --- /dev/null +++ b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/test/java/org/kie/kogito/dmn/quarkus/example/TrafficViolationTest.java @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.dmn.quarkus.example; + +import org.junit.jupiter.api.Test; + +import io.quarkus.test.junit.QuarkusTest; +import io.restassured.http.ContentType; + +import static io.restassured.RestAssured.given; +import static org.hamcrest.Matchers.is; + +@QuarkusTest +public class TrafficViolationTest { + + @Test + public void testEvaluateTrafficViolation() { + given() + .body("{\n" + + " \"Driver\": {\n" + + " \"Points\": 2\n" + + " },\n" + + " \"Violation\": {\n" + + " \"Type\": \"speed\",\n" + + " \"Actual Speed\": 120,\n" + + " \"Speed Limit\": 100\n" + + " }\n" + + "}") + .contentType(ContentType.JSON) + .when() + .post("/Traffic Violation") + .then() + .statusCode(200) + .body("'Should the driver be suspended?'", is("No")); + } +} diff --git a/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/test/java/testscenario/KogitoScenarioJunitActivatorTest.java b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/test/java/testscenario/KogitoScenarioJunitActivatorTest.java new file mode 100644 index 0000000000..4b19a12015 --- /dev/null +++ b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/test/java/testscenario/KogitoScenarioJunitActivatorTest.java @@ -0,0 +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. + */ +package testscenario; + +/** + * KogitoJunitActivator is a custom JUnit runner that enables the execution of Test Scenario files (*.scesim). + * This activator class, when executed, will load all scesim files available in the project and run them. + * Each row of the scenario will generate a test JUnit result. + */ +@org.junit.runner.RunWith(org.kogito.scenariosimulation.runner.KogitoJunitActivator.class) +public class KogitoScenarioJunitActivatorTest { + +} \ No newline at end of file diff --git a/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/test/resources/TrafficViolationTest.scesim b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/test/resources/TrafficViolationTest.scesim new file mode 100644 index 0000000000..3a9a5d98f5 --- /dev/null +++ b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/test/resources/TrafficViolationTest.scesim @@ -0,0 +1,766 @@ + + + + + + + + + Index + OTHER + + + # + java.lang.Integer + + java.lang.Integer + # + 70 + NOT_EXPRESSION + + + + + Description + OTHER + + + Scenario description + java.lang.String + + java.lang.String + Scenario description + 300 + NOT_EXPRESSION + + + + + Driver + + + Points + + + + 1|5 + GIVEN + + + Driver + Driver + + number + Driver + Points + + 114 + NOT_EXPRESSION + + + + + Violation + + + Type + + + + 1|8 + GIVEN + + + Violation + Violation + + Type + Violation + Type + + 114 + NOT_EXPRESSION + + + + + Violation + + + Speed Limit + + + + 1|9 + GIVEN + + + Violation + Violation + + number + Violation + Speed Limit + + 114 + NOT_EXPRESSION + + + + + Violation + + + Actual Speed + + + + 1|10 + GIVEN + + + Violation + Violation + + number + Violation + Actual Speed + + 114 + NOT_EXPRESSION + + + + + Fine + + + Amount + + + + 1|11 + EXPECT + + + Fine + Fine + + number + Fine + Amount + + 114 + NOT_EXPRESSION + + + + + Fine + + + Points + + + + 1|12 + EXPECT + + + Fine + Fine + + number + Fine + Points + + 114 + NOT_EXPRESSION + + + + + Should the driver be suspended? + + + + 1|13 + EXPECT + + + Should the driver be suspended? + Should the driver be suspended? + + string + Should the driver be suspended? + value + + 114 + NOT_EXPRESSION + + + + + + + + + Scenario description + java.lang.String + + + Description + OTHER + + Above speed limit: 10km/h and 30 km/h + + + + Driver + Driver + + + 1|5 + GIVEN + + 10 + + + + Violation + Violation + + + 1|8 + GIVEN + + "speed" + + + + Violation + Violation + + + 1|9 + GIVEN + + 100 + + + + Violation + Violation + + + 1|10 + GIVEN + + 120 + + + + Fine + Fine + + + 1|11 + EXPECT + + 500 + + + + Fine + Fine + + + 1|12 + EXPECT + + 3 + + + + Should the driver be suspended? + Should the driver be suspended? + + + 1|13 + EXPECT + + "No" + + + + # + java.lang.Integer + + + Index + OTHER + + 1 + + + + + + + + Scenario description + java.lang.String + + + Description + OTHER + + Above speed limit: more than 30 km/h + + + + Driver + Driver + + + 1|5 + GIVEN + + 10 + + + + Violation + Violation + + + 1|8 + GIVEN + + "speed" + + + + Violation + Violation + + + 1|9 + GIVEN + + 100 + + + + Violation + Violation + + + 1|10 + GIVEN + + 150 + + + + Fine + Fine + + + 1|11 + EXPECT + + 1000 + + + + Fine + Fine + + + 1|12 + EXPECT + + 7 + + + + Should the driver be suspended? + Should the driver be suspended? + + + 1|13 + EXPECT + + "No" + + + + # + java.lang.Integer + + + Index + OTHER + + 2 + + + + + + + + Scenario description + java.lang.String + + + Description + OTHER + + Parking violation + + + + Driver + Driver + + + 1|5 + GIVEN + + 10 + + + + Violation + Violation + + + 1|8 + GIVEN + + "parking" + + + + Violation + Violation + + + 1|9 + GIVEN + + + + + Violation + Violation + + + 1|10 + GIVEN + + + + + Fine + Fine + + + 1|11 + EXPECT + + 100 + + + + Fine + Fine + + + 1|12 + EXPECT + + 1 + + + + Should the driver be suspended? + Should the driver be suspended? + + + 1|13 + EXPECT + + "No" + + + + # + java.lang.Integer + + + Index + OTHER + + 3 + + + + + + + + Scenario description + java.lang.String + + + Description + OTHER + + DUI violation + + + + Driver + Driver + + + 1|5 + GIVEN + + 10 + + + + Violation + Violation + + + 1|8 + GIVEN + + "driving under the influence" + + + + Violation + Violation + + + 1|9 + GIVEN + + + + + Violation + Violation + + + 1|10 + GIVEN + + + + + Fine + Fine + + + 1|11 + EXPECT + + 1000 + + + + Fine + Fine + + + 1|12 + EXPECT + + 5 + + + + Should the driver be suspended? + Should the driver be suspended? + + + 1|13 + EXPECT + + "No" + + + + # + java.lang.Integer + + + Index + OTHER + + 4 + + + + + + + + Scenario description + java.lang.String + + + Description + OTHER + + Driver suspended + + + + Driver + Driver + + + 1|5 + GIVEN + + 15 + + + + Violation + Violation + + + 1|8 + GIVEN + + "speed" + + + + Violation + Violation + + + 1|9 + GIVEN + + 100 + + + + Violation + Violation + + + 1|10 + GIVEN + + 140 + + + + Fine + Fine + + + 1|11 + EXPECT + + 1000 + + + + Fine + Fine + + + 1|12 + EXPECT + + 7 + + + + Should the driver be suspended? + Should the driver be suspended? + + + 1|13 + EXPECT + + "Yes" + + + + # + java.lang.Integer + + + Index + OTHER + + 5 + + + + + + + + + + + + 1|1 + GIVEN + + + Empty + java.lang.Void + + java.lang.Void + INSTANCE 1 + PROPERTY 1 + 114 + NOT_EXPRESSION + + + + + + + + + Empty + java.lang.Void + + + 1|1 + GIVEN + + + + + + + + ../../main/resources/Traffic Violation.dmn + DMN + https://github.com/kiegroup/drools/kie-dmn/_A4BCA8B8-CF08-433F-93B2-A2598F19ECFF + Traffic Violation + false + false + + + + + \ No newline at end of file diff --git a/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/test/resources/application.properties b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/test/resources/application.properties new file mode 100644 index 0000000000..a047ea13ba --- /dev/null +++ b/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/src/test/resources/application.properties @@ -0,0 +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. +# + +# Quarkus +quarkus.http.test-port=0 \ No newline at end of file diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/README.md b/kogito-quarkus-examples/dmn-pmml-quarkus-example/README.md index 9e6742d842..7e9ca9a780 100644 --- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/README.md +++ b/kogito-quarkus-examples/dmn-pmml-quarkus-example/README.md @@ -11,9 +11,9 @@ Demonstrates DMN on Kogito capabilities, including REST interface code generatio ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed ### Compile and Run in Local Dev Mode @@ -127,6 +127,3 @@ Example response: } ``` -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/operator/dmn-pmml-quarkus-example.yaml b/kogito-quarkus-examples/dmn-pmml-quarkus-example/operator/dmn-pmml-quarkus-example.yaml deleted file mode 100644 index 94d75dbaa7..0000000000 --- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/operator/dmn-pmml-quarkus-example.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: dmn-pmml-quarkus-example -spec: - type: RemoteSource - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/dmn-pmml-quarkus-example - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: dmn-pmml-quarkus-example - diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/pom.xml b/kogito-quarkus-examples/dmn-pmml-quarkus-example/pom.xml index 2b502a0451..4606fa7fec 100644 --- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/pom.xml +++ b/kogito-quarkus-examples/dmn-pmml-quarkus-example/pom.xml @@ -1,23 +1,43 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT dmn-pmml-quarkus-example Kogito Example :: DMN :: PMML - QUARKUS - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -41,12 +61,12 @@ - org.kie.kogito - kogito-quarkus-decisions + org.drools + drools-quarkus-decisions - org.kie.kogito - kogito-quarkus-predictions + org.kie + kie-quarkus-predictions io.quarkus diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/main/resources/application.properties b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/main/resources/application.properties index 35b7e32bea..a76c2a39bb 100644 --- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/main/resources/application.properties +++ b/kogito-quarkus-examples/dmn-pmml-quarkus-example/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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/CommonTestUtils.java b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/CommonTestUtils.java index fa360a5034..c74b609a65 100644 --- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/CommonTestUtils.java +++ b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/CommonTestUtils.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.dmn.pmml.quarkus.example; diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/DMNMiningModelTest.java b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/DMNMiningModelTest.java index 6c3f656ff4..07ddf01f45 100644 --- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/DMNMiningModelTest.java +++ b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/DMNMiningModelTest.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.dmn.pmml.quarkus.example; diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/DMNRegressionTest.java b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/DMNRegressionTest.java index aa5630f267..07ce648fb1 100644 --- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/DMNRegressionTest.java +++ b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/DMNRegressionTest.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.dmn.pmml.quarkus.example; diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/DMNScoreCardTest.java b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/DMNScoreCardTest.java index 1cc71bfd06..df0ae9e8b9 100644 --- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/DMNScoreCardTest.java +++ b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/DMNScoreCardTest.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.dmn.pmml.quarkus.example; diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/DMNTreeTest.java b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/DMNTreeTest.java index 45d3761a0a..c1ccdd8ac4 100644 --- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/DMNTreeTest.java +++ b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/DMNTreeTest.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.dmn.pmml.quarkus.example; diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/DecisionTreeTest.java b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/DecisionTreeTest.java index 0482d2e654..bf9ba4a2d7 100644 --- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/DecisionTreeTest.java +++ b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/DecisionTreeTest.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.dmn.pmml.quarkus.example; diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/LinRegTest.java b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/LinRegTest.java index cae090da03..af452c8704 100644 --- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/LinRegTest.java +++ b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/LinRegTest.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.dmn.pmml.quarkus.example; diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/MiningModelTest.java b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/MiningModelTest.java index 0ae7f7a31f..55df44e577 100644 --- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/MiningModelTest.java +++ b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/MiningModelTest.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.dmn.pmml.quarkus.example; diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDMNRegressionIT.java b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDMNRegressionIT.java index 1c752f6d62..40fdfa152b 100644 --- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDMNRegressionIT.java +++ b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDMNRegressionIT.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.dmn.pmml.quarkus.example; -import io.quarkus.test.junit.NativeImageTest; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@NativeImageTest +@QuarkusIntegrationTest public class NativeDMNRegressionIT extends DMNRegressionTest { // Execute the same tests but in native mode. diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDMNTreeIT.java b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDMNTreeIT.java index 174768ce4c..75c4886ae7 100644 --- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDMNTreeIT.java +++ b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDMNTreeIT.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.dmn.pmml.quarkus.example; -import io.quarkus.test.junit.NativeImageTest; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@NativeImageTest +@QuarkusIntegrationTest public class NativeDMNTreeIT extends DMNTreeTest { // Execute the same tests but in native mode. diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDecisionTreeIT.java b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDecisionTreeIT.java index c227f3ff26..21ec6e0a69 100644 --- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDecisionTreeIT.java +++ b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeDecisionTreeIT.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.dmn.pmml.quarkus.example; -import io.quarkus.test.junit.NativeImageTest; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@NativeImageTest +@QuarkusIntegrationTest public class NativeDecisionTreeIT extends DecisionTreeTest { // Execute the same tests but in native mode. diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeLinRegIT.java b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeLinRegIT.java index 1718164ec6..63bf0172a3 100644 --- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeLinRegIT.java +++ b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/NativeLinRegIT.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.dmn.pmml.quarkus.example; -import io.quarkus.test.junit.NativeImageTest; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@NativeImageTest +@QuarkusIntegrationTest public class NativeLinRegIT extends LinRegTest { // Execute the same tests but in native mode. diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/ScoreCardTest.java b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/ScoreCardTest.java index 6e0b31b918..af960208c1 100644 --- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/ScoreCardTest.java +++ b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/org/kie/kogito/dmn/pmml/quarkus/example/ScoreCardTest.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.dmn.pmml.quarkus.example; diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/testscenario/KogitoScenarioJunitActivatorTest.java b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/testscenario/KogitoScenarioJunitActivatorTest.java index b80780fad8..4b19a12015 100644 --- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/testscenario/KogitoScenarioJunitActivatorTest.java +++ b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/java/testscenario/KogitoScenarioJunitActivatorTest.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 testscenario; diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/resources/KiePMMLRegressionTest.scesim b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/resources/KiePMMLRegressionTest.scesim index ce32e9a1d0..f394b4fb2a 100644 --- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/resources/KiePMMLRegressionTest.scesim +++ b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/resources/KiePMMLRegressionTest.scesim @@ -440,7 +440,7 @@ - src/main/resources/KiePMMLRegression.dmn + ../../main/resources/KiePMMLRegression.dmn DMN https://kiegroup.org/dmn/_51A1FD67-8A67-4332-9889-B718BE8B7456 TestRegressionDMN diff --git a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/resources/application.properties b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/resources/application.properties index 3c17236931..a047ea13ba 100644 --- a/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/resources/application.properties +++ b/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/test/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. +# + # Quarkus quarkus.http.test-port=0 \ No newline at end of file diff --git a/kogito-quarkus-examples/dmn-quarkus-example/README.md b/kogito-quarkus-examples/dmn-quarkus-example/README.md index ee5d4bdfb3..18e4a5f7b0 100644 --- a/kogito-quarkus-examples/dmn-quarkus-example/README.md +++ b/kogito-quarkus-examples/dmn-quarkus-example/README.md @@ -11,9 +11,9 @@ Demonstrates DMN on Kogito capabilities, including REST interface code generatio ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVM 19.3.1](https://github.com/oracle/graal/releases/tag/vm-19.3.1) installed @@ -128,7 +128,3 @@ Example response: "Should the driver be suspended?":"No" } ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-quarkus-examples/dmn-quarkus-example/operator/dmn-quarkus-example.yaml b/kogito-quarkus-examples/dmn-quarkus-example/operator/dmn-quarkus-example.yaml deleted file mode 100644 index 5c3a34c491..0000000000 --- a/kogito-quarkus-examples/dmn-quarkus-example/operator/dmn-quarkus-example.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: dmn-quarkus-example -spec: - type: RemoteSource - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/dmn-quarkus-example - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: dmn-quarkus-example \ No newline at end of file diff --git a/kogito-quarkus-examples/dmn-quarkus-example/pom.xml b/kogito-quarkus-examples/dmn-quarkus-example/pom.xml index 38ccc03702..b68b9cc295 100644 --- a/kogito-quarkus-examples/dmn-quarkus-example/pom.xml +++ b/kogito-quarkus-examples/dmn-quarkus-example/pom.xml @@ -1,23 +1,43 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT dmn-quarkus-example Kogito Example :: DMN - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -39,8 +59,8 @@ - org.kie.kogito - kogito-quarkus-decisions + org.drools + drools-quarkus-decisions io.quarkus diff --git a/kogito-quarkus-examples/dmn-quarkus-example/src/main/resources/application.properties b/kogito-quarkus-examples/dmn-quarkus-example/src/main/resources/application.properties index c94efbb4d2..727b6c82f1 100644 --- a/kogito-quarkus-examples/dmn-quarkus-example/src/main/resources/application.properties +++ b/kogito-quarkus-examples/dmn-quarkus-example/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. +# + # Packaging quarkus.swagger-ui.always-include=true diff --git a/kogito-quarkus-examples/dmn-quarkus-example/src/test/java/org/kie/kogito/dmn/quarkus/example/NativeTrafficViolationIT.java b/kogito-quarkus-examples/dmn-quarkus-example/src/test/java/org/kie/kogito/dmn/quarkus/example/NativeTrafficViolationIT.java index cbd459afc1..b43c7dca80 100644 --- a/kogito-quarkus-examples/dmn-quarkus-example/src/test/java/org/kie/kogito/dmn/quarkus/example/NativeTrafficViolationIT.java +++ b/kogito-quarkus-examples/dmn-quarkus-example/src/test/java/org/kie/kogito/dmn/quarkus/example/NativeTrafficViolationIT.java @@ -1,23 +1,26 @@ /* - * Copyright 2019 Red Hat, Inc. and/or its affiliates. + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.kie.kogito.dmn.quarkus.example; -import io.quarkus.test.junit.NativeImageTest; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@NativeImageTest +@QuarkusIntegrationTest public class NativeTrafficViolationIT extends TrafficViolationTest { // Execute the same tests but in native mode. diff --git a/kogito-quarkus-examples/dmn-quarkus-example/src/test/java/org/kie/kogito/dmn/quarkus/example/TrafficViolationTest.java b/kogito-quarkus-examples/dmn-quarkus-example/src/test/java/org/kie/kogito/dmn/quarkus/example/TrafficViolationTest.java index b72795ac34..3c42782c77 100644 --- a/kogito-quarkus-examples/dmn-quarkus-example/src/test/java/org/kie/kogito/dmn/quarkus/example/TrafficViolationTest.java +++ b/kogito-quarkus-examples/dmn-quarkus-example/src/test/java/org/kie/kogito/dmn/quarkus/example/TrafficViolationTest.java @@ -1,17 +1,20 @@ /* - * Copyright 2019 Red Hat, Inc. and/or its affiliates. + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.kie.kogito.dmn.quarkus.example; diff --git a/kogito-quarkus-examples/dmn-quarkus-example/src/test/java/testscenario/KogitoScenarioJunitActivatorTest.java b/kogito-quarkus-examples/dmn-quarkus-example/src/test/java/testscenario/KogitoScenarioJunitActivatorTest.java index b80780fad8..4b19a12015 100644 --- a/kogito-quarkus-examples/dmn-quarkus-example/src/test/java/testscenario/KogitoScenarioJunitActivatorTest.java +++ b/kogito-quarkus-examples/dmn-quarkus-example/src/test/java/testscenario/KogitoScenarioJunitActivatorTest.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 testscenario; diff --git a/kogito-quarkus-examples/dmn-quarkus-example/src/test/resources/TrafficViolationTest.scesim b/kogito-quarkus-examples/dmn-quarkus-example/src/test/resources/TrafficViolationTest.scesim index ff5d6a2b3e..3a9a5d98f5 100644 --- a/kogito-quarkus-examples/dmn-quarkus-example/src/test/resources/TrafficViolationTest.scesim +++ b/kogito-quarkus-examples/dmn-quarkus-example/src/test/resources/TrafficViolationTest.scesim @@ -753,7 +753,7 @@ - src/main/resources/Traffic Violation.dmn + ../../main/resources/Traffic Violation.dmn DMN https://github.com/kiegroup/drools/kie-dmn/_A4BCA8B8-CF08-433F-93B2-A2598F19ECFF Traffic Violation diff --git a/kogito-quarkus-examples/dmn-quarkus-example/src/test/resources/application.properties b/kogito-quarkus-examples/dmn-quarkus-example/src/test/resources/application.properties index 3c17236931..a047ea13ba 100644 --- a/kogito-quarkus-examples/dmn-quarkus-example/src/test/resources/application.properties +++ b/kogito-quarkus-examples/dmn-quarkus-example/src/test/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. +# + # Quarkus quarkus.http.test-port=0 \ No newline at end of file diff --git a/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/README.md b/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/README.md new file mode 100644 index 0000000000..8a49a17980 --- /dev/null +++ b/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/README.md @@ -0,0 +1,141 @@ +# DMN + Quarkus example with model included in different jar + +## Description + +A simple DMN service to evaluate a model (traffic violation) that is imported from a different jar. + +Demonstrates DMN on Kogito capabilities, including REST interface code generation. + +## Installing and Running + +### Prerequisites + +You will need: + - Java 17+ installed + - Environment variable JAVA_HOME set accordingly + - Maven 3.9.6+ installed + +When using native image compilation, you will also need: + - [GraalVM 19.3.1](https://github.com/oracle/graal/releases/tag/vm-19.3.1) installed + - Environment variable GRAALVM_HOME set accordingly + - Note that GraalVM native image compilation typically requires other packages (glibc-devel, zlib-devel and gcc) to be installed too. You also need 'native-image' installed in GraalVM (using 'gu install native-image'). Please refer to [GraalVM installation documentation](https://www.graalvm.org/docs/reference-manual/aot-compilation/#prerequisites) for more details. + +### Compile and Run in Local Dev Mode + +``` +cd ./dmn-consumer-example +mvn clean compile quarkus:dev +``` + +(This requires a previous installation of `dmn-resource-jar`) + +### Package and Run in JVM mode + +``` +mvn clean package +java -jar ./dmn-consumer-example/target/quarkus-app/quarkus-run.jar +``` + +or on Windows + +``` +mvn clean package +java -jar .\dmn-consumer-example\target\quarkus-app\quarkus-run.jar +``` + +### Package and Run using Local Native Image +Note that this requires GRAALVM_HOME to point to a valid GraalVM installation + +``` +mvn clean package -Pnative +``` + +To run the generated native executable, generated in `./dmn-consumer-example/target/`, execute + +``` +./dmn-consumer-example/target/dmn-consumer-example-runner +``` + +Note: This does not yet work on Windows, GraalVM and Quarkus should be rolling out support for Windows soon. + +## OpenAPI (Swagger) documentation +[Specification at swagger.io](https://swagger.io/docs/specification/about/) + +You can take a look at the [OpenAPI definition](http://localhost:8080/openapi?format=json) - automatically generated and included in this service - to determine all available operations exposed by this service. For easy readability you can visualize the OpenAPI definition file using a UI tool like for example available [Swagger UI](https://editor.swagger.io). + +In addition, various clients to interact with this service can be easily generated using this OpenAPI definition. + +When running in either Quarkus Development or Native mode, we also leverage the [Quarkus OpenAPI extension](https://quarkus.io/guides/openapi-swaggerui#use-swagger-ui-for-development) that exposes [Swagger UI](http://localhost:8080/swagger-ui/) that you can use to look at available REST endpoints and send test requests. + +## Test DMN Model using Maven + +Validate the functionality of DMN models before deploying them into a production environment by defining test scenarios in Test Scenario Editor. + +To define test scenarios you need to create a .scesim file inside your project and link it to the DMN model you want to be tested. Run all Test Scenarios, executing: + +```sh +cd ./dmn-consumer-example +mvn clean test +``` +See results in surefire test report `target/surefire-reports` + +(This requires a previous installation of `dmn-resource-jar`) + +## Example Usage + +Once the service is up and running, you can use the following example to interact with the service. + +### POST /Traffic Violation + +Returns penalty information from the given inputs -- driver and violation: + +Given inputs: + +```json +{ + "Driver":{"Points":2}, + "Violation":{ + "Type":"speed", + "Actual Speed":120, + "Speed Limit":100 + } +} +``` + +Curl command (using the JSON object above): + +```sh +curl -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{"Driver":{"Points":2},"Violation":{"Type":"speed","Actual Speed":120,"Speed Limit":100}}' http://localhost:8080/Traffic%20Violation +``` +or on Windows: + +```sh +curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" -d "{\"Driver\":{\"Points\":2},\"Violation\":{\"Type\":\"speed\",\"Actual Speed\":120,\"Speed Limit\":100}}" http://localhost:8080/Traffic%20Violation +``` + +As response, penalty information is returned. + +Example response: + +```json +{ + "Violation":{ + "Type":"speed", + "Speed Limit":100, + "Actual Speed":120 + }, + "Driver":{ + "Points":2 + }, + "Fine":{ + "Points":3, + "Amount":500 + }, + "Should the driver be suspended?":"No" +} +``` + +The difference from the [dmn-quarkus-example](../dmn-quarkus-example) is that, in the current one, the `Traffic Model.dml` is defined in a different jar. + + + diff --git a/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-consumer-example/pom.xml b/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-consumer-example/pom.xml new file mode 100644 index 0000000000..3b4a0fdd0d --- /dev/null +++ b/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-consumer-example/pom.xml @@ -0,0 +1,147 @@ + + + 4.0.0 + + org.kie.kogito.examples + dmn-resource-jar-quarkus-example + 999-SNAPSHOT + + + dmn-consumer-example + + + 3.8.4 + quarkus-bom + io.quarkus + 3.8.4 + org.kie.kogito + kogito-bom + 999-SNAPSHOT + 999-SNAPSHOT + 3.6.1 + + + + + org.kie.kogito.examples + dmn-resource-jar + ${project.version} + + + ${quarkus.platform.group-id} + ${quarkus.platform.artifact-id} + ${quarkus.platform.version} + pom + import + + + ${kogito.bom.group-id} + ${kogito.bom.artifact-id} + ${kogito.bom.version} + pom + import + + + + + + org.kie.kogito.examples + dmn-resource-jar + + + org.drools + drools-quarkus-decisions + + + io.quarkus + quarkus-resteasy + + + io.quarkus + quarkus-arc + + + io.quarkus + quarkus-resteasy-jackson + + + io.quarkus + quarkus-smallrye-openapi + + + io.quarkus + quarkus-junit5 + test + + + io.rest-assured + rest-assured + test + + + org.kie.kogito + kogito-scenario-simulation + test + + + io.quarkus + quarkus-smallrye-health + + + + ${project.artifactId} + + + src/main/resources + + + + ${project.build.directory}/generated-resources + + + + + ${quarkus.platform.group-id} + quarkus-maven-plugin + ${quarkus-plugin.version} + + + + build + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + ${dependency-plugin.version} + + + unpack + generate-resources + + unpack + + + + + org.kie.kogito.examples + dmn-resource-jar + ${project.version} + jar + true + ${project.build.directory}/generated-resources + **/*.dmn + + + + + + + + + diff --git a/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-consumer-example/src/main/resources/application.properties b/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-consumer-example/src/main/resources/application.properties new file mode 100644 index 0000000000..727b6c82f1 --- /dev/null +++ b/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-consumer-example/src/main/resources/application.properties @@ -0,0 +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. +# + +# Packaging + +quarkus.swagger-ui.always-include=true diff --git a/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-consumer-example/src/test/java/org/kie/kogito/dmn/consumer/example/NativeTrafficViolationIT.java b/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-consumer-example/src/test/java/org/kie/kogito/dmn/consumer/example/NativeTrafficViolationIT.java new file mode 100644 index 0000000000..1d1a4103cc --- /dev/null +++ b/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-consumer-example/src/test/java/org/kie/kogito/dmn/consumer/example/NativeTrafficViolationIT.java @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.dmn.consumer.example; + +import io.quarkus.test.junit.QuarkusIntegrationTest; + +@QuarkusIntegrationTest +public class NativeTrafficViolationIT extends TrafficViolationTest { + + // Execute the same tests but in native mode. +} \ No newline at end of file diff --git a/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-consumer-example/src/test/java/org/kie/kogito/dmn/consumer/example/TrafficViolationTest.java b/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-consumer-example/src/test/java/org/kie/kogito/dmn/consumer/example/TrafficViolationTest.java new file mode 100644 index 0000000000..612166f5ea --- /dev/null +++ b/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-consumer-example/src/test/java/org/kie/kogito/dmn/consumer/example/TrafficViolationTest.java @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.dmn.consumer.example; + +import org.junit.jupiter.api.Test; + +import io.quarkus.test.junit.QuarkusTest; +import io.restassured.http.ContentType; + +import static io.restassured.RestAssured.given; +import static org.hamcrest.Matchers.is; + +@QuarkusTest +public class TrafficViolationTest { + + @Test + public void testEvaluateTrafficViolation() { + given() + .body("{\n" + + " \"Driver\": {\n" + + " \"Points\": 2\n" + + " },\n" + + " \"Violation\": {\n" + + " \"Type\": \"speed\",\n" + + " \"Actual Speed\": 120,\n" + + " \"Speed Limit\": 100\n" + + " }\n" + + "}") + .contentType(ContentType.JSON) + .when() + .post("/Traffic Violation") + .then() + .statusCode(200) + .body("'Should the driver be suspended?'", is("No")); + } +} diff --git a/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-consumer-example/src/test/java/testscenario/KogitoScenarioJunitActivatorTest.java b/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-consumer-example/src/test/java/testscenario/KogitoScenarioJunitActivatorTest.java new file mode 100644 index 0000000000..4b19a12015 --- /dev/null +++ b/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-consumer-example/src/test/java/testscenario/KogitoScenarioJunitActivatorTest.java @@ -0,0 +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. + */ +package testscenario; + +/** + * KogitoJunitActivator is a custom JUnit runner that enables the execution of Test Scenario files (*.scesim). + * This activator class, when executed, will load all scesim files available in the project and run them. + * Each row of the scenario will generate a test JUnit result. + */ +@org.junit.runner.RunWith(org.kogito.scenariosimulation.runner.KogitoJunitActivator.class) +public class KogitoScenarioJunitActivatorTest { + +} \ No newline at end of file diff --git a/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-consumer-example/src/test/resources/TrafficViolationTest.scesim b/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-consumer-example/src/test/resources/TrafficViolationTest.scesim new file mode 100644 index 0000000000..e98bd57e9c --- /dev/null +++ b/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-consumer-example/src/test/resources/TrafficViolationTest.scesim @@ -0,0 +1,766 @@ + + + + + + + + + Index + OTHER + + + # + java.lang.Integer + + java.lang.Integer + # + 70 + NOT_EXPRESSION + + + + + Description + OTHER + + + Scenario description + java.lang.String + + java.lang.String + Scenario description + 300 + NOT_EXPRESSION + + + + + Driver + + + Points + + + + 1|5 + GIVEN + + + Driver + Driver + + number + Driver + Points + + 114 + NOT_EXPRESSION + + + + + Violation + + + Type + + + + 1|8 + GIVEN + + + Violation + Violation + + Type + Violation + Type + + 114 + NOT_EXPRESSION + + + + + Violation + + + Speed Limit + + + + 1|9 + GIVEN + + + Violation + Violation + + number + Violation + Speed Limit + + 114 + NOT_EXPRESSION + + + + + Violation + + + Actual Speed + + + + 1|10 + GIVEN + + + Violation + Violation + + number + Violation + Actual Speed + + 114 + NOT_EXPRESSION + + + + + Fine + + + Amount + + + + 1|11 + EXPECT + + + Fine + Fine + + number + Fine + Amount + + 114 + NOT_EXPRESSION + + + + + Fine + + + Points + + + + 1|12 + EXPECT + + + Fine + Fine + + number + Fine + Points + + 114 + NOT_EXPRESSION + + + + + Should the driver be suspended? + + + + 1|13 + EXPECT + + + Should the driver be suspended? + Should the driver be suspended? + + string + Should the driver be suspended? + value + + 114 + NOT_EXPRESSION + + + + + + + + + Scenario description + java.lang.String + + + Description + OTHER + + Above speed limit: 10km/h and 30 km/h + + + + Driver + Driver + + + 1|5 + GIVEN + + 10 + + + + Violation + Violation + + + 1|8 + GIVEN + + "speed" + + + + Violation + Violation + + + 1|9 + GIVEN + + 100 + + + + Violation + Violation + + + 1|10 + GIVEN + + 120 + + + + Fine + Fine + + + 1|11 + EXPECT + + 500 + + + + Fine + Fine + + + 1|12 + EXPECT + + 3 + + + + Should the driver be suspended? + Should the driver be suspended? + + + 1|13 + EXPECT + + "No" + + + + # + java.lang.Integer + + + Index + OTHER + + 1 + + + + + + + + Scenario description + java.lang.String + + + Description + OTHER + + Above speed limit: more than 30 km/h + + + + Driver + Driver + + + 1|5 + GIVEN + + 10 + + + + Violation + Violation + + + 1|8 + GIVEN + + "speed" + + + + Violation + Violation + + + 1|9 + GIVEN + + 100 + + + + Violation + Violation + + + 1|10 + GIVEN + + 150 + + + + Fine + Fine + + + 1|11 + EXPECT + + 1000 + + + + Fine + Fine + + + 1|12 + EXPECT + + 7 + + + + Should the driver be suspended? + Should the driver be suspended? + + + 1|13 + EXPECT + + "No" + + + + # + java.lang.Integer + + + Index + OTHER + + 2 + + + + + + + + Scenario description + java.lang.String + + + Description + OTHER + + Parking violation + + + + Driver + Driver + + + 1|5 + GIVEN + + 10 + + + + Violation + Violation + + + 1|8 + GIVEN + + "parking" + + + + Violation + Violation + + + 1|9 + GIVEN + + + + + Violation + Violation + + + 1|10 + GIVEN + + + + + Fine + Fine + + + 1|11 + EXPECT + + 100 + + + + Fine + Fine + + + 1|12 + EXPECT + + 1 + + + + Should the driver be suspended? + Should the driver be suspended? + + + 1|13 + EXPECT + + "No" + + + + # + java.lang.Integer + + + Index + OTHER + + 3 + + + + + + + + Scenario description + java.lang.String + + + Description + OTHER + + DUI violation + + + + Driver + Driver + + + 1|5 + GIVEN + + 10 + + + + Violation + Violation + + + 1|8 + GIVEN + + "driving under the influence" + + + + Violation + Violation + + + 1|9 + GIVEN + + + + + Violation + Violation + + + 1|10 + GIVEN + + + + + Fine + Fine + + + 1|11 + EXPECT + + 1000 + + + + Fine + Fine + + + 1|12 + EXPECT + + 5 + + + + Should the driver be suspended? + Should the driver be suspended? + + + 1|13 + EXPECT + + "No" + + + + # + java.lang.Integer + + + Index + OTHER + + 4 + + + + + + + + Scenario description + java.lang.String + + + Description + OTHER + + Driver suspended + + + + Driver + Driver + + + 1|5 + GIVEN + + 15 + + + + Violation + Violation + + + 1|8 + GIVEN + + "speed" + + + + Violation + Violation + + + 1|9 + GIVEN + + 100 + + + + Violation + Violation + + + 1|10 + GIVEN + + 140 + + + + Fine + Fine + + + 1|11 + EXPECT + + 1000 + + + + Fine + Fine + + + 1|12 + EXPECT + + 7 + + + + Should the driver be suspended? + Should the driver be suspended? + + + 1|13 + EXPECT + + "Yes" + + + + # + java.lang.Integer + + + Index + OTHER + + 5 + + + + + + + + + + + + 1|1 + GIVEN + + + Empty + java.lang.Void + + java.lang.Void + INSTANCE 1 + PROPERTY 1 + 114 + NOT_EXPRESSION + + + + + + + + + Empty + java.lang.Void + + + 1|1 + GIVEN + + + + + + + + ../../../target/generated-resources/Traffic Violation.dmn + DMN + https://github.com/kiegroup/drools/kie-dmn/_A4BCA8B8-CF08-433F-93B2-A2598F19ECFF + Traffic Violation + false + false + + + + + \ No newline at end of file diff --git a/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-consumer-example/src/test/resources/application.properties b/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-consumer-example/src/test/resources/application.properties new file mode 100644 index 0000000000..a047ea13ba --- /dev/null +++ b/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-consumer-example/src/test/resources/application.properties @@ -0,0 +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. +# + +# Quarkus +quarkus.http.test-port=0 \ No newline at end of file diff --git a/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-resource-jar/pom.xml b/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-resource-jar/pom.xml new file mode 100644 index 0000000000..5b18fbe235 --- /dev/null +++ b/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-resource-jar/pom.xml @@ -0,0 +1,32 @@ + + + 4.0.0 + + org.kie.kogito.examples + dmn-resource-jar-quarkus-example + 999-SNAPSHOT + + + dmn-resource-jar + + + 17 + 17 + UTF-8 + + + + + maven-compiler-plugin + + + -parameters + + + + + + + \ No newline at end of file diff --git a/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-resource-jar/src/main/resources/Traffic Violation.dmn b/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-resource-jar/src/main/resources/Traffic Violation.dmn new file mode 100644 index 0000000000..109d4689e1 --- /dev/null +++ b/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/dmn-resource-jar/src/main/resources/Traffic Violation.dmn @@ -0,0 +1,230 @@ + + + + + + string + + + number + + + string + + + string + + + number + + + + + string + + + date + + + string + + "speed", "parking", "driving under the influence" + + + + number + + + number + + + + + number + + + number + + + + + + + + + + + + + + Violation.Type + + + + + Violation.Actual Speed - Violation.Speed Limit + + + + + + + "speed" + + + [10..30) + + + 500 + + + 3 + + + + + "speed" + + + >= 30 + + + 1000 + + + 7 + + + + + "parking" + + + - + + + 100 + + + 1 + + + + + "driving under the influence" + + + - + + + 1000 + + + 5 + + + + + + + + + Should the driver be suspended due to points on his license? + "Yes", "No" + + + + + + + + + + + + Driver.Points + Fine.Points + + + + + if Total Points >= 20 then "Yes" else "No" + + + + + + + + + + 50.0 + 254.0 + 329.0 + 119.0 + 100.0 + 186.0 + + + 50.0 + 100.0 + 398.0 + + + 398.0 + + + 398.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/pom.xml b/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/pom.xml new file mode 100644 index 0000000000..51c8776d35 --- /dev/null +++ b/kogito-quarkus-examples/dmn-resource-jar-quarkus-example/pom.xml @@ -0,0 +1,48 @@ + + + + 4.0.0 + + org.kie.kogito.examples + kogito-quarkus-examples + 999-SNAPSHOT + + dmn-resource-jar-quarkus-example + Kogito Example :: DMN :: Resource jar providing model + + + 3.8.4 + quarkus-bom + io.quarkus + 3.8.4 + org.kie.kogito + kogito-bom + 999-SNAPSHOT + 999-SNAPSHOT + + pom + + dmn-resource-jar + dmn-consumer-example + + diff --git a/kogito-quarkus-examples/dmn-tracing-quarkus/Dockerfile b/kogito-quarkus-examples/dmn-tracing-quarkus/Dockerfile index d3fd100a3a..96dd8f1b90 100644 --- a/kogito-quarkus-examples/dmn-tracing-quarkus/Dockerfile +++ b/kogito-quarkus-examples/dmn-tracing-quarkus/Dockerfile @@ -1,4 +1,23 @@ -FROM quay.io/kiegroup/kogito-runtime-jvm:latest +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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. +# + +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.20 ENV RUNTIME_TYPE quarkus diff --git a/kogito-quarkus-examples/dmn-tracing-quarkus/README.md b/kogito-quarkus-examples/dmn-tracing-quarkus/README.md index f401157604..d6e9756e7d 100644 --- a/kogito-quarkus-examples/dmn-tracing-quarkus/README.md +++ b/kogito-quarkus-examples/dmn-tracing-quarkus/README.md @@ -9,9 +9,9 @@ A simple DMN service to evaluate a loan approval and generate tracing events tha ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVM 19.3.1](https://github.com/oracle/graal/releases/tag/vm-19.3.1) installed @@ -134,10 +134,7 @@ Example response: ## Integration example with Trusty Service -When the tracing addon is enabled, the tracing events are emitted and pushed to a Kafka broker. The [Trusty Service](https://github.com/kiegroup/kogito-apps/tree/main/trusty) can consume such events and store them on a storage. The Trusty Service exposes then some api to consume the information that has been collected. +When the tracing addon is enabled, the tracing events are emitted and pushed to a Kafka broker. The [Trusty Service](https://github.com/apache/incubator-kie-kogito-apps/tree/main/trusty) can consume such events and store them on a storage. The Trusty Service exposes then some api to consume the information that has been collected. A `docker-compose` example is provided in the current folder. In particular, when `docker-compose up` is run, a Kafka broker, an Infinispan container and the latest build of the trusty service configured to use Infinispan are deployed. Once the services are up and running, after a decision has been evaluated, you can access the trusty service API to list the evaluations at `localhost:8081/executions` for example. -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-quarkus-examples/dmn-tracing-quarkus/docker-compose.yml b/kogito-quarkus-examples/dmn-tracing-quarkus/docker-compose.yml index 3438741d5c..203fad5084 100644 --- a/kogito-quarkus-examples/dmn-tracing-quarkus/docker-compose.yml +++ b/kogito-quarkus-examples/dmn-tracing-quarkus/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' services: diff --git a/kogito-quarkus-examples/dmn-tracing-quarkus/docker-compose/infinispan/infinispan.xml b/kogito-quarkus-examples/dmn-tracing-quarkus/docker-compose/infinispan/infinispan.xml index f7c28ab38c..49b57f7d93 100644 --- a/kogito-quarkus-examples/dmn-tracing-quarkus/docker-compose/infinispan/infinispan.xml +++ b/kogito-quarkus-examples/dmn-tracing-quarkus/docker-compose/infinispan/infinispan.xml @@ -1,3 +1,23 @@ + diff --git a/kogito-quarkus-examples/dmn-tracing-quarkus/operator/dmn-quarkus-example.yaml b/kogito-quarkus-examples/dmn-tracing-quarkus/operator/dmn-quarkus-example.yaml deleted file mode 100644 index ee1ba5f6db..0000000000 --- a/kogito-quarkus-examples/dmn-tracing-quarkus/operator/dmn-quarkus-example.yaml +++ /dev/null @@ -1,30 +0,0 @@ ---- -#Strimzi operator should be pre-installed in namespace -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoInfra -metadata: - name: kogito-kafka-infra -spec: - resource: - apiVersion: kafka.strimzi.io/v1beta2 - kind: Kafka ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: dmn-tracing-quarkus -spec: - type: RemoteSource - gitSource: - contextDir: kogito-quarkus-examples/dmn-tracing-quarkus - uri: "https://github.com/kiegroup/kogito-examples/" - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: dmn-tracing-quarkus -spec: - infra: - - kogito-kafka-infra diff --git a/kogito-quarkus-examples/dmn-tracing-quarkus/pom.xml b/kogito-quarkus-examples/dmn-tracing-quarkus/pom.xml index 07fc0c4cec..6f69ae7abc 100644 --- a/kogito-quarkus-examples/dmn-tracing-quarkus/pom.xml +++ b/kogito-quarkus-examples/dmn-tracing-quarkus/pom.xml @@ -1,23 +1,43 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT dmn-tracing-quarkus Kogito Example :: DMN Tracing - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -39,16 +59,16 @@ - org.kie.kogito - kogito-quarkus-decisions + org.drools + drools-quarkus-decisions - org.kie.kogito - kogito-addons-quarkus-tracing-decision + org.kie + kie-addons-quarkus-tracing-decision - org.kie.kogito - kogito-addons-quarkus-monitoring-prometheus + org.kie + kie-addons-quarkus-monitoring-prometheus org.kie.kogito diff --git a/kogito-quarkus-examples/dmn-tracing-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/dmn-tracing-quarkus/src/main/resources/application.properties index 35b7e32bea..a76c2a39bb 100644 --- a/kogito-quarkus-examples/dmn-tracing-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/dmn-tracing-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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/dmn-tracing-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/tracing/LoanEligibilityIT.java b/kogito-quarkus-examples/dmn-tracing-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/tracing/LoanEligibilityIT.java index 22ade7e8f9..efe716fa09 100644 --- a/kogito-quarkus-examples/dmn-tracing-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/tracing/LoanEligibilityIT.java +++ b/kogito-quarkus-examples/dmn-tracing-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/tracing/LoanEligibilityIT.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.dmn.quarkus.tracing; diff --git a/kogito-quarkus-examples/dmn-tracing-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/tracing/NativeLoanEligibilityIT.java b/kogito-quarkus-examples/dmn-tracing-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/tracing/NativeLoanEligibilityIT.java index 75cb111740..1f643270ee 100644 --- a/kogito-quarkus-examples/dmn-tracing-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/tracing/NativeLoanEligibilityIT.java +++ b/kogito-quarkus-examples/dmn-tracing-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/tracing/NativeLoanEligibilityIT.java @@ -1,26 +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.dmn.quarkus.tracing; import org.kie.kogito.testcontainers.quarkus.KafkaQuarkusTestResource; import io.quarkus.test.common.QuarkusTestResource; -import io.quarkus.test.junit.NativeImageTest; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@NativeImageTest +@QuarkusIntegrationTest @QuarkusTestResource(KafkaQuarkusTestResource.class) public class NativeLoanEligibilityIT extends LoanEligibilityIT { diff --git a/kogito-quarkus-examples/dmn-tracing-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/tracing/matcher/StringMatchesUUIDPattern.java b/kogito-quarkus-examples/dmn-tracing-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/tracing/matcher/StringMatchesUUIDPattern.java index c1f9f3398e..54614fccd6 100644 --- a/kogito-quarkus-examples/dmn-tracing-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/tracing/matcher/StringMatchesUUIDPattern.java +++ b/kogito-quarkus-examples/dmn-tracing-quarkus/src/test/java/org/kie/kogito/dmn/quarkus/tracing/matcher/StringMatchesUUIDPattern.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.dmn.quarkus.tracing.matcher; diff --git a/kogito-quarkus-examples/dmn-tracing-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/dmn-tracing-quarkus/src/test/resources/application.properties index ac9526c175..192af53c77 100644 --- a/kogito-quarkus-examples/dmn-tracing-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/dmn-tracing-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.http.test-port=0 kafka.bootstrap.servers=localhost:9092 \ No newline at end of file diff --git a/kogito-quarkus-examples/flexible-process-quarkus/README.md b/kogito-quarkus-examples/flexible-process-quarkus/README.md index 2f63813716..929fe3b5d0 100644 --- a/kogito-quarkus-examples/flexible-process-quarkus/README.md +++ b/kogito-quarkus-examples/flexible-process-quarkus/README.md @@ -43,9 +43,9 @@ will terminate. You will need: -* Java 11+ installed +* Java 17+ installed * Environment variable JAVA_HOME set accordingly -* Maven 3.8.6+ installed +* Maven 3.9.6+ installed When using native image compilation, you will also need: @@ -100,10 +100,6 @@ In addition, various clients to interact with this service can be easily generat When running in either Quarkus Development or Native mode, we also leverage the [Quarkus OpenAPI extension](https://quarkus.io/guides/openapi-swaggerui#use-swagger-ui-for-development) that exposes [Swagger UI](http://localhost:8080/swagger-ui/) that you can use to look at available REST endpoints and send test requests. -## Deploying with the Kogito Operator - -In the [operator](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). - ## Usage example diff --git a/kogito-quarkus-examples/flexible-process-quarkus/operator/flexible-process-quarkus.yaml b/kogito-quarkus-examples/flexible-process-quarkus/operator/flexible-process-quarkus.yaml deleted file mode 100644 index 701d7d6e88..0000000000 --- a/kogito-quarkus-examples/flexible-process-quarkus/operator/flexible-process-quarkus.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: flexible-process-quarkus -spec: - type: RemoteSource - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/flexible-process-quarkus - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: flexible-process-quarkus \ No newline at end of file diff --git a/kogito-quarkus-examples/flexible-process-quarkus/pom.xml b/kogito-quarkus-examples/flexible-process-quarkus/pom.xml index f59b52e1f0..4b4ab5fde8 100644 --- a/kogito-quarkus-examples/flexible-process-quarkus/pom.xml +++ b/kogito-quarkus-examples/flexible-process-quarkus/pom.xml @@ -1,23 +1,43 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT flexible-process-quarkus Kogito Example :: Flexible Process - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -39,8 +59,8 @@ - org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus io.quarkus diff --git a/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/model/Comment.java b/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/model/Comment.java index c6e924361e..3257e28ba8 100644 --- a/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/model/Comment.java +++ b/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/model/Comment.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.flexible.example.model; diff --git a/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/model/Product.java b/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/model/Product.java index 9efe281bc8..1dd99f1d9f 100644 --- a/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/model/Product.java +++ b/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/model/Product.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.flexible.example.model; diff --git a/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/model/Questionnaire.java b/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/model/Questionnaire.java index 67d71a3b12..1ab5c96283 100644 --- a/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/model/Questionnaire.java +++ b/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/model/Questionnaire.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.flexible.example.model; diff --git a/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/model/State.java b/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/model/State.java index 29b47e5ed5..6efea72c9d 100644 --- a/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/model/State.java +++ b/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/model/State.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.flexible.example.model; diff --git a/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/model/SupportCase.java b/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/model/SupportCase.java index 251a49e459..f9dd8de9e8 100644 --- a/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/model/SupportCase.java +++ b/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/model/SupportCase.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.flexible.example.model; diff --git a/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/service/CommentService.java b/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/service/CommentService.java index 70061b61cb..8da2c7ca59 100644 --- a/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/service/CommentService.java +++ b/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/service/CommentService.java @@ -1,26 +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.flexible.example.service; -import javax.enterprise.context.ApplicationScoped; - import org.kie.kogito.flexible.example.model.Comment; import org.kie.kogito.flexible.example.model.State; import org.kie.kogito.flexible.example.model.SupportCase; +import jakarta.enterprise.context.ApplicationScoped; + import static org.kie.kogito.flexible.example.model.State.WAITING_FOR_CUSTOMER; import static org.kie.kogito.flexible.example.model.State.WAITING_FOR_OWNER; diff --git a/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/service/StateService.java b/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/service/StateService.java index 68d512c101..74a5f6315f 100644 --- a/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/service/StateService.java +++ b/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/service/StateService.java @@ -1,26 +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.flexible.example.service; -import javax.enterprise.context.ApplicationScoped; - import org.kie.kogito.flexible.example.model.Questionnaire; import org.kie.kogito.flexible.example.model.State; import org.kie.kogito.flexible.example.model.SupportCase; +import jakarta.enterprise.context.ApplicationScoped; + @ApplicationScoped public class StateService { diff --git a/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/service/TriageService.java b/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/service/TriageService.java index 2f98e73717..f3c9586f15 100644 --- a/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/service/TriageService.java +++ b/kogito-quarkus-examples/flexible-process-quarkus/src/main/java/org/kie/kogito/flexible/example/service/TriageService.java @@ -1,27 +1,30 @@ /* - * 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.flexible.example.service; import java.util.Random; -import javax.enterprise.context.ApplicationScoped; - import org.kie.kogito.flexible.example.model.State; import org.kie.kogito.flexible.example.model.SupportCase; +import jakarta.enterprise.context.ApplicationScoped; + @ApplicationScoped public class TriageService { diff --git a/kogito-quarkus-examples/flexible-process-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/flexible-process-quarkus/src/main/resources/application.properties index 7339127a0e..5e4372315b 100644 --- a/kogito-quarkus-examples/flexible-process-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/flexible-process-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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/flexible-process-quarkus/src/main/resources/service-desk.bpmn b/kogito-quarkus-examples/flexible-process-quarkus/src/main/resources/service-desk.bpmn index b172529784..264cf721c3 100644 --- a/kogito-quarkus-examples/flexible-process-quarkus/src/main/resources/service-desk.bpmn +++ b/kogito-quarkus-examples/flexible-process-quarkus/src/main/resources/service-desk.bpmn @@ -1,4 +1,5 @@ - + + @@ -499,11 +500,13 @@ + _AD768963-CBF7-4269-9D43-51FE0D5D2556_TaskNameInputX _AD768963-CBF7-4269-9D43-51FE0D5D2556_SkippableInputX + _AD768963-CBF7-4269-9D43-51FE0D5D2556_GroupIdInputX _AD768963-CBF7-4269-9D43-51FE0D5D2556_evaluationOutputX @@ -524,6 +527,13 @@ + + _AD768963-CBF7-4269-9D43-51FE0D5D2556_GroupIdInputX + + + + + _AD768963-CBF7-4269-9D43-51FE0D5D2556_evaluationOutputX evaluation @@ -743,7 +753,7 @@ supportCase - + diff --git a/kogito-quarkus-examples/flexible-process-quarkus/src/test/java/org/kie/kogito/flexible/example/quarkus/ServiceDeskProcessTest.java b/kogito-quarkus-examples/flexible-process-quarkus/src/test/java/org/kie/kogito/flexible/example/quarkus/ServiceDeskProcessTest.java index 085ece400b..a5f39fc5cf 100644 --- a/kogito-quarkus-examples/flexible-process-quarkus/src/test/java/org/kie/kogito/flexible/example/quarkus/ServiceDeskProcessTest.java +++ b/kogito-quarkus-examples/flexible-process-quarkus/src/test/java/org/kie/kogito/flexible/example/quarkus/ServiceDeskProcessTest.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.flexible.example.quarkus; @@ -91,6 +94,7 @@ private void addSupportComment(String id) { String location = given() .basePath(BASE_PATH) .contentType(ContentType.JSON) + .queryParam("group", "support") .when() .post("/{id}/ReceiveSupportComment", id) .then() @@ -122,9 +126,11 @@ private void addSupportComment(String id) { private void addCustomerComment(String id) { String location = given() - .basePath(BASE_PATH + "/" + id).contentType(ContentType.JSON) + .basePath(BASE_PATH) + .contentType(ContentType.JSON) + .queryParam("group", "customer") .when() - .post("/ReceiveCustomerComment") + .post("/{id}/ReceiveCustomerComment", id) .then() .statusCode(201) .header("Location", notNullValue()) @@ -153,19 +159,26 @@ private void addCustomerComment(String id) { } private void resolveCase(String id) { - given().basePath(BASE_PATH + "/" + id).contentType(ContentType.JSON).when().post("/Resolve_Case").then() - .statusCode(200).body("supportCase.state", is(State.RESOLVED.name())); + given() + .basePath(BASE_PATH) + .contentType(ContentType.JSON) + .when() + .post("/{id}/Resolve_Case", id) + .then() + .statusCode(200) + .body("supportCase.state", is(State.RESOLVED.name())); } private void sendQuestionnaire(String id) { String taskId = given() - .basePath(BASE_PATH + "/" + id) + .basePath(BASE_PATH) .contentType(ContentType.JSON) + .queryParam("group", "customer") .when() - .get("/tasks") + .get("/{id}/tasks", id) .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("Questionnaire")) .extract() .path("[0].id"); @@ -174,13 +187,13 @@ private void sendQuestionnaire(String id) { params.put("evaluation", 10); given() - .basePath(BASE_PATH + "/" + id) + .basePath(BASE_PATH) .queryParam("user", "Paco") .queryParam("group", "customer") .contentType(ContentType.JSON) .when() .body(params) - .post("/Questionnaire/" + taskId) + .post("/{id}/Questionnaire/{taskId}/", id, taskId) .then() .statusCode(200) .body("supportCase.state", is(State.CLOSED.name())) diff --git a/kogito-quarkus-examples/flexible-process-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/flexible-process-quarkus/src/test/resources/application.properties index 3c17236931..a047ea13ba 100644 --- a/kogito-quarkus-examples/flexible-process-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/flexible-process-quarkus/src/test/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. +# + # Quarkus quarkus.http.test-port=0 \ No newline at end of file diff --git a/kogito-quarkus-examples/kogito-travel-agency/README.md b/kogito-quarkus-examples/kogito-travel-agency/README.md index acebb5995d..c12eb5d51e 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/README.md +++ b/kogito-quarkus-examples/kogito-travel-agency/README.md @@ -28,7 +28,3 @@ Everyone is encouraged to contribute to this tutorial by * create new versions of the tutorial by starting from the last version * blogging about it * using it on conferences and workshops - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/README.md b/kogito-quarkus-examples/kogito-travel-agency/basic/README.md index 47fdcc54af..77d905e6f4 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/basic/README.md +++ b/kogito-quarkus-examples/kogito-travel-agency/basic/README.md @@ -99,9 +99,9 @@ There will be services implemented to carry on the hotel and flight booking. Imp You will need: -* Java 11+ installed +* Java 17+ installed * Environment variable JAVA_HOME set accordingly -* Maven 3.8.6+ installed +* Maven 3.9.6+ installed When using native image compilation, you will also need: diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/pom.xml b/kogito-quarkus-examples/kogito-travel-agency/basic/pom.xml index ef3c38177f..84421dd058 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/basic/pom.xml +++ b/kogito-quarkus-examples/kogito-travel-agency/basic/pom.xml @@ -1,26 +1,46 @@ + 4.0.0 org.kie.kogito.examples kogito-travel-agency-example - 2.0.0-SNAPSHOT + 999-SNAPSHOT kogito-travel-agency-example-basic Kogito Example :: Travel Agency :: Basic UTF-8 UTF-8 - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT - 8.44.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -49,8 +69,8 @@ - org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus org.drools @@ -65,8 +85,8 @@ quarkus-resteasy-jackson - org.kie.kogito - kogito-addons-quarkus-monitoring-prometheus + org.kie + kie-addons-quarkus-monitoring-prometheus io.quarkus diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/docker/Dockerfile.jvm b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/docker/Dockerfile.jvm index 3cf0c2abd1..19088bb955 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/docker/Dockerfile.jvm +++ b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/docker/Dockerfile.jvm @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/kogito-travel-agency-jvm # ### -FROM fabric8/java-alpine-openjdk11-jre +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.20 ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV AB_ENABLED=jmx_exporter @@ -23,4 +23,4 @@ COPY target/quarkus-app/*.jar /deployments/ COPY target/quarkus-app/app/ /deployments/app/ COPY target/quarkus-app/quarkus/ /deployments/quarkus/ -ENTRYPOINT [ "/deployments/run-java.sh" ] \ No newline at end of file +ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/docker/Dockerfile.native b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/docker/Dockerfile.native index 49bc0edc48..c1a1320724 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/docker/Dockerfile.native +++ b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/docker/Dockerfile.native @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/using-kogito # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.4 WORKDIR /work/ COPY target/*-runner /work/application RUN chmod 775 /work diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/Address.java b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/Address.java index d808334384..662dfa9b9f 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/Address.java +++ b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/Address.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.acme.travels; diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/Flight.java b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/Flight.java index c14acd9899..313410ffeb 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/Flight.java +++ b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/Flight.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.acme.travels; diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/Hotel.java b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/Hotel.java index f5788dfe24..a1a3cdfc10 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/Hotel.java +++ b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/Hotel.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.acme.travels; diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/Traveller.java b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/Traveller.java index a1bc010022..a4acc873c9 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/Traveller.java +++ b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/Traveller.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.acme.travels; diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/Trip.java b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/Trip.java index 7d4691de1b..3c016db64b 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/Trip.java +++ b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/Trip.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.acme.travels; diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/service/FlightBookingService.java b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/service/FlightBookingService.java index 952adcee98..a4bf92e22b 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/service/FlightBookingService.java +++ b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/service/FlightBookingService.java @@ -1,25 +1,28 @@ /* - * 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.acme.travels.service; -import javax.enterprise.context.ApplicationScoped; - import org.acme.travels.Flight; import org.acme.travels.Trip; +import jakarta.enterprise.context.ApplicationScoped; + @ApplicationScoped public class FlightBookingService { diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/service/HotelBookingService.java b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/service/HotelBookingService.java index d03812216f..f15a529093 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/service/HotelBookingService.java +++ b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/java/org/acme/travels/service/HotelBookingService.java @@ -1,26 +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.acme.travels.service; -import javax.enterprise.context.ApplicationScoped; - import org.acme.travels.Address; import org.acme.travels.Hotel; import org.acme.travels.Trip; +import jakarta.enterprise.context.ApplicationScoped; + @ApplicationScoped public class HotelBookingService { diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/resources/META-INF/resources/index.html b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/resources/META-INF/resources/index.html index e03c03053f..097ac6c041 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/resources/META-INF/resources/index.html +++ b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/resources/META-INF/resources/index.html @@ -1,3 +1,23 @@ + diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/resources/application.properties b/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/resources/application.properties index 6a64003ab5..710fa431d2 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/basic/src/main/resources/application.properties +++ b/kogito-quarkus-examples/kogito-travel-agency/basic/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. +# + # Configuration file # key = value diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/BookFlightTest.java b/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/BookFlightTest.java index 5f5d08ebf2..3b1ec30bed 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/BookFlightTest.java +++ b/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/BookFlightTest.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.acme.travel; @@ -19,9 +22,6 @@ import java.util.HashMap; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; - import org.acme.travels.Address; import org.acme.travels.Flight; import org.acme.travels.Traveller; @@ -33,6 +33,9 @@ import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/BookHotelTest.java b/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/BookHotelTest.java index 6161bde5dd..c4dbb26aa4 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/BookHotelTest.java +++ b/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/BookHotelTest.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.acme.travel; @@ -19,9 +22,6 @@ import java.util.HashMap; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; - import org.acme.travels.Address; import org.acme.travels.Hotel; import org.acme.travels.Traveller; @@ -33,6 +33,9 @@ import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/TravelTest.java b/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/TravelTest.java index a79fa3e355..105cbd5af8 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/TravelTest.java +++ b/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/TravelTest.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.acme.travel; @@ -21,9 +24,6 @@ import java.util.List; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; - import org.acme.travels.Address; import org.acme.travels.Flight; import org.acme.travels.Hotel; @@ -37,6 +37,9 @@ import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/VisaRulesTest.java b/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/VisaRulesTest.java index a45f594c85..2ba946d5f1 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/VisaRulesTest.java +++ b/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/java/org/acme/travel/VisaRulesTest.java @@ -1,24 +1,25 @@ /* - * 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.acme.travel; import java.util.Date; -import javax.inject.Inject; - import org.acme.travels.Address; import org.acme.travels.Traveller; import org.acme.travels.Trip; @@ -29,6 +30,8 @@ import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; diff --git a/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/resources/application.properties b/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/resources/application.properties index 3c17236931..a047ea13ba 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/resources/application.properties +++ b/kogito-quarkus-examples/kogito-travel-agency/basic/src/test/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. +# + # Quarkus quarkus.http.test-port=0 \ No newline at end of file diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/docker-compose.yml b/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/docker-compose.yml index eedd2da5c2..2cbc0a4150 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/docker-compose.yml +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/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/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/grafana/provisioning/dashboards/dashboard.yml b/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/grafana/provisioning/dashboards/dashboard.yml index 14716ee197..7a78ec05f3 100755 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/grafana/provisioning/dashboards/dashboard.yml +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/grafana/provisioning/dashboards/dashboard.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. +# + apiVersion: 1 providers: diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/grafana/provisioning/datasources/datasource.yml b/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/grafana/provisioning/datasources/datasource.yml index 897523f49b..098d8c08cc 100755 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/grafana/provisioning/datasources/datasource.yml +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/grafana/provisioning/datasources/datasource.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. +# + # config file version apiVersion: 1 diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/infinispan/infinispan.xml b/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/infinispan/infinispan.xml index 4d594bfc24..a466561b9f 100755 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/infinispan/infinispan.xml +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/infinispan/infinispan.xml @@ -1,3 +1,23 @@ + diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/prometheus/prometheus.yml b/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/prometheus/prometheus.yml index f176310fcf..8012288aba 100755 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/prometheus/prometheus.yml +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/prometheus/prometheus.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. +# + # A scrape configuration containing exactly one endpoint to scrape: scrape_configs: # The job name is added as a label `job=` to any timeseries scraped from this config. diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/startServices.sh b/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/startServices.sh index f77454a74c..ddd98b43a6 100755 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/startServices.sh +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/startServices.sh @@ -1,18 +1,21 @@ #!/bin/sh # -# 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. # echo "Script requires your Kogito Travel Agency and Visas projects to be compiled" diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/operator/data-index.yaml b/kogito-quarkus-examples/kogito-travel-agency/extended/operator/data-index.yaml deleted file mode 100644 index 8d4c5de4a4..0000000000 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/operator/data-index.yaml +++ /dev/null @@ -1,33 +0,0 @@ -#Strimzi operator should be pre-installed in namespace -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoInfra -metadata: - name: kogito-kafka-infra -spec: - resource: - apiVersion: kafka.strimzi.io/v1beta2 - kind: Kafka ---- -#Infinispan operator should be pre-installed in namespace -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoInfra -metadata: - name: kogito-infinispan-infra -spec: - resource: - apiVersion: infinispan.org/v1 - kind: Infinispan ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoSupportingService -metadata: - name: data-index -spec: - # Type of the supporting service - serviceType: DataIndex - # For more information please read: https://docs.jboss.org/kogito/release/latest/html_single/#con_kogito-travel-agency - replicas: 1 - infra: - - kogito-kafka-infra - - kogito-infinispan-infra - diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/operator/travels.yaml b/kogito-quarkus-examples/kogito-travel-agency/extended/operator/travels.yaml deleted file mode 100644 index 4f261a16f9..0000000000 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/operator/travels.yaml +++ /dev/null @@ -1,40 +0,0 @@ -#Strimzi operator should be pre-installed in namespace -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoInfra -metadata: - name: kogito-kafka-infra -spec: - resource: - apiVersion: kafka.strimzi.io/v1beta2 - kind: Kafka ---- -#Infinispan operator should be pre-installed in namespace -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoInfra -metadata: - name: kogito-infinispan-infra -spec: - resource: - apiVersion: infinispan.org/v1 - kind: Infinispan ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: travels -spec: - type: RemoteSource - gitSource: - contextDir: kogito-quarkus-examples/kogito-travel-agency/extended/travels - uri: "https://github.com/kiegroup/kogito-examples/" - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: travels -spec: - infra: - - kogito-kafka-infra - - kogito-infinispan-infra diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/operator/visas.yaml b/kogito-quarkus-examples/kogito-travel-agency/extended/operator/visas.yaml deleted file mode 100644 index 87f8be89c5..0000000000 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/operator/visas.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: visas -spec: - type: RemoteSource - gitSource: - contextDir: kogito-quarkus-examples/kogito-travel-agency/extended/visas - uri: "https://github.com/kiegroup/kogito-examples/" - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: visas -spec: - infra: - - kogito-kafka-infra - - kogito-infinispan-infra - diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/pom.xml b/kogito-quarkus-examples/kogito-travel-agency/extended/pom.xml index c95c812518..4509edfb79 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/pom.xml +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/pom.xml @@ -1,11 +1,31 @@ + 4.0.0 org.kie.kogito.examples kogito-travel-agency-example - 2.0.0-SNAPSHOT + 999-SNAPSHOT kogito-travel-agency-example-extended pom @@ -15,10 +35,10 @@ visas - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/README.md b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/README.md index 463fe026af..e2f305dd5c 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/README.md +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/README.md @@ -116,9 +116,9 @@ There will be services implemented to carry on the hotel and flight booking. Imp ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - GraalVM 19.3.1+ installed @@ -371,4 +371,4 @@ curl -H "Content-Type: application/json" -H "Accept: application/json" -X POST h ### Querying the technical cache When running **Kogito Data Index Service** on dev mode, the GraphiQL UI is available at [http://localhost:8180](http://localhost:8180/) and allow to -perform different queries on the model as is explained at [wiki/Data-Index-service](https://github.com/kiegroup/kogito-runtimes/wiki/Data-Index-Service) +perform different queries on the model as is explained at [wiki/Data-Index-service](https://github.com/apache/incubator-kie-kogito-runtimes/wiki/Data-Index-Service) diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/pom.xml b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/pom.xml index 7495c8277f..3ea51b25b3 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/pom.xml +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/pom.xml @@ -1,24 +1,44 @@ + 4.0.0 org.kie.kogito.examples kogito-travel-agency-example-extended - 2.0.0-SNAPSHOT + 999-SNAPSHOT travels Kogito Example :: Travel Agency :: Travels - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT - 8.44.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -47,16 +67,16 @@ - org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus - org.kie.kogito - kogito-addons-quarkus-messaging + org.kie + kie-addons-quarkus-messaging - org.kie.kogito - kogito-addons-quarkus-process-svg + org.kie + kie-addons-quarkus-process-svg io.quarkus @@ -79,20 +99,20 @@ quarkus-hibernate-validator - org.kie.kogito - kogito-addons-quarkus-monitoring-prometheus + org.kie + kie-addons-quarkus-monitoring-prometheus - org.kie.kogito - kogito-addons-quarkus-persistence-infinispan + org.kie + kie-addons-quarkus-persistence-infinispan - org.kie.kogito - kogito-addons-quarkus-events-process + org.kie + kie-addons-quarkus-events-process - org.kie.kogito - kogito-addons-quarkus-process-management + org.kie + kie-addons-quarkus-process-management org.drools @@ -123,8 +143,8 @@ test - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/docker/Dockerfile.jvm b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/docker/Dockerfile.jvm index 5b2e76cc27..3fbacb695a 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/docker/Dockerfile.jvm +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/docker/Dockerfile.jvm @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/kogito-travel-agency-travels-jvm # ### -FROM fabric8/java-alpine-openjdk11-jre +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.20 ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV AB_ENABLED=jmx_exporter @@ -23,4 +23,4 @@ COPY target/quarkus-app/*.jar /deployments/ COPY target/quarkus-app/app/ /deployments/app/ COPY target/quarkus-app/quarkus/ /deployments/quarkus/ -ENTRYPOINT [ "/deployments/run-java.sh" ] \ No newline at end of file +ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/docker/Dockerfile.native b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/docker/Dockerfile.native index 49bc0edc48..c1a1320724 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/docker/Dockerfile.native +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/docker/Dockerfile.native @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/using-kogito # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.4 WORKDIR /work/ COPY target/*-runner /work/application RUN chmod 775 /work diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/Address.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/Address.java index d808334384..662dfa9b9f 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/Address.java +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/Address.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.acme.travels; diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/Flight.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/Flight.java index c14acd9899..313410ffeb 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/Flight.java +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/Flight.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.acme.travels; diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/Hotel.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/Hotel.java index f5788dfe24..a1a3cdfc10 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/Hotel.java +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/Hotel.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.acme.travels; diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/Traveller.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/Traveller.java index 2f2f9c0041..358a7cb02b 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/Traveller.java +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/Traveller.java @@ -1,24 +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.acme.travels; -import javax.validation.constraints.Email; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; +import jakarta.validation.constraints.Email; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; public class Traveller { diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/Trip.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/Trip.java index 7d4691de1b..3c016db64b 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/Trip.java +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/Trip.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.acme.travels; diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/VisaApplication.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/VisaApplication.java index 9209973a71..967093d39b 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/VisaApplication.java +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/VisaApplication.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.acme.travels; diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/VisaResolution.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/VisaResolution.java index 832322ba5d..ea8746e6ef 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/VisaResolution.java +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/VisaResolution.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.acme.travels; diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/service/FlightBookingResource.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/service/FlightBookingResource.java index 6963ac09db..c2a242c5ae 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/service/FlightBookingResource.java +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/service/FlightBookingResource.java @@ -1,26 +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.acme.travels.service; -import javax.inject.Inject; -import javax.ws.rs.GET; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; @Path("/flightservice") public class FlightBookingResource { diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/service/FlightBookingService.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/service/FlightBookingService.java index fd8dca72b2..4b97be42d2 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/service/FlightBookingService.java +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/service/FlightBookingService.java @@ -1,25 +1,28 @@ /* - * 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.acme.travels.service; -import javax.enterprise.context.ApplicationScoped; - import org.acme.travels.Flight; import org.acme.travels.Trip; +import jakarta.enterprise.context.ApplicationScoped; + @ApplicationScoped public class FlightBookingService { diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/service/HotelBookingService.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/service/HotelBookingService.java index d03812216f..f15a529093 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/service/HotelBookingService.java +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/acme/travels/service/HotelBookingService.java @@ -1,26 +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.acme.travels.service; -import javax.enterprise.context.ApplicationScoped; - import org.acme.travels.Address; import org.acme.travels.Hotel; import org.acme.travels.Trip; +import jakarta.enterprise.context.ApplicationScoped; + @ApplicationScoped public class HotelBookingService { diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/kie/kogito/app/VertxRouter.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/kie/kogito/app/VertxRouter.java index 5a5f7ed9b4..413f2491e4 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/kie/kogito/app/VertxRouter.java +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/java/org/kie/kogito/app/VertxRouter.java @@ -1,24 +1,23 @@ /* - * 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.app; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.event.Observes; -import javax.inject.Inject; - import io.quarkus.qute.Location; import io.quarkus.qute.Template; import io.vertx.core.Vertx; @@ -27,6 +26,10 @@ import io.vertx.ext.web.handler.LoggerHandler; import io.vertx.ext.web.handler.StaticHandler; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.event.Observes; +import jakarta.inject.Inject; + import static io.vertx.core.http.HttpMethod.GET; @ApplicationScoped diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/resources/application.properties b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/resources/application.properties index 7e1a9b5412..5869751c51 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/resources/application.properties +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/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. +# + # Packaging # quarkus.package.type=fast-jar @@ -47,4 +66,8 @@ mp.messaging.outgoing.kogito-usertaskinstances-events.value.serializer=org.apach #mp.messaging.outgoing.kogito-variables-events.bootstrap.servers=localhost:9092 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 \ No newline at end of file +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 \ No newline at end of file diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/resources/templates/index.html b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/resources/templates/index.html index 1b18c00ee3..650d697c5a 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/resources/templates/index.html +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/main/resources/templates/index.html @@ -1,19 +1,23 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this 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/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/filtered-resources/project.properties b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/filtered-resources/project.properties index 301ad794d3..5771872775 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/filtered-resources/project.properties +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/filtered-resources/project.properties @@ -1,17 +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. # + project.version=${project.version} project.artifactId=${project.artifactId} \ No newline at end of file diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/BookFlightIT.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/BookFlightIT.java index 70283a30aa..edb4fa01e5 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/BookFlightIT.java +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/BookFlightIT.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.acme.travel; @@ -19,9 +22,6 @@ import java.util.HashMap; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; - import org.acme.travels.Address; import org.acme.travels.Flight; import org.acme.travels.Traveller; @@ -33,6 +33,9 @@ import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/BookHotelIT.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/BookHotelIT.java index 506a681771..f1a50a31ac 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/BookHotelIT.java +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/BookHotelIT.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.acme.travel; @@ -19,9 +22,6 @@ import java.util.HashMap; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; - import org.acme.travels.Address; import org.acme.travels.Hotel; import org.acme.travels.Traveller; @@ -33,6 +33,9 @@ import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/ProjectMetadataProvider.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/ProjectMetadataProvider.java index 90ea34ae45..a9709db59a 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/ProjectMetadataProvider.java +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/ProjectMetadataProvider.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.travel; diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/TravelIT.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/TravelIT.java index e9d522dee0..b04106ebc0 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/TravelIT.java +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/TravelIT.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.acme.travel; @@ -21,9 +24,6 @@ import java.util.List; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; - import org.acme.travels.Address; import org.acme.travels.Flight; import org.acme.travels.Hotel; @@ -45,6 +45,9 @@ import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import static io.restassured.RestAssured.given; import static org.hamcrest.core.StringContains.containsString; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/VisaRulesIT.java b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/VisaRulesIT.java index 608ca9daa6..3ea43be779 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/VisaRulesIT.java +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/java/org/acme/travel/VisaRulesIT.java @@ -1,24 +1,25 @@ /* - * 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.acme.travel; import java.util.Date; -import javax.inject.Inject; - import org.acme.travels.Address; import org.acme.travels.Traveller; import org.acme.travels.Trip; @@ -29,6 +30,8 @@ import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; + import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/resources/application.properties b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/resources/application.properties index a3684a9aa3..6242af5d67 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/travels/src/test/resources/application.properties +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/travels/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.http.test-port=0 quarkus.http.cors=true @@ -33,4 +52,8 @@ mp.messaging.outgoing.kogito-usertaskinstances-events.value.serializer=org.apach #mp.messaging.outgoing.kogito-variables-events.bootstrap.servers=localhost:9092 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 \ No newline at end of file +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 \ No newline at end of file diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/README.md b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/README.md index 7f5cdb9195..079235da90 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/README.md +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/README.md @@ -60,9 +60,9 @@ Public process that will be responsible for processing visa application ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - GraalVM 19.3.1+ installed @@ -227,4 +227,4 @@ EOF ### Querying the technical cache When running **Kogito Data Index Service** on dev mode, the GraphiQL UI is available at [http://localhost:8180](http://localhost:8180/) and allow to -perform different queries on the model as is explained at [wiki/Data-Index-service](https://github.com/kiegroup/kogito-runtimes/wiki/Data-Index-Service) +perform different queries on the model as is explained at [wiki/Data-Index-service](https://github.com/apache/incubator-kie-kogito-runtimes/wiki/Data-Index-Service) diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/pom.xml b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/pom.xml index 8e8342f2a6..994868238a 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/pom.xml +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/pom.xml @@ -1,23 +1,43 @@ + 4.0.0 org.kie.kogito.examples kogito-travel-agency-example-extended - 2.0.0-SNAPSHOT + 999-SNAPSHOT visas Kogito Example :: Travel Agency :: Visas - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -39,16 +59,16 @@ - org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus - org.kie.kogito - kogito-addons-quarkus-messaging + org.kie + kie-addons-quarkus-messaging - org.kie.kogito - kogito-addons-quarkus-process-svg + org.kie + kie-addons-quarkus-process-svg io.quarkus @@ -81,28 +101,28 @@ quarkus-smallrye-openapi - org.kie.kogito - kogito-addons-quarkus-monitoring-prometheus + org.kie + kie-addons-quarkus-monitoring-prometheus io.quarkus quarkus-qute - org.kie.kogito - kogito-addons-quarkus-persistence-infinispan + org.kie + kie-addons-quarkus-persistence-infinispan - org.kie.kogito - kogito-addons-quarkus-events-process + org.kie + kie-addons-quarkus-events-process - org.kie.kogito - kogito-addons-quarkus-process-management + org.kie + kie-addons-quarkus-process-management - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/docker/Dockerfile.jvm b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/docker/Dockerfile.jvm index 9e3ee62832..86f24e1c16 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/docker/Dockerfile.jvm +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/docker/Dockerfile.jvm @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/kogito-travel-agency-visas-jvm # ### -FROM fabric8/java-alpine-openjdk11-jre +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.20 ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV AB_ENABLED=jmx_exporter @@ -23,4 +23,4 @@ COPY target/quarkus-app/*.jar /deployments/ COPY target/quarkus-app/app/ /deployments/app/ COPY target/quarkus-app/quarkus/ /deployments/quarkus/ -ENTRYPOINT [ "/deployments/run-java.sh" ] \ No newline at end of file +ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/docker/Dockerfile.native b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/docker/Dockerfile.native index dafe4e4bcd..3924261fd9 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/docker/Dockerfile.native +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/docker/Dockerfile.native @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/sample-kogito # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.4 WORKDIR /work/ COPY target/*-runner /work/application RUN chmod 775 /work diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/acme/travels/VisaApplication.java b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/acme/travels/VisaApplication.java index 9209973a71..967093d39b 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/acme/travels/VisaApplication.java +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/acme/travels/VisaApplication.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.acme.travels; diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/acme/travels/VisaResolution.java b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/acme/travels/VisaResolution.java index 832322ba5d..ea8746e6ef 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/acme/travels/VisaResolution.java +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/acme/travels/VisaResolution.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.acme.travels; diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/kie/kogito/app/ProcessEventListenerConfig.java b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/kie/kogito/app/ProcessEventListenerConfig.java index e49595a347..ebffc9e000 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/kie/kogito/app/ProcessEventListenerConfig.java +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/kie/kogito/app/ProcessEventListenerConfig.java @@ -1,31 +1,34 @@ /* - * 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.app; -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; - import org.kie.kogito.KogitoGAV; import org.kie.kogito.config.ConfigBean; import org.kie.kogito.process.impl.DefaultProcessEventListenerConfig; import io.micrometer.prometheus.PrometheusMeterRegistry; +import jakarta.annotation.PostConstruct; +import jakarta.annotation.PreDestroy; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; + @ApplicationScoped public class ProcessEventListenerConfig extends DefaultProcessEventListenerConfig { diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/kie/kogito/app/VertxRouter.java b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/kie/kogito/app/VertxRouter.java index 20705faa7f..413f2491e4 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/kie/kogito/app/VertxRouter.java +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/kie/kogito/app/VertxRouter.java @@ -1,24 +1,23 @@ /* - * 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.app; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.event.Observes; -import javax.inject.Inject; - import io.quarkus.qute.Location; import io.quarkus.qute.Template; import io.vertx.core.Vertx; @@ -27,6 +26,10 @@ import io.vertx.ext.web.handler.LoggerHandler; import io.vertx.ext.web.handler.StaticHandler; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.event.Observes; +import jakarta.inject.Inject; + import static io.vertx.core.http.HttpMethod.GET; @ApplicationScoped @@ -45,4 +48,4 @@ void setupRouter(@Observes Router router) { String indexPage = indexTemplate.render(); router.route(GET, "/").handler(ctx -> ctx.response().end(indexPage)); } -} \ No newline at end of file +} diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/kie/kogito/app/VisaApplicationPrometheusProcessEventListener.java b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/kie/kogito/app/VisaApplicationPrometheusProcessEventListener.java index 2cc9c2589f..bebd8cd522 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/kie/kogito/app/VisaApplicationPrometheusProcessEventListener.java +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/java/org/kie/kogito/app/VisaApplicationPrometheusProcessEventListener.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.app; diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/resources/application.properties b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/resources/application.properties index d3e554b334..a65a220a04 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/resources/application.properties +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/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. +# + # Packaging # quarkus.package.type=fast-jar @@ -50,4 +69,9 @@ 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.bootstrap.servers=localhost:9092 +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.monitoring.process.useDefault=false diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/resources/org/acme/travels/visa-approval-rules.drl b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/resources/org/acme/travels/visa-approval-rules.drl index cf6181c15a..08fc782e6b 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/resources/org/acme/travels/visa-approval-rules.drl +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/resources/org/acme/travels/visa-approval-rules.drl @@ -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.acme.travels diff --git a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/resources/templates/index.html b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/resources/templates/index.html index e9ec5f6cf6..99941c9018 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/resources/templates/index.html +++ b/kogito-quarkus-examples/kogito-travel-agency/extended/visas/src/main/resources/templates/index.html @@ -1,19 +1,23 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this 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/kogito-quarkus-examples/kogito-travel-agency/pom.xml b/kogito-quarkus-examples/kogito-travel-agency/pom.xml index 57f6d1b31d..4c9af7f3ec 100644 --- a/kogito-quarkus-examples/kogito-travel-agency/pom.xml +++ b/kogito-quarkus-examples/kogito-travel-agency/pom.xml @@ -1,11 +1,31 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT kogito-travel-agency-example pom @@ -15,10 +35,10 @@ extended - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 diff --git a/kogito-quarkus-examples/ocp-tryout/README.md b/kogito-quarkus-examples/ocp-tryout/README.md index 9bf8422d17..454aeecb52 100644 --- a/kogito-quarkus-examples/ocp-tryout/README.md +++ b/kogito-quarkus-examples/ocp-tryout/README.md @@ -92,8 +92,6 @@ All configuration required to make those connections as well as initializations - `kogito.jobsservice.props` - command line properties for the job service ## Constraints -- Developer Sandbox does not allow to install additional operators - (https://www.youtube.com/watch?v=oDqw8aBGDD8 from 18.02.2021 - time: 9:09) - => cannot use Kogito Operator install - Developer Sandbox sets [resource quotas](https://github.com/codeready-toolchain/host-operator/blob/master/deploy/templates/nstemplatetiers/base/cluster.yaml) per user name ### Memory and cpu requests and limits diff --git a/kogito-quarkus-examples/ocp-tryout/applicationImage.md b/kogito-quarkus-examples/ocp-tryout/applicationImage.md index 89e8e0c79c..c7df34afda 100644 --- a/kogito-quarkus-examples/ocp-tryout/applicationImage.md +++ b/kogito-quarkus-examples/ocp-tryout/applicationImage.md @@ -1,7 +1,7 @@ ## Prepare Kogito application image The Tryout process installs a container image, which must be accessible from an image repository. If such an image exists, this step can be skipped. -Below steps show the process of building and uploading an image using the example of the [extended Kogito Travel Agency](https://github.com/kiegroup/kogito-examples/tree/stable/kogito-quarkus-examples/kogito-travel-agency/extended/travels/) application: +Below steps show the process of building and uploading an image using the example of the [extended Kogito Travel Agency](https://github.com/apache/incubator-kie-kogito-examples/tree/stable/kogito-quarkus-examples/kogito-travel-agency/extended/travels/) application: - cd into `kogito-examples/kogito-quarkus-examples/kogito-travel-agency/extended/travels` - build the application: `mvn clean package` - build the image: `docker build -f src/main/docker/Dockerfile.jvm -t quarkus/kogito-travel-agency-travels-jvm .` diff --git a/kogito-quarkus-examples/ocp-tryout/common-functions.sh b/kogito-quarkus-examples/ocp-tryout/common-functions.sh index 697226a7cf..3a6c1f3f22 100755 --- a/kogito-quarkus-examples/ocp-tryout/common-functions.sh +++ b/kogito-quarkus-examples/ocp-tryout/common-functions.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. +# + function waitForPod(){ if [ "$DRY_RUN" == N ]; then diff --git a/kogito-quarkus-examples/ocp-tryout/infinispan/infinispan-values.yaml b/kogito-quarkus-examples/ocp-tryout/infinispan/infinispan-values.yaml index a516c7796b..99bde44a6b 100644 --- a/kogito-quarkus-examples/ocp-tryout/infinispan/infinispan-values.yaml +++ b/kogito-quarkus-examples/ocp-tryout/infinispan/infinispan-values.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. +# + images: server: quay.io/infinispan/server:14.0.4.Final deploy: diff --git a/kogito-quarkus-examples/ocp-tryout/infinispan/infinispan.sh b/kogito-quarkus-examples/ocp-tryout/infinispan/infinispan.sh index 6d726d4064..8492afb942 100755 --- a/kogito-quarkus-examples/ocp-tryout/infinispan/infinispan.sh +++ b/kogito-quarkus-examples/ocp-tryout/infinispan/infinispan.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. +# + action=$1 diff --git a/kogito-quarkus-examples/ocp-tryout/installer.properties b/kogito-quarkus-examples/ocp-tryout/installer.properties index 378f1904e8..4e95a8efef 100644 --- a/kogito-quarkus-examples/ocp-tryout/installer.properties +++ b/kogito-quarkus-examples/ocp-tryout/installer.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_VERSION=latest DRY_RUN=N # the project under which to install the tryout diff --git a/kogito-quarkus-examples/ocp-tryout/installer.sh b/kogito-quarkus-examples/ocp-tryout/installer.sh index 87c1dbc008..5a41f0a952 100755 --- a/kogito-quarkus-examples/ocp-tryout/installer.sh +++ b/kogito-quarkus-examples/ocp-tryout/installer.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. +# + # firstly, any Kogito unrelated infrastructure like infinispan, kafka, etc. is installed # secondly, any Kogito services like data-index, management console, etc. is installed diff --git a/kogito-quarkus-examples/ocp-tryout/kafka/kafka-values.yaml b/kogito-quarkus-examples/ocp-tryout/kafka/kafka-values.yaml index 95bc0fe40f..10b7b68fb7 100644 --- a/kogito-quarkus-examples/ocp-tryout/kafka/kafka-values.yaml +++ b/kogito-quarkus-examples/ocp-tryout/kafka/kafka-values.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. +# + persistence: size: 1Gi dataLogDir: diff --git a/kogito-quarkus-examples/ocp-tryout/kafka/kafka.sh b/kogito-quarkus-examples/ocp-tryout/kafka/kafka.sh index 59605066ec..a59af9a947 100755 --- a/kogito-quarkus-examples/ocp-tryout/kafka/kafka.sh +++ b/kogito-quarkus-examples/ocp-tryout/kafka/kafka.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. +# + action=$1 diff --git a/kogito-quarkus-examples/ocp-tryout/keycloak/deployment-patch.yaml b/kogito-quarkus-examples/ocp-tryout/keycloak/deployment-patch.yaml index f02d19ec30..7745ef05f6 100644 --- a/kogito-quarkus-examples/ocp-tryout/keycloak/deployment-patch.yaml +++ b/kogito-quarkus-examples/ocp-tryout/keycloak/deployment-patch.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. +# + spec: template: spec: diff --git a/kogito-quarkus-examples/ocp-tryout/keycloak/keycloak.sh b/kogito-quarkus-examples/ocp-tryout/keycloak/keycloak.sh index 8b5af631ea..2f67181056 100755 --- a/kogito-quarkus-examples/ocp-tryout/keycloak/keycloak.sh +++ b/kogito-quarkus-examples/ocp-tryout/keycloak/keycloak.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. +# + action=$1 diff --git a/kogito-quarkus-examples/ocp-tryout/kogito-data-index/deployment-patch-infinispan.yaml b/kogito-quarkus-examples/ocp-tryout/kogito-data-index/deployment-patch-infinispan.yaml index c139f65b38..fed69bc259 100644 --- a/kogito-quarkus-examples/ocp-tryout/kogito-data-index/deployment-patch-infinispan.yaml +++ b/kogito-quarkus-examples/ocp-tryout/kogito-data-index/deployment-patch-infinispan.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. +# + spec: template: spec: diff --git a/kogito-quarkus-examples/ocp-tryout/kogito-data-index/kogito-data-index.sh b/kogito-quarkus-examples/ocp-tryout/kogito-data-index/kogito-data-index.sh index 707e74c068..62c9b9027d 100755 --- a/kogito-quarkus-examples/ocp-tryout/kogito-data-index/kogito-data-index.sh +++ b/kogito-quarkus-examples/ocp-tryout/kogito-data-index/kogito-data-index.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. +# + action=$1 type=$2 diff --git a/kogito-quarkus-examples/ocp-tryout/kogito-jobs-service/deployment-patch.yaml b/kogito-quarkus-examples/ocp-tryout/kogito-jobs-service/deployment-patch.yaml index e827a95231..9e45d677d5 100644 --- a/kogito-quarkus-examples/ocp-tryout/kogito-jobs-service/deployment-patch.yaml +++ b/kogito-quarkus-examples/ocp-tryout/kogito-jobs-service/deployment-patch.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. +# + spec: template: spec: diff --git a/kogito-quarkus-examples/ocp-tryout/kogito-jobs-service/kogito-jobs-service.sh b/kogito-quarkus-examples/ocp-tryout/kogito-jobs-service/kogito-jobs-service.sh index 066eaa53e0..903c7d81cc 100755 --- a/kogito-quarkus-examples/ocp-tryout/kogito-jobs-service/kogito-jobs-service.sh +++ b/kogito-quarkus-examples/ocp-tryout/kogito-jobs-service/kogito-jobs-service.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. +# + action=$1 type=$2 diff --git a/kogito-quarkus-examples/ocp-tryout/kogito-management-console/deployment-patch.yaml b/kogito-quarkus-examples/ocp-tryout/kogito-management-console/deployment-patch.yaml index 8571c36701..170a469c2c 100644 --- a/kogito-quarkus-examples/ocp-tryout/kogito-management-console/deployment-patch.yaml +++ b/kogito-quarkus-examples/ocp-tryout/kogito-management-console/deployment-patch.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. +# + spec: template: spec: diff --git a/kogito-quarkus-examples/ocp-tryout/kogito-management-console/kogito-management-console.sh b/kogito-quarkus-examples/ocp-tryout/kogito-management-console/kogito-management-console.sh index 25e9557542..22c1469c0b 100755 --- a/kogito-quarkus-examples/ocp-tryout/kogito-management-console/kogito-management-console.sh +++ b/kogito-quarkus-examples/ocp-tryout/kogito-management-console/kogito-management-console.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. +# + action=$1 diff --git a/kogito-quarkus-examples/ocp-tryout/kogito-shared/kogito-configs.yaml b/kogito-quarkus-examples/ocp-tryout/kogito-shared/kogito-configs.yaml index 3b3d63a3c1..fef616fd82 100644 --- a/kogito-quarkus-examples/ocp-tryout/kogito-shared/kogito-configs.yaml +++ b/kogito-quarkus-examples/ocp-tryout/kogito-shared/kogito-configs.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. +# + apiVersion: v1 kind: ConfigMap metadata: diff --git a/kogito-quarkus-examples/ocp-tryout/kogito-shared/kogito-shared.sh b/kogito-quarkus-examples/ocp-tryout/kogito-shared/kogito-shared.sh index ea1148314b..1c8a2d98bb 100755 --- a/kogito-quarkus-examples/ocp-tryout/kogito-shared/kogito-shared.sh +++ b/kogito-quarkus-examples/ocp-tryout/kogito-shared/kogito-shared.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. +# + source ../common-functions.sh diff --git a/kogito-quarkus-examples/ocp-tryout/kogito-task-console/deployment-patch.yaml b/kogito-quarkus-examples/ocp-tryout/kogito-task-console/deployment-patch.yaml index 994bf438a0..f224569cb8 100644 --- a/kogito-quarkus-examples/ocp-tryout/kogito-task-console/deployment-patch.yaml +++ b/kogito-quarkus-examples/ocp-tryout/kogito-task-console/deployment-patch.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. +# + spec: template: spec: diff --git a/kogito-quarkus-examples/ocp-tryout/kogito-task-console/kogito-task-console.sh b/kogito-quarkus-examples/ocp-tryout/kogito-task-console/kogito-task-console.sh index a1ba854fcd..f6d84920b4 100755 --- a/kogito-quarkus-examples/ocp-tryout/kogito-task-console/kogito-task-console.sh +++ b/kogito-quarkus-examples/ocp-tryout/kogito-task-console/kogito-task-console.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. +# + action=$1 diff --git a/kogito-quarkus-examples/ocp-tryout/testapp/example/apps/travels.yaml b/kogito-quarkus-examples/ocp-tryout/testapp/example/apps/travels.yaml index 684c7d82eb..df59efcf2b 100644 --- a/kogito-quarkus-examples/ocp-tryout/testapp/example/apps/travels.yaml +++ b/kogito-quarkus-examples/ocp-tryout/testapp/example/apps/travels.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. +# + image: repository: quay.io/kiegroup/examples-travels tag: "1.16.0.final" diff --git a/kogito-quarkus-examples/ocp-tryout/testapp/example/apps/visas.yaml b/kogito-quarkus-examples/ocp-tryout/testapp/example/apps/visas.yaml index e248a9de6b..6b3cf39658 100644 --- a/kogito-quarkus-examples/ocp-tryout/testapp/example/apps/visas.yaml +++ b/kogito-quarkus-examples/ocp-tryout/testapp/example/apps/visas.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. +# + image: repository: quay.io/kiegroup/examples-visas tag: "1.16.0.final" diff --git a/kogito-quarkus-examples/ocp-tryout/testapp/testapp.sh b/kogito-quarkus-examples/ocp-tryout/testapp/testapp.sh index e7e6dd34e5..c233706bfe 100755 --- a/kogito-quarkus-examples/ocp-tryout/testapp/testapp.sh +++ b/kogito-quarkus-examples/ocp-tryout/testapp/testapp.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. +# + action=$1 diff --git a/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/Chart.yaml b/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/Chart.yaml index 262f334c21..e64ebe5abd 100644 --- a/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/Chart.yaml +++ b/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/Chart.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. +# + apiVersion: v2 name: tryout-kogito-app description: A Helm chart for Kubernetes diff --git a/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/templates/NOTES.txt b/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/templates/NOTES.txt index e5176af64e..eb6963f832 100644 --- a/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/templates/NOTES.txt +++ b/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/templates/NOTES.txt @@ -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. +==== + 1. Get the application URL by running these commands: {{- if .Values.ingress.enabled }} {{- range $host := .Values.ingress.hosts }} diff --git a/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/templates/deployment.yaml b/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/templates/deployment.yaml index 083275aac1..8411a6ff88 100644 --- a/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/templates/deployment.yaml +++ b/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/templates/deployment.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. +# + apiVersion: apps/v1 kind: Deployment metadata: diff --git a/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/templates/route.yaml b/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/templates/route.yaml index bf6f0b845e..8d63ffae22 100644 --- a/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/templates/route.yaml +++ b/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/templates/route.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. +# + {{- if .Values.route.enabled }} {{- $fullName := include "tryout-kogito-app.fullname" . -}} apiVersion: route.openshift.io/v1 diff --git a/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/templates/service.yaml b/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/templates/service.yaml index 598e7960ff..1d7189e5ef 100644 --- a/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/templates/service.yaml +++ b/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/templates/service.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. +# + apiVersion: v1 kind: Service metadata: diff --git a/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/templates/serviceaccount.yaml b/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/templates/serviceaccount.yaml index 421115a585..ca8e99911c 100644 --- a/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/templates/serviceaccount.yaml +++ b/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/templates/serviceaccount.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. +# + {{- if .Values.serviceAccount.create -}} apiVersion: v1 kind: ServiceAccount diff --git a/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/templates/tests/test-connection.yaml b/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/templates/tests/test-connection.yaml index 607251bef9..c87f3c3ffc 100644 --- a/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/templates/tests/test-connection.yaml +++ b/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/templates/tests/test-connection.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. +# + apiVersion: v1 kind: Pod metadata: diff --git a/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/values.yaml b/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/values.yaml index 68a12e585c..e5e4addecb 100644 --- a/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/values.yaml +++ b/kogito-quarkus-examples/ocp-tryout/tryout-kogito-app/values.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. +# + # Default values for tryout-kogito-app. # This is a YAML-formatted file. # Declare variables to be passed into your templates. diff --git a/kogito-quarkus-examples/ocp-tryout/uninstaller.sh b/kogito-quarkus-examples/ocp-tryout/uninstaller.sh index e906cf3f83..365a0fc03f 100755 --- a/kogito-quarkus-examples/ocp-tryout/uninstaller.sh +++ b/kogito-quarkus-examples/ocp-tryout/uninstaller.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. +# + source installer.properties source common-functions.sh diff --git a/kogito-quarkus-examples/onboarding-example/README.md b/kogito-quarkus-examples/onboarding-example/README.md index cb5f5afdbd..a9b6a11f3f 100644 --- a/kogito-quarkus-examples/onboarding-example/README.md +++ b/kogito-quarkus-examples/onboarding-example/README.md @@ -27,9 +27,9 @@ You can run the example in any of the following configurations: You will need: -- Java 11+ installed +- Java 17+ installed - Environment variable JAVA_HOME set accordingly -- Maven 3.8.6+ installed +- Maven 3.9.6+ installed When using native image compilation, you will also need: diff --git a/kogito-quarkus-examples/onboarding-example/hr/pom.xml b/kogito-quarkus-examples/onboarding-example/hr/pom.xml index e3d2c3b14a..355e25fa80 100644 --- a/kogito-quarkus-examples/onboarding-example/hr/pom.xml +++ b/kogito-quarkus-examples/onboarding-example/hr/pom.xml @@ -1,23 +1,43 @@ + 4.0.0 org.kie.kogito.examples onboarding-example - 2.0.0-SNAPSHOT + 999-SNAPSHOT hr Kogito Example :: Onboarding Example :: HR with Drools HR related rules for onboarding - org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus - org.kie.kogito - kogito-addons-quarkus-monitoring-prometheus + org.kie + kie-addons-quarkus-monitoring-prometheus io.quarkus diff --git a/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/Address.java b/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/Address.java index 94a7ba8b44..7aa3a47031 100644 --- a/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/Address.java +++ b/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/Address.java @@ -1,17 +1,20 @@ /* - * Copyright 2019 Red Hat, Inc. and/or its affiliates. + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.kie.kogito.examples.hr; diff --git a/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/Department.java b/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/Department.java index 6a81ab81b8..4b7dd0ebb1 100644 --- a/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/Department.java +++ b/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/Department.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.examples.hr; diff --git a/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/DepartmentModel.java b/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/DepartmentModel.java index 01d41385c6..efa9e300c9 100644 --- a/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/DepartmentModel.java +++ b/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/DepartmentModel.java @@ -1,17 +1,20 @@ /* - * Copyright 2019 Red Hat, Inc. and/or its affiliates. + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.kie.kogito.examples.hr; diff --git a/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/Employee.java b/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/Employee.java index 14c0638513..85d110a7c6 100644 --- a/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/Employee.java +++ b/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/Employee.java @@ -1,17 +1,20 @@ /* - * Copyright 2019 Red Hat, Inc. and/or its affiliates. + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.kie.kogito.examples.hr; diff --git a/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/EmployeeRepository.java b/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/EmployeeRepository.java index 40c3c4ce67..818ddffb2e 100644 --- a/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/EmployeeRepository.java +++ b/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/EmployeeRepository.java @@ -1,17 +1,20 @@ /* - * Copyright 2019 Red Hat, Inc. and/or its affiliates. + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.kie.kogito.examples.hr; diff --git a/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/EmployeeValidation.java b/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/EmployeeValidation.java index 716517e158..e26a99deeb 100644 --- a/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/EmployeeValidation.java +++ b/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/EmployeeValidation.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.examples.hr; diff --git a/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/EmployeeValidationModel.java b/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/EmployeeValidationModel.java index d0fc58b177..9bdac39fd6 100644 --- a/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/EmployeeValidationModel.java +++ b/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/EmployeeValidationModel.java @@ -1,17 +1,20 @@ /* - * Copyright 2019 Red Hat, Inc. and/or its affiliates. + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.kie.kogito.examples.hr; diff --git a/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/IdModel.java b/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/IdModel.java index cb356501d5..e3eca598d9 100644 --- a/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/IdModel.java +++ b/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/IdModel.java @@ -1,17 +1,20 @@ /* - * Copyright 2019 Red Hat, Inc. and/or its affiliates. + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.kie.kogito.examples.hr; diff --git a/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/IdResource.java b/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/IdResource.java index b34a44c828..0755533881 100644 --- a/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/IdResource.java +++ b/kogito-quarkus-examples/onboarding-example/hr/src/main/java/org/kie/kogito/examples/hr/IdResource.java @@ -1,25 +1,28 @@ /* - * 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.examples.hr; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; @Path("/id") public class IdResource { diff --git a/kogito-quarkus-examples/onboarding-example/hr/src/main/resources/application.properties b/kogito-quarkus-examples/onboarding-example/hr/src/main/resources/application.properties index 29a61e6272..9c5829f4e3 100644 --- a/kogito-quarkus-examples/onboarding-example/hr/src/main/resources/application.properties +++ b/kogito-quarkus-examples/onboarding-example/hr/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. +# + # Configuration file # key = value # Packaging diff --git a/kogito-quarkus-examples/onboarding-example/hr/src/main/resources/org/kie/kogito/examples/hr/department.drl b/kogito-quarkus-examples/onboarding-example/hr/src/main/resources/org/kie/kogito/examples/hr/department.drl index 486b1b9d24..428ef45387 100644 --- a/kogito-quarkus-examples/onboarding-example/hr/src/main/resources/org/kie/kogito/examples/hr/department.drl +++ b/kogito-quarkus-examples/onboarding-example/hr/src/main/resources/org/kie/kogito/examples/hr/department.drl @@ -1,17 +1,20 @@ /** - * Copyright 2019 Red Hat, Inc. and/or its affiliates. + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.kie.kogito.examples.hr unit Department; diff --git a/kogito-quarkus-examples/onboarding-example/hr/src/main/resources/org/kie/kogito/examples/hr/employeeValidation.drl b/kogito-quarkus-examples/onboarding-example/hr/src/main/resources/org/kie/kogito/examples/hr/employeeValidation.drl index 3c13c020be..2c4825906b 100644 --- a/kogito-quarkus-examples/onboarding-example/hr/src/main/resources/org/kie/kogito/examples/hr/employeeValidation.drl +++ b/kogito-quarkus-examples/onboarding-example/hr/src/main/resources/org/kie/kogito/examples/hr/employeeValidation.drl @@ -1,17 +1,20 @@ /** - * Copyright 2019 Red Hat, Inc. and/or its affiliates. + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.kie.kogito.examples.hr; unit EmployeeValidation; diff --git a/kogito-quarkus-examples/onboarding-example/hr/src/test/java/org/kie/kogito/examples/hr/DepartmentTest.java b/kogito-quarkus-examples/onboarding-example/hr/src/test/java/org/kie/kogito/examples/hr/DepartmentTest.java index 573df95423..96ea54393b 100644 --- a/kogito-quarkus-examples/onboarding-example/hr/src/test/java/org/kie/kogito/examples/hr/DepartmentTest.java +++ b/kogito-quarkus-examples/onboarding-example/hr/src/test/java/org/kie/kogito/examples/hr/DepartmentTest.java @@ -1,17 +1,20 @@ /* - * Copyright 2019 Red Hat, Inc. and/or its affiliates. + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.kie.kogito.examples.hr; diff --git a/kogito-quarkus-examples/onboarding-example/hr/src/test/java/org/kie/kogito/examples/hr/EmployeeValidationTest.java b/kogito-quarkus-examples/onboarding-example/hr/src/test/java/org/kie/kogito/examples/hr/EmployeeValidationTest.java index ad779ba07b..544073fc99 100644 --- a/kogito-quarkus-examples/onboarding-example/hr/src/test/java/org/kie/kogito/examples/hr/EmployeeValidationTest.java +++ b/kogito-quarkus-examples/onboarding-example/hr/src/test/java/org/kie/kogito/examples/hr/EmployeeValidationTest.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.examples.hr; diff --git a/kogito-quarkus-examples/onboarding-example/hr/src/test/resources/application.properties b/kogito-quarkus-examples/onboarding-example/hr/src/test/resources/application.properties index f8370288bf..29d8e2d679 100644 --- a/kogito-quarkus-examples/onboarding-example/hr/src/test/resources/application.properties +++ b/kogito-quarkus-examples/onboarding-example/hr/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. +# + # Configuration file # key = value quarkus.http.test-port=0 diff --git a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/README.md b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/README.md index 6d91a79e2b..054bf1bf00 100644 --- a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/README.md +++ b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/README.md @@ -17,6 +17,10 @@ mvn clean package quarkus:dev ``` ### Compile and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` Note that this requires GRAALVM_HOME to point to a valid GraalVM installation diff --git a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/pom.xml b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/pom.xml index 18712bc1c0..153debfede 100644 --- a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/pom.xml +++ b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/pom.xml @@ -1,11 +1,31 @@ + 4.0.0 org.kie.kogito.examples onboarding-example - 2.0.0-SNAPSHOT + 999-SNAPSHOT onboarding-quarkus Kogito Example :: Onboarding Example :: Onboarding with Business Process Quarkus @@ -13,16 +33,16 @@ - org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus - org.kie.kogito - kogito-addons-quarkus-monitoring-prometheus + org.kie + kie-addons-quarkus-monitoring-prometheus - org.kie.kogito - kogito-addons-quarkus-kubernetes + org.kie + kie-addons-quarkus-kubernetes @@ -111,8 +131,8 @@ - org.kie.kogito - kogito-addons-quarkus-persistence-infinispan + org.kie + kie-addons-quarkus-persistence-infinispan diff --git a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/BaseWorkItemHandlerConfig.java b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/BaseWorkItemHandlerConfig.java index cf8e63d123..ab82bcc7cc 100644 --- a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/BaseWorkItemHandlerConfig.java +++ b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/BaseWorkItemHandlerConfig.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.examples; @@ -22,9 +25,6 @@ import java.util.List; import java.util.Map; -import javax.annotation.PostConstruct; -import javax.inject.Inject; - import org.eclipse.microprofile.config.inject.ConfigProperty; import org.kie.kogito.addons.k8s.Endpoint; import org.kie.kogito.addons.k8s.EndpointQueryKey; @@ -34,6 +34,9 @@ import org.kie.kogito.internal.process.runtime.KogitoWorkItemHandler; import org.kie.kogito.process.impl.DefaultWorkItemHandlerConfig; +import jakarta.annotation.PostConstruct; +import jakarta.inject.Inject; + public abstract class BaseWorkItemHandlerConfig extends DefaultWorkItemHandlerConfig { @Inject diff --git a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/WorkItemHandlerConfig.java b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/WorkItemHandlerConfig.java index a56957ec57..a89d2c1af9 100644 --- a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/WorkItemHandlerConfig.java +++ b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/WorkItemHandlerConfig.java @@ -1,21 +1,24 @@ /* - * 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.examples; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; @ApplicationScoped public class WorkItemHandlerConfig extends BaseWorkItemHandlerConfig { diff --git a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/onboarding/Address.java b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/onboarding/Address.java index e96eef01e6..e1ecc05201 100644 --- a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/onboarding/Address.java +++ b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/onboarding/Address.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.examples.onboarding; diff --git a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/onboarding/DecisionTaskWorkItemHandler.java b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/onboarding/DecisionTaskWorkItemHandler.java index 5caf31508f..25ffb1aa04 100644 --- a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/onboarding/DecisionTaskWorkItemHandler.java +++ b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/onboarding/DecisionTaskWorkItemHandler.java @@ -1,29 +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.examples.onboarding; import java.util.Map; -import javax.ws.rs.HttpMethod; - import org.kie.kogito.addons.quarkus.k8s.workitems.QuarkusDiscoveredEndpointCaller; import org.kie.kogito.internal.process.runtime.KogitoWorkItem; import org.kie.kogito.internal.process.runtime.KogitoWorkItemHandler; import org.kie.kogito.internal.process.runtime.KogitoWorkItemManager; +import jakarta.ws.rs.HttpMethod; + public class DecisionTaskWorkItemHandler implements KogitoWorkItemHandler { private QuarkusDiscoveredEndpointCaller endpointCaller; diff --git a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/onboarding/Employee.java b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/onboarding/Employee.java index 8aaab4b07a..eb6d0b5ca5 100644 --- a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/onboarding/Employee.java +++ b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/onboarding/Employee.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.examples.onboarding; diff --git a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/onboarding/Payroll.java b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/onboarding/Payroll.java index 9ed04c3f25..454e8ce2e0 100644 --- a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/onboarding/Payroll.java +++ b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/java/org/kie/kogito/examples/onboarding/Payroll.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.examples.onboarding; diff --git a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/resources/META-INF/kmodule.xml b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/resources/META-INF/kmodule.xml index 088d681b28..9b0f9364a3 100644 --- a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/resources/META-INF/kmodule.xml +++ b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/resources/META-INF/kmodule.xml @@ -1 +1,21 @@ + \ No newline at end of file diff --git a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/resources/application.properties index a33273764b..b22bd00433 100644 --- a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/onboarding-example/onboarding-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. +# + # Configuration file # key = value # Packaging diff --git a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/test/java/org/kie/kogito/examples/WorkItemHandlerConfig.java b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/test/java/org/kie/kogito/examples/WorkItemHandlerConfig.java index e773e73879..98dc9a2482 100644 --- a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/test/java/org/kie/kogito/examples/WorkItemHandlerConfig.java +++ b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/test/java/org/kie/kogito/examples/WorkItemHandlerConfig.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.examples; diff --git a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/test/java/org/kie/kogito/examples/onboarding/OnboardingEndpointIT.java b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/test/java/org/kie/kogito/examples/onboarding/OnboardingEndpointIT.java index 31e5150554..d640de590d 100644 --- a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/test/java/org/kie/kogito/examples/onboarding/OnboardingEndpointIT.java +++ b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/test/java/org/kie/kogito/examples/onboarding/OnboardingEndpointIT.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.examples.onboarding; @@ -23,8 +26,6 @@ import java.util.Map; import java.util.function.Function; -import javax.inject.Inject; - import org.junit.jupiter.api.Test; import org.kie.kogito.examples.test.RecordedOutputWorkItemHandler; import org.kie.kogito.internal.process.runtime.KogitoWorkItem; @@ -37,6 +38,8 @@ import io.quarkus.test.junit.QuarkusTest; import io.restassured.http.ContentType; +import jakarta.inject.Inject; + import static io.restassured.RestAssured.given; import static org.hamcrest.core.Is.is; diff --git a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/test/java/org/kie/kogito/examples/test/RecordedOutputWorkItemHandler.java b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/test/java/org/kie/kogito/examples/test/RecordedOutputWorkItemHandler.java index 98c20ea8b5..05a6799916 100644 --- a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/test/java/org/kie/kogito/examples/test/RecordedOutputWorkItemHandler.java +++ b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/test/java/org/kie/kogito/examples/test/RecordedOutputWorkItemHandler.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.examples.test; diff --git a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/test/resources/application.properties index 7641e2db4f..1d9d192bfd 100644 --- a/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/onboarding-example/onboarding-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.http.test-port=0 org.acme.kogito.onboarding.local=true \ No newline at end of file diff --git a/kogito-quarkus-examples/onboarding-example/payroll/pom.xml b/kogito-quarkus-examples/onboarding-example/payroll/pom.xml index dc3a6cfa0e..fb476a9747 100644 --- a/kogito-quarkus-examples/onboarding-example/payroll/pom.xml +++ b/kogito-quarkus-examples/onboarding-example/payroll/pom.xml @@ -1,20 +1,40 @@ + 4.0.0 org.kie.kogito.examples onboarding-example - 2.0.0-SNAPSHOT + 999-SNAPSHOT payroll Kogito Example :: Onboarding Example :: Payroll with DMN Payroll related decisions for onboarding - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 @@ -29,8 +49,8 @@ - org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus io.quarkus diff --git a/kogito-quarkus-examples/onboarding-example/payroll/src/main/java/org/kie/kogito/examples/payroll/Address.java b/kogito-quarkus-examples/onboarding-example/payroll/src/main/java/org/kie/kogito/examples/payroll/Address.java index 557708a351..93db7c9b4d 100644 --- a/kogito-quarkus-examples/onboarding-example/payroll/src/main/java/org/kie/kogito/examples/payroll/Address.java +++ b/kogito-quarkus-examples/onboarding-example/payroll/src/main/java/org/kie/kogito/examples/payroll/Address.java @@ -1,17 +1,20 @@ /* - * Copyright 2019 Red Hat, Inc. and/or its affiliates. + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.kie.kogito.examples.payroll; diff --git a/kogito-quarkus-examples/onboarding-example/payroll/src/main/java/org/kie/kogito/examples/payroll/Employee.java b/kogito-quarkus-examples/onboarding-example/payroll/src/main/java/org/kie/kogito/examples/payroll/Employee.java index ea74fae3c7..9aa0edda23 100644 --- a/kogito-quarkus-examples/onboarding-example/payroll/src/main/java/org/kie/kogito/examples/payroll/Employee.java +++ b/kogito-quarkus-examples/onboarding-example/payroll/src/main/java/org/kie/kogito/examples/payroll/Employee.java @@ -1,17 +1,20 @@ /* - * Copyright 2019 Red Hat, Inc. and/or its affiliates. + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.kie.kogito.examples.payroll; diff --git a/kogito-quarkus-examples/onboarding-example/payroll/src/main/java/org/kie/kogito/examples/payroll/Payroll.java b/kogito-quarkus-examples/onboarding-example/payroll/src/main/java/org/kie/kogito/examples/payroll/Payroll.java index c5a3844acf..e7d001dc5e 100644 --- a/kogito-quarkus-examples/onboarding-example/payroll/src/main/java/org/kie/kogito/examples/payroll/Payroll.java +++ b/kogito-quarkus-examples/onboarding-example/payroll/src/main/java/org/kie/kogito/examples/payroll/Payroll.java @@ -1,17 +1,20 @@ /* - * Copyright 2019 Red Hat, Inc. and/or its affiliates. + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.kie.kogito.examples.payroll; diff --git a/kogito-quarkus-examples/onboarding-example/payroll/src/main/resources/META-INF/kmodule.xml b/kogito-quarkus-examples/onboarding-example/payroll/src/main/resources/META-INF/kmodule.xml index 088d681b28..9b0f9364a3 100644 --- a/kogito-quarkus-examples/onboarding-example/payroll/src/main/resources/META-INF/kmodule.xml +++ b/kogito-quarkus-examples/onboarding-example/payroll/src/main/resources/META-INF/kmodule.xml @@ -1 +1,21 @@ + \ No newline at end of file diff --git a/kogito-quarkus-examples/onboarding-example/payroll/src/main/resources/application.properties b/kogito-quarkus-examples/onboarding-example/payroll/src/main/resources/application.properties index ccf4fb79f4..ace62428a8 100644 --- a/kogito-quarkus-examples/onboarding-example/payroll/src/main/resources/application.properties +++ b/kogito-quarkus-examples/onboarding-example/payroll/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. +# + # Configuration file # key = value # Packaging diff --git a/kogito-quarkus-examples/onboarding-example/payroll/src/test/java/org/kie/kogito/examples/payroll/PaymentDateTest.java b/kogito-quarkus-examples/onboarding-example/payroll/src/test/java/org/kie/kogito/examples/payroll/PaymentDateTest.java index 5fe388f31f..2fa1c67927 100644 --- a/kogito-quarkus-examples/onboarding-example/payroll/src/test/java/org/kie/kogito/examples/payroll/PaymentDateTest.java +++ b/kogito-quarkus-examples/onboarding-example/payroll/src/test/java/org/kie/kogito/examples/payroll/PaymentDateTest.java @@ -1,17 +1,20 @@ /* - * Copyright 2019 Red Hat, Inc. and/or its affiliates. + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.kie.kogito.examples.payroll; diff --git a/kogito-quarkus-examples/onboarding-example/payroll/src/test/java/org/kie/kogito/examples/payroll/TaxRateTest.java b/kogito-quarkus-examples/onboarding-example/payroll/src/test/java/org/kie/kogito/examples/payroll/TaxRateTest.java index 78184da510..79687d0147 100644 --- a/kogito-quarkus-examples/onboarding-example/payroll/src/test/java/org/kie/kogito/examples/payroll/TaxRateTest.java +++ b/kogito-quarkus-examples/onboarding-example/payroll/src/test/java/org/kie/kogito/examples/payroll/TaxRateTest.java @@ -1,17 +1,20 @@ /* - * Copyright 2019 Red Hat, Inc. and/or its affiliates. + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.kie.kogito.examples.payroll; diff --git a/kogito-quarkus-examples/onboarding-example/payroll/src/test/java/org/kie/kogito/examples/payroll/VacationDaysTest.java b/kogito-quarkus-examples/onboarding-example/payroll/src/test/java/org/kie/kogito/examples/payroll/VacationDaysTest.java index 48f2b2d5d5..68c90e11d3 100644 --- a/kogito-quarkus-examples/onboarding-example/payroll/src/test/java/org/kie/kogito/examples/payroll/VacationDaysTest.java +++ b/kogito-quarkus-examples/onboarding-example/payroll/src/test/java/org/kie/kogito/examples/payroll/VacationDaysTest.java @@ -1,17 +1,20 @@ /* - * Copyright 2019 Red Hat, Inc. and/or its affiliates. + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.kie.kogito.examples.payroll; diff --git a/kogito-quarkus-examples/onboarding-example/payroll/src/test/resources/application.properties b/kogito-quarkus-examples/onboarding-example/payroll/src/test/resources/application.properties index 3c17236931..a047ea13ba 100644 --- a/kogito-quarkus-examples/onboarding-example/payroll/src/test/resources/application.properties +++ b/kogito-quarkus-examples/onboarding-example/payroll/src/test/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. +# + # Quarkus quarkus.http.test-port=0 \ No newline at end of file diff --git a/kogito-quarkus-examples/onboarding-example/pom.xml b/kogito-quarkus-examples/onboarding-example/pom.xml index 0c349c8b1e..5f5150b0e0 100644 --- a/kogito-quarkus-examples/onboarding-example/pom.xml +++ b/kogito-quarkus-examples/onboarding-example/pom.xml @@ -1,11 +1,31 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT onboarding-example pom @@ -17,14 +37,14 @@ onboarding-quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT diff --git a/kogito-quarkus-examples/pmml-event-driven-quarkus/README.md b/kogito-quarkus-examples/pmml-event-driven-quarkus/README.md index dbb80a2934..b8f1e5baad 100644 --- a/kogito-quarkus-examples/pmml-event-driven-quarkus/README.md +++ b/kogito-quarkus-examples/pmml-event-driven-quarkus/README.md @@ -14,9 +14,9 @@ The main goal behind the addon is to allow Kogito PMML services to be used as pa ### Prerequisites You will need: -- Java 11+ installed +- Java 17+ installed - Environment variable JAVA_HOME set accordingly -- Maven 3.8.6+ installed +- Maven 3.9.6+ installed - [Docker Engine](https://docs.docker.com/engine/) and [Docker Compose](https://docs.docker.com/compose/) installed When using native image compilation, you will also need: @@ -30,8 +30,8 @@ Like the other Kogito AddOns, the only required step to enable it is to include ```xml - org.kie.kogito - kogito-addons-quarkus-events-predictions + org.kie + kie-addons-quarkus-events-predictions ``` diff --git a/kogito-quarkus-examples/pmml-event-driven-quarkus/docker-compose.yml b/kogito-quarkus-examples/pmml-event-driven-quarkus/docker-compose.yml index f07d3cc400..802976737c 100644 --- a/kogito-quarkus-examples/pmml-event-driven-quarkus/docker-compose.yml +++ b/kogito-quarkus-examples/pmml-event-driven-quarkus/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' services: diff --git a/kogito-quarkus-examples/pmml-event-driven-quarkus/pom.xml b/kogito-quarkus-examples/pmml-event-driven-quarkus/pom.xml index 04ad43e099..02d0bbbc65 100644 --- a/kogito-quarkus-examples/pmml-event-driven-quarkus/pom.xml +++ b/kogito-quarkus-examples/pmml-event-driven-quarkus/pom.xml @@ -1,23 +1,43 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT pmml-event-driven-quarkus Kogito Example :: PMML Event-Driven - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -40,13 +60,13 @@ - org.kie.kogito - kogito-quarkus-predictions + org.kie + kie-quarkus-predictions - org.kie.kogito - kogito-addons-quarkus-events-predictions + org.kie + kie-addons-quarkus-events-predictions diff --git a/kogito-quarkus-examples/pmml-event-driven-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/pmml-event-driven-quarkus/src/main/resources/application.properties index bb46176c32..16043182f4 100644 --- a/kogito-quarkus-examples/pmml-event-driven-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/pmml-event-driven-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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/pmml-event-driven-quarkus/src/test/java/org/kie/kogito/examples/PmmlEventDrivenIT.java b/kogito-quarkus-examples/pmml-event-driven-quarkus/src/test/java/org/kie/kogito/examples/PmmlEventDrivenIT.java index 3908d37d47..212a629a44 100644 --- a/kogito-quarkus-examples/pmml-event-driven-quarkus/src/test/java/org/kie/kogito/examples/PmmlEventDrivenIT.java +++ b/kogito-quarkus-examples/pmml-event-driven-quarkus/src/test/java/org/kie/kogito/examples/PmmlEventDrivenIT.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.examples; diff --git a/kogito-quarkus-examples/pmml-event-driven-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/pmml-event-driven-quarkus/src/test/resources/application.properties index 4396d4ebfb..4242e6e9c1 100644 --- a/kogito-quarkus-examples/pmml-event-driven-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/pmml-event-driven-quarkus/src/test/resources/application.properties @@ -1 +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. +# + quarkus.kafka.devservices.enabled=false \ No newline at end of file diff --git a/kogito-quarkus-examples/pmml-event-driven-quarkus/src/test/resources/logback-test.xml b/kogito-quarkus-examples/pmml-event-driven-quarkus/src/test/resources/logback-test.xml index e8c716f5ef..bb6af4db85 100644 --- a/kogito-quarkus-examples/pmml-event-driven-quarkus/src/test/resources/logback-test.xml +++ b/kogito-quarkus-examples/pmml-event-driven-quarkus/src/test/resources/logback-test.xml @@ -1,3 +1,23 @@ + diff --git a/kogito-quarkus-examples/pmml-incubation-api-quarkus/README.md b/kogito-quarkus-examples/pmml-incubation-api-quarkus/README.md index ad1cc17377..c21e6bd230 100644 --- a/kogito-quarkus-examples/pmml-incubation-api-quarkus/README.md +++ b/kogito-quarkus-examples/pmml-incubation-api-quarkus/README.md @@ -17,9 +17,9 @@ The custom REST endpoint evaluates a PMML that computes a linear regression: ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed ### Compile and Run in Local Dev Mode diff --git a/kogito-quarkus-examples/pmml-incubation-api-quarkus/pom.xml b/kogito-quarkus-examples/pmml-incubation-api-quarkus/pom.xml index 4a930255b5..a2e8f5a04b 100644 --- a/kogito-quarkus-examples/pmml-incubation-api-quarkus/pom.xml +++ b/kogito-quarkus-examples/pmml-incubation-api-quarkus/pom.xml @@ -1,23 +1,43 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT pmml-incubation-api-quarkus Kogito Example :: PMML Incubation API With Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -47,8 +67,8 @@ quarkus-resteasy-jackson - org.kie.kogito - kogito-quarkus-predictions + org.kie + kie-quarkus-predictions io.quarkus diff --git a/kogito-quarkus-examples/pmml-incubation-api-quarkus/src/main/java/org/acme/CustomRestPrediction.java b/kogito-quarkus-examples/pmml-incubation-api-quarkus/src/main/java/org/acme/CustomRestPrediction.java index ff7152a4f4..1fec8e320c 100644 --- a/kogito-quarkus-examples/pmml-incubation-api-quarkus/src/main/java/org/acme/CustomRestPrediction.java +++ b/kogito-quarkus-examples/pmml-incubation-api-quarkus/src/main/java/org/acme/CustomRestPrediction.java @@ -1,35 +1,38 @@ /* - * 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; import java.util.Map; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; - import org.kie.kogito.incubation.application.AppRoot; import org.kie.kogito.incubation.common.DataContext; import org.kie.kogito.incubation.common.MapDataContext; import org.kie.kogito.incubation.predictions.PredictionIds; import org.kie.kogito.incubation.predictions.services.PredictionService; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; + @Path("/custom-rest-prediction") public class CustomRestPrediction { diff --git a/kogito-quarkus-examples/pmml-incubation-api-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/pmml-incubation-api-quarkus/src/main/resources/application.properties index 241b48028f..6c9f91fcc7 100644 --- a/kogito-quarkus-examples/pmml-incubation-api-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/pmml-incubation-api-quarkus/src/main/resources/application.properties @@ -1 +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. +# + kogito.generate.rest.predictions=false diff --git a/kogito-quarkus-examples/pmml-incubation-api-quarkus/src/test/java/org/acme/CustomRestPredictionTest.java b/kogito-quarkus-examples/pmml-incubation-api-quarkus/src/test/java/org/acme/CustomRestPredictionTest.java index 43c4520070..bd06eb124f 100644 --- a/kogito-quarkus-examples/pmml-incubation-api-quarkus/src/test/java/org/acme/CustomRestPredictionTest.java +++ b/kogito-quarkus-examples/pmml-incubation-api-quarkus/src/test/java/org/acme/CustomRestPredictionTest.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; diff --git a/kogito-quarkus-examples/pmml-quarkus-example/README.md b/kogito-quarkus-examples/pmml-quarkus-example/README.md index a458891eab..4bb247a7a7 100644 --- a/kogito-quarkus-examples/pmml-quarkus-example/README.md +++ b/kogito-quarkus-examples/pmml-quarkus-example/README.md @@ -11,9 +11,9 @@ Demonstrates PMML on Kogito capabilities, including REST interface code generati ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVM 19.3.1](https://github.com/oracle/graal/releases/tag/vm-19.3.1) installed @@ -195,7 +195,3 @@ Example response: "categoricalResult":1.381666666666666 } ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-quarkus-examples/pmml-quarkus-example/operator/pmml-quarkus-example.yaml b/kogito-quarkus-examples/pmml-quarkus-example/operator/pmml-quarkus-example.yaml deleted file mode 100644 index 4c72c7642d..0000000000 --- a/kogito-quarkus-examples/pmml-quarkus-example/operator/pmml-quarkus-example.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: pmml-quarkus-example -spec: - type: RemoteSource - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/pmml-quarkus-example - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: pmml-quarkus-example \ No newline at end of file diff --git a/kogito-quarkus-examples/pmml-quarkus-example/pom.xml b/kogito-quarkus-examples/pmml-quarkus-example/pom.xml index 40fb97a021..6dfa20c58d 100644 --- a/kogito-quarkus-examples/pmml-quarkus-example/pom.xml +++ b/kogito-quarkus-examples/pmml-quarkus-example/pom.xml @@ -1,23 +1,43 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT pmml-quarkus-example Kogito Example :: PMML - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -39,8 +59,8 @@ - org.kie.kogito - kogito-quarkus-predictions + org.kie + kie-quarkus-predictions io.quarkus diff --git a/kogito-quarkus-examples/pmml-quarkus-example/src/main/resources/application.properties b/kogito-quarkus-examples/pmml-quarkus-example/src/main/resources/application.properties index 80bf3f8b49..bf4a3d657e 100644 --- a/kogito-quarkus-examples/pmml-quarkus-example/src/main/resources/application.properties +++ b/kogito-quarkus-examples/pmml-quarkus-example/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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/CommonTestUtils.java b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/CommonTestUtils.java index aa0a543fe3..f6b9acc3c4 100644 --- a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/CommonTestUtils.java +++ b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/CommonTestUtils.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.pmml.quarkus.example; diff --git a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/LinRegTest.java b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/LinRegTest.java index 60ec72e2ec..48192c5b1a 100644 --- a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/LinRegTest.java +++ b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/LinRegTest.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.pmml.quarkus.example; diff --git a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/MiningModelTest.java b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/MiningModelTest.java index 3cb39b0a8b..b379b55559 100644 --- a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/MiningModelTest.java +++ b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/MiningModelTest.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.pmml.quarkus.example; diff --git a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeLinRegTestIT.java b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeLinRegTestIT.java index d173b1e4d8..59bc2c9cc5 100644 --- a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeLinRegTestIT.java +++ b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeLinRegTestIT.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.pmml.quarkus.example; -import io.quarkus.test.junit.NativeImageTest; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@NativeImageTest +@QuarkusIntegrationTest public class NativeLinRegTestIT extends LinRegTest { // Execute the same tests but in native mode. diff --git a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeMiningModelTestIT.java b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeMiningModelTestIT.java index f29e5a049f..989417b6e0 100644 --- a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeMiningModelTestIT.java +++ b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeMiningModelTestIT.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.pmml.quarkus.example; -import io.quarkus.test.junit.NativeImageTest; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@NativeImageTest +@QuarkusIntegrationTest public class NativeMiningModelTestIT extends MiningModelTest { // Execute the same tests but in native mode. diff --git a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeSampleMineTestIT.java b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeSampleMineTestIT.java index 8b4160f802..be4f6ace39 100644 --- a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeSampleMineTestIT.java +++ b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeSampleMineTestIT.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.pmml.quarkus.example; -import io.quarkus.test.junit.NativeImageTest; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@NativeImageTest +@QuarkusIntegrationTest public class NativeSampleMineTestIT extends SampleMineTest { // Execute the same tests but in native mode. diff --git a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeSimpleScorecardTestIT.java b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeSimpleScorecardTestIT.java index e2ebcb606f..8aae4d2079 100644 --- a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeSimpleScorecardTestIT.java +++ b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/NativeSimpleScorecardTestIT.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.pmml.quarkus.example; -import io.quarkus.test.junit.NativeImageTest; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@NativeImageTest +@QuarkusIntegrationTest public class NativeSimpleScorecardTestIT extends SimpleScorecardTest { // Execute the same tests but in native mode. diff --git a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/SampleMineTest.java b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/SampleMineTest.java index af88056c04..24a3cca9a6 100644 --- a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/SampleMineTest.java +++ b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/SampleMineTest.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.pmml.quarkus.example; diff --git a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/SimpleScorecardTest.java b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/SimpleScorecardTest.java index 6df97d00cb..f9d8f82beb 100644 --- a/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/SimpleScorecardTest.java +++ b/kogito-quarkus-examples/pmml-quarkus-example/src/test/java/org/kie/kogito/pmml/quarkus/example/SimpleScorecardTest.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.pmml.quarkus.example; diff --git a/kogito-quarkus-examples/pmml-quarkus-example/src/test/resources/application.properties b/kogito-quarkus-examples/pmml-quarkus-example/src/test/resources/application.properties index 3c17236931..a047ea13ba 100644 --- a/kogito-quarkus-examples/pmml-quarkus-example/src/test/resources/application.properties +++ b/kogito-quarkus-examples/pmml-quarkus-example/src/test/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. +# + # Quarkus quarkus.http.test-port=0 \ No newline at end of file diff --git a/kogito-quarkus-examples/pom.xml b/kogito-quarkus-examples/pom.xml index 3fe564b87e..b64e75a425 100644 --- a/kogito-quarkus-examples/pom.xml +++ b/kogito-quarkus-examples/pom.xml @@ -1,4 +1,24 @@ + @@ -7,7 +27,7 @@ org.kie.kogito.examples kogito-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT kogito-quarkus-examples @@ -15,6 +35,7 @@ Kogito Example :: Quarkus + org.kie.kogito.examples.quarkus 0 @@ -29,6 +50,7 @@ decisiontable-quarkus-example + dmn-15-quarkus-example dmn-drools-quarkus-metrics dmn-event-driven-quarkus dmn-incubation-api-quarkus @@ -37,7 +59,8 @@ dmn-listener-dtable dmn-pmml-quarkus-example dmn-quarkus-example - dmn-tracing-quarkus + dmn-resource-jar-quarkus-example + dmn-multiple-models-quarkus-example flexible-process-quarkus kogito-travel-agency onboarding-example @@ -71,36 +94,19 @@ process-service-calls-quarkus process-timer-quarkus process-usertasks-custom-lifecycle-quarkus - process-usertasks-quarkus-with-console process-usertasks-quarkus process-usertasks-timer-quarkus-with-console - process-usertasks-with-security-oidc-quarkus-with-console process-usertasks-with-security-oidc-quarkus process-usertasks-with-security-quarkus rules-incubation-api-quarkus rules-legacy-quarkus-example + rules-legacy-scesim-quarkus-example rules-quarkus-helloworld ruleunit-event-driven-quarkus ruleunit-quarkus-example - trusty-tracing-quarkus-devservices - - - productized - - - productized - - - - native @@ -118,12 +124,15 @@ decisiontable-quarkus-example + dmn-15-quarkus-example dmn-drools-quarkus-metrics dmn-event-driven-quarkus dmn-knative-quickstart-quarkus dmn-listener-quarkus dmn-pmml-quarkus-example dmn-quarkus-example + dmn-resource-jar-quarkus-example + dmn-multiple-models-quarkus-example dmn-tracing-quarkus flexible-process-quarkus kogito-travel-agency @@ -147,10 +156,8 @@ process-service-calls-quarkus process-timer-quarkus process-usertasks-custom-lifecycle-quarkus - process-usertasks-quarkus-with-console process-usertasks-quarkus process-usertasks-timer-quarkus-with-console - process-usertasks-with-security-oidc-quarkus-with-console process-usertasks-with-security-oidc-quarkus process-usertasks-with-security-quarkus rules-quarkus-helloworld diff --git a/kogito-quarkus-examples/process-business-rules-quarkus/README.md b/kogito-quarkus-examples/process-business-rules-quarkus/README.md index 160be0419f..5b3d8e282f 100644 --- a/kogito-quarkus-examples/process-business-rules-quarkus/README.md +++ b/kogito-quarkus-examples/process-business-rules-quarkus/README.md @@ -54,9 +54,9 @@ This example shows ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - GraalVM 19.3+ installed @@ -87,6 +87,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ```sh @@ -206,7 +211,7 @@ Should return something like ``` -Then to see the Task created perfor the following command +Then to see the Task created perform the following command ``` curl http://localhost:8080/persons/{uuid}/ChildrenHandling/{tuuid} @@ -249,7 +254,3 @@ Should return something similar to } ``` and there should be no outstanding task for the person anymore. - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-quarkus-examples/process-business-rules-quarkus/operator/process-business-rules-quarkus.yaml b/kogito-quarkus-examples/process-business-rules-quarkus/operator/process-business-rules-quarkus.yaml deleted file mode 100644 index c92a38cc4a..0000000000 --- a/kogito-quarkus-examples/process-business-rules-quarkus/operator/process-business-rules-quarkus.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-business-rules-quarkus -spec: - type: RemoteSource - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/process-business-rules-quarkus - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-business-rules-quarkus \ No newline at end of file diff --git a/kogito-quarkus-examples/process-business-rules-quarkus/pom.xml b/kogito-quarkus-examples/process-business-rules-quarkus/pom.xml index d20e8e4f84..b4f55619b8 100644 --- a/kogito-quarkus-examples/process-business-rules-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-business-rules-quarkus/pom.xml @@ -1,24 +1,44 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-business-rules-quarkus Kogito Example :: Process Business Rules Quarkus Kogito business rules invocation - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -48,8 +68,8 @@ quarkus-resteasy-jackson - org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus io.quarkus diff --git a/kogito-quarkus-examples/process-business-rules-quarkus/src/main/docker/Dockerfile.jvm b/kogito-quarkus-examples/process-business-rules-quarkus/src/main/docker/Dockerfile.jvm index 014531a48f..c16cf87f06 100644 --- a/kogito-quarkus-examples/process-business-rules-quarkus/src/main/docker/Dockerfile.jvm +++ b/kogito-quarkus-examples/process-business-rules-quarkus/src/main/docker/Dockerfile.jvm @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/process-business-rules-quarkus-jvm # ### -FROM fabric8/java-alpine-openjdk11-jre +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.20 ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV AB_ENABLED=jmx_exporter @@ -23,4 +23,4 @@ COPY target/quarkus-app/*.jar /deployments/ COPY target/quarkus-app/app/ /deployments/app/ COPY target/quarkus-app/quarkus/ /deployments/quarkus/ -ENTRYPOINT [ "/deployments/run-java.sh" ] \ No newline at end of file +ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/kogito-quarkus-examples/process-business-rules-quarkus/src/main/docker/Dockerfile.native b/kogito-quarkus-examples/process-business-rules-quarkus/src/main/docker/Dockerfile.native index b508cbb1d3..dca027f3e7 100644 --- a/kogito-quarkus-examples/process-business-rules-quarkus/src/main/docker/Dockerfile.native +++ b/kogito-quarkus-examples/process-business-rules-quarkus/src/main/docker/Dockerfile.native @@ -7,14 +7,14 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.native -t quarkus/kogito-infinispan-persistence-quarkus . +# docker build -f src/main/docker/Dockerfile.native -t quarkus/process-business-rules-quarkus . # # Then run the container using: # -# docker run -i --rm -p 8080:8080 quarkus/kogito-infinispan-persistence-quarkus +# docker run -i --rm -p 8080:8080 quarkus/process-business-rules-quarkus # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.4 WORKDIR /work/ COPY target/*-runner /work/application RUN chmod 775 /work diff --git a/kogito-quarkus-examples/process-business-rules-quarkus/src/main/java/org/acme/travels/Person.java b/kogito-quarkus-examples/process-business-rules-quarkus/src/main/java/org/acme/travels/Person.java index bfc9d2a8cd..77b60c13f2 100644 --- a/kogito-quarkus-examples/process-business-rules-quarkus/src/main/java/org/acme/travels/Person.java +++ b/kogito-quarkus-examples/process-business-rules-quarkus/src/main/java/org/acme/travels/Person.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.acme.travels; diff --git a/kogito-quarkus-examples/process-business-rules-quarkus/src/main/java/org/acme/travels/PersonValidationService.java b/kogito-quarkus-examples/process-business-rules-quarkus/src/main/java/org/acme/travels/PersonValidationService.java index 075d97b873..850d6c455b 100644 --- a/kogito-quarkus-examples/process-business-rules-quarkus/src/main/java/org/acme/travels/PersonValidationService.java +++ b/kogito-quarkus-examples/process-business-rules-quarkus/src/main/java/org/acme/travels/PersonValidationService.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.acme.travels; diff --git a/kogito-quarkus-examples/process-business-rules-quarkus/src/main/resources/META-INF/resources/index.html b/kogito-quarkus-examples/process-business-rules-quarkus/src/main/resources/META-INF/resources/index.html deleted file mode 100644 index a965327283..0000000000 --- a/kogito-quarkus-examples/process-business-rules-quarkus/src/main/resources/META-INF/resources/index.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - kogito-infinispan-persistence-quarkus - 1.0-SNAPSHOT - - - - -

- -
-
-

Congratulations, you have created a new Quarkus application.

- -

Why do you see this?

- -

This page is served by Quarkus. The source is in - src/main/resources/META-INF/resources/index.html.

- -

What can I do from here?

- -

If not already done, run the application in dev mode using: mvn compile quarkus:dev. -

-
    -
  • Add REST resources, Servlets, functions and other services in src/main/java.
  • -
  • Your static assets are located in src/main/resources/META-INF/resources.
  • -
  • Configure your application in src/main/resources/application.properties. -
  • -
- -

How do I get rid of this page?

-

Just delete the src/main/resources/META-INF/resources/index.html file.

-
-
-
-

Application

-
    -
  • GroupId: org.acme
  • -
  • ArtifactId: kogito-infinispan-persistence-quarkus
  • -
  • Version: 1.0-SNAPSHOT
  • -
  • Quarkus Version: 0.19.1
  • -
-
- -
-
- - - - \ No newline at end of file diff --git a/kogito-quarkus-examples/process-business-rules-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-business-rules-quarkus/src/main/resources/application.properties index 35b7e32bea..a76c2a39bb 100644 --- a/kogito-quarkus-examples/process-business-rules-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-business-rules-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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/process-business-rules-quarkus/src/main/resources/org/acme/travels/PersonValidationService.drl b/kogito-quarkus-examples/process-business-rules-quarkus/src/main/resources/org/acme/travels/PersonValidationService.drl index 0016df5317..5777b53bc4 100644 --- a/kogito-quarkus-examples/process-business-rules-quarkus/src/main/resources/org/acme/travels/PersonValidationService.drl +++ b/kogito-quarkus-examples/process-business-rules-quarkus/src/main/resources/org/acme/travels/PersonValidationService.drl @@ -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.acme.travels unit PersonValidationService diff --git a/kogito-quarkus-examples/process-business-rules-quarkus/src/test/java/org/acme/travels/PersonProcessTest.java b/kogito-quarkus-examples/process-business-rules-quarkus/src/test/java/org/acme/travels/PersonProcessTest.java index 9ff19f5140..4dceff6c2b 100644 --- a/kogito-quarkus-examples/process-business-rules-quarkus/src/test/java/org/acme/travels/PersonProcessTest.java +++ b/kogito-quarkus-examples/process-business-rules-quarkus/src/test/java/org/acme/travels/PersonProcessTest.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.acme.travels; @@ -19,9 +22,6 @@ import java.util.List; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; - import org.junit.jupiter.api.Test; import org.kie.kogito.Model; import org.kie.kogito.process.Process; @@ -30,6 +30,9 @@ import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; diff --git a/kogito-quarkus-examples/process-business-rules-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/process-business-rules-quarkus/src/test/resources/application.properties index 3c17236931..a047ea13ba 100644 --- a/kogito-quarkus-examples/process-business-rules-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/process-business-rules-quarkus/src/test/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. +# + # Quarkus quarkus.http.test-port=0 \ No newline at end of file diff --git a/kogito-quarkus-examples/process-decisions-quarkus/README.md b/kogito-quarkus-examples/process-decisions-quarkus/README.md index f2cff4a768..8134d0edb8 100644 --- a/kogito-quarkus-examples/process-decisions-quarkus/README.md +++ b/kogito-quarkus-examples/process-decisions-quarkus/README.md @@ -111,9 +111,9 @@ The DMN file where this decision is declared is [TrafficViolation.dmn](src/main/ ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - GraalVM 19.3+ installed @@ -144,6 +144,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ```sh @@ -277,8 +282,3 @@ After the Curl command, you should see a similar console log } ``` In this case the driver license is expired when the DRL is evaluated because the DriverService generated an expired date for the driver's license thus DMN is not evaluated, so the `validLicense` is `false`, `suspended` and `fine` are `null`. - - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). \ No newline at end of file diff --git a/kogito-quarkus-examples/process-decisions-quarkus/pom.xml b/kogito-quarkus-examples/process-decisions-quarkus/pom.xml index d13f21a705..e6d503daf7 100644 --- a/kogito-quarkus-examples/process-decisions-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-decisions-quarkus/pom.xml @@ -1,24 +1,44 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-decisions-quarkus Kogito Example :: Process :: Decisions :: Quarkus Process with DMN and DRL integration - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -48,8 +68,8 @@ quarkus-resteasy-jackson
- org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus io.quarkus diff --git a/kogito-quarkus-examples/process-decisions-quarkus/src/main/java/org/kie/kogito/traffic/Driver.java b/kogito-quarkus-examples/process-decisions-quarkus/src/main/java/org/kie/kogito/traffic/Driver.java index f77a47b749..32d9bb013a 100644 --- a/kogito-quarkus-examples/process-decisions-quarkus/src/main/java/org/kie/kogito/traffic/Driver.java +++ b/kogito-quarkus-examples/process-decisions-quarkus/src/main/java/org/kie/kogito/traffic/Driver.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.traffic; import java.util.Date; @@ -58,6 +60,14 @@ public Driver(String id, String name, String state, String city, Integer points, this.licenseExpiration = licenseExpiration; } + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + public String getName() { return name; } diff --git a/kogito-quarkus-examples/process-decisions-quarkus/src/main/java/org/kie/kogito/traffic/DriverService.java b/kogito-quarkus-examples/process-decisions-quarkus/src/main/java/org/kie/kogito/traffic/DriverService.java index 595aa50e4b..afccc4e61a 100644 --- a/kogito-quarkus-examples/process-decisions-quarkus/src/main/java/org/kie/kogito/traffic/DriverService.java +++ b/kogito-quarkus-examples/process-decisions-quarkus/src/main/java/org/kie/kogito/traffic/DriverService.java @@ -1,29 +1,31 @@ /* - * 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.traffic; import java.time.ZonedDateTime; import java.util.Date; -import javax.enterprise.context.ApplicationScoped; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.enterprise.context.ApplicationScoped; + @ApplicationScoped public class DriverService { diff --git a/kogito-quarkus-examples/process-decisions-quarkus/src/main/java/org/kie/kogito/traffic/Fine.java b/kogito-quarkus-examples/process-decisions-quarkus/src/main/java/org/kie/kogito/traffic/Fine.java index 4b6873829e..928562fb5f 100644 --- a/kogito-quarkus-examples/process-decisions-quarkus/src/main/java/org/kie/kogito/traffic/Fine.java +++ b/kogito-quarkus-examples/process-decisions-quarkus/src/main/java/org/kie/kogito/traffic/Fine.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.traffic; diff --git a/kogito-quarkus-examples/process-decisions-quarkus/src/main/java/org/kie/kogito/traffic/LicenseValidationService.java b/kogito-quarkus-examples/process-decisions-quarkus/src/main/java/org/kie/kogito/traffic/LicenseValidationService.java index 53fd44ed58..29f4bef1b4 100644 --- a/kogito-quarkus-examples/process-decisions-quarkus/src/main/java/org/kie/kogito/traffic/LicenseValidationService.java +++ b/kogito-quarkus-examples/process-decisions-quarkus/src/main/java/org/kie/kogito/traffic/LicenseValidationService.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.traffic; diff --git a/kogito-quarkus-examples/process-decisions-quarkus/src/main/java/org/kie/kogito/traffic/Violation.java b/kogito-quarkus-examples/process-decisions-quarkus/src/main/java/org/kie/kogito/traffic/Violation.java index 56446af2d2..170dd2dda0 100644 --- a/kogito-quarkus-examples/process-decisions-quarkus/src/main/java/org/kie/kogito/traffic/Violation.java +++ b/kogito-quarkus-examples/process-decisions-quarkus/src/main/java/org/kie/kogito/traffic/Violation.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.traffic; import java.math.BigDecimal; diff --git a/kogito-quarkus-examples/process-decisions-quarkus/src/main/resources/LicenseValidationService.drl b/kogito-quarkus-examples/process-decisions-quarkus/src/main/resources/LicenseValidationService.drl index 799c78abd4..b408466b45 100644 --- a/kogito-quarkus-examples/process-decisions-quarkus/src/main/resources/LicenseValidationService.drl +++ b/kogito-quarkus-examples/process-decisions-quarkus/src/main/resources/LicenseValidationService.drl @@ -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.traffic diff --git a/kogito-quarkus-examples/process-decisions-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-decisions-quarkus/src/main/resources/application.properties index 9689b95e30..bcfa41d7c3 100644 --- a/kogito-quarkus-examples/process-decisions-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-decisions-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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/process-decisions-quarkus/src/test/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java b/kogito-quarkus-examples/process-decisions-quarkus/src/test/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java index 1697330392..145762f2f7 100644 --- a/kogito-quarkus-examples/process-decisions-quarkus/src/test/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java +++ b/kogito-quarkus-examples/process-decisions-quarkus/src/test/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java @@ -1,22 +1,25 @@ /* - * 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.traffic; -import io.quarkus.test.junit.NativeImageTest; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@NativeImageTest +@QuarkusIntegrationTest public class NativeTrafficProcessIT extends TrafficProcessIT { } diff --git a/kogito-quarkus-examples/process-decisions-quarkus/src/test/java/org/kie/kogito/traffic/TrafficProcessIT.java b/kogito-quarkus-examples/process-decisions-quarkus/src/test/java/org/kie/kogito/traffic/TrafficProcessIT.java index 4f9c49ed0e..f1f1e9ec37 100644 --- a/kogito-quarkus-examples/process-decisions-quarkus/src/test/java/org/kie/kogito/traffic/TrafficProcessIT.java +++ b/kogito-quarkus-examples/process-decisions-quarkus/src/test/java/org/kie/kogito/traffic/TrafficProcessIT.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.traffic; diff --git a/kogito-quarkus-examples/process-decisions-rest-quarkus/README.md b/kogito-quarkus-examples/process-decisions-rest-quarkus/README.md index 2850fbfb1a..4f9916543a 100644 --- a/kogito-quarkus-examples/process-decisions-rest-quarkus/README.md +++ b/kogito-quarkus-examples/process-decisions-rest-quarkus/README.md @@ -145,9 +145,9 @@ The DMN file where this decision is declared is [TrafficViolation.dmn](src/main/ ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - GraalVM 19.3+ installed @@ -178,6 +178,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ```sh @@ -326,8 +331,3 @@ After the Curl command, you should see a similar console log } ``` In this case the driver license is expired when the DRL is evaluated because the DriverService generated an expired date for the driver's license thus DMN is not evaluated, so the `validLicense` is `false` and `trafficViolationResponse` is `null`. - - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). \ No newline at end of file diff --git a/kogito-quarkus-examples/process-decisions-rest-quarkus/pom.xml b/kogito-quarkus-examples/process-decisions-rest-quarkus/pom.xml index 852e7997b7..7817b5a8e9 100644 --- a/kogito-quarkus-examples/process-decisions-rest-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-decisions-rest-quarkus/pom.xml @@ -1,25 +1,45 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-decisions-rest-quarkus Kogito Example :: Process :: Decisions :: REST Quarkus Process with DMN and DRL integration through REST - Quarkus 8080 - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -49,8 +69,8 @@ quarkus-resteasy-jackson - org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus io.quarkus diff --git a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/Driver.java b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/Driver.java index f77a47b749..32d9bb013a 100644 --- a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/Driver.java +++ b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/Driver.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.traffic; import java.util.Date; @@ -58,6 +60,14 @@ public Driver(String id, String name, String state, String city, Integer points, this.licenseExpiration = licenseExpiration; } + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + public String getName() { return name; } diff --git a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/DriverService.java b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/DriverService.java index 595aa50e4b..afccc4e61a 100644 --- a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/DriverService.java +++ b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/DriverService.java @@ -1,29 +1,31 @@ /* - * 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.traffic; import java.time.ZonedDateTime; import java.util.Date; -import javax.enterprise.context.ApplicationScoped; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.enterprise.context.ApplicationScoped; + @ApplicationScoped public class DriverService { diff --git a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/Fine.java b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/Fine.java index 4b6873829e..928562fb5f 100644 --- a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/Fine.java +++ b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/Fine.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.traffic; diff --git a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/LicenseValidationRestClient.java b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/LicenseValidationRestClient.java index d624fcbe21..7a38d6eeae 100644 --- a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/LicenseValidationRestClient.java +++ b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/LicenseValidationRestClient.java @@ -1,30 +1,33 @@ /* - * 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.traffic; import java.util.Map; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; - import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; + @Path("/validation/first") @RegisterRestClient public interface LicenseValidationRestClient { diff --git a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/LicenseValidationRestService.java b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/LicenseValidationRestService.java index f8dc393091..0f53368042 100644 --- a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/LicenseValidationRestService.java +++ b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/LicenseValidationRestService.java @@ -1,27 +1,30 @@ /* - * 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.traffic; import java.util.Collections; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; - import org.eclipse.microprofile.rest.client.inject.RestClient; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; + @ApplicationScoped public class LicenseValidationRestService { diff --git a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/LicenseValidationService.java b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/LicenseValidationService.java index 53fd44ed58..29f4bef1b4 100644 --- a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/LicenseValidationService.java +++ b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/LicenseValidationService.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.traffic; diff --git a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/TrafficViolationResponse.java b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/TrafficViolationResponse.java index c5945896ca..4f16a5e6e2 100644 --- a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/TrafficViolationResponse.java +++ b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/TrafficViolationResponse.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.traffic; diff --git a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/TrafficViolationRestClient.java b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/TrafficViolationRestClient.java index 7c6945cbf2..f971133a39 100644 --- a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/TrafficViolationRestClient.java +++ b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/TrafficViolationRestClient.java @@ -1,30 +1,33 @@ /* - * 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.traffic; import java.util.Map; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; - import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; + @Path("/Traffic%20Violation") @RegisterRestClient public interface TrafficViolationRestClient { diff --git a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/TrafficViolationRestService.java b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/TrafficViolationRestService.java index 881e999698..99685059a3 100644 --- a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/TrafficViolationRestService.java +++ b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/TrafficViolationRestService.java @@ -1,28 +1,31 @@ /* - * 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.traffic; import java.util.HashMap; import java.util.Map; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; - import org.eclipse.microprofile.rest.client.inject.RestClient; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; + @ApplicationScoped public class TrafficViolationRestService { diff --git a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/Violation.java b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/Violation.java index 56446af2d2..170dd2dda0 100644 --- a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/Violation.java +++ b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/java/org/kie/kogito/traffic/Violation.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.traffic; import java.math.BigDecimal; diff --git a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/resources/LicenseValidationService.drl b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/resources/LicenseValidationService.drl index 799c78abd4..b408466b45 100644 --- a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/resources/LicenseValidationService.drl +++ b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/resources/LicenseValidationService.drl @@ -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.traffic diff --git a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/resources/application.properties index afbd25e4eb..5c348d2614 100644 --- a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-decisions-rest-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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/test/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/test/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java index 1697330392..145762f2f7 100644 --- a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/test/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java +++ b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/test/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java @@ -1,22 +1,25 @@ /* - * 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.traffic; -import io.quarkus.test.junit.NativeImageTest; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@NativeImageTest +@QuarkusIntegrationTest public class NativeTrafficProcessIT extends TrafficProcessIT { } diff --git a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/test/java/org/kie/kogito/traffic/TrafficProcessIT.java b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/test/java/org/kie/kogito/traffic/TrafficProcessIT.java index c61d2d2cf7..eef6f3b9d2 100644 --- a/kogito-quarkus-examples/process-decisions-rest-quarkus/src/test/java/org/kie/kogito/traffic/TrafficProcessIT.java +++ b/kogito-quarkus-examples/process-decisions-rest-quarkus/src/test/java/org/kie/kogito/traffic/TrafficProcessIT.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.traffic; diff --git a/kogito-quarkus-examples/process-decisions-rules-quarkus/README.md b/kogito-quarkus-examples/process-decisions-rules-quarkus/README.md index 811b7c9406..1d086fb763 100644 --- a/kogito-quarkus-examples/process-decisions-rules-quarkus/README.md +++ b/kogito-quarkus-examples/process-decisions-rules-quarkus/README.md @@ -111,9 +111,9 @@ The DMN file where this decision is declared is [TrafficViolation.dmn](src/main/ ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.1+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - GraalVM 19.3+ installed @@ -144,6 +144,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ```sh @@ -274,7 +279,7 @@ After the Curl command, you should see a similar console log "Suspended": "yes", "ValidLicense": false }, - "fine": null, + "fine": {"Amount": 500.0, "Points": 3}, "violation": { "Code": null, "Date": null, @@ -334,8 +339,3 @@ After the Curl command, you should see a similar console log } ``` In this case the driver license is expired when the DRL is evaluated because the DriverService generated an expired date for the driver's license thus DMN is not evaluated, so the `validLicense` is `false`, `suspended` and `fine` are `null`. - - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). \ No newline at end of file diff --git a/kogito-quarkus-examples/process-decisions-rules-quarkus/pom.xml b/kogito-quarkus-examples/process-decisions-rules-quarkus/pom.xml index d80e3fe235..208c9d5398 100644 --- a/kogito-quarkus-examples/process-decisions-rules-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-decisions-rules-quarkus/pom.xml @@ -1,24 +1,44 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-decisions-rules-quarkus Kogito Example :: Process :: Decisions :: Rules :: Quarkus Process with DRL, DMN and DRL integration - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -48,8 +68,8 @@ quarkus-resteasy-jackson - org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus io.quarkus diff --git a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/DriverService.java b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/DriverService.java index 38ebb18de8..78a9328f0e 100644 --- a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/DriverService.java +++ b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/DriverService.java @@ -1,30 +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.traffic; import java.time.ZonedDateTime; import java.util.Date; -import javax.enterprise.context.ApplicationScoped; - import org.kie.kogito.traffic.licensevalidation.Driver; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.enterprise.context.ApplicationScoped; + @ApplicationScoped public class DriverService { diff --git a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/Fine.java b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/Fine.java index 4b6873829e..928562fb5f 100644 --- a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/Fine.java +++ b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/Fine.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.traffic; diff --git a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/Violation.java b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/Violation.java index 56446af2d2..170dd2dda0 100644 --- a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/Violation.java +++ b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/Violation.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.traffic; import java.math.BigDecimal; diff --git a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/licensevalidated/LicenseValidatedService.java b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/licensevalidated/LicenseValidatedService.java index b6a0374e9d..374e5efa23 100644 --- a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/licensevalidated/LicenseValidatedService.java +++ b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/licensevalidated/LicenseValidatedService.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.traffic.licensevalidated; diff --git a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/licensevalidated/Validated.java b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/licensevalidated/Validated.java index 90c51f09e3..a24f9189e0 100644 --- a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/licensevalidated/Validated.java +++ b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/licensevalidated/Validated.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.traffic.licensevalidated; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/licensevalidation/Driver.java b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/licensevalidation/Driver.java index 6ee8bfbb04..cfe7d07937 100644 --- a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/licensevalidation/Driver.java +++ b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/licensevalidation/Driver.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.traffic.licensevalidation; import java.util.Date; @@ -59,6 +61,14 @@ public Driver(String id, String name, String state, String city, Integer points, this.licenseExpiration = licenseExpiration; } + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + public String getName() { return name; } diff --git a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/licensevalidation/LicenseValidationService.java b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/licensevalidation/LicenseValidationService.java index 2d56c89eea..278b5fb470 100644 --- a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/licensevalidation/LicenseValidationService.java +++ b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/java/org/kie/kogito/traffic/licensevalidation/LicenseValidationService.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.traffic.licensevalidation; diff --git a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/resources/LicenseValidatedService.drl b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/resources/LicenseValidatedService.drl index 9e91dd8bb8..3130e73050 100644 --- a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/resources/LicenseValidatedService.drl +++ b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/resources/LicenseValidatedService.drl @@ -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.traffic.licensevalidated diff --git a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/resources/LicenseValidationService.drl b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/resources/LicenseValidationService.drl index 324866bfa3..da7439087d 100644 --- a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/resources/LicenseValidationService.drl +++ b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/resources/LicenseValidationService.drl @@ -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.traffic.licensevalidation diff --git a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/resources/application.properties index 9689b95e30..bcfa41d7c3 100644 --- a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-decisions-rules-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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/test/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/test/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java index 1697330392..145762f2f7 100644 --- a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/test/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java +++ b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/test/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java @@ -1,22 +1,25 @@ /* - * 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.traffic; -import io.quarkus.test.junit.NativeImageTest; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@NativeImageTest +@QuarkusIntegrationTest public class NativeTrafficProcessIT extends TrafficProcessIT { } diff --git a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/test/java/org/kie/kogito/traffic/TrafficProcessIT.java b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/test/java/org/kie/kogito/traffic/TrafficProcessIT.java index 61a3400fdf..90d4528326 100644 --- a/kogito-quarkus-examples/process-decisions-rules-quarkus/src/test/java/org/kie/kogito/traffic/TrafficProcessIT.java +++ b/kogito-quarkus-examples/process-decisions-rules-quarkus/src/test/java/org/kie/kogito/traffic/TrafficProcessIT.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.traffic; diff --git a/kogito-quarkus-examples/process-error-handling/README.md b/kogito-quarkus-examples/process-error-handling/README.md index 862062c7bd..14973444a2 100644 --- a/kogito-quarkus-examples/process-error-handling/README.md +++ b/kogito-quarkus-examples/process-error-handling/README.md @@ -58,9 +58,9 @@ The `Apply` script calls the corresponding method of the class `ErrorHandlingScr ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - GraalVM 19.3+ installed @@ -91,6 +91,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ```sh @@ -246,7 +251,3 @@ Follow all the step in the previous paragraph, but complete the `Repair` task pr ``` Catch all ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-quarkus-examples/process-error-handling/operator/process-scripts-quarkus.yaml b/kogito-quarkus-examples/process-error-handling/operator/process-scripts-quarkus.yaml deleted file mode 100644 index f36772b13d..0000000000 --- a/kogito-quarkus-examples/process-error-handling/operator/process-scripts-quarkus.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-error-handling -spec: - type: RemoteSource - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/process-error-handling - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-error-handling diff --git a/kogito-quarkus-examples/process-error-handling/pom.xml b/kogito-quarkus-examples/process-error-handling/pom.xml index a8ea2e0d9c..6422f70747 100644 --- a/kogito-quarkus-examples/process-error-handling/pom.xml +++ b/kogito-quarkus-examples/process-error-handling/pom.xml @@ -1,23 +1,43 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-error-handling Kogito Example :: Process Scripts With Quarkus Kogito scripts invocation - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -47,8 +67,8 @@ quarkus-resteasy-jackson - org.kie.kogito - kogito-quarkus-processes + org.jbpm + jbpm-quarkus io.quarkus diff --git a/kogito-quarkus-examples/process-error-handling/src/main/docker/Dockerfile.jvm b/kogito-quarkus-examples/process-error-handling/src/main/docker/Dockerfile.jvm index 51512fde1a..dffa7045af 100644 --- a/kogito-quarkus-examples/process-error-handling/src/main/docker/Dockerfile.jvm +++ b/kogito-quarkus-examples/process-error-handling/src/main/docker/Dockerfile.jvm @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/process-error-handling-jvm # ### -FROM fabric8/java-alpine-openjdk11-jre +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.20 ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV AB_ENABLED=jmx_exporter @@ -23,4 +23,4 @@ COPY target/quarkus-app/*.jar /deployments/ COPY target/quarkus-app/app/ /deployments/app/ COPY target/quarkus-app/quarkus/ /deployments/quarkus/ -ENTRYPOINT [ "/deployments/run-java.sh" ] \ No newline at end of file +ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/kogito-quarkus-examples/process-error-handling/src/main/docker/Dockerfile.native b/kogito-quarkus-examples/process-error-handling/src/main/docker/Dockerfile.native index b508cbb1d3..b69d820725 100644 --- a/kogito-quarkus-examples/process-error-handling/src/main/docker/Dockerfile.native +++ b/kogito-quarkus-examples/process-error-handling/src/main/docker/Dockerfile.native @@ -7,14 +7,14 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.native -t quarkus/kogito-infinispan-persistence-quarkus . +# docker build -f src/main/docker/Dockerfile.native -t quarkus/process-error-handling . # # Then run the container using: # -# docker run -i --rm -p 8080:8080 quarkus/kogito-infinispan-persistence-quarkus +# docker run -i --rm -p 8080:8080 quarkus/process-error-handling # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.4 WORKDIR /work/ COPY target/*-runner /work/application RUN chmod 775 /work diff --git a/kogito-quarkus-examples/process-error-handling/src/main/java/org/acme/script/ErrorHandlingScript.java b/kogito-quarkus-examples/process-error-handling/src/main/java/org/acme/script/ErrorHandlingScript.java index e81c4908ee..3b28d9eb5f 100644 --- a/kogito-quarkus-examples/process-error-handling/src/main/java/org/acme/script/ErrorHandlingScript.java +++ b/kogito-quarkus-examples/process-error-handling/src/main/java/org/acme/script/ErrorHandlingScript.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.acme.script; diff --git a/kogito-quarkus-examples/process-error-handling/src/main/java/org/acme/wih/CustomTaskWorkItemHandler.java b/kogito-quarkus-examples/process-error-handling/src/main/java/org/acme/wih/CustomTaskWorkItemHandler.java index ec3170709d..ee6309cd6b 100644 --- a/kogito-quarkus-examples/process-error-handling/src/main/java/org/acme/wih/CustomTaskWorkItemHandler.java +++ b/kogito-quarkus-examples/process-error-handling/src/main/java/org/acme/wih/CustomTaskWorkItemHandler.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.acme.wih; diff --git a/kogito-quarkus-examples/process-error-handling/src/main/java/org/acme/wih/CustomWorkItemHandlerConfig.java b/kogito-quarkus-examples/process-error-handling/src/main/java/org/acme/wih/CustomWorkItemHandlerConfig.java index 99b78b853d..06849089e2 100644 --- a/kogito-quarkus-examples/process-error-handling/src/main/java/org/acme/wih/CustomWorkItemHandlerConfig.java +++ b/kogito-quarkus-examples/process-error-handling/src/main/java/org/acme/wih/CustomWorkItemHandlerConfig.java @@ -1,24 +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.acme.wih; -import javax.enterprise.context.ApplicationScoped; - import org.kie.kogito.process.impl.DefaultWorkItemHandlerConfig; +import jakarta.enterprise.context.ApplicationScoped; + @ApplicationScoped public class CustomWorkItemHandlerConfig extends DefaultWorkItemHandlerConfig { diff --git a/kogito-quarkus-examples/process-error-handling/src/main/resources/META-INF/resources/index.html b/kogito-quarkus-examples/process-error-handling/src/main/resources/META-INF/resources/index.html deleted file mode 100644 index a965327283..0000000000 --- a/kogito-quarkus-examples/process-error-handling/src/main/resources/META-INF/resources/index.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - kogito-infinispan-persistence-quarkus - 1.0-SNAPSHOT - - - - - - -
-
-

Congratulations, you have created a new Quarkus application.

- -

Why do you see this?

- -

This page is served by Quarkus. The source is in - src/main/resources/META-INF/resources/index.html.

- -

What can I do from here?

- -

If not already done, run the application in dev mode using: mvn compile quarkus:dev. -

-
    -
  • Add REST resources, Servlets, functions and other services in src/main/java.
  • -
  • Your static assets are located in src/main/resources/META-INF/resources.
  • -
  • Configure your application in src/main/resources/application.properties. -
  • -
- -

How do I get rid of this page?

-

Just delete the src/main/resources/META-INF/resources/index.html file.

-
-
-
-

Application

-
    -
  • GroupId: org.acme
  • -
  • ArtifactId: kogito-infinispan-persistence-quarkus
  • -
  • Version: 1.0-SNAPSHOT
  • -
  • Quarkus Version: 0.19.1
  • -
-
- -
-
- - - - \ No newline at end of file diff --git a/kogito-quarkus-examples/process-error-handling/src/main/resources/application.properties b/kogito-quarkus-examples/process-error-handling/src/main/resources/application.properties index c7872ed3a8..0391780d2f 100644 --- a/kogito-quarkus-examples/process-error-handling/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-error-handling/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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/process-error-handling/src/test/java/org/acme/travels/quarkus/HelloErrorProcessTest.java b/kogito-quarkus-examples/process-error-handling/src/test/java/org/acme/travels/quarkus/HelloErrorProcessTest.java index 1764afdf57..9b1266a59a 100644 --- a/kogito-quarkus-examples/process-error-handling/src/test/java/org/acme/travels/quarkus/HelloErrorProcessTest.java +++ b/kogito-quarkus-examples/process-error-handling/src/test/java/org/acme/travels/quarkus/HelloErrorProcessTest.java @@ -1,26 +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.acme.travels.quarkus; import java.util.HashMap; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; - import org.junit.jupiter.api.Test; import org.kie.kogito.Model; import org.kie.kogito.process.Process; @@ -28,6 +28,9 @@ import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/kogito-quarkus-examples/process-error-handling/src/test/resources/application.properties b/kogito-quarkus-examples/process-error-handling/src/test/resources/application.properties index 3c17236931..a047ea13ba 100644 --- a/kogito-quarkus-examples/process-error-handling/src/test/resources/application.properties +++ b/kogito-quarkus-examples/process-error-handling/src/test/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. +# + # Quarkus quarkus.http.test-port=0 \ No newline at end of file diff --git a/kogito-quarkus-examples/process-incubation-api-quarkus/README.md b/kogito-quarkus-examples/process-incubation-api-quarkus/README.md index 1e5427c8a9..39880893f4 100644 --- a/kogito-quarkus-examples/process-incubation-api-quarkus/README.md +++ b/kogito-quarkus-examples/process-incubation-api-quarkus/README.md @@ -16,9 +16,9 @@ The custom REST endpoint evaluates a process that expects a name: ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed ### Compile and Run in Local Dev Mode diff --git a/kogito-quarkus-examples/process-incubation-api-quarkus/pom.xml b/kogito-quarkus-examples/process-incubation-api-quarkus/pom.xml index bddd25ce0d..c1388fc46a 100644 --- a/kogito-quarkus-examples/process-incubation-api-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-incubation-api-quarkus/pom.xml @@ -1,23 +1,43 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-incubation-api-quarkus Kogito Example :: Process Incubation API With Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -47,8 +67,8 @@ quarkus-resteasy-jackson
- org.kie.kogito - kogito-quarkus-processes + org.jbpm + jbpm-quarkus io.quarkus diff --git a/kogito-quarkus-examples/process-incubation-api-quarkus/src/main/java/org/acme/CustomRestProcess.java b/kogito-quarkus-examples/process-incubation-api-quarkus/src/main/java/org/acme/CustomRestProcess.java index 2d6846e20a..57b3969365 100644 --- a/kogito-quarkus-examples/process-incubation-api-quarkus/src/main/java/org/acme/CustomRestProcess.java +++ b/kogito-quarkus-examples/process-incubation-api-quarkus/src/main/java/org/acme/CustomRestProcess.java @@ -1,35 +1,38 @@ /* - * 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; import java.util.Map; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; - import org.kie.kogito.incubation.application.AppRoot; import org.kie.kogito.incubation.common.DataContext; import org.kie.kogito.incubation.common.MapDataContext; import org.kie.kogito.incubation.processes.ProcessIds; import org.kie.kogito.incubation.processes.services.StraightThroughProcessService; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; + @Path("/custom-rest-process") public class CustomRestProcess { @@ -48,4 +51,4 @@ public DataContext customProcessScripts(Map payload) { MapDataContext ctx = MapDataContext.of(payload); return svc.evaluate(id, ctx); } -} \ No newline at end of file +} diff --git a/kogito-quarkus-examples/process-incubation-api-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-incubation-api-quarkus/src/main/resources/application.properties index 473c5a4120..1641f918d7 100644 --- a/kogito-quarkus-examples/process-incubation-api-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-incubation-api-quarkus/src/main/resources/application.properties @@ -1 +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. +# + kogito.generate.rest.processes=false diff --git a/kogito-quarkus-examples/process-incubation-api-quarkus/src/test/java/org/acme/CustomRestProcessTest.java b/kogito-quarkus-examples/process-incubation-api-quarkus/src/test/java/org/acme/CustomRestProcessTest.java index 0579807c90..f7192a1db4 100644 --- a/kogito-quarkus-examples/process-incubation-api-quarkus/src/test/java/org/acme/CustomRestProcessTest.java +++ b/kogito-quarkus-examples/process-incubation-api-quarkus/src/test/java/org/acme/CustomRestProcessTest.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; diff --git a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/README.md b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/README.md index 87d26274b4..b1a45052e2 100644 --- a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/README.md +++ b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/README.md @@ -72,9 +72,9 @@ You can install Infinispan server by downloading version 12.x from the [official ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - GraalVM 19.3+ installed @@ -123,6 +123,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ```sh @@ -214,7 +219,3 @@ where uuid is the id of the deal review and tuuid is the id of the user task you ``` Review of the deal very good work for traveller Doe ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/operator/process-infinispan-persistence-quarkus.yaml b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/operator/process-infinispan-persistence-quarkus.yaml deleted file mode 100644 index 90f993b4ed..0000000000 --- a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/operator/process-infinispan-persistence-quarkus.yaml +++ /dev/null @@ -1,29 +0,0 @@ -#Infinispan operator should be pre-installed in namespace -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoInfra -metadata: - name: kogito-infinispan-infra -spec: - resource: - apiVersion: infinispan.org/v1 - kind: Infinispan ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-infinispan-persistence-quarkus -spec: - type: RemoteSource - gitSource: - contextDir: kogito-quarkus-examples/process-infinispan-persistence-quarkus - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-infinispan-persistence-quarkus -spec: - infra: - - kogito-infinispan-infra \ No newline at end of file diff --git a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/pom.xml b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/pom.xml index fdecf09f82..06dc16dc94 100644 --- a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/pom.xml @@ -1,24 +1,44 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-infinispan-persistence-quarkus Kogito Example :: Process Infinispan Persistence Quarkus Process with Infinispan persistence - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -49,16 +69,16 @@ - org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus io.quarkus quarkus-smallrye-openapi - org.kie.kogito - kogito-addons-quarkus-persistence-infinispan + org.kie + kie-addons-quarkus-persistence-infinispan io.quarkus diff --git a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/docker/Dockerfile.jvm b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/docker/Dockerfile.jvm index e9c3d78f50..3d41e9d4eb 100644 --- a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/docker/Dockerfile.jvm +++ b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/docker/Dockerfile.jvm @@ -7,14 +7,14 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/kogito-infinispan-persistence-quarkus-jvm . +# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/process-infinispan-persistence-quarkus-jvm . # # Then run the container using: # -# docker run -i --rm -p 8080:8080 quarkus/kogito-infinispan-persistence-quarkus-jvm +# docker run -i --rm -p 8080:8080 quarkus/process-infinispan-persistence-quarkus-jvm # ### -FROM fabric8/java-alpine-openjdk11-jre +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.20 ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV AB_ENABLED=jmx_exporter @@ -23,4 +23,4 @@ COPY target/quarkus-app/*.jar /deployments/ COPY target/quarkus-app/app/ /deployments/app/ COPY target/quarkus-app/quarkus/ /deployments/quarkus/ -ENTRYPOINT [ "/deployments/run-java.sh" ] \ No newline at end of file +ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/docker/Dockerfile.native b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/docker/Dockerfile.native index b508cbb1d3..4058c3da21 100644 --- a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/docker/Dockerfile.native +++ b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/docker/Dockerfile.native @@ -7,14 +7,14 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.native -t quarkus/kogito-infinispan-persistence-quarkus . +# docker build -f src/main/docker/Dockerfile.native -t quarkus/process-infinispan-persistence-quarkus . # # Then run the container using: # -# docker run -i --rm -p 8080:8080 quarkus/kogito-infinispan-persistence-quarkus +# docker run -i --rm -p 8080:8080 quarkus/process-infinispan-persistence-quarkus # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.4 WORKDIR /work/ COPY target/*-runner /work/application RUN chmod 775 /work diff --git a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/java/org/acme/deals/Address.java b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/java/org/acme/deals/Address.java index 0322a9086f..0d8d3c41fa 100644 --- a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/java/org/acme/deals/Address.java +++ b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/java/org/acme/deals/Address.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.acme.deals; diff --git a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/java/org/acme/deals/Traveller.java b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/java/org/acme/deals/Traveller.java index 86c281ad50..68accdafa5 100644 --- a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/java/org/acme/deals/Traveller.java +++ b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/java/org/acme/deals/Traveller.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.acme.deals; diff --git a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/resources/META-INF/hotrod-client.properties b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/resources/META-INF/hotrod-client.properties index 860399eb4d..76aa288250 100644 --- a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/resources/META-INF/hotrod-client.properties +++ b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/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. +# + # This property is a workaround to make this example work on the Mac # It has to be removed in production as it impacts the performance significantly # See https://github.com/quarkusio/quarkus-quickstarts/pull/158/files#diff-fbd9118964ca218e93cef43c946413a0R9 diff --git a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/resources/META-INF/resources/index.html b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/resources/META-INF/resources/index.html deleted file mode 100644 index a965327283..0000000000 --- a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/resources/META-INF/resources/index.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - kogito-infinispan-persistence-quarkus - 1.0-SNAPSHOT - - - - - - -
-
-

Congratulations, you have created a new Quarkus application.

- -

Why do you see this?

- -

This page is served by Quarkus. The source is in - src/main/resources/META-INF/resources/index.html.

- -

What can I do from here?

- -

If not already done, run the application in dev mode using: mvn compile quarkus:dev. -

-
    -
  • Add REST resources, Servlets, functions and other services in src/main/java.
  • -
  • Your static assets are located in src/main/resources/META-INF/resources.
  • -
  • Configure your application in src/main/resources/application.properties. -
  • -
- -

How do I get rid of this page?

-

Just delete the src/main/resources/META-INF/resources/index.html file.

-
-
-
-

Application

-
    -
  • GroupId: org.acme
  • -
  • ArtifactId: kogito-infinispan-persistence-quarkus
  • -
  • Version: 1.0-SNAPSHOT
  • -
  • Quarkus Version: 0.19.1
  • -
-
- -
-
- - - - \ No newline at end of file diff --git a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/resources/application.properties index 35f016ffc0..ef87a8e937 100644 --- a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-infinispan-persistence-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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/test/java/org/acme/deals/DealsRestIT.java b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/test/java/org/acme/deals/DealsRestIT.java index d68a7ebc22..716dec36b7 100644 --- a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/test/java/org/acme/deals/DealsRestIT.java +++ b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/test/java/org/acme/deals/DealsRestIT.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.acme.deals; @@ -52,7 +55,7 @@ public void testDealsRest() { given().accept(ContentType.JSON) .when().get("/deals") .then().statusCode(200) - .body("$.size()", is(1)) + .body("size()", is(1)) .body("[0].id", is(dealId)) .body("[0].name", is(deal)); @@ -65,7 +68,7 @@ public void testDealsRest() { String dealReviewId = given().accept(ContentType.JSON) .when().get("/dealreviews") .then().statusCode(200) - .body("$.size()", is(1)) + .body("size()", is(1)) .body("[0].id", notNullValue()) .body("[0].deal", is(deal)) .extract().path("[0].id"); @@ -74,7 +77,7 @@ public void testDealsRest() { String taskId = given().accept(ContentType.JSON) .when().get("/dealreviews/{uuid}/tasks?user=john", dealReviewId) .then().statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("review")) .body("[0].parameters.deal", is(deal)) .extract().path("[0].id"); @@ -90,12 +93,12 @@ public void testDealsRest() { //verify no deals to review given().accept(ContentType.JSON) .when().get("/dealreviews") - .then().statusCode(200).body("$.size()", is(0)); + .then().statusCode(200).body("size()", is(0)); //verify no deals given().accept(ContentType.JSON) .when().get("/deals") - .then().statusCode(200).body("$.size()", is(0)); + .then().statusCode(200).body("size()", is(0)); } @Test diff --git a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/test/java/org/acme/deals/NativeDealsRestIT.java b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/test/java/org/acme/deals/NativeDealsRestIT.java index 81b8e1b433..81c1c5d0ac 100644 --- a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/test/java/org/acme/deals/NativeDealsRestIT.java +++ b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/test/java/org/acme/deals/NativeDealsRestIT.java @@ -1,23 +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.acme.deals; -import io.quarkus.test.junit.NativeImageTest; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@NativeImageTest +@QuarkusIntegrationTest public class NativeDealsRestIT extends DealsRestIT { } diff --git a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/test/resources/application.properties index 3c17236931..a047ea13ba 100644 --- a/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/process-infinispan-persistence-quarkus/src/test/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. +# + # Quarkus quarkus.http.test-port=0 \ No newline at end of file diff --git a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/README.md b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/README.md index eecf76b13c..de9a02a369 100644 --- a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/README.md +++ b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/README.md @@ -14,13 +14,12 @@ A quick reminder of what the original example was doing: * if not processed traveller, info is logged and then process instance finishes sending a reply to a different Kafka topic The functionality is still the same, but the format of the event, rather than being a cloudevent JSON format, it is a representation of the traveller object using Avro format. To help us deal with the serialization details, -[jackson-kafka-avro-serializer](https://github.com/productboardlabs/jackson-kafka-avro-serializer) dependency is added to `pom.xml` +`kie-addons-quarkus-marshallers-avro` dependency is added to `pom.xml` ``` - - io.github.productboardlabs - jackson-kafka-avro-serializer - 0.7.0 + + org.kie + kie-addons-quarkus-marshallers-avro ``` @@ -89,9 +88,9 @@ https://kafka.apache.org/quickstart ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - GraalVM 19.3+ installed @@ -122,6 +121,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ``` diff --git a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/pom.xml b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/pom.xml index 2473da2ba2..89dfac3b3d 100644 --- a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/pom.xml @@ -1,24 +1,44 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-kafka-avro-multi-quarkus Kogito Example :: Process with Kafka and Quarkus, multiple channels, avro serialization Kogito with Kafka - Quarkus, using one channel per message name - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -40,20 +60,20 @@ - org.kie.kogito - kogito-addons-quarkus-messaging + org.kie + kie-addons-quarkus-messaging io.quarkus quarkus-smallrye-reactive-messaging-kafka - org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus - org.kie.kogito - kogito-addons-quarkus-marshallers-avro + org.kie + kie-addons-quarkus-marshallers-avro io.quarkus diff --git a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/AvroMarshallerProducer.java b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/AvroMarshallerProducer.java index d10c672086..f1de90ccef 100644 --- a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/AvroMarshallerProducer.java +++ b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/AvroMarshallerProducer.java @@ -1,32 +1,35 @@ /* - * 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.acme.travel; import java.io.IOException; -import javax.annotation.PostConstruct; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Produces; - import org.kie.kogito.event.EventMarshaller; import org.kie.kogito.event.EventUnmarshaller; import org.kie.kogito.event.avro.AvroEventMarshaller; import org.kie.kogito.event.avro.AvroEventUnmarshaller; import org.kie.kogito.event.avro.AvroIO; +import jakarta.annotation.PostConstruct; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Produces; + @ApplicationScoped public class AvroMarshallerProducer { diff --git a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/StringKeyDecorator.java b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/StringKeyDecorator.java index b86ac3eed9..b594a3b79e 100644 --- a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/StringKeyDecorator.java +++ b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/StringKeyDecorator.java @@ -1,27 +1,30 @@ /* - * 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.acme.travel; -import javax.enterprise.context.ApplicationScoped; - import org.eclipse.microprofile.reactive.messaging.Message; import org.kie.kogito.addon.quarkus.common.reactive.messaging.MessageDecorator; import io.smallrye.reactive.messaging.kafka.api.OutgoingKafkaRecordMetadata; +import jakarta.enterprise.context.ApplicationScoped; + @ApplicationScoped public class StringKeyDecorator implements MessageDecorator { diff --git a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/Traveller.java b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/Traveller.java index 75e93ab4ba..d3b7ca64bd 100644 --- a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/Traveller.java +++ b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/Traveller.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.acme.travel; diff --git a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/TravellerValidationService.java b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/TravellerValidationService.java index fac9d3ee18..f807943864 100644 --- a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/TravellerValidationService.java +++ b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/java/org/acme/travel/TravellerValidationService.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.acme.travel; diff --git a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/resources/META-INF/resources/index.html b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/resources/META-INF/resources/index.html deleted file mode 100644 index 94a44ee8ab..0000000000 --- a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/resources/META-INF/resources/index.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - kafka-quickstart - 1.0-SNAPSHOT - - - - - - -
-
-

Congratulations, you have created a new Quarkus application.

- -

Why do you see this?

- -

This page is served by Quarkus. The source is in - src/main/resources/META-INF/resources/index.html.

- -

What can I do from here?

- -

If not already done, run the application in dev mode using: mvn compile quarkus:dev. -

-
    -
  • Add REST resources, Servlets, functions and other services in src/main/java.
  • -
  • Your static assets are located in src/main/resources/META-INF/resources.
  • -
  • Configure your application in src/main/resources/application.properties. -
  • -
- -

How do I get rid of this page?

-

Just delete the src/main/resources/META-INF/resources/index.html file.

-
-
-
-

Application

-
    -
  • GroupId: org.acme
  • -
  • ArtifactId: kafka-quickstart
  • -
  • Version: 1.0-SNAPSHOT
  • -
  • Quarkus Version: 0.18.0
  • -
-
- -
-
- - - - \ No newline at end of file diff --git a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/resources/application.properties index 9594b900aa..a1e61aa3b1 100644 --- a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-kafka-avro-multi-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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/resources/travellers.drl b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/resources/travellers.drl index e2feedd297..da5c4b40f9 100644 --- a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/resources/travellers.drl +++ b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/main/resources/travellers.drl @@ -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.acme.travel unit TravellerValidationService diff --git a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/test/java/org/acme/travel/tests/avro/quarkus/MultiMessagingIT.java b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/test/java/org/acme/travel/tests/avro/quarkus/MultiMessagingIT.java index 11bd3766ab..9f32fbb1d1 100644 --- a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/test/java/org/acme/travel/tests/avro/quarkus/MultiMessagingIT.java +++ b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/test/java/org/acme/travel/tests/avro/quarkus/MultiMessagingIT.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.acme.travel.tests.avro.quarkus; @@ -22,8 +25,6 @@ import java.util.concurrent.TimeUnit; import java.util.stream.IntStream; -import javax.inject.Inject; - import org.acme.travel.Traveller; import org.eclipse.microprofile.reactive.messaging.Channel; import org.eclipse.microprofile.reactive.messaging.Emitter; @@ -39,6 +40,8 @@ import io.quarkus.test.junit.QuarkusTest; import io.smallrye.reactive.messaging.kafka.Record; +import jakarta.inject.Inject; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; diff --git a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/test/resources/application.properties index b5822c9c1a..16ad0289a4 100644 --- a/kogito-quarkus-examples/process-kafka-avro-multi-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/process-kafka-avro-multi-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.kafka.devservices.enabled=false diff --git a/kogito-quarkus-examples/process-kafka-multi-quarkus/README.md b/kogito-quarkus-examples/process-kafka-multi-quarkus/README.md index cbcdfffa1c..1bb522d903 100644 --- a/kogito-quarkus-examples/process-kafka-multi-quarkus/README.md +++ b/kogito-quarkus-examples/process-kafka-multi-quarkus/README.md @@ -78,9 +78,9 @@ https://kafka.apache.org/quickstart ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - GraalVM 19.3+ installed @@ -111,6 +111,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ``` @@ -161,11 +166,11 @@ Content (cloud event format) ```json { - "specversion": "0.3", + "specversion": "1.0", "id": "21627e26-31eb-43e7-8343-92a696fd96b1", "source": "", - "type": "TravellersMessageDataEvent_3", - "time": "2022-02-24T13:25:16+0000", + "type": "travellers", + "time": "2022-02-24T13:25:16Z", "data": { "firstName" : "Jan", "lastName" : "Kowalski", @@ -177,7 +182,7 @@ Content (cloud event format) One liner ```json -{"specversion": "0.3","id": "21627e26-31eb-43e7-8343-92a696fd96b1","source": "","type": "travellers", "time": "2022-02-24T13:25:16Z","data": { "firstName" : "Jan", "lastName" : "Kowalski", "email" : "jan.kowalski@example.com", "nationality" : "Polish"}} +{"specversion": "1.0","id": "21627e26-31eb-43e7-8343-92a696fd96b1","source": "","type": "travellers", "time": "2022-02-24T13:25:16Z","data": { "firstName" : "Jan", "lastName" : "Kowalski", "email" : "jan.kowalski@example.com", "nationality" : "Polish"}} ``` @@ -207,7 +212,7 @@ this will then trigger the successful processing of the traveller and put anothe } ``` -there are bunch of extension attributes that starts with `kogito` to provide some context of the execution and the event producer. +there is a bunch of extension attributes that starts with `kogito` to provide some context of the execution and the event producer. To take the other path of the process put following message on `travellers` topic @@ -221,7 +226,7 @@ With the following content (Cloud Event Format) ```json { - "specversion": "0.3", + "specversion": "1.0", "id": "31627e26-31eb-43e7-8343-92a696fd96b1", "source": "", "type": "travellers", @@ -238,7 +243,7 @@ With the following content (Cloud Event Format) One Liner ```json -{"specversion": "0.3","id": "31627e26-31eb-43e7-8343-92a696fd96b1","source": "","type": "travellers", "time": "2022-02-24T13:25:16Z","data": { "firstName" : "John", "lastName" : "Doe", "email" : "john.doe@example.com", "nationality" : "American"}} +{"specversion": "1.0","id": "31627e26-31eb-43e7-8343-92a696fd96b1","source": "","type": "travellers", "time": "2022-02-24T13:25:16Z","data": { "firstName" : "John", "lastName" : "Doe", "email" : "john.doe@example.com", "nationality" : "American"}} ``` this will result in message being send to `cancelledtravelers` topic, according to this configuration @@ -248,6 +253,3 @@ mp.messaging.outgoing.no\u0020travel.connector=smallrye-kafka mp.messaging.outgoing.no\u0020travel.topic=cancelledtravellers mp.messaging.outgoing.no\u0020travel.value.serializer=org.apache.kafka.common.serialization.StringSerializer ``` -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-quarkus-examples/process-kafka-multi-quarkus/operator/process-kafka-multi-quarkus.yaml b/kogito-quarkus-examples/process-kafka-multi-quarkus/operator/process-kafka-multi-quarkus.yaml deleted file mode 100644 index 8c7b1b4094..0000000000 --- a/kogito-quarkus-examples/process-kafka-multi-quarkus/operator/process-kafka-multi-quarkus.yaml +++ /dev/null @@ -1,33 +0,0 @@ -#Strimzi operator should be pre-installed in namespace -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoInfra -metadata: - name: kogito-kafka-infra -spec: - resource: - apiVersion: kafka.strimzi.io/v1beta2 - kind: Kafka ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-kafka-quickstart-quarkus -spec: - type: RemoteSource - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/process-kafka-multi-quickstart-quarkus - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-kafka-multi-quickstart-quarkus -spec: - infra: - - kogito-kafka-infra diff --git a/kogito-quarkus-examples/process-kafka-multi-quarkus/pom.xml b/kogito-quarkus-examples/process-kafka-multi-quarkus/pom.xml index 3fa03011a6..e83dbc1c11 100644 --- a/kogito-quarkus-examples/process-kafka-multi-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-kafka-multi-quarkus/pom.xml @@ -1,24 +1,44 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-kafka-multi-quarkus Kogito Example :: Process with Kafka and Quarkus, multiple channels Kogito with Kafka - Quarkus, using one channel per message name - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -41,20 +61,20 @@ - org.kie.kogito - kogito-addons-quarkus-events-process + org.kie + kie-addons-quarkus-events-process - org.kie.kogito - kogito-addons-quarkus-messaging + org.kie + kie-addons-quarkus-messaging io.quarkus quarkus-smallrye-reactive-messaging-kafka - org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus io.quarkus diff --git a/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/docker/Dockerfile.jvm b/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/docker/Dockerfile.jvm index eaf393e837..41287be9f2 100644 --- a/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/docker/Dockerfile.jvm +++ b/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/docker/Dockerfile.jvm @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/process-kafka-multi-quarkus-jvm # ### -FROM fabric8/java-alpine-openjdk11-jre +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.20 ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV AB_ENABLED=jmx_exporter diff --git a/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/docker/Dockerfile.native b/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/docker/Dockerfile.native index 80ff691a65..d79a0aef2c 100644 --- a/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/docker/Dockerfile.native +++ b/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/docker/Dockerfile.native @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/process-kafka-multi-quarkus # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.4 WORKDIR /work/ COPY target/*-runner /work/application RUN chmod 775 /work diff --git a/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/java/org/acme/travel/Traveller.java b/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/java/org/acme/travel/Traveller.java index 75e93ab4ba..d3b7ca64bd 100644 --- a/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/java/org/acme/travel/Traveller.java +++ b/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/java/org/acme/travel/Traveller.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.acme.travel; diff --git a/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/java/org/acme/travel/TravellerValidationService.java b/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/java/org/acme/travel/TravellerValidationService.java index fac9d3ee18..f807943864 100644 --- a/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/java/org/acme/travel/TravellerValidationService.java +++ b/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/java/org/acme/travel/TravellerValidationService.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.acme.travel; diff --git a/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/resources/META-INF/resources/index.html b/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/resources/META-INF/resources/index.html deleted file mode 100644 index 94a44ee8ab..0000000000 --- a/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/resources/META-INF/resources/index.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - kafka-quickstart - 1.0-SNAPSHOT - - - - - - -
-
-

Congratulations, you have created a new Quarkus application.

- -

Why do you see this?

- -

This page is served by Quarkus. The source is in - src/main/resources/META-INF/resources/index.html.

- -

What can I do from here?

- -

If not already done, run the application in dev mode using: mvn compile quarkus:dev. -

-
    -
  • Add REST resources, Servlets, functions and other services in src/main/java.
  • -
  • Your static assets are located in src/main/resources/META-INF/resources.
  • -
  • Configure your application in src/main/resources/application.properties. -
  • -
- -

How do I get rid of this page?

-

Just delete the src/main/resources/META-INF/resources/index.html file.

-
-
-
-

Application

-
    -
  • GroupId: org.acme
  • -
  • ArtifactId: kafka-quickstart
  • -
  • Version: 1.0-SNAPSHOT
  • -
  • Quarkus Version: 0.18.0
  • -
-
- -
-
- - - - \ No newline at end of file diff --git a/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/resources/application.properties index 269596713b..44c825058b 100644 --- a/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-kafka-multi-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. +# + # Packaging # quarkus.package.type=fast-jar @@ -39,4 +58,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-variables-events.auto.offset.reset=earliest -mp.messaging.outgoing.kogito-variables-events.group.id=kogito-kafka-multi \ No newline at end of file +mp.messaging.outgoing.kogito-variables-events.group.id=kogito-kafka-multi + +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.auto.offset.reset=earliest +mp.messaging.outgoing.kogito-processdefinitions-events.group.id=kogito-kafka-multi diff --git a/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/resources/travellers.drl b/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/resources/travellers.drl index e2feedd297..da5c4b40f9 100644 --- a/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/resources/travellers.drl +++ b/kogito-quarkus-examples/process-kafka-multi-quarkus/src/main/resources/travellers.drl @@ -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.acme.travel unit TravellerValidationService diff --git a/kogito-quarkus-examples/process-kafka-multi-quarkus/src/test/java/org/acme/travel/tests/multimessaging/quarkus/MultiMessagingIT.java b/kogito-quarkus-examples/process-kafka-multi-quarkus/src/test/java/org/acme/travel/tests/multimessaging/quarkus/MultiMessagingIT.java index 8774db2e90..928c10f262 100644 --- a/kogito-quarkus-examples/process-kafka-multi-quarkus/src/test/java/org/acme/travel/tests/multimessaging/quarkus/MultiMessagingIT.java +++ b/kogito-quarkus-examples/process-kafka-multi-quarkus/src/test/java/org/acme/travel/tests/multimessaging/quarkus/MultiMessagingIT.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.acme.travel.tests.multimessaging.quarkus; diff --git a/kogito-quarkus-examples/process-kafka-multi-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/process-kafka-multi-quarkus/src/test/resources/application.properties index 4396d4ebfb..4242e6e9c1 100644 --- a/kogito-quarkus-examples/process-kafka-multi-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/process-kafka-multi-quarkus/src/test/resources/application.properties @@ -1 +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. +# + quarkus.kafka.devservices.enabled=false \ No newline at end of file diff --git a/kogito-quarkus-examples/process-kafka-persistence-quarkus/README.md b/kogito-quarkus-examples/process-kafka-persistence-quarkus/README.md index e235339474..5e64654c05 100644 --- a/kogito-quarkus-examples/process-kafka-persistence-quarkus/README.md +++ b/kogito-quarkus-examples/process-kafka-persistence-quarkus/README.md @@ -74,9 +74,9 @@ docker-compose up ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - GraalVM 20.2+ installed @@ -107,6 +107,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ```sh @@ -198,7 +203,3 @@ where uuid is the id of the deal review and tuuid is the id of the user task you ``` Review of the deal very good work for traveller Doe ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-quarkus-examples/process-kafka-persistence-quarkus/operator/process-kafka-persistence-quarkus.yaml b/kogito-quarkus-examples/process-kafka-persistence-quarkus/operator/process-kafka-persistence-quarkus.yaml deleted file mode 100644 index f80896009d..0000000000 --- a/kogito-quarkus-examples/process-kafka-persistence-quarkus/operator/process-kafka-persistence-quarkus.yaml +++ /dev/null @@ -1,29 +0,0 @@ -#Infinispan operator should be pre-installed in namespace -apiVersion: app.kiegroup.org/v1alpha1 -kind: KogitoInfra -metadata: - name: kogito-kafka-infra -spec: - resource: - apiVersion: kafka.strimzi.io/v1beta2 - kind: Kafka ---- -apiVersion: app.kiegroup.org/v1alpha1 -kind: KogitoBuild -metadata: - name: process-kafka-persistence-quarkus -spec: - type: RemoteSource - gitSource: - contextDir: kogito-quarkus-examples/process-kafka-persistence-quarkus - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1alpha1 -kind: KogitoRuntime -metadata: - name: process-kafka-persistence-quarkus -spec: - infra: - - kogito-kafka-infra \ No newline at end of file diff --git a/kogito-quarkus-examples/process-kafka-persistence-quarkus/pom.xml b/kogito-quarkus-examples/process-kafka-persistence-quarkus/pom.xml index c0d02b120a..a40a736c71 100644 --- a/kogito-quarkus-examples/process-kafka-persistence-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-kafka-persistence-quarkus/pom.xml @@ -1,27 +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. + +--> org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT 4.0.0 @@ -29,14 +33,14 @@ Kogito Example :: Process Kafka Persistence Quarkus Process with Kafka persistence - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -58,12 +62,12 @@ - org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus - org.kie.kogito - kogito-addons-quarkus-persistence-kafka + org.kie + kie-addons-quarkus-persistence-kafka io.quarkus diff --git a/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/docker/Dockerfile.jvm b/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/docker/Dockerfile.jvm index 081c98debf..0a24ff1479 100644 --- a/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/docker/Dockerfile.jvm +++ b/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/docker/Dockerfile.jvm @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/process-kafka-persistence-quarkus-jvm # ### -FROM fabric8/java-alpine-openjdk11-jre +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.20 ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV AB_ENABLED=jmx_exporter @@ -23,4 +23,4 @@ COPY target/quarkus-app/*.jar /deployments/ COPY target/quarkus-app/app/ /deployments/app/ COPY target/quarkus-app/quarkus/ /deployments/quarkus/ -ENTRYPOINT [ "/deployments/run-java.sh" ] \ No newline at end of file +ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/docker/Dockerfile.native b/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/docker/Dockerfile.native index 3c420fea93..5cd76cc4ed 100644 --- a/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/docker/Dockerfile.native +++ b/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/docker/Dockerfile.native @@ -7,14 +7,14 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.native -t quarkus/kogito-infinispan-persistence-quarkus . +# docker build -f src/main/docker/Dockerfile.native -t quarkus/process-kafka-persistence-quarkus . # # Then run the container using: # -# docker run -i --rm -p 8080:8080 quarkus/kogito-kafka-persistence-quarkus +# docker run -i --rm -p 8080:8080 quarkus/process-kafka-persistence-quarkus # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.4 WORKDIR /work/ COPY target/*-runner /work/application RUN chmod 775 /work diff --git a/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/docker/docker-compose.yml b/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/docker/docker-compose.yml index 1df68ed540..a9fde4aa12 100644 --- a/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/docker/docker-compose.yml +++ b/kogito-quarkus-examples/process-kafka-persistence-quarkus/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: zookeeper: diff --git a/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/java/org/acme/deals/Address.java b/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/java/org/acme/deals/Address.java index a3b5a98c6d..0d8d3c41fa 100644 --- a/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/java/org/acme/deals/Address.java +++ b/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/java/org/acme/deals/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.deals; diff --git a/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/java/org/acme/deals/Application.java b/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/java/org/acme/deals/Application.java index 533137b030..fc141365c0 100644 --- a/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/java/org/acme/deals/Application.java +++ b/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/java/org/acme/deals/Application.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.deals; @@ -19,10 +22,6 @@ import java.util.Set; import java.util.concurrent.TimeUnit; -import javax.annotation.PostConstruct; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; - import org.apache.kafka.clients.admin.AdminClient; import org.apache.kafka.clients.admin.NewTopic; import org.slf4j.Logger; @@ -31,6 +30,10 @@ import io.quarkus.runtime.Startup; import io.smallrye.common.annotation.Identifier; +import jakarta.annotation.PostConstruct; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; + import static java.util.Collections.singleton; @ApplicationScoped diff --git a/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/java/org/acme/deals/Traveller.java b/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/java/org/acme/deals/Traveller.java index f7d07fdb7f..68accdafa5 100644 --- a/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/java/org/acme/deals/Traveller.java +++ b/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/java/org/acme/deals/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.deals; diff --git a/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/resources/META-INF/resources/index.html b/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/resources/META-INF/resources/index.html deleted file mode 100644 index b7d33fc830..0000000000 --- a/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/resources/META-INF/resources/index.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - kogito-infinispan-persistence-quarkus - 1.0-SNAPSHOT - - - - - - -
-
-

Congratulations, you have created a new Quarkus application.

- -

Why do you see this?

- -

This page is served by Quarkus. The source is in - src/main/resources/META-INF/resources/index.html.

- -

What can I do from here?

- -

If not already done, run the application in dev mode using: mvn compile quarkus:dev. -

-
    -
  • Add REST resources, Servlets, functions and other services in src/main/java.
  • -
  • Your static assets are located in src/main/resources/META-INF/resources.
  • -
  • Configure your application in src/main/resources/application.properties. -
  • -
- -

How do I get rid of this page?

-

Just delete the src/main/resources/META-INF/resources/index.html file.

-
-
-
-

Application

-
    -
  • GroupId: org.acme
  • -
  • ArtifactId: kogito-kafka-persistence-quarkus
  • -
  • Version: 1.0-SNAPSHOT
  • -
  • Quarkus Version: 1.8.3
  • -
-
- -
-
- - - - \ No newline at end of file diff --git a/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/resources/application.properties index 5f411a3e58..0085a569e2 100644 --- a/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-kafka-persistence-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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/test/java/org/acme/deals/DealsRestIT.java b/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/test/java/org/acme/deals/DealsRestIT.java index b337345e41..7b95f42263 100644 --- a/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/test/java/org/acme/deals/DealsRestIT.java +++ b/kogito-quarkus-examples/process-kafka-persistence-quarkus/src/test/java/org/acme/deals/DealsRestIT.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.deals; @@ -46,7 +49,7 @@ public void testDealsRest() { given().accept(ContentType.JSON) .when().get("/deals") .then().statusCode(200) - .body("$.size()", is(1)) + .body("size()", is(1)) .body("[0].id", is(dealId)) .body("[0].name", is(deal)); @@ -59,7 +62,7 @@ public void testDealsRest() { String dealReviewId = given().accept(ContentType.JSON) .when().get("/dealreviews") .then().statusCode(200) - .body("$.size()", is(1)) + .body("size()", is(1)) .body("[0].id", notNullValue()) .body("[0].deal", is(deal)) .extract().path("[0].id"); @@ -68,7 +71,7 @@ public void testDealsRest() { String taskId = given().accept(ContentType.JSON) .when().get("/dealreviews/{uuid}/tasks?user=john", dealReviewId) .then().statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("review")) .body("[0].parameters.deal", is(deal)) .extract().path("[0].id"); @@ -84,11 +87,11 @@ public void testDealsRest() { //verify no deals to review given().accept(ContentType.JSON) .when().get("/dealreviews") - .then().statusCode(200).body("$.size()", is(0)); + .then().statusCode(200).body("size()", is(0)); //verify no deals given().accept(ContentType.JSON) .when().get("/deals") - .then().statusCode(200).body("$.size()", is(0)); + .then().statusCode(200).body("size()", is(0)); } } diff --git a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/README.md b/kogito-quarkus-examples/process-kafka-quickstart-quarkus/README.md index d52ca0c19c..1992bea867 100644 --- a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/README.md +++ b/kogito-quarkus-examples/process-kafka-quickstart-quarkus/README.md @@ -78,9 +78,9 @@ https://kafka.apache.org/quickstart ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - GraalVM 19.3+ installed @@ -111,6 +111,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ``` @@ -154,11 +159,11 @@ Content (cloud event format) ```json { - "specversion": "0.3", + "specversion": "1.0", "id": "21627e26-31eb-43e7-8343-92a696fd96b1", "source": "", "type": "travellers", - "time": "2022-02-24T13:25:16+0000", + "time": "2022-02-24T13:25:16Z", "data": { "firstName" : "Jan", "lastName" : "Kowalski", @@ -170,7 +175,7 @@ Content (cloud event format) One liner ```json -{"specversion": "0.3","id": "21627e26-31eb-43e7-8343-92a696fd96b1","source": "","type": "travellers", "time": "2022-02-24T13:25:16+0000","data": { "firstName" : "Jan", "lastName" : "Kowalski", "email" : "jan.kowalski@example.com", "nationality" : "Polish"}} +{"specversion": "1.0","id": "21627e26-31eb-43e7-8343-92a696fd96b1","source": "","type": "travellers", "time": "2022-02-24T13:25:16Z","data": { "firstName" : "Jan", "lastName" : "Kowalski", "email" : "jan.kowalski@example.com", "nationality" : "Polish"}} ``` @@ -178,29 +183,27 @@ this will then trigger the successful processing of the traveller and put anothe ```json { - "specversion": "0.3", - "id": "86f69dd6-7145-4188-aeaa-e44622eeec86", - "source": "", - "type": "TravellersMessageDataEvent_3", - "time": "2019-10-03T16:22:40.373523+02:00[Europe/Warsaw]", - "data": { - "firstName": "Jan", - "lastName": "Kowalski", - "email": "jan.kowalski@example.com", - "nationality": "Polish", - "processed": true - }, - "kogitoProcessinstanceId": "4fb091c2-82f7-4655-8687-245a4ab07483", - "kogitoParentProcessinstanceId": null, - "kogitoRootProcessinstanceId": null, - "kogitoProcessId": "Travellers", - "kogitoRootProcessId": null, - "kogitoProcessinstanceState": "1", - "kogitoReferenceId": null + "specversion": "1.0", + "id": "e84a4591-3581-42cd-bb2a-fac989ffd1a0", + "source": "/process/Travelers", + "type": "processedtravellers", + "time": "2024-06-05T11:30:49.722368+02:00", + "kogitoproctype": "BPMN", + "kogitoprocinstanceid": "66d1c981-9d6d-4c01-bc43-b712dc73b6cc", + "kogitoprocist": "Active", + "kogitoprocversion": "1.0", + "kogitoprocid": "Travelers", + "data": { + "firstName": "Jan", + "lastName": "Kowalski", + "email": "jan.kowalski@example.com", + "nationality": "Polish", + "processed": true + } } ``` -there are bunch of extension attributes that starts with `kogito` to provide some context of the execution and the event producer. +there are a bunch of extension attributes that starts with `kogito` to provide some context of the execution and the event producer. To take the other path of the process put following message on `travellers` topic @@ -214,11 +217,11 @@ With the following content (Cloud Event Format) ```json { - "specversion": "0.3", + "specversion": "1.0", "id": "31627e26-31eb-43e7-8343-92a696fd96b1", "source": "", "type": "travellers", - "time": "2022-02-24T13:25:16+0000", + "time": "2022-02-24T13:25:16Z", "data": { "firstName" : "John", "lastName" : "Doe", @@ -231,11 +234,7 @@ With the following content (Cloud Event Format) One Liner ```json -{"specversion": "0.3","id": "31627e26-31eb-43e7-8343-92a696fd96b1","source": "","type": "travellers", "time": "2022-02-24T13:25:16+0000","data": { "firstName" : "John", "lastName" : "Doe", "email" : "john.doe@example.com", "nationality" : "American"}} +{"specversion": "1.0","id": "31627e26-31eb-43e7-8343-92a696fd96b1","source": "","type": "travellers", "time": "2022-02-24T13:25:16Z","data": { "firstName" : "John", "lastName" : "Doe", "email" : "john.doe@example.com", "nationality" : "American"}} ``` -this will not result in message being send to `processedtravelers` topic. - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). +this will not result in message being sent to `processedtravelers` topic. diff --git a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/operator/process-kafka-quickstart-quarkus.yaml b/kogito-quarkus-examples/process-kafka-quickstart-quarkus/operator/process-kafka-quickstart-quarkus.yaml deleted file mode 100644 index e625d9b6d9..0000000000 --- a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/operator/process-kafka-quickstart-quarkus.yaml +++ /dev/null @@ -1,33 +0,0 @@ -#Strimzi operator should be pre-installed in namespace -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoInfra -metadata: - name: kogito-kafka-infra -spec: - resource: - apiVersion: kafka.strimzi.io/v1beta2 - kind: Kafka ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-kafka-quickstart-quarkus -spec: - type: RemoteSource - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/process-kafka-quickstart-quarkus - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-kafka-quickstart-quarkus -spec: - infra: - - kogito-kafka-infra \ No newline at end of file diff --git a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/pom.xml b/kogito-quarkus-examples/process-kafka-quickstart-quarkus/pom.xml index 294e08f529..0c2edd0c19 100644 --- a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-kafka-quickstart-quarkus/pom.xml @@ -1,24 +1,44 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-kafka-quickstart-quarkus Kogito Example :: Process with Kafka and Quarkus Kogito with Kafka - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -44,12 +64,12 @@ quarkus-smallrye-reactive-messaging-kafka
- org.kie.kogito - kogito-addons-quarkus-messaging + org.kie + kie-addons-quarkus-messaging - org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus io.quarkus diff --git a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/docker/Dockerfile.jvm b/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/docker/Dockerfile.jvm index 78574625e3..d0eee31a2c 100644 --- a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/docker/Dockerfile.jvm +++ b/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/docker/Dockerfile.jvm @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/process-kafka-quickstart-quarkus-jvm # ### -FROM fabric8/java-alpine-openjdk11-jre +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.20 ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV AB_ENABLED=jmx_exporter @@ -23,4 +23,4 @@ COPY target/quarkus-app/*.jar /deployments/ COPY target/quarkus-app/app/ /deployments/app/ COPY target/quarkus-app/quarkus/ /deployments/quarkus/ -ENTRYPOINT [ "/deployments/run-java.sh" ] \ No newline at end of file +ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/docker/Dockerfile.native b/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/docker/Dockerfile.native index 957b2ba60a..6e93db7e21 100644 --- a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/docker/Dockerfile.native +++ b/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/docker/Dockerfile.native @@ -7,14 +7,14 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.native -t quarkus/kafka-quickstart . +# docker build -f src/main/docker/Dockerfile.native -t quarkus/process-kafka-quickstart-quarkus . # # Then run the container using: # -# docker run -i --rm -p 8080:8080 quarkus/kafka-quickstart +# docker run -i --rm -p 8080:8080 quarkus/process-kafka-quickstart-quarkus # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.4 WORKDIR /work/ COPY target/*-runner /work/application RUN chmod 775 /work diff --git a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/java/org/acme/travel/Traveller.java b/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/java/org/acme/travel/Traveller.java index 75e93ab4ba..d3b7ca64bd 100644 --- a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/java/org/acme/travel/Traveller.java +++ b/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/java/org/acme/travel/Traveller.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.acme.travel; diff --git a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/java/org/acme/travel/TravellerValidationService.java b/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/java/org/acme/travel/TravellerValidationService.java index fac9d3ee18..f807943864 100644 --- a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/java/org/acme/travel/TravellerValidationService.java +++ b/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/java/org/acme/travel/TravellerValidationService.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.acme.travel; diff --git a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/resources/META-INF/resources/index.html b/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/resources/META-INF/resources/index.html deleted file mode 100644 index 94a44ee8ab..0000000000 --- a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/resources/META-INF/resources/index.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - kafka-quickstart - 1.0-SNAPSHOT - - - - - - -
-
-

Congratulations, you have created a new Quarkus application.

- -

Why do you see this?

- -

This page is served by Quarkus. The source is in - src/main/resources/META-INF/resources/index.html.

- -

What can I do from here?

- -

If not already done, run the application in dev mode using: mvn compile quarkus:dev. -

-
    -
  • Add REST resources, Servlets, functions and other services in src/main/java.
  • -
  • Your static assets are located in src/main/resources/META-INF/resources.
  • -
  • Configure your application in src/main/resources/application.properties. -
  • -
- -

How do I get rid of this page?

-

Just delete the src/main/resources/META-INF/resources/index.html file.

-
-
-
-

Application

-
    -
  • GroupId: org.acme
  • -
  • ArtifactId: kafka-quickstart
  • -
  • Version: 1.0-SNAPSHOT
  • -
  • Quarkus Version: 0.18.0
  • -
-
- -
-
- - - - \ No newline at end of file diff --git a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/resources/application.properties index 4bd4e1294a..d877808b78 100644 --- a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-kafka-quickstart-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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/resources/travellers.drl b/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/resources/travellers.drl index e2feedd297..da5c4b40f9 100644 --- a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/resources/travellers.drl +++ b/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/main/resources/travellers.drl @@ -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.acme.travel unit TravellerValidationService diff --git a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/test/java/org/acme/travel/tests/messaging/quarkus/MessagingIT.java b/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/test/java/org/acme/travel/tests/messaging/quarkus/MessagingIT.java index a60381ea7f..20fba84f08 100644 --- a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/test/java/org/acme/travel/tests/messaging/quarkus/MessagingIT.java +++ b/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/test/java/org/acme/travel/tests/messaging/quarkus/MessagingIT.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.acme.travel.tests.messaging.quarkus; diff --git a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/test/resources/application.properties index 97f9010859..5dbcf1475f 100644 --- a/kogito-quarkus-examples/process-kafka-quickstart-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/process-kafka-quickstart-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.http.test-port=0 quarkus.kafka.devservices.enabled=false diff --git a/kogito-quarkus-examples/process-knative-quickstart-quarkus/README.md b/kogito-quarkus-examples/process-knative-quickstart-quarkus/README.md index fab6af775b..774e0edd84 100644 --- a/kogito-quarkus-examples/process-knative-quickstart-quarkus/README.md +++ b/kogito-quarkus-examples/process-knative-quickstart-quarkus/README.md @@ -3,7 +3,7 @@ ## Description A quickstart project that deals with traveller processing carried by rules. It illustrates how easy it is to make the Kogito processes and rules to work with Knative Eventing. This project is based on -the example [Process with Kafka](https://github.com/kiegroup/kogito-examples/tree/main/kogito-quarkus-examples/process-kafka-quickstart-quarkus). +the example [Process with Kafka](https://github.com/apache/incubator-kie-kogito-examples/tree/main/kogito-quarkus-examples/process-kafka-quickstart-quarkus). This example shows @@ -78,9 +78,9 @@ For local testing only you can use [Podman](https://podman.io/getting-started/in You will need: -- Java 11+ installed +- Java 17+ installed - Environment variable JAVA_HOME set accordingly -- Maven 3.8.6+ installed +- Maven 3.9.6+ installed When using native image compilation, you will also need: @@ -120,6 +120,10 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` Note that this requires GRAALVM_HOME to point to a valid GraalVM installation @@ -176,7 +180,7 @@ __ ____ __ _____ ___ __ ____ ______ 2021-05-18 14:50:50,111 INFO [org.kie.kog.add.clo.qua.QuarkusKogitoExtensionInitializer] (Quarkus Main Thread) Registered Kogito CloudEvent extension 2021-05-18 14:50:50,114 INFO [org.kie.kog.ser.eve.imp.AbstractMessageConsumer] (Quarkus Main Thread) Consumer for class org.acme.travel.Traveller started. -2021-05-18 14:50:50,164 INFO [io.quarkus] (Quarkus Main Thread) process-knative-quickstart-quarkus 2.0.0-SNAPSHOT on JVM (powered by Quarkus 1.13.3.Final) started in 3.118s. Listening on: http://localhost:8080 +2021-05-18 14:50:50,164 INFO [io.quarkus] (Quarkus Main Thread) process-knative-quickstart-quarkus 999-SNAPSHOT on JVM (powered by Quarkus 1.13.3.Final) started in 3.118s. Listening on: http://localhost:8080 2021-05-18 14:50:50,164 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated. 2021-05-18 14:50:50,164 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, kogito-decisions, kogito-predictions, kogito-processes, kogito-rules, mutiny, rest-client, rest-client-jackson, resteasy, resteasy-jackson, servlet, smallrye-context-propagation, smallrye-health, smallrye-openapi, smallrye-reactive-messaging, swagger-ui, vertx, vertx-web] ``` diff --git a/kogito-quarkus-examples/process-knative-quickstart-quarkus/pom.xml b/kogito-quarkus-examples/process-knative-quickstart-quarkus/pom.xml index 5d32855e63..133b7c8658 100644 --- a/kogito-quarkus-examples/process-knative-quickstart-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-knative-quickstart-quarkus/pom.xml @@ -1,25 +1,45 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-knative-quickstart-quarkus Kogito Example :: Process with Knative Eventing and Quarkus Kogito with Knative Eventing - Quarkus 2.33.2 - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -49,17 +69,17 @@ quarkus-resteasy-jackson
- org.kie.kogito - kogito-quarkus-rules + org.drools + drools-quarkus-rules - org.kie.kogito - kogito-quarkus-processes + org.jbpm + jbpm-quarkus - org.kie.kogito - kogito-addons-quarkus-knative-eventing + org.kie + kie-addons-quarkus-knative-eventing io.quarkus diff --git a/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/main/java/org/acme/travel/Traveller.java b/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/main/java/org/acme/travel/Traveller.java index 75e93ab4ba..d3b7ca64bd 100644 --- a/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/main/java/org/acme/travel/Traveller.java +++ b/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/main/java/org/acme/travel/Traveller.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.acme.travel; diff --git a/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/main/java/org/acme/travel/TravellerValidationService.java b/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/main/java/org/acme/travel/TravellerValidationService.java index fac9d3ee18..f807943864 100644 --- a/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/main/java/org/acme/travel/TravellerValidationService.java +++ b/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/main/java/org/acme/travel/TravellerValidationService.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.acme.travel; diff --git a/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/main/resources/application.properties index 16f20f1a14..cda9b219fa 100644 --- a/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-knative-quickstart-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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/main/resources/travellers.drl b/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/main/resources/travellers.drl index e2feedd297..da5c4b40f9 100644 --- a/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/main/resources/travellers.drl +++ b/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/main/resources/travellers.drl @@ -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.acme.travel unit TravellerValidationService diff --git a/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/test/java/org/acme/travel/CloudEventListenerTest.java b/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/test/java/org/acme/travel/CloudEventListenerTest.java index 0fddbe0974..dcd56bd422 100644 --- a/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/test/java/org/acme/travel/CloudEventListenerTest.java +++ b/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/test/java/org/acme/travel/CloudEventListenerTest.java @@ -1,22 +1,23 @@ /* - * 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.acme.travel; -import javax.ws.rs.core.MediaType; - import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; @@ -30,6 +31,8 @@ import io.quarkus.test.junit.QuarkusTest; import io.restassured.RestAssured; +import jakarta.ws.rs.core.MediaType; + import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; import static com.github.tomakehurst.wiremock.client.WireMock.containing; import static com.github.tomakehurst.wiremock.client.WireMock.post; diff --git a/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/test/java/org/acme/travel/TopicsInformationTest.java b/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/test/java/org/acme/travel/TopicsInformationTest.java index 4006f6e6d9..ce416c698f 100644 --- a/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/test/java/org/acme/travel/TopicsInformationTest.java +++ b/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/test/java/org/acme/travel/TopicsInformationTest.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.acme.travel; diff --git a/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/test/resources/application.properties index 07d0cf7e13..b7fee18b52 100644 --- a/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/process-knative-quickstart-quarkus/src/test/resources/application.properties @@ -1,4 +1,25 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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.http.test-port=8282 quarkus.log.level=INFO mp.messaging.outgoing.kogito_outgoing_stream.url=http://0.0.0.0:8181 + +kogito.addon.messaging.outgoing.cloudEventMode=structured diff --git a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/README.md b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/README.md index e0d1701d54..4c1d628ddb 100644 --- a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/README.md +++ b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/README.md @@ -71,9 +71,9 @@ For more details you can check applications.properties. ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - GraalVM 19.3+ installed @@ -121,6 +121,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ```sh diff --git a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/operator/process-mongodb-persistence-quarkus.yaml b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/operator/process-mongodb-persistence-quarkus.yaml deleted file mode 100644 index 13bf3ae63e..0000000000 --- a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/operator/process-mongodb-persistence-quarkus.yaml +++ /dev/null @@ -1,29 +0,0 @@ -## MongoDB operator should be pre-installed in namespace -apiVersion: app.kiegroup.org/v1alpha1 -kind: KogitoInfra -metadata: - name: kogito-mongodb -spec: - resource: - apiVersion: mongodb.com/v1 - kind: MongoDB ---- -apiVersion: app.kiegroup.org/v1alpha1 -kind: KogitoBuild -metadata: - name: process-mongodb -spec: - type: RemoteSource - gitSource: - contextDir: kogito-quarkus-examples/process-mongodb-persistence-quarkus - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1alpha1 -kind: KogitoRuntime -metadata: - name: process-mongodb -spec: - infra: - - kogito-mongodb \ No newline at end of file diff --git a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/pom.xml b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/pom.xml index 094560f07e..b0a2de519d 100644 --- a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/pom.xml @@ -1,24 +1,44 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-mongodb-persistence-quarkus Kogito Example :: Process MongoDB Persistence Quarkus Process with MongoDB persistence - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -48,16 +68,16 @@ quarkus-resteasy-jackson - org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus io.quarkus quarkus-smallrye-openapi - org.kie.kogito - kogito-addons-quarkus-persistence-mongodb + org.kie + kie-addons-quarkus-persistence-mongodb io.quarkus @@ -122,8 +142,8 @@
- org.kie.kogito - kogito-addons-quarkus-events-process + org.kie + kie-addons-quarkus-events-process io.quarkus diff --git a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/main/docker/Dockerfile.jvm b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/main/docker/Dockerfile.jvm index a201b741c2..9875050456 100644 --- a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/main/docker/Dockerfile.jvm +++ b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/main/docker/Dockerfile.jvm @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/process-mongodb-persistence-quarkus-jvm # ### -FROM fabric8/java-alpine-openjdk11-jre +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.20 ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV AB_ENABLED=jmx_exporter @@ -23,4 +23,4 @@ COPY target/quarkus-app/*.jar /deployments/ COPY target/quarkus-app/app/ /deployments/app/ COPY target/quarkus-app/quarkus/ /deployments/quarkus/ -ENTRYPOINT [ "/deployments/run-java.sh" ] \ No newline at end of file +ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/main/docker/Dockerfile.native b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/main/docker/Dockerfile.native index fe9ec08d58..109f195f80 100644 --- a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/main/docker/Dockerfile.native +++ b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/main/docker/Dockerfile.native @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/process-mongodb-persistence-quarkus # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.4 WORKDIR /work/ COPY target/*-runner /work/application RUN chmod 775 /work diff --git a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/main/java/org/acme/deals/Address.java b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/main/java/org/acme/deals/Address.java index 0c3c0fa8c3..a00e02099e 100644 --- a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/main/java/org/acme/deals/Address.java +++ b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/main/java/org/acme/deals/Address.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.acme.deals; diff --git a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/main/java/org/acme/deals/Traveller.java b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/main/java/org/acme/deals/Traveller.java index 02e90894b3..d0473a11d7 100644 --- a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/main/java/org/acme/deals/Traveller.java +++ b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/main/java/org/acme/deals/Traveller.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.acme.deals; diff --git a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/main/resources/META-INF/resources/index.html b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/main/resources/META-INF/resources/index.html deleted file mode 100644 index bf23110f13..0000000000 --- a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/main/resources/META-INF/resources/index.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - process-mongodb-persistence-quarkus - 1.0-SNAPSHOT - - - - - - -
-
-

Congratulations, you have created a new Quarkus application.

- -

Why do you see this?

- -

This page is served by Quarkus. The source is in - src/main/resources/META-INF/resources/index.html.

- -

What can I do from here?

- -

If not already done, run the application in dev mode using: mvn compile quarkus:dev. -

-
    -
  • Add REST resources, Servlets, functions and other services in src/main/java.
  • -
  • Your static assets are located in src/main/resources/META-INF/resources.
  • -
  • Configure your application in src/main/resources/application.properties. -
  • -
- -

How do I get rid of this page?

-

Just delete the src/main/resources/META-INF/resources/index.html file.

-
-
-
-

Application

-
    -
  • GroupId: org.acme
  • -
  • ArtifactId: process-mongodb-persistence-quarkus
  • -
  • Version: 1.0-SNAPSHOT
  • -
  • Quarkus Version: 0.19.1
  • -
-
- -
-
- - - - \ No newline at end of file diff --git a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/main/resources/application.properties index a700a75201..9c7cd32267 100644 --- a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-mongodb-persistence-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. +# + # Packaging # quarkus.package.type=fast-jar @@ -18,4 +37,8 @@ mp.messaging.outgoing.kogito-usertaskinstances-events.value.serializer=org.apach 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 \ No newline at end of file +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 \ No newline at end of file diff --git a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/test/java/org/acme/deals/DealsRestIT.java b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/test/java/org/acme/deals/DealsRestIT.java index ee83e1d19a..bc9f960a2a 100644 --- a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/test/java/org/acme/deals/DealsRestIT.java +++ b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/test/java/org/acme/deals/DealsRestIT.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.acme.deals; @@ -42,7 +45,7 @@ public void testDealsRest() { // test getting the created deal given().accept(ContentType.JSON) .when().get("/deals") - .then().log().ifValidationFails().statusCode(200).body("$.size()", is(1), "[0].id", is(dealId)); + .then().log().ifValidationFails().statusCode(200).body("size()", is(1), "[0].id", is(dealId)); // test getting order by id given().accept(ContentType.JSON) @@ -52,12 +55,12 @@ public void testDealsRest() { // get deals for review String dealReviewId = given().accept(ContentType.JSON) .when().get("/dealreviews") - .then().log().ifValidationFails().statusCode(200).body("$.size()", is(1)).body("[0].id", notNullValue()).extract().path("[0].id"); + .then().log().ifValidationFails().statusCode(200).body("size()", is(1)).body("[0].id", notNullValue()).extract().path("[0].id"); // get task for john String taskId = given().accept(ContentType.JSON) .when().get("/dealreviews/{uuid}/tasks?user=john", dealReviewId) - .then().log().ifValidationFails().statusCode(200).body("$.size", is(1)).extract().path("[0].id"); + .then().log().ifValidationFails().statusCode(200).body("size()", is(1)).extract().path("[0].id"); // complete review task given().contentType(ContentType.JSON).accept(ContentType.JSON).body("{\"review\" : \"very good work\"}") @@ -67,11 +70,11 @@ public void testDealsRest() { //verify no deals to review given().accept(ContentType.JSON) .when().get("/dealreviews") - .then().log().ifValidationFails().statusCode(200).body("$.size()", is(0)); + .then().log().ifValidationFails().statusCode(200).body("size()", is(0)); //verify no deals given().accept(ContentType.JSON) .when().get("/deals") - .then().log().ifValidationFails().statusCode(200).body("$.size()", is(0)); + .then().log().ifValidationFails().statusCode(200).body("size()", is(0)); } } diff --git a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/test/java/org/acme/deals/NativeDealsRestIT.java b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/test/java/org/acme/deals/NativeDealsRestIT.java index 81b8e1b433..81c1c5d0ac 100644 --- a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/test/java/org/acme/deals/NativeDealsRestIT.java +++ b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/test/java/org/acme/deals/NativeDealsRestIT.java @@ -1,23 +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.acme.deals; -import io.quarkus.test.junit.NativeImageTest; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@NativeImageTest +@QuarkusIntegrationTest public class NativeDealsRestIT extends DealsRestIT { } diff --git a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/test/resources/application.properties index df9a3471ac..7246c70cd7 100644 --- a/kogito-quarkus-examples/process-mongodb-persistence-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/process-mongodb-persistence-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.http.test-port=0 quarkus.log.console.enable=true diff --git a/kogito-quarkus-examples/process-monitoring-quarkus/Dockerfile b/kogito-quarkus-examples/process-monitoring-quarkus/Dockerfile deleted file mode 100644 index d3fd100a3a..0000000000 --- a/kogito-quarkus-examples/process-monitoring-quarkus/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM quay.io/kiegroup/kogito-runtime-jvm:latest - -ENV RUNTIME_TYPE quarkus - -COPY target/quarkus-app/lib/ $KOGITO_HOME/bin/lib/ -COPY target/quarkus-app/*.jar $KOGITO_HOME/bin -COPY target/quarkus-app/app/ $KOGITO_HOME/bin/app/ -COPY target/quarkus-app/quarkus/ $KOGITO_HOME/bin/quarkus/ - -# For the legacy quarkus application jar use the commands below -# COPY target/*-runner.jar $KOGITO_HOME/bin -# COPY target/lib $KOGITO_HOME/bin/lib diff --git a/kogito-quarkus-examples/process-monitoring-quarkus/README.md b/kogito-quarkus-examples/process-monitoring-quarkus/README.md index 99363fb1c7..168989e9ae 100644 --- a/kogito-quarkus-examples/process-monitoring-quarkus/README.md +++ b/kogito-quarkus-examples/process-monitoring-quarkus/README.md @@ -8,9 +8,9 @@ This example demonstrates how to enable and consume the runtime metrics monitori You will need: -- Java 11+ installed +- Java 17+ installed - Environment variable JAVA_HOME set accordingly -- Maven 3.8.6+ installed +- Maven 3.9.6+ installed - Docker 19+ (only if you want to run the integration tests and/or you want to use the `docker-compose` script provided in this example). ### How to enable the feature @@ -20,8 +20,8 @@ Import the following dependency in your `pom.xml`: ```XML - org.kie.kogito - kogito-addons-quarkus-monitoring-prometheus + org.kie + kie-addons-quarkus-monitoring-prometheus ``` diff --git a/kogito-quarkus-examples/process-monitoring-quarkus/docker-compose.yml b/kogito-quarkus-examples/process-monitoring-quarkus/docker-compose.yml index fedca2a135..9ecdf51640 100644 --- a/kogito-quarkus-examples/process-monitoring-quarkus/docker-compose.yml +++ b/kogito-quarkus-examples/process-monitoring-quarkus/docker-compose.yml @@ -1,8 +1,27 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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' services: hello: - build: . + image: org.kie.kogito.examples/process-monitoring-quarkus:1.0 ports: - 8080:8080 diff --git a/kogito-quarkus-examples/process-monitoring-quarkus/docker-compose/grafana/provisioning/dashboards/dashboard.yml b/kogito-quarkus-examples/process-monitoring-quarkus/docker-compose/grafana/provisioning/dashboards/dashboard.yml index 437d59118f..1c31f32b3b 100644 --- a/kogito-quarkus-examples/process-monitoring-quarkus/docker-compose/grafana/provisioning/dashboards/dashboard.yml +++ b/kogito-quarkus-examples/process-monitoring-quarkus/docker-compose/grafana/provisioning/dashboards/dashboard.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. +# + apiVersion: 1 providers: diff --git a/kogito-quarkus-examples/process-monitoring-quarkus/docker-compose/grafana/provisioning/datasources/datasource.yml b/kogito-quarkus-examples/process-monitoring-quarkus/docker-compose/grafana/provisioning/datasources/datasource.yml index 4e58703f23..14e5b05c55 100644 --- a/kogito-quarkus-examples/process-monitoring-quarkus/docker-compose/grafana/provisioning/datasources/datasource.yml +++ b/kogito-quarkus-examples/process-monitoring-quarkus/docker-compose/grafana/provisioning/datasources/datasource.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. +# + # config file version apiVersion: 1 diff --git a/kogito-quarkus-examples/process-monitoring-quarkus/docker-compose/prometheus/prometheus.yml b/kogito-quarkus-examples/process-monitoring-quarkus/docker-compose/prometheus/prometheus.yml index e93a8f4560..d9b3bbebb0 100644 --- a/kogito-quarkus-examples/process-monitoring-quarkus/docker-compose/prometheus/prometheus.yml +++ b/kogito-quarkus-examples/process-monitoring-quarkus/docker-compose/prometheus/prometheus.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. +# + # A scrape configuration containing exactly one endpoint to scrape: scrape_configs: # The job name is added as a label `job=` to any timeseries scraped from this config. diff --git a/kogito-quarkus-examples/process-monitoring-quarkus/pom.xml b/kogito-quarkus-examples/process-monitoring-quarkus/pom.xml index 1669a3fdfc..2446331927 100755 --- a/kogito-quarkus-examples/process-monitoring-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-monitoring-quarkus/pom.xml @@ -1,24 +1,44 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-monitoring-quarkus Kogito Example :: Process Monitoring :: Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -41,12 +61,16 @@ - org.kie.kogito - kogito-quarkus-processes + org.jbpm + jbpm-quarkus - org.kie.kogito - kogito-addons-quarkus-monitoring-prometheus + org.kie + kie-addons-quarkus-monitoring-prometheus + + + io.quarkus + quarkus-container-image-jib io.quarkus diff --git a/kogito-quarkus-examples/process-monitoring-quarkus/src/main/java/org/kie/kogito/examples/quarkus/CalculationService.java b/kogito-quarkus-examples/process-monitoring-quarkus/src/main/java/org/kie/kogito/examples/quarkus/CalculationService.java index 11dfcb97e2..8b7b50da07 100644 --- a/kogito-quarkus-examples/process-monitoring-quarkus/src/main/java/org/kie/kogito/examples/quarkus/CalculationService.java +++ b/kogito-quarkus-examples/process-monitoring-quarkus/src/main/java/org/kie/kogito/examples/quarkus/CalculationService.java @@ -1,26 +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.examples.quarkus; import java.util.Random; -import javax.enterprise.context.ApplicationScoped; - import org.kie.kogito.examples.quarkus.demo.Order; +import jakarta.enterprise.context.ApplicationScoped; + @ApplicationScoped public class CalculationService { diff --git a/kogito-quarkus-examples/process-monitoring-quarkus/src/main/java/org/kie/kogito/examples/quarkus/demo/Order.java b/kogito-quarkus-examples/process-monitoring-quarkus/src/main/java/org/kie/kogito/examples/quarkus/demo/Order.java index 03a8199193..354920c235 100755 --- a/kogito-quarkus-examples/process-monitoring-quarkus/src/main/java/org/kie/kogito/examples/quarkus/demo/Order.java +++ b/kogito-quarkus-examples/process-monitoring-quarkus/src/main/java/org/kie/kogito/examples/quarkus/demo/Order.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.examples.quarkus.demo; diff --git a/kogito-quarkus-examples/process-monitoring-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-monitoring-quarkus/src/main/resources/application.properties index 2432db771d..4bbbce90e6 100644 --- a/kogito-quarkus-examples/process-monitoring-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-monitoring-quarkus/src/main/resources/application.properties @@ -1 +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. +# + quarkus.swagger-ui.always-include=true + +# Container image +quarkus.container-image.build=true +quarkus.container-image.group=org.kie.kogito.examples +quarkus.container-image.name=process-monitoring-quarkus +quarkus.container-image.tag=1.0 diff --git a/kogito-quarkus-examples/process-monitoring-quarkus/src/test/filtered-resources/project.properties b/kogito-quarkus-examples/process-monitoring-quarkus/src/test/filtered-resources/project.properties index 301ad794d3..5771872775 100644 --- a/kogito-quarkus-examples/process-monitoring-quarkus/src/test/filtered-resources/project.properties +++ b/kogito-quarkus-examples/process-monitoring-quarkus/src/test/filtered-resources/project.properties @@ -1,17 +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. # + project.version=${project.version} project.artifactId=${project.artifactId} \ No newline at end of file diff --git a/kogito-quarkus-examples/process-monitoring-quarkus/src/test/java/org/kie/kogito/examples/quarkus/DashboardGenerationIT.java b/kogito-quarkus-examples/process-monitoring-quarkus/src/test/java/org/kie/kogito/examples/quarkus/DashboardGenerationIT.java index 2ff62553c8..0e147fa27c 100644 --- a/kogito-quarkus-examples/process-monitoring-quarkus/src/test/java/org/kie/kogito/examples/quarkus/DashboardGenerationIT.java +++ b/kogito-quarkus-examples/process-monitoring-quarkus/src/test/java/org/kie/kogito/examples/quarkus/DashboardGenerationIT.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.examples.quarkus; import java.util.List; diff --git a/kogito-quarkus-examples/process-monitoring-quarkus/src/test/java/org/kie/kogito/examples/quarkus/NativeDashboardGenerationIT.java b/kogito-quarkus-examples/process-monitoring-quarkus/src/test/java/org/kie/kogito/examples/quarkus/NativeDashboardGenerationIT.java index 7bf4ac629a..5a66fd4f81 100644 --- a/kogito-quarkus-examples/process-monitoring-quarkus/src/test/java/org/kie/kogito/examples/quarkus/NativeDashboardGenerationIT.java +++ b/kogito-quarkus-examples/process-monitoring-quarkus/src/test/java/org/kie/kogito/examples/quarkus/NativeDashboardGenerationIT.java @@ -1,24 +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.examples.quarkus; -import io.quarkus.test.junit.NativeImageTest; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@NativeImageTest +@QuarkusIntegrationTest public class NativeDashboardGenerationIT extends DashboardGenerationIT { // Execute the same tests but in native mode. diff --git a/kogito-quarkus-examples/process-monitoring-quarkus/src/test/java/org/kie/kogito/examples/quarkus/ProcessMetricsTest.java b/kogito-quarkus-examples/process-monitoring-quarkus/src/test/java/org/kie/kogito/examples/quarkus/ProcessMetricsTest.java index a51cd75eee..168e3f831c 100644 --- a/kogito-quarkus-examples/process-monitoring-quarkus/src/test/java/org/kie/kogito/examples/quarkus/ProcessMetricsTest.java +++ b/kogito-quarkus-examples/process-monitoring-quarkus/src/test/java/org/kie/kogito/examples/quarkus/ProcessMetricsTest.java @@ -1,27 +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.examples.quarkus; import java.util.HashMap; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; - import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.kie.kogito.Model; @@ -31,6 +30,9 @@ import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import static io.restassured.RestAssured.given; import static org.hamcrest.Matchers.containsString; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -91,13 +93,16 @@ public void testProcessMetricsQuarkus() { String.format("kogito_process_instance_running_total{app_id=\"default-process-monitoring-listener\",artifactId=\"%s\",process_id=\"demo.orderItems\",version=\"%s\"} 1.0", PROJECT_ARTIFACT_ID, PROJECT_VERSION))) .body(containsString( - String.format("kogito_work_item_duration_seconds_max{artifactId=\"%s\",name=\"org.kie.kogito.examples.quarkus.CalculationService_calculateTotal_3_Handler\",version=\"%s\"}", + String.format( + "kogito_work_item_duration_seconds_max{artifactId=\"%s\",name=\"org.kie.kogito.examples.quarkus.CalculationService_calculateTotal_ServiceTask_1_Handler\",version=\"%s\"}", PROJECT_ARTIFACT_ID, PROJECT_VERSION))) .body(containsString( - String.format("kogito_work_item_duration_seconds_count{artifactId=\"%s\",name=\"org.kie.kogito.examples.quarkus.CalculationService_calculateTotal_3_Handler\",version=\"%s\"}", + String.format( + "kogito_work_item_duration_seconds_count{artifactId=\"%s\",name=\"org.kie.kogito.examples.quarkus.CalculationService_calculateTotal_ServiceTask_1_Handler\",version=\"%s\"}", PROJECT_ARTIFACT_ID, PROJECT_VERSION))) .body(containsString( - String.format("kogito_work_item_duration_seconds_sum{artifactId=\"%s\",name=\"org.kie.kogito.examples.quarkus.CalculationService_calculateTotal_3_Handler\",version=\"%s\"}", + String.format( + "kogito_work_item_duration_seconds_sum{artifactId=\"%s\",name=\"org.kie.kogito.examples.quarkus.CalculationService_calculateTotal_ServiceTask_1_Handler\",version=\"%s\"}", PROJECT_ARTIFACT_ID, PROJECT_VERSION))); } } diff --git a/kogito-quarkus-examples/process-monitoring-quarkus/src/test/java/org/kie/kogito/examples/quarkus/ProjectMetadataProvider.java b/kogito-quarkus-examples/process-monitoring-quarkus/src/test/java/org/kie/kogito/examples/quarkus/ProjectMetadataProvider.java index bd1570570f..b6c3df342c 100644 --- a/kogito-quarkus-examples/process-monitoring-quarkus/src/test/java/org/kie/kogito/examples/quarkus/ProjectMetadataProvider.java +++ b/kogito-quarkus-examples/process-monitoring-quarkus/src/test/java/org/kie/kogito/examples/quarkus/ProjectMetadataProvider.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.examples.quarkus; diff --git a/kogito-quarkus-examples/process-monitoring-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/process-monitoring-quarkus/src/test/resources/application.properties index 3c17236931..a047ea13ba 100644 --- a/kogito-quarkus-examples/process-monitoring-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/process-monitoring-quarkus/src/test/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. +# + # Quarkus quarkus.http.test-port=0 \ No newline at end of file diff --git a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/README.md b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/README.md index 9d541b4adf..8d79623ebb 100644 --- a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/README.md +++ b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/README.md @@ -36,7 +36,7 @@ curl -d '{"approver" : "john", "order" : {"orderNumber" : "12345", "shipped" : f

-6. With the Kafka broker info from step 8, run the Kogito Data Index Service with MongoDB to consume Kafka messages: https://github.com/kiegroup/kogito-runtimes/wiki/Data-Index-Service +6. With the Kafka broker info from step 8, run the Kogito Data Index Service with MongoDB to consume Kafka messages: https://github.com/apache/incubator-kie-kogito-runtimes/wiki/Data-Index-Service 7. Shut down the cluster ```shell diff --git a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/docker-clean.sh b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/docker-clean.sh index 8a012b7df5..92447e9301 100755 --- a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/docker-clean.sh +++ b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/docker-clean.sh @@ -1,4 +1,23 @@ #!/bin/sh +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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. +# + # Helper script to remove any cache from previous build docker-compose stop diff --git a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/docker-compose.yml b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/docker-compose.yml index 38f5a11923..b466e423d1 100644 --- a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/docker-compose.yml +++ b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/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' services: kafka: diff --git a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/mongodb/Dockerfile b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/mongodb/Dockerfile index fad6a072db..e38891021c 100644 --- a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/mongodb/Dockerfile +++ b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/mongodb/Dockerfile @@ -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. +# + FROM library/mongo:4.4.14 COPY init.sh /usr/local/bin/ diff --git a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/mongodb/init.sh b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/mongodb/init.sh index 9281d34184..636e455018 100644 --- a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/mongodb/init.sh +++ b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/mongodb/init.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 -euxo pipefail diff --git a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/mongodb/launch.sh b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/mongodb/launch.sh index 04786f1502..09c955e69f 100644 --- a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/mongodb/launch.sh +++ b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/mongodb/launch.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 -m diff --git a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/pom.xml b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/pom.xml index 47aa6727e5..a2a97fd4d3 100644 --- a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/pom.xml @@ -1,4 +1,24 @@ + @@ -6,7 +26,7 @@ org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-outbox-mongodb-quarkus @@ -15,14 +35,14 @@ 1.7 - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -46,8 +66,8 @@ - org.kie.kogito - kogito-quarkus-processes + org.jbpm + jbpm-quarkus io.quarkus @@ -59,12 +79,12 @@ - org.kie.kogito - kogito-addons-quarkus-persistence-mongodb + org.kie + kie-addons-quarkus-persistence-mongodb - org.kie.kogito - kogito-addons-quarkus-events-mongodb + org.kie + kie-addons-quarkus-events-mongodb io.quarkus diff --git a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/sidecar/Dockerfile b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/sidecar/Dockerfile index 5264764138..9e160ea74d 100644 --- a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/sidecar/Dockerfile +++ b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/sidecar/Dockerfile @@ -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. +# + FROM library/mongo:4.4.14 RUN apt-get update && apt-get install -y curl diff --git a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/sidecar/launch.sh b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/sidecar/launch.sh index 5d9ce0fbde..51f265d29c 100644 --- a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/sidecar/launch.sh +++ b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/sidecar/launch.sh @@ -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. +# + set -euxo pipefail until mongo -u "$MONGODB_USER" -p "$MONGODB_PASSWORD" --host "$MONGODB_RS"/"$MONGODB_HOST" admin --eval "print(\"waited for connection\")"; do diff --git a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/java/org/kie/kogito/examples/CalculationService.java b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/java/org/kie/kogito/examples/CalculationService.java index fc2e8fee76..6424974f44 100644 --- a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/java/org/kie/kogito/examples/CalculationService.java +++ b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/java/org/kie/kogito/examples/CalculationService.java @@ -1,26 +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.examples; import java.util.Random; -import javax.enterprise.context.ApplicationScoped; - import org.kie.kogito.examples.demo.Order; +import jakarta.enterprise.context.ApplicationScoped; + @ApplicationScoped public class CalculationService { diff --git a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/java/org/kie/kogito/examples/PersonValidationService.java b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/java/org/kie/kogito/examples/PersonValidationService.java index af854584cb..022478f873 100644 --- a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/java/org/kie/kogito/examples/PersonValidationService.java +++ b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/java/org/kie/kogito/examples/PersonValidationService.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.examples; diff --git a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/java/org/kie/kogito/examples/demo/Order.java b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/java/org/kie/kogito/examples/demo/Order.java index 753b87aecd..d3770e78cf 100755 --- a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/java/org/kie/kogito/examples/demo/Order.java +++ b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/java/org/kie/kogito/examples/demo/Order.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.examples.demo; diff --git a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/java/org/kie/kogito/examples/demo/Person.java b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/java/org/kie/kogito/examples/demo/Person.java index c38f75fe3c..92aa205134 100644 --- a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/java/org/kie/kogito/examples/demo/Person.java +++ b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/java/org/kie/kogito/examples/demo/Person.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.examples.demo; diff --git a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/resources/META-INF/kmodule.xml b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/resources/META-INF/kmodule.xml index 2ba4076c16..41665a75bb 100755 --- a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/resources/META-INF/kmodule.xml +++ b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/resources/META-INF/kmodule.xml @@ -1 +1,21 @@ + \ No newline at end of file diff --git a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/resources/application.properties index 29295e3600..689f9d3c5c 100644 --- a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-outbox-mongodb-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. +# + quarkus.swagger-ui.always-include=true kogito.persistence.type=mongodb diff --git a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/resources/org/kie/kogito/examples/PersonValidationService.drl b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/resources/org/kie/kogito/examples/PersonValidationService.drl index 81e156389c..9d0fdc6ce1 100644 --- a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/resources/org/kie/kogito/examples/PersonValidationService.drl +++ b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/main/resources/org/kie/kogito/examples/PersonValidationService.drl @@ -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.examples unit PersonValidationService diff --git a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/test/java/org/kie/kogito/quarkus/outbox/OutboxIT.java b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/test/java/org/kie/kogito/quarkus/outbox/OutboxIT.java index 22fadaf7a2..5832a8f472 100644 --- a/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/test/java/org/kie/kogito/quarkus/outbox/OutboxIT.java +++ b/kogito-quarkus-examples/process-outbox-mongodb-quarkus/src/test/java/org/kie/kogito/quarkus/outbox/OutboxIT.java @@ -1,30 +1,30 @@ /* - * 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.quarkus.outbox; -import java.nio.file.Path; -import java.nio.file.Paths; import java.time.Duration; import java.util.Set; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.function.Consumer; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.kie.kogito.test.quarkus.kafka.KafkaTestClient; import org.slf4j.Logger; @@ -32,9 +32,6 @@ import org.testcontainers.containers.DockerComposeContainer; import org.testcontainers.containers.output.OutputFrame; import org.testcontainers.containers.output.Slf4jLogConsumer; -import org.testcontainers.containers.wait.strategy.Wait; -import org.testcontainers.junit.jupiter.Container; -import org.testcontainers.junit.jupiter.Testcontainers; import com.jayway.jsonpath.JsonPath; @@ -45,7 +42,7 @@ import static org.hamcrest.Matchers.hasSize; import static org.junit.jupiter.api.Assertions.assertTrue; -@Testcontainers +//@Testcontainers public class OutboxIT { private static final Logger LOGGER = LoggerFactory.getLogger(OutboxIT.class); @@ -54,12 +51,11 @@ public class OutboxIT { private static final String PROCESS_EVENTS_TOPIC = "kogito-processinstances-events"; private static final String USERTASK_EVENTS_TOPIC = "kogito-usertaskinstances-events"; - private static final String VARIABLE_EVENTS_TOPIC = "kogito-variables-events"; private static final int KOGITO_PORT = 8080; private static final int KAFKA_PORT = 9092; private static final int DEBEZIUM_PORT = 8083; - @Container + //@Container private static DockerComposeContainer COMPOSE; private int kogitoPort; @@ -69,33 +65,33 @@ public class OutboxIT { private KafkaTestClient kafkaClient; static { - Path path = Paths.get("../../docker-compose.yml"); - if (!path.toFile().exists()) { - path = Paths.get("docker-compose.yml"); - } - COMPOSE = new DockerComposeContainer(path.toFile()); - COMPOSE.withPull(false); - COMPOSE.withServices("kafka", "mongodb", "connect", "sidecar", "kogito"); - COMPOSE.withExposedService("kogito", KOGITO_PORT); - COMPOSE.withExposedService("kafka", KAFKA_PORT); - COMPOSE.withExposedService("connect", DEBEZIUM_PORT); - COMPOSE.withLogConsumer("kafka", logger()); - COMPOSE.withLogConsumer("connect", logger()); - COMPOSE.withLogConsumer("sidecar", logger()); - COMPOSE.withLogConsumer("kogito", logger()); - COMPOSE.waitingFor("kafka", Wait.forListeningPort()); - COMPOSE.waitingFor("sidecar", Wait.forListeningPort()); - COMPOSE.waitingFor("kogito", Wait.forListeningPort()); - COMPOSE.withLocalCompose(true); - //See https://github.com/testcontainers/testcontainers-java/issues/4565 - COMPOSE.withOptions("--compatibility"); + // Path path = Paths.get("../../docker-compose.yml"); + // if (!path.toFile().exists()) { + // path = Paths.get("docker-compose.yml"); + // } + // COMPOSE = new DockerComposeContainer(path.toFile()); + // COMPOSE.withPull(false); + // COMPOSE.withServices("kafka", "mongodb", "connect", "sidecar", "kogito"); + // COMPOSE.withExposedService("kogito", KOGITO_PORT); + // COMPOSE.withExposedService("kafka", KAFKA_PORT); + // COMPOSE.withExposedService("connect", DEBEZIUM_PORT); + // COMPOSE.withLogConsumer("kafka", logger()); + // COMPOSE.withLogConsumer("connect", logger()); + // COMPOSE.withLogConsumer("sidecar", logger()); + // COMPOSE.withLogConsumer("kogito", logger()); + // COMPOSE.waitingFor("kafka", Wait.forListeningPort()); + // COMPOSE.waitingFor("sidecar", Wait.forListeningPort()); + // COMPOSE.waitingFor("kogito", Wait.forListeningPort()); + // COMPOSE.withLocalCompose(true); + // //See https://github.com/testcontainers/testcontainers-java/issues/4565 + // COMPOSE.withOptions("--compatibility"); } private static Consumer logger() { return new Slf4jLogConsumer(LOGGER); } - @BeforeEach + //@BeforeEach void setup() { kogitoPort = COMPOSE.getServicePort("kogito", KOGITO_PORT); debeziumPort = COMPOSE.getServicePort("connect", DEBEZIUM_PORT); @@ -103,7 +99,7 @@ void setup() { kafkaClient = new KafkaTestClient("localhost:" + kafkaPort); } - @AfterEach + //@AfterEach void close() { if (kafkaClient != null) { kafkaClient.shutdown(); @@ -111,6 +107,7 @@ void close() { } @Test + @Disabled public void testSendProcessEvents() throws InterruptedException { // Check Debezium (Kafka, MongoDB) readiness await().ignoreExceptions() @@ -153,18 +150,25 @@ public void testSendProcessEvents() throws InterruptedException { CountDownLatch processEventCounter = new CountDownLatch(2); CountDownLatch userTaskEventCounter = new CountDownLatch(1); kafkaClient.consume(Set.of(PROCESS_EVENTS_TOPIC, USERTASK_EVENTS_TOPIC), message -> { + LOGGER.info("ProcessInstanceVariableDataEvent: {}", message); String type = JsonPath.read(message, "$.type"); - if ("ProcessInstanceEvent".equals(type)) { - String orderNumber = JsonPath.read(message, "$.data.variables.order.orderNumber"); - boolean shipped = JsonPath.read(message, "$.data.variables.order.shipped"); - if ("23570".equals(orderNumber) && !shipped) { - processEventCounter.countDown(); + if ("ProcessInstanceVariableDataEvent".equals(type)) { + String varName = JsonPath.read(message, "$.data.variableName"); + if ("order".equals(varName)) { + String orderNumber = JsonPath.read(message, "$.data.variableValue.orderNumber"); + boolean shipped = JsonPath.read(message, "$.data.variableValue.shipped"); + if ("23570".equals(orderNumber) && !shipped) { + processEventCounter.countDown(); + } } - } else if ("UserTaskInstanceEvent".equals(type)) { - String orderNumber = JsonPath.read(message, "$.data.inputs.input1.orderNumber"); - boolean shipped = JsonPath.read(message, "$.data.inputs.input1.shipped"); - if ("23570".equals(orderNumber) && !shipped) { - userTaskEventCounter.countDown(); + } else if ("UserTaskInstanceVariableDataEvent".equals(type)) { + String varName = JsonPath.read(message, "$.data.variableName"); + if ("input1".equals(varName)) { + String orderNumber = JsonPath.read(message, "$.data.variableValue.orderNumber"); + boolean shipped = JsonPath.read(message, "$.data.variableValue.shipped"); + if ("23570".equals(orderNumber) && !shipped) { + userTaskEventCounter.countDown(); + } } } }); @@ -192,11 +196,12 @@ public void testSendProcessEvents() throws InterruptedException { .get("/connectors/{connector}/topics") .then() .statusCode(200) - .body("kogito-connector.topics", hasSize(3)) - .body("kogito-connector.topics", hasItems(PROCESS_EVENTS_TOPIC, USERTASK_EVENTS_TOPIC, VARIABLE_EVENTS_TOPIC))); + .body("kogito-connector.topics", hasSize(2)) + .body("kogito-connector.topics", hasItems(PROCESS_EVENTS_TOPIC, USERTASK_EVENTS_TOPIC))); // Check process events pushed assertTrue(processEventCounter.await(TIMEOUT.getSeconds(), TimeUnit.SECONDS)); + assertTrue(userTaskEventCounter.await(TIMEOUT.getSeconds(), TimeUnit.SECONDS)); } } diff --git a/kogito-quarkus-examples/process-performance-client/pom.xml b/kogito-quarkus-examples/process-performance-client/pom.xml index 99cf83fa06..28f21b8d57 100755 --- a/kogito-quarkus-examples/process-performance-client/pom.xml +++ b/kogito-quarkus-examples/process-performance-client/pom.xml @@ -1,4 +1,24 @@ + org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-performance-client Kogito Example :: Client Performance test Client Performance test - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT diff --git a/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/AsyncRestDispatcher.java b/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/AsyncRestDispatcher.java index 565e46f314..5d5101a232 100644 --- a/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/AsyncRestDispatcher.java +++ b/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/AsyncRestDispatcher.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.performance.client; diff --git a/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/KafkaDispatcher.java b/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/KafkaDispatcher.java index 39d0a1e490..119cdc3f40 100644 --- a/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/KafkaDispatcher.java +++ b/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/KafkaDispatcher.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.performance.client; @@ -23,7 +26,7 @@ import org.apache.kafka.clients.producer.ProducerConfig; import org.apache.kafka.clients.producer.ProducerRecord; import org.apache.kafka.common.serialization.ByteArraySerializer; -import org.kie.kogito.event.process.ProcessDataEvent; +import org.kie.kogito.event.process.ProcessInstanceDataEvent; import org.kie.kogito.jackson.utils.ObjectMapperFactory; import com.fasterxml.jackson.core.JsonProcessingException; @@ -31,7 +34,7 @@ public class KafkaDispatcher implements RequestDispatcher { - private class ObjectCloudEvent extends ProcessDataEvent { + private class ObjectCloudEvent extends ProcessInstanceDataEvent { public ObjectCloudEvent(String trigger, Object data) { super(trigger, "java_client", data, null, null, null, null, null, null, null, null, null, null, null); } diff --git a/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/MainRunner.java b/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/MainRunner.java index 988d2ead25..b7aec37e7c 100644 --- a/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/MainRunner.java +++ b/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/MainRunner.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.performance.client; import org.kie.kogito.performance.client.RequestDispatcherFactory.RequestType; diff --git a/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/RequestDispatcher.java b/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/RequestDispatcher.java index 1bdabe1066..88ed81b791 100644 --- a/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/RequestDispatcher.java +++ b/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/RequestDispatcher.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.performance.client; diff --git a/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/RequestDispatcherFactory.java b/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/RequestDispatcherFactory.java index 72b0f04ad0..9488656115 100644 --- a/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/RequestDispatcherFactory.java +++ b/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/RequestDispatcherFactory.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.performance.client; diff --git a/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/RequestDispatcherRunner.java b/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/RequestDispatcherRunner.java index ec74239016..d506701f4f 100644 --- a/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/RequestDispatcherRunner.java +++ b/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/RequestDispatcherRunner.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.performance.client; diff --git a/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/SyncRestDispatcher.java b/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/SyncRestDispatcher.java index 9f6728e852..6549a3f45f 100644 --- a/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/SyncRestDispatcher.java +++ b/kogito-quarkus-examples/process-performance-client/src/main/java/org/kie/kogito/performance/client/SyncRestDispatcher.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.performance.client; diff --git a/kogito-quarkus-examples/process-performance-quarkus/README.md b/kogito-quarkus-examples/process-performance-quarkus/README.md index f36be8e99c..22a9e68b4f 100644 --- a/kogito-quarkus-examples/process-performance-quarkus/README.md +++ b/kogito-quarkus-examples/process-performance-quarkus/README.md @@ -18,9 +18,9 @@ Kafka cluster installed and available over the network. Refer to [Kafka Apache s ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed - Apache Kafka When using native image compilation, you will also need: @@ -49,6 +49,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ``` diff --git a/kogito-quarkus-examples/process-performance-quarkus/pom.xml b/kogito-quarkus-examples/process-performance-quarkus/pom.xml index 0d527b4389..7d3a7372e8 100755 --- a/kogito-quarkus-examples/process-performance-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-performance-quarkus/pom.xml @@ -1,4 +1,24 @@ + org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-performance-quarkus Kogito Example :: Quarkus Performance test Quarkus Performance test - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -46,12 +66,12 @@ quarkus-smallrye-reactive-messaging-kafka - org.kie.kogito - kogito-addons-quarkus-messaging + org.kie + kie-addons-quarkus-messaging - org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus io.quarkus diff --git a/kogito-quarkus-examples/process-performance-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-performance-quarkus/src/main/resources/application.properties index c42c416f8a..5eef106144 100644 --- a/kogito-quarkus-examples/process-performance-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-performance-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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/README.md b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/README.md index efe0b3d683..c6d3111ba0 100644 --- a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/README.md +++ b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/README.md @@ -59,7 +59,7 @@ It utilizes PostgreSQL server as the backend store. This quickstart requires a PostgreSQL server to be available with a database, a user and credentials already created , these configurations should then be set in the data source URL parameter in [applications.properties](src/main/resources/application.properties) file with the key - `quarkus.datasource.reactive.url`, i.e `quarkus.datasource.reactive.url=postgresql://localhost:5432/kogito` here are the [full settings for URI](https://quarkus.io/guides/reactive-sql-clients#reactive-datasource) + `quarkus.datasource.jdbc.url`, i.e `quarkus.datasource.jdbc.url=postgresql://localhost:5432/kogito`. You must set the property `kogito.persistence.type=postgresql` to enable PostgreSQL persistence. There is also a configuration to allow the application to run DDL scripts during the initialization, which you can enable with the @@ -83,9 +83,9 @@ Optionally and for convenience, a docker-compose [configuration file](docker-com ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - GraalVM 19.3+ installed @@ -134,6 +134,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ```sh diff --git a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/docker-compose/docker-compose.yml b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/docker-compose/docker-compose.yml index e8e8636aaa..4aa58ffa91 100644 --- a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/docker-compose/docker-compose.yml +++ b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/docker-compose/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/kogito-quarkus-examples/process-postgresql-persistence-quarkus/docker-compose/sql/init.sql b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/docker-compose/sql/init.sql index 5b483ec23d..8cfbe001cd 100644 --- a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/docker-compose/sql/init.sql +++ b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/docker-compose/sql/init.sql @@ -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. +-- + CREATE ROLE "kogito-user" WITH LOGIN SUPERUSER diff --git a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/pom.xml b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/pom.xml index 9068e217f4..ffde991ac4 100644 --- a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/pom.xml @@ -1,4 +1,24 @@ + org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-postgresql-persistence-quarkus @@ -16,14 +36,14 @@ Kogito Example :: Process PostgreSQL Persistence Quarkus Process with PostgreSQL persistence - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -53,12 +73,12 @@ quarkus-resteasy-jackson - org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus - org.kie.kogito - kogito-addons-quarkus-persistence-jdbc + org.kie + kie-addons-quarkus-persistence-jdbc io.quarkus @@ -114,8 +134,8 @@ - org.kie.kogito - kogito-addons-quarkus-events-process + org.kie + kie-addons-quarkus-events-process io.quarkus diff --git a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/main/docker/Dockerfile.jvm b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/main/docker/Dockerfile.jvm index f58feb9b3f..7360bca354 100644 --- a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/main/docker/Dockerfile.jvm +++ b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/main/docker/Dockerfile.jvm @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/process-postgresql-persistence-quarkus-jvm # ### -FROM fabric8/java-alpine-openjdk11-jre +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.20 ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV AB_ENABLED=jmx_exporter @@ -23,4 +23,4 @@ COPY target/quarkus-app/*.jar /deployments/ COPY target/quarkus-app/app/ /deployments/app/ COPY target/quarkus-app/quarkus/ /deployments/quarkus/ -ENTRYPOINT [ "/deployments/run-java.sh" ] \ No newline at end of file +ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/main/docker/Dockerfile.native b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/main/docker/Dockerfile.native index 7e40ad5732..4320540157 100644 --- a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/main/docker/Dockerfile.native +++ b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/main/docker/Dockerfile.native @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/process-postgresql-persistence-quarkus # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.4 WORKDIR /work/ COPY target/*-runner /work/application RUN chmod 775 /work diff --git a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/main/java/org/acme/deals/Address.java b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/main/java/org/acme/deals/Address.java index 0c3c0fa8c3..a00e02099e 100644 --- a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/main/java/org/acme/deals/Address.java +++ b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/main/java/org/acme/deals/Address.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.acme.deals; diff --git a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/main/java/org/acme/deals/Traveller.java b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/main/java/org/acme/deals/Traveller.java index 02e90894b3..d0473a11d7 100644 --- a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/main/java/org/acme/deals/Traveller.java +++ b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/main/java/org/acme/deals/Traveller.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.acme.deals; diff --git a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/main/resources/application.properties index c6ad517bde..8919fc3679 100644 --- a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/main/resources/application.properties @@ -1,22 +1,27 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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.swagger-ui.always-include=true kogito.persistence.type=jdbc quarkus.datasource.db-kind=postgresql -#quarkus.datasource.username=postgres -#quarkus.datasource.password=changeme -#quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/jdbc_test +%prod.quarkus.datasource.username=kogito-user +%prod.quarkus.datasource.password=kogito-pass +%prod.quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/kogito quarkus.flyway.migrate-at-start=true - -kafka.bootstrap.servers=localhost:9092 - -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-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 diff --git a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/test/java/org/acme/deals/DealsRestIT.java b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/test/java/org/acme/deals/DealsRestIT.java index 7030aad124..4b846116a9 100644 --- a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/test/java/org/acme/deals/DealsRestIT.java +++ b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/test/java/org/acme/deals/DealsRestIT.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.acme.deals; @@ -39,7 +42,7 @@ public void testDealsRest() { // test getting the created deal given().accept(ContentType.JSON) .when().get("/deals") - .then().log().ifValidationFails().statusCode(200).body("$.size()", is(1), "[0].id", is(dealId)); + .then().log().ifValidationFails().statusCode(200).body("size()", is(1), "[0].id", is(dealId)); // test getting order by id given().accept(ContentType.JSON) @@ -49,12 +52,12 @@ public void testDealsRest() { // get deals for review String dealReviewId = given().accept(ContentType.JSON) .when().get("/dealreviews") - .then().log().ifValidationFails().statusCode(200).body("$.size()", is(1)).body("[0].id", notNullValue()).extract().path("[0].id"); + .then().log().ifValidationFails().statusCode(200).body("size()", is(1)).body("[0].id", notNullValue()).extract().path("[0].id"); // get task for john String taskId = given().accept(ContentType.JSON) .when().get("/dealreviews/{uuid}/tasks?user=john", dealReviewId) - .then().log().ifValidationFails().statusCode(200).body("$.size()", is(1)).extract().path("[0].id"); + .then().log().ifValidationFails().statusCode(200).body("size()", is(1)).extract().path("[0].id"); // complete review task given().contentType(ContentType.JSON).accept(ContentType.JSON).body("{\"review\" : \"very good work\"}") @@ -64,11 +67,11 @@ public void testDealsRest() { //verify no deals to review given().accept(ContentType.JSON) .when().get("/dealreviews") - .then().log().ifValidationFails().statusCode(200).body("$.size()", is(0)); + .then().log().ifValidationFails().statusCode(200).body("size()", is(0)); //verify no deals given().accept(ContentType.JSON) .when().get("/deals") - .then().log().ifValidationFails().statusCode(200).body("$.size()", is(0)); + .then().log().ifValidationFails().statusCode(200).body("size()", is(0)); } } diff --git a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/test/resources/application.properties index 5d1e4e73b7..a0cab1c395 100644 --- a/kogito-quarkus-examples/process-postgresql-persistence-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/process-postgresql-persistence-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.http.test-port=0 quarkus.log.console.enable=true diff --git a/kogito-quarkus-examples/process-quarkus-example/README.md b/kogito-quarkus-examples/process-quarkus-example/README.md index 44c0e70b67..d03a817ac4 100644 --- a/kogito-quarkus-examples/process-quarkus-example/README.md +++ b/kogito-quarkus-examples/process-quarkus-example/README.md @@ -13,9 +13,9 @@ Based on these two processes (defined using BPMN 2.0 format), the custom data ob ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVM 19.1.1](https://github.com/oracle/graal/releases/tag/vm-19.1.1) installed @@ -43,6 +43,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ``` @@ -292,7 +297,3 @@ Example response: } } ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-quarkus-examples/process-quarkus-example/operator/process-quarkus-example.yaml b/kogito-quarkus-examples/process-quarkus-example/operator/process-quarkus-example.yaml deleted file mode 100644 index fb08685d5c..0000000000 --- a/kogito-quarkus-examples/process-quarkus-example/operator/process-quarkus-example.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-quarkus-example -spec: - type: RemoteSource - gitSource: - contextDir: kogito-quarkus-examples/process-quarkus-example - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: -#uncomment to enable persistence -#--- -##Infinispan operator should be pre-installed in namespace -#apiVersion: app.kiegroup.org/v1beta1 -#kind: KogitoInfra -#metadata: -# name: kogito-infinispan-infra -#spec: -# resource: -# apiVersion: infinispan.org/v1 -# kind: Infinispan ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-quarkus-example -# uncomment to enable persistence -#spec: -# infra: -# - kogito-infinispan-infra - #env: - # - name: MAVEN_ARGS_APPEND - # value: "-Ppersistence" \ No newline at end of file diff --git a/kogito-quarkus-examples/process-quarkus-example/pom.xml b/kogito-quarkus-examples/process-quarkus-example/pom.xml index 828f07f1fd..0719935798 100755 --- a/kogito-quarkus-examples/process-quarkus-example/pom.xml +++ b/kogito-quarkus-examples/process-quarkus-example/pom.xml @@ -1,24 +1,44 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-quarkus-example Kogito Example :: Process and Quarkus Order management service - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -40,12 +60,12 @@ - org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus - org.kie.kogito - kogito-addons-quarkus-process-management + org.kie + kie-addons-quarkus-process-management io.quarkus @@ -114,8 +134,8 @@ - org.kie.kogito - kogito-addons-quarkus-persistence-infinispan + org.kie + kie-addons-quarkus-persistence-infinispan @@ -143,8 +163,8 @@ - org.kie.kogito - kogito-addons-quarkus-events-process + org.kie + kie-addons-quarkus-events-process io.quarkus diff --git a/kogito-quarkus-examples/process-quarkus-example/src/main/java/org/kie/kogito/examples/CalculationService.java b/kogito-quarkus-examples/process-quarkus-example/src/main/java/org/kie/kogito/examples/CalculationService.java index bf28039f05..6424974f44 100644 --- a/kogito-quarkus-examples/process-quarkus-example/src/main/java/org/kie/kogito/examples/CalculationService.java +++ b/kogito-quarkus-examples/process-quarkus-example/src/main/java/org/kie/kogito/examples/CalculationService.java @@ -1,26 +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.examples; import java.util.Random; -import javax.enterprise.context.ApplicationScoped; - import org.kie.kogito.examples.demo.Order; +import jakarta.enterprise.context.ApplicationScoped; + @ApplicationScoped public class CalculationService { diff --git a/kogito-quarkus-examples/process-quarkus-example/src/main/java/org/kie/kogito/examples/PersonValidationService.java b/kogito-quarkus-examples/process-quarkus-example/src/main/java/org/kie/kogito/examples/PersonValidationService.java index 1601506f70..022478f873 100644 --- a/kogito-quarkus-examples/process-quarkus-example/src/main/java/org/kie/kogito/examples/PersonValidationService.java +++ b/kogito-quarkus-examples/process-quarkus-example/src/main/java/org/kie/kogito/examples/PersonValidationService.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.examples; diff --git a/kogito-quarkus-examples/process-quarkus-example/src/main/java/org/kie/kogito/examples/demo/Order.java b/kogito-quarkus-examples/process-quarkus-example/src/main/java/org/kie/kogito/examples/demo/Order.java index de8b4fb8f2..d3770e78cf 100755 --- a/kogito-quarkus-examples/process-quarkus-example/src/main/java/org/kie/kogito/examples/demo/Order.java +++ b/kogito-quarkus-examples/process-quarkus-example/src/main/java/org/kie/kogito/examples/demo/Order.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.examples.demo; diff --git a/kogito-quarkus-examples/process-quarkus-example/src/main/java/org/kie/kogito/examples/demo/Person.java b/kogito-quarkus-examples/process-quarkus-example/src/main/java/org/kie/kogito/examples/demo/Person.java index 4ce2cb03d7..92aa205134 100644 --- a/kogito-quarkus-examples/process-quarkus-example/src/main/java/org/kie/kogito/examples/demo/Person.java +++ b/kogito-quarkus-examples/process-quarkus-example/src/main/java/org/kie/kogito/examples/demo/Person.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.examples.demo; diff --git a/kogito-quarkus-examples/process-quarkus-example/src/main/resources/META-INF/kmodule.xml b/kogito-quarkus-examples/process-quarkus-example/src/main/resources/META-INF/kmodule.xml index 2ba4076c16..41665a75bb 100755 --- a/kogito-quarkus-examples/process-quarkus-example/src/main/resources/META-INF/kmodule.xml +++ b/kogito-quarkus-examples/process-quarkus-example/src/main/resources/META-INF/kmodule.xml @@ -1 +1,21 @@ + \ No newline at end of file diff --git a/kogito-quarkus-examples/process-quarkus-example/src/main/resources/application.properties b/kogito-quarkus-examples/process-quarkus-example/src/main/resources/application.properties index 899e5a43b4..58d33b2d1a 100644 --- a/kogito-quarkus-examples/process-quarkus-example/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-quarkus-example/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. +# + # Packaging # quarkus.package.type=fast-jar @@ -18,4 +37,8 @@ mp.messaging.outgoing.kogito-usertaskinstances-events.value.serializer=org.apach 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 \ No newline at end of file +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 diff --git a/kogito-quarkus-examples/process-quarkus-example/src/main/resources/org/kie/kogito/examples/PersonValidationService.drl b/kogito-quarkus-examples/process-quarkus-example/src/main/resources/org/kie/kogito/examples/PersonValidationService.drl index c78f0bc31b..9d0fdc6ce1 100644 --- a/kogito-quarkus-examples/process-quarkus-example/src/main/resources/org/kie/kogito/examples/PersonValidationService.drl +++ b/kogito-quarkus-examples/process-quarkus-example/src/main/resources/org/kie/kogito/examples/PersonValidationService.drl @@ -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.examples unit PersonValidationService diff --git a/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/OrdersProcessIT.java b/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/OrdersProcessIT.java index 55a9515e73..b2c49bc78d 100644 --- a/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/OrdersProcessIT.java +++ b/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/OrdersProcessIT.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.examples; @@ -21,9 +24,6 @@ import java.util.Map; import java.util.Optional; -import javax.inject.Inject; -import javax.inject.Named; - import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.kie.kogito.Model; @@ -40,6 +40,9 @@ import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/OrdersRestIT.java b/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/OrdersRestIT.java index a6c91f37bb..682b0132d2 100644 --- a/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/OrdersRestIT.java +++ b/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/OrdersRestIT.java @@ -1,23 +1,23 @@ /* - * 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.examples; -import javax.inject.Inject; -import javax.inject.Named; - import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.kie.kogito.Model; @@ -29,6 +29,9 @@ import io.quarkus.test.junit.QuarkusTest; import io.restassured.http.ContentType; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import static io.restassured.RestAssured.given; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.is; @@ -74,7 +77,7 @@ public void testOrdersRest() { // test getting the created order given().accept(ContentType.JSON).when().get("/orders").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId)); + .body("size()", is(1), "[0].id", is(firstCreatedId)); // test getting order by id given() @@ -112,7 +115,7 @@ public void testOrdersRest() { .get("/orders") .then() .statusCode(200) - .body("$.size()", is(1), "[0].id", is(secondCreatedId)); + .body("size()", is(1), "[0].id", is(secondCreatedId)); // delete second before finishing given() @@ -128,7 +131,7 @@ public void testOrdersRest() { .get("/orders") .then() .statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } @Test @@ -150,7 +153,7 @@ public void testOrdersWithErrorRest() { // test getting the created order given().accept(ContentType.JSON).when().get("/orders").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId)); + .body("size()", is(1), "[0].id", is(firstCreatedId)); // test retrieving error info using process management addon given().accept(ContentType.JSON).when().get("/management/processes/demo.orders/instances/" + firstCreatedId + "/error").then() @@ -171,7 +174,7 @@ public void testOrdersWithErrorRest() { given().accept(ContentType.JSON).when().delete("/orders/" + firstCreatedId).then().statusCode(200); // get all orders make sure there is zero given().accept(ContentType.JSON).when().get("/orders").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } @Test @@ -185,7 +188,7 @@ public void testOrdersWithOrderItemsRest() { // test getting the created order given().accept(ContentType.JSON).when().get("/orders").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId)); + .body("size()", is(1), "[0].id", is(firstCreatedId)); // test getting order by id given().accept(ContentType.JSON).when().get("/orders/" + firstCreatedId).then() @@ -193,7 +196,7 @@ public void testOrdersWithOrderItemsRest() { // test getting order items subprocess String orderItemsId = given().accept(ContentType.JSON).when().get("/orderItems").then().statusCode(200) - .body("$.size()", is(1)).extract().path("[0].id"); + .body("size()", is(1)).extract().path("[0].id"); // test getting order items by id given().accept(ContentType.JSON).when().get("/orderItems/" + orderItemsId).then() @@ -206,7 +209,7 @@ public void testOrdersWithOrderItemsRest() { .get("/orderItems/" + orderItemsId + "/tasks?user=john") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("Verify order")) .extract() .path("[0].id"); @@ -225,11 +228,11 @@ public void testOrdersWithOrderItemsRest() { // get all orders make sure there is zero given().accept(ContentType.JSON).when().get("/orders").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); // get all order items make sure there is zero given().accept(ContentType.JSON).when().get("/orderItems").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } @Test @@ -243,7 +246,7 @@ public void testOrdersWithOrderItemsAbortedRest() { // test getting the created order given().accept(ContentType.JSON).when().get("/orders").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId)); + .body("size()", is(1), "[0].id", is(firstCreatedId)); // test getting order by id given().accept(ContentType.JSON).when().get("/orders/" + firstCreatedId).then() @@ -251,7 +254,7 @@ public void testOrdersWithOrderItemsAbortedRest() { // test getting order items subprocess String orderItemsId = given().accept(ContentType.JSON).when().get("/orderItems?businessKey=ORD-0001").then().statusCode(200) - .body("$.size()", is(1)).extract().path("[0].id"); + .body("size()", is(1)).extract().path("[0].id"); // test getting order items by id given().accept(ContentType.JSON).when().get("/orderItems/" + orderItemsId).then() @@ -264,7 +267,7 @@ public void testOrdersWithOrderItemsAbortedRest() { .get("/orderItems/" + orderItemsId + "/tasks?user=john") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("Verify order")); // test deleting order items @@ -272,11 +275,11 @@ public void testOrdersWithOrderItemsAbortedRest() { // get all orders make sure there is zero given().accept(ContentType.JSON).when().get("/orders").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); // get all order items make sure there is zero given().accept(ContentType.JSON).when().get("/orderItems").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } @Test @@ -290,7 +293,7 @@ public void testCreateAndUpdateOrders() { assertNotNull(id); // get all orders make sure there is one given().accept(ContentType.JSON).when().get("/orders").then().statusCode(200) - .body("$.size()", is(1)); + .body("size()", is(1)); // get order by its custom ID and test given().accept(ContentType.JSON).body(orderPayload).when().get("/orders/{id}", id).then() @@ -307,13 +310,13 @@ public void testCreateAndUpdateOrders() { // get all orders make sure there is one given().accept(ContentType.JSON).when().get("/orders").then().statusCode(200) - .body("$.size()", is(1)); + .body("size()", is(1)); // test deleting order items by custom ID given().accept(ContentType.JSON).when().delete("/orders/{id}", id).then().statusCode(200); // get all orders make sure there is zero given().accept(ContentType.JSON).when().get("/orders").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } } diff --git a/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/PersonProcessIT.java b/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/PersonProcessIT.java index bf8bec9a80..d58c87c501 100644 --- a/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/PersonProcessIT.java +++ b/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/PersonProcessIT.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.examples; @@ -20,9 +23,6 @@ import java.util.List; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; - import org.junit.jupiter.api.Test; import org.kie.kogito.Model; import org.kie.kogito.auth.IdentityProviders; @@ -37,6 +37,9 @@ import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; diff --git a/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/PersonsRestIT.java b/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/PersonsRestIT.java index 3dece4add2..011eba9786 100644 --- a/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/PersonsRestIT.java +++ b/kogito-quarkus-examples/process-quarkus-example/src/test/java/org/kie/kogito/examples/PersonsRestIT.java @@ -1,23 +1,23 @@ /* - * 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.examples; -import javax.inject.Inject; -import javax.inject.Named; - import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.DisabledIfSystemProperty; @@ -30,6 +30,9 @@ import io.quarkus.test.junit.QuarkusTest; import io.restassured.http.ContentType; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import static io.restassured.RestAssured.given; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; @@ -65,7 +68,7 @@ public void testAdultPersonsRest() { // get all persons make sure there is zero given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } @Test @@ -79,7 +82,7 @@ public void testChildPersonsRest() { // test getting the created order given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId)); + .body("size()", is(1), "[0].id", is(firstCreatedId)); // test getting task String taskId = given() @@ -88,7 +91,7 @@ public void testChildPersonsRest() { .get("/persons/" + firstCreatedId + "/tasks?user=admin") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("ChildrenHandling")) .extract() .path("[0].id"); @@ -105,7 +108,7 @@ public void testChildPersonsRest() { // get all persons make sure there is zero given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } @Test @@ -119,7 +122,7 @@ public void testChildPersonsRestWithSecurityPolicy() { // test getting the created order given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId)); + .body("size()", is(1), "[0].id", is(firstCreatedId)); // test getting task String taskInfo = given() @@ -128,7 +131,7 @@ public void testChildPersonsRestWithSecurityPolicy() { .get("/persons/" + firstCreatedId + "/tasks?user=admin") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("ChildrenHandling")) .extract() .path("[0].id"); @@ -146,7 +149,7 @@ public void testChildPersonsRestWithSecurityPolicy() { // get all persons make sure there is zero given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } @Test @@ -160,7 +163,7 @@ public void testChildPersonsRestWithSecurityPolicyNotAuthorized() { // test getting the created order given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId)); + .body("size()", is(1), "[0].id", is(firstCreatedId)); // test getting task with wrong user given() @@ -169,7 +172,7 @@ public void testChildPersonsRestWithSecurityPolicyNotAuthorized() { .get("/persons/" + firstCreatedId + "/tasks?user=john") .then() .statusCode(200) - .body("$.size", is(0)); + .body("size()", is(0)); String taskInfo = given() .accept(ContentType.JSON) @@ -177,7 +180,7 @@ public void testChildPersonsRestWithSecurityPolicyNotAuthorized() { .get("/persons/" + firstCreatedId + "/tasks?user=admin") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("ChildrenHandling")) .extract() .path("[0].id"); @@ -206,7 +209,7 @@ public void testChildPersonsRestWithSecurityPolicyNotAuthorized() { // get all persons make sure there is zero given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } @Test @@ -220,7 +223,7 @@ public void testChildPersonsRestWithSecurityPolicyAndLifeCycles() { // test getting the created order given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId)); + .body("size()", is(1), "[0].id", is(firstCreatedId)); // test getting task String taskId = given() @@ -229,7 +232,7 @@ public void testChildPersonsRestWithSecurityPolicyAndLifeCycles() { .get("/persons/" + firstCreatedId + "/tasks?user=admin") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("ChildrenHandling")) .extract() .path("[0].id"); @@ -249,7 +252,7 @@ public void testChildPersonsRestWithSecurityPolicyAndLifeCycles() { // get all persons make sure there is zero given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } // Disabled until KOGITO-1787 is fixed @@ -269,7 +272,7 @@ public void testPersonsRestStartFromUserTask() { // test getting the created order given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId), "[0].person.adult", is(false)); + .body("size()", is(1), "[0].id", is(firstCreatedId), "[0].person.adult", is(false)); // test getting task String taskInfo = given() @@ -278,7 +281,7 @@ public void testPersonsRestStartFromUserTask() { .get("/persons/" + firstCreatedId + "/tasks?user=admin") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("ChildrenHandling")) .extract() .path("[0].id"); @@ -296,7 +299,7 @@ public void testPersonsRestStartFromUserTask() { // get all persons make sure there is zero given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } @Test @@ -313,7 +316,7 @@ public void testChildPersonsRestAbortViaMgmtInterface() { // test getting the created order given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId), "[0].person.adult", is(false)); + .body("size()", is(1), "[0].id", is(firstCreatedId), "[0].person.adult", is(false)); // test getting task given() @@ -322,7 +325,7 @@ public void testChildPersonsRestAbortViaMgmtInterface() { .get("/persons/" + firstCreatedId + "/tasks?user=admin") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("ChildrenHandling")) .extract() .path("[0].id"); @@ -333,7 +336,7 @@ public void testChildPersonsRestAbortViaMgmtInterface() { // get all persons make sure there is zero given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } @Test @@ -350,7 +353,7 @@ public void testChildPersonsRestRetriggerNodeViaMgmtInterface() { // test getting the created order given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId), "[0].person.adult", is(false)); + .body("size()", is(1), "[0].id", is(firstCreatedId), "[0].person.adult", is(false)); // test getting task String taskInfo = given() @@ -359,13 +362,13 @@ public void testChildPersonsRestRetriggerNodeViaMgmtInterface() { .get("/persons/" + firstCreatedId + "/tasks?user=admin") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("ChildrenHandling")) .extract() .path("[0].id"); String nodeInstanceId = given().contentType(ContentType.JSON).accept(ContentType.JSON).when().get("/management/processes/persons/instances/" + firstCreatedId + "/nodeInstances").then() - .statusCode(200).body("$.size()", is(1)).extract().path("[0].nodeInstanceId"); + .statusCode(200).body("size()", is(1)).extract().path("[0].nodeInstanceId"); // retrigger node instance via management interface given().contentType(ContentType.JSON).accept(ContentType.JSON).when().post("/management/processes/persons/instances/" + firstCreatedId + "/nodeInstances/" + nodeInstanceId).then() @@ -373,13 +376,13 @@ public void testChildPersonsRestRetriggerNodeViaMgmtInterface() { taskInfo = given().accept(ContentType.JSON).when().get("/persons/" + firstCreatedId + "/tasks?user=admin").then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .extract() .path("[0].id"); String retriggeredNodeInstanceId = given().contentType(ContentType.JSON).accept(ContentType.JSON).when().get("/management/processes/persons/instances/" + firstCreatedId + "/nodeInstances").then() - .statusCode(200).body("$.size()", is(1)).extract().path("[0].nodeInstanceId"); + .statusCode(200).body("size()", is(1)).extract().path("[0].nodeInstanceId"); // since node instance was retriggered it must have different ids assertNotEquals(nodeInstanceId, retriggeredNodeInstanceId); @@ -396,7 +399,7 @@ public void testChildPersonsRestRetriggerNodeViaMgmtInterface() { // get all persons make sure there is zero given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } @Test @@ -413,7 +416,7 @@ public void testChildPersonsRestCancelAndTriggerNodeViaMgmtInterface() { // test getting the created order given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId), "[0].person.adult", is(false)); + .body("size()", is(1), "[0].id", is(firstCreatedId), "[0].person.adult", is(false)); // test getting task String taskInfo = given() @@ -422,13 +425,13 @@ public void testChildPersonsRestCancelAndTriggerNodeViaMgmtInterface() { .get("/persons/" + firstCreatedId + "/tasks?user=admin") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("ChildrenHandling")) .extract() .path("[0].id"); String nodeInstanceId = given().contentType(ContentType.JSON).accept(ContentType.JSON).when().get("/management/processes/persons/instances/" + firstCreatedId + "/nodeInstances").then() - .statusCode(200).body("$.size()", is(1)).extract().path("[0].nodeInstanceId"); + .statusCode(200).body("size()", is(1)).extract().path("[0].nodeInstanceId"); // cancel node instance given().contentType(ContentType.JSON).accept(ContentType.JSON).when().delete("/management/processes/persons/instances/" + firstCreatedId + "/nodeInstances/" + nodeInstanceId).then() @@ -440,13 +443,13 @@ public void testChildPersonsRestCancelAndTriggerNodeViaMgmtInterface() { taskInfo = given().accept(ContentType.JSON).when().get("/persons/" + firstCreatedId + "/tasks?user=admin").then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .extract() .path("[0].id"); String retriggeredNodeInstanceId = given().contentType(ContentType.JSON).accept(ContentType.JSON).when().get("/management/processes/persons/instances/" + firstCreatedId + "/nodeInstances").then() - .statusCode(200).body("$.size()", is(1)).extract().path("[0].nodeInstanceId"); + .statusCode(200).body("size()", is(1)).extract().path("[0].nodeInstanceId"); // since node instance was retriggered it must have different ids assertNotEquals(nodeInstanceId, retriggeredNodeInstanceId); @@ -463,7 +466,7 @@ public void testChildPersonsRestCancelAndTriggerNodeViaMgmtInterface() { // get all persons make sure there is zero given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } } diff --git a/kogito-quarkus-examples/process-quarkus-example/src/test/resources/application.properties b/kogito-quarkus-examples/process-quarkus-example/src/test/resources/application.properties index 21d13b3df3..dad6fd0513 100644 --- a/kogito-quarkus-examples/process-quarkus-example/src/test/resources/application.properties +++ b/kogito-quarkus-examples/process-quarkus-example/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.http.test-port=0 @@ -11,4 +30,8 @@ mp.messaging.outgoing.kogito-usertaskinstances-events.value.serializer=org.apach 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 \ No newline at end of file +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 diff --git a/kogito-quarkus-examples/process-rest-service-call-quarkus/README.md b/kogito-quarkus-examples/process-rest-service-call-quarkus/README.md index 0a9af86068..fef23edc2f 100644 --- a/kogito-quarkus-examples/process-rest-service-call-quarkus/README.md +++ b/kogito-quarkus-examples/process-rest-service-call-quarkus/README.md @@ -48,9 +48,9 @@ during REST service invocation. ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - GraalVM 19.1+ installed @@ -80,6 +80,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ```sh @@ -144,7 +149,3 @@ After the above command nothing will show on Quarkus log as the user is skipped * Curl Log

- -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-quarkus-examples/process-rest-service-call-quarkus/operator/process-service-rest-call-quarkus.yaml b/kogito-quarkus-examples/process-rest-service-call-quarkus/operator/process-service-rest-call-quarkus.yaml deleted file mode 100644 index dc5364221a..0000000000 --- a/kogito-quarkus-examples/process-rest-service-call-quarkus/operator/process-service-rest-call-quarkus.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-service-rest-call-quarkus -spec: - type: RemoteSource - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/process-service-rest-call-quarkus - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-service-rest-call-quarkus \ No newline at end of file diff --git a/kogito-quarkus-examples/process-rest-service-call-quarkus/pom.xml b/kogito-quarkus-examples/process-rest-service-call-quarkus/pom.xml index f15c86c1ef..6b1c512bc0 100644 --- a/kogito-quarkus-examples/process-rest-service-call-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-rest-service-call-quarkus/pom.xml @@ -1,24 +1,44 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-rest-service-call-quarkus Kogito Example :: Process Service Rest Cal with Quarkus Kogito service invocation using REST - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -48,8 +68,8 @@ quarkus-resteasy-jackson
- org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus io.quarkus @@ -66,7 +86,7 @@ io.smallrye smallrye-context-propagation-propagators-rxjava2 - 1.2.2 + 2.1.0 io.quarkus diff --git a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/docker/Dockerfile.jvm b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/docker/Dockerfile.jvm index 85f68f01b2..170fb97057 100644 --- a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/docker/Dockerfile.jvm +++ b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/docker/Dockerfile.jvm @@ -7,14 +7,14 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/process-service-rest-call-quarkus-jvm . +# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/process-rest-service-call-quarkus-jvm . # # Then run the container using: # -# docker run -i --rm -p 8080:8080 quarkus/process-service-rest-call-quarkus-jvm +# docker run -i --rm -p 8080:8080 quarkus/process-rest-service-call-quarkus-jvm # ### -FROM fabric8/java-alpine-openjdk11-jre +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.20 ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV AB_ENABLED=jmx_exporter @@ -23,4 +23,4 @@ COPY target/quarkus-app/*.jar /deployments/ COPY target/quarkus-app/app/ /deployments/app/ COPY target/quarkus-app/quarkus/ /deployments/quarkus/ -ENTRYPOINT [ "/deployments/run-java.sh" ] \ No newline at end of file +ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/docker/Dockerfile.native b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/docker/Dockerfile.native index b508cbb1d3..6f9a5614d9 100644 --- a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/docker/Dockerfile.native +++ b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/docker/Dockerfile.native @@ -7,16 +7,16 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.native -t quarkus/kogito-infinispan-persistence-quarkus . +# docker build -f src/main/docker/Dockerfile.native -t quarkus/process-rest-service-call-quarkus . # # Then run the container using: # -# docker run -i --rm -p 8080:8080 quarkus/kogito-infinispan-persistence-quarkus +# docker run -i --rm -p 8080:8080 quarkus/process-rest-service-call-quarkus # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.4 WORKDIR /work/ COPY target/*-runner /work/application RUN chmod 775 /work EXPOSE 8080 -CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] \ No newline at end of file +CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] diff --git a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/quarkus/User.java b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/quarkus/User.java index 38604ad82d..0cb3cbcfa5 100644 --- a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/quarkus/User.java +++ b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/quarkus/User.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.acme.travels.quarkus; diff --git a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/rest/UsersRemoteService.java b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/rest/UsersRemoteService.java index 7fb378539d..65219a6b11 100644 --- a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/rest/UsersRemoteService.java +++ b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/rest/UsersRemoteService.java @@ -1,28 +1,31 @@ /* - * 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.acme.travels.rest; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; - import org.acme.travels.quarkus.User; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; + @Path("/v2") @RegisterRestClient public interface UsersRemoteService { diff --git a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/services/AuditService.java b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/services/AuditService.java index 8db780db9f..7585cdd9f5 100644 --- a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/services/AuditService.java +++ b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/services/AuditService.java @@ -1,26 +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.acme.travels.services; -import javax.enterprise.context.ApplicationScoped; - import org.acme.travels.quarkus.User; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.enterprise.context.ApplicationScoped; + @ApplicationScoped public class AuditService { diff --git a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/services/UserService.java b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/services/UserService.java index a6b61d8696..19e2fabbbc 100644 --- a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/services/UserService.java +++ b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/java/org/acme/travels/services/UserService.java @@ -1,28 +1,31 @@ /* - * 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.acme.travels.services; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; - import org.acme.travels.quarkus.User; import org.acme.travels.rest.UsersRemoteService; import org.eclipse.microprofile.faulttolerance.Fallback; import org.eclipse.microprofile.rest.client.inject.RestClient; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; + @ApplicationScoped public class UserService { diff --git a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/resources/META-INF/resources/index.html b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/resources/META-INF/resources/index.html deleted file mode 100644 index a965327283..0000000000 --- a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/resources/META-INF/resources/index.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - kogito-infinispan-persistence-quarkus - 1.0-SNAPSHOT - - - - - - -
-
-

Congratulations, you have created a new Quarkus application.

- -

Why do you see this?

- -

This page is served by Quarkus. The source is in - src/main/resources/META-INF/resources/index.html.

- -

What can I do from here?

- -

If not already done, run the application in dev mode using: mvn compile quarkus:dev. -

-
    -
  • Add REST resources, Servlets, functions and other services in src/main/java.
  • -
  • Your static assets are located in src/main/resources/META-INF/resources.
  • -
  • Configure your application in src/main/resources/application.properties. -
  • -
- -

How do I get rid of this page?

-

Just delete the src/main/resources/META-INF/resources/index.html file.

-
-
-
-

Application

-
    -
  • GroupId: org.acme
  • -
  • ArtifactId: kogito-infinispan-persistence-quarkus
  • -
  • Version: 1.0-SNAPSHOT
  • -
  • Quarkus Version: 0.19.1
  • -
-
- -
-
- - - - \ No newline at end of file diff --git a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/resources/application.properties index ffd8821875..d3332094ef 100644 --- a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/main/resources/application.properties @@ -1,7 +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. +# + # Packaging # quarkus.package.type=fast-jar quarkus.swagger-ui.always-include=true org.acme.travels.rest.UsersRemoteService/mp-rest/url=https://petstore.swagger.io -org.acme.travels.rest.UsersRemoteService/mp-rest/scope=javax.enterprise.context.ApplicationScoped \ No newline at end of file +org.acme.travels.rest.UsersRemoteService/mp-rest/scope=jakarta.enterprise.context.ApplicationScoped \ No newline at end of file diff --git a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/test/java/org/acme/travels/quarkus/UsersProcessTest.java b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/test/java/org/acme/travels/quarkus/UsersProcessTest.java index 9d4f229204..6375cbbb16 100644 --- a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/test/java/org/acme/travels/quarkus/UsersProcessTest.java +++ b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/test/java/org/acme/travels/quarkus/UsersProcessTest.java @@ -1,26 +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.acme.travels.quarkus; import java.util.HashMap; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; - import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.kie.kogito.Model; @@ -29,6 +29,9 @@ import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; diff --git a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/test/resources/application.properties index 232c11374a..019f9366ad 100644 --- a/kogito-quarkus-examples/process-rest-service-call-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/process-rest-service-call-quarkus/src/test/resources/application.properties @@ -1,5 +1,24 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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.http.test-port=0 org.acme.travels.rest.UsersRemoteService/mp-rest/url=https://petstore.swagger.io -org.acme.travels.rest.UsersRemoteService/mp-rest/scope=javax.enterprise.context.ApplicationScoped \ No newline at end of file +org.acme.travels.rest.UsersRemoteService/mp-rest/scope=jakarta.enterprise.context.ApplicationScoped \ No newline at end of file diff --git a/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/README.md b/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/README.md index 40ee897c75..6f2561e94c 100644 --- a/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/README.md +++ b/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/README.md @@ -2,7 +2,7 @@ ## Description -This example contains a BPMN that performs two consecutive REST invocations using [RestWorkItemHandler](https://github.com/kiegroup/kogito-runtimes/blob/main/kogito-workitems/kogito-rest-workitem/src/main/java/org/kogito/workitem/rest/RestWorkItemHandler.java), an alternative declarative approach to service programatic calls. +This example contains a BPMN that performs two consecutive REST invocations using [RestWorkItemHandler](https://github.com/apache/incubator-kie-kogito-runtimes/blob/main/kogito-workitems/kogito-rest-workitem/src/main/java/org/kogito/workitem/rest/RestWorkItemHandler.java), an alternative declarative approach to service programatic calls. Note that in order to user a WorkItem in Kogito Editor, corresponding .wid file needs to located together with the bpmn file under the same directory @@ -17,9 +17,9 @@ and returns the sum. ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVm](https://www.graalvm.org/downloads/) 20.2.0+ installed @@ -47,6 +47,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Compile and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ```text @@ -66,6 +71,7 @@ with following content ```json { + "port": 8080, "inputNumbers": { "numbers": [ 1, @@ -85,17 +91,11 @@ with following content Complete curl command can be found below: ```text -curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' -d '{"inputNumbers" : {"numbers": [1,2,3,4,5,6,7,8,7]}}' http://localhost:8080/RestExample +curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' -d '{"inputNumbers" : {"port":8080, "numbers": [1,2,3,4,5,6,7,8,7]}}' http://localhost:8080/RestExample ``` curl response will be something like this, which includes field `sum`, the result of multiplying each input number by 8 (that number might differ in your execution) and summing all of them: ```text -{"id":"8e79ac60-c0c1-40d0-808e-8d3585307661","randomNumber":8,"sum":344,"inputNumbers":{"numbers":[1,2,3,4,5,6,7,8,7]}} +{"id":"8e79ac60-c0c1-40d0-808e-8d3585307661","port":8080,"randomNumber":8,"sum":344,"inputNumbers":{"numbers":[1,2,3,4,5,6,7,8,7]}} ``` - - -``` -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/pom.xml b/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/pom.xml index a0cdb59184..f16ffce28b 100644 --- a/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/pom.xml @@ -1,24 +1,44 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-rest-workitem-multi-quarkus Kogito Example :: Process Rest :: Quarkus Invoking multiple Rest WS using RestWorkItemHandler - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -40,8 +60,8 @@ - org.kie.kogito - kogito-quarkus-processes + org.jbpm + jbpm-quarkus org.kie.kogito diff --git a/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/main/java/org/acme/numbers/Numbers.java b/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/main/java/org/acme/numbers/Numbers.java index e1793bd128..c633a5cd08 100644 --- a/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/main/java/org/acme/numbers/Numbers.java +++ b/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/main/java/org/acme/numbers/Numbers.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.acme.numbers; diff --git a/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/main/java/org/acme/numbers/NumbersResource.java b/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/main/java/org/acme/numbers/NumbersResource.java index 71dbca9bc1..728d6ebf0d 100644 --- a/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/main/java/org/acme/numbers/NumbersResource.java +++ b/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/main/java/org/acme/numbers/NumbersResource.java @@ -1,34 +1,37 @@ /* - * 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.acme.numbers; import java.util.Random; import java.util.stream.Collectors; -import javax.annotation.PostConstruct; -import javax.enterprise.context.ApplicationScoped; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.annotation.PostConstruct; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.ws.rs.DefaultValue; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; @Path("/numbers") @Produces(MediaType.APPLICATION_JSON) diff --git a/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/main/resources/application.properties index e69de29bb2..d8a500d9d8 100644 --- a/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/main/resources/application.properties @@ -0,0 +1,19 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/test/java/org/acme/numbers/NativeForRestExampleTestIT.java b/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/test/java/org/acme/numbers/NativeForRestExampleTestIT.java index 9852e8da3b..02b85fcf12 100644 --- a/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/test/java/org/acme/numbers/NativeForRestExampleTestIT.java +++ b/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/test/java/org/acme/numbers/NativeForRestExampleTestIT.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.acme.numbers; -import io.quarkus.test.junit.NativeImageTest; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@NativeImageTest +@QuarkusIntegrationTest class NativeForRestExampleTestIT extends RestExampleTestIT { } diff --git a/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/test/java/org/acme/numbers/NumbersMockService.java b/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/test/java/org/acme/numbers/NumbersMockService.java index 64f3eb7a3e..7815f2f87d 100644 --- a/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/test/java/org/acme/numbers/NumbersMockService.java +++ b/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/test/java/org/acme/numbers/NumbersMockService.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.acme.numbers; diff --git a/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/test/java/org/acme/numbers/RestExampleTestIT.java b/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/test/java/org/acme/numbers/RestExampleTestIT.java index 56473a0f0a..fe7d2b74d6 100644 --- a/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/test/java/org/acme/numbers/RestExampleTestIT.java +++ b/kogito-quarkus-examples/process-rest-workitem-multi-quarkus/src/test/java/org/acme/numbers/RestExampleTestIT.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.acme.numbers; diff --git a/kogito-quarkus-examples/process-rest-workitem-quarkus/README.md b/kogito-quarkus-examples/process-rest-workitem-quarkus/README.md index 3062033e64..6a8ffbd94a 100644 --- a/kogito-quarkus-examples/process-rest-workitem-quarkus/README.md +++ b/kogito-quarkus-examples/process-rest-workitem-quarkus/README.md @@ -5,7 +5,7 @@ A quickstart project that processes users in the system. It's main purpose is to to call external REST service to load a given user by its username. -There are two ways to invoke a rest web service in Kogito: programmatically, as shown in this other [example](https://github.com/kiegroup/kogito-examples/tree/stable/kogito-quarkus-examples/process-service-calls-quarkus) or using RestWorkItemHandler, as in this example. +There are two ways to invoke a rest web service in Kogito: programmatically, as shown in this other [example](https://github.com/apache/incubator-kie-kogito-examples/tree/stable/kogito-quarkus-examples/process-service-calls-quarkus) or using RestWorkItemHandler, as in this example. Note that in order to user a WorkItem in Kogito Editor, corresponding .wid file needs to located together with the bpmn file under the same directory @@ -52,9 +52,9 @@ during REST service invocation. ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - GraalVM 19.1+ installed @@ -84,6 +84,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ```sh @@ -148,7 +153,3 @@ After the above command nothing will show on Quarkus log as the user is skipped * Curl Log

- -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-quarkus-examples/process-rest-workitem-quarkus/operator/process-service-rest-call-quarkus.yaml b/kogito-quarkus-examples/process-rest-workitem-quarkus/operator/process-service-rest-call-quarkus.yaml deleted file mode 100644 index dc5364221a..0000000000 --- a/kogito-quarkus-examples/process-rest-workitem-quarkus/operator/process-service-rest-call-quarkus.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-service-rest-call-quarkus -spec: - type: RemoteSource - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/process-service-rest-call-quarkus - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-service-rest-call-quarkus \ No newline at end of file diff --git a/kogito-quarkus-examples/process-rest-workitem-quarkus/pom.xml b/kogito-quarkus-examples/process-rest-workitem-quarkus/pom.xml index 70c6af42c8..e4a9cfef3a 100644 --- a/kogito-quarkus-examples/process-rest-workitem-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-rest-workitem-quarkus/pom.xml @@ -1,24 +1,44 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-rest-workitem-quarkus Kogito Example :: Process Service Rest WorkItem call with Quarkus Kogito service invocation using REST work item and Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -48,8 +68,8 @@ quarkus-resteasy-jackson
- org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus io.quarkus @@ -59,10 +79,6 @@ io.quarkus quarkus-smallrye-openapi - - io.quarkus - quarkus-rest-client - io.quarkus quarkus-junit5 diff --git a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/docker/Dockerfile.jvm b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/docker/Dockerfile.jvm index 85f68f01b2..0ff2b601e9 100644 --- a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/docker/Dockerfile.jvm +++ b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/docker/Dockerfile.jvm @@ -7,14 +7,14 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/process-service-rest-call-quarkus-jvm . +# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/process-rest-workitem-quarkus-jvm . # # Then run the container using: # -# docker run -i --rm -p 8080:8080 quarkus/process-service-rest-call-quarkus-jvm +# docker run -i --rm -p 8080:8080 quarkus/process-rest-workitem-quarkus-jvm # ### -FROM fabric8/java-alpine-openjdk11-jre +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.20 ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV AB_ENABLED=jmx_exporter @@ -23,4 +23,4 @@ COPY target/quarkus-app/*.jar /deployments/ COPY target/quarkus-app/app/ /deployments/app/ COPY target/quarkus-app/quarkus/ /deployments/quarkus/ -ENTRYPOINT [ "/deployments/run-java.sh" ] \ No newline at end of file +ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/docker/Dockerfile.native b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/docker/Dockerfile.native index b508cbb1d3..d825de4b48 100644 --- a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/docker/Dockerfile.native +++ b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/docker/Dockerfile.native @@ -7,14 +7,14 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.native -t quarkus/kogito-infinispan-persistence-quarkus . +# docker build -f src/main/docker/Dockerfile.native -t quarkus/process-rest-workitem-quarkus . # # Then run the container using: # -# docker run -i --rm -p 8080:8080 quarkus/kogito-infinispan-persistence-quarkus +# docker run -i --rm -p 8080:8080 quarkus/process-rest-workitem-quarkus # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.4 WORKDIR /work/ COPY target/*-runner /work/application RUN chmod 775 /work diff --git a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/User.java b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/User.java index 8d2a4a78f7..14d8bd0ceb 100644 --- a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/User.java +++ b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/User.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.acme.travels; diff --git a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/rest/UserResource.java b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/rest/UserResource.java new file mode 100644 index 0000000000..9e8ee5c798 --- /dev/null +++ b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/rest/UserResource.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.acme.travels.rest; + +import org.acme.travels.User; + +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; + +@Path("/v2") +public class UserResource { + + @Inject + UserService userService; + + @GET + @Path("/user/{username}") + @Produces("application/json") + public User getUser(@PathParam("username") String username) { + return userService.getUser(username); + } +} diff --git a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/rest/UserService.java b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/rest/UserService.java new file mode 100644 index 0000000000..f4f89a0a00 --- /dev/null +++ b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/rest/UserService.java @@ -0,0 +1,18 @@ +package org.acme.travels.rest; + +import org.acme.travels.User; + +import jakarta.enterprise.context.ApplicationScoped; + +@ApplicationScoped +public class UserService { + + public User getUser(String name) { + if ("test".equals(name)) { + User user = new User(); + user.setLastName(name); + return user; + } + return null; + } +} diff --git a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/rest/UsersRemoteService.java b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/rest/UsersRemoteService.java deleted file mode 100644 index e5f3223c65..0000000000 --- a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/rest/UsersRemoteService.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR 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.rest; - -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; - -import org.acme.travels.User; -import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; - -@Path("/v2") -@RegisterRestClient -public interface UsersRemoteService { - - @GET - @Path("/user/{username}") - @Produces("application/json") - User get(@PathParam("username") String username); -} diff --git a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/services/AuditService.java b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/services/AuditService.java index e9c805c39c..4d49e5c2e4 100644 --- a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/services/AuditService.java +++ b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/java/org/acme/travels/services/AuditService.java @@ -1,26 +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.acme.travels.services; -import javax.enterprise.context.ApplicationScoped; - import org.acme.travels.User; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.enterprise.context.ApplicationScoped; + @ApplicationScoped public class AuditService { diff --git a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/resources/application.properties index ffd8821875..9553ee92e4 100644 --- a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/resources/application.properties @@ -1,7 +1,23 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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. +# + # Packaging # quarkus.package.type=fast-jar quarkus.swagger-ui.always-include=true - -org.acme.travels.rest.UsersRemoteService/mp-rest/url=https://petstore.swagger.io -org.acme.travels.rest.UsersRemoteService/mp-rest/scope=javax.enterprise.context.ApplicationScoped \ No newline at end of file diff --git a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/resources/org/acme/travels/users.bpmn b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/resources/org/acme/travels/users.bpmn index 27a92410df..6be2d68d1c 100644 --- a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/resources/org/acme/travels/users.bpmn +++ b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/main/resources/org/acme/travels/users.bpmn @@ -1,13 +1,25 @@ - + + + + - + + + + - + + _E5D17755-D671-43ED-BD7D-F6538933069C_InMessage + _E5D17755-D671-43ED-BD7D-F6538933069C_OutMessage + + + + @@ -21,21 +33,21 @@ - + - + - + - + - + - + @@ -57,13 +69,15 @@ _DBA10C00-6407-4EF5-9D85-01177AE8F39F _1A98DE32-CF81-424B-A59E-6D22899E31C0 - + + - _296CCA4D-3C70-469C-A10E-2FF421D4D7A8_EndpointInputX + _296CCA4D-3C70-469C-A10E-2FF421D4D7A8_UrlInputX _296CCA4D-3C70-469C-A10E-2FF421D4D7A8_usernameInputX + _296CCA4D-3C70-469C-A10E-2FF421D4D7A8_PortInputX _296CCA4D-3C70-469C-A10E-2FF421D4D7A8_TaskNameInputX @@ -71,16 +85,23 @@ - _296CCA4D-3C70-469C-A10E-2FF421D4D7A8_EndpointInputX + _296CCA4D-3C70-469C-A10E-2FF421D4D7A8_UrlInputX - + username _296CCA4D-3C70-469C-A10E-2FF421D4D7A8_usernameInputX + + _296CCA4D-3C70-469C-A10E-2FF421D4D7A8_PortInputX + + + + + _296CCA4D-3C70-469C-A10E-2FF421D4D7A8_TaskNameInputX @@ -88,6 +109,10 @@ + + _296CCA4D-3C70-469C-A10E-2FF421D4D7A8_ResultOutputX + traveller + @@ -131,8 +156,8 @@ _1A98DE32-CF81-424B-A59E-6D22899E31C0 - _BF17E37C-6984-4F27-9B6A-A9880E95B019 _4EFC11AE-52BB-4EEF-B241-CFAAE4B7AE93 + _BF17E37C-6984-4F27-9B6A-A9880E95B019 @@ -171,15 +196,15 @@ + + + + - - - - @@ -241,7 +266,7 @@ - _1ztzQLGyEDmz-aPY8v7uEg - _1ztzQLGyEDmz-aPY8v7uEg + _yBVmwPqbEDyfjZKSxf4Vqg + _yBVmwPqbEDyfjZKSxf4Vqg \ No newline at end of file diff --git a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/test/java/org/acme/travels/UsersProcessTest.java b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/test/java/org/acme/travels/UsersProcessTest.java index ee59e05025..a98fe18bda 100644 --- a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/test/java/org/acme/travels/UsersProcessTest.java +++ b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/test/java/org/acme/travels/UsersProcessTest.java @@ -1,26 +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.acme.travels; import java.util.HashMap; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; - import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.kie.kogito.Model; @@ -29,6 +29,9 @@ import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; diff --git a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/test/resources/application.properties index 232c11374a..019f9366ad 100644 --- a/kogito-quarkus-examples/process-rest-workitem-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/process-rest-workitem-quarkus/src/test/resources/application.properties @@ -1,5 +1,24 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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.http.test-port=0 org.acme.travels.rest.UsersRemoteService/mp-rest/url=https://petstore.swagger.io -org.acme.travels.rest.UsersRemoteService/mp-rest/scope=javax.enterprise.context.ApplicationScoped \ No newline at end of file +org.acme.travels.rest.UsersRemoteService/mp-rest/scope=jakarta.enterprise.context.ApplicationScoped \ No newline at end of file diff --git a/kogito-quarkus-examples/process-saga-quarkus/README.md b/kogito-quarkus-examples/process-saga-quarkus/README.md index 3316acafb5..5122c01703 100644 --- a/kogito-quarkus-examples/process-saga-quarkus/README.md +++ b/kogito-quarkus-examples/process-saga-quarkus/README.md @@ -43,7 +43,7 @@ This is the BPMN process that represents the Order Saga, and it is the one being ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - Maven 3.8.6+ installed @@ -66,6 +66,11 @@ java -jar target/process-saga-quarkus-runner.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ``` @@ -95,7 +100,7 @@ Once the service is up and running, you can use the following examples to intera ### Starting the Order Saga -#### POST /orders +#### POST /order Allows to start a new Order Saga with the given data: @@ -111,7 +116,7 @@ Given data: Curl command (using the JSON object above): ```sh -curl -H "Content-Type: application/json" -X POST http://localhost:8080/orders -d '{"orderId" : "03e6cf79-3301-434b-b5e1-d6899b5639aa"}' +curl -H "Content-Type: application/json" -X POST http://localhost:8080/order -d '{"orderId" : "03e6cf79-3301-434b-b5e1-d6899b5639aa"}' ``` The response for the request is returned with attributes representing the response of each step, either success or failure. The `orderResponse` attribute indicates if the order can be confirmed in case of success or @@ -168,7 +173,7 @@ Example: Curl command (using the JSON object above): ```sh -curl -H "Content-Type: application/json" -X POST http://localhost:8080/orders -d '{"orderId" : "03e6cf79-3301-434b-b5e1-d6899b5639aa", "failService" : "PaymentService"}' +curl -H "Content-Type: application/json" -X POST http://localhost:8080/order -d '{"orderId" : "03e6cf79-3301-434b-b5e1-d6899b5639aa", "failService" : "PaymentService"}' ``` Response example: @@ -208,7 +213,3 @@ In the console executing the application you can check the log it with the execu 17:16:17:747 WARN [org.kie.kogito.examples.StockService] Cancel Stock for 9098daa2-f40f-4231-995a-1c7d159df190 17:16:17:747 WARN [org.kie.kogito.examples.OrderService] Failed Order 12345678 ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). \ No newline at end of file diff --git a/kogito-quarkus-examples/process-saga-quarkus/pom.xml b/kogito-quarkus-examples/process-saga-quarkus/pom.xml index 1cf3201035..f8923f9aed 100644 --- a/kogito-quarkus-examples/process-saga-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-saga-quarkus/pom.xml @@ -1,10 +1,30 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-saga-quarkus @@ -13,14 +33,14 @@ How to implement Saga with a BPMN Process using Compensations - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -44,8 +64,8 @@ - org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus io.quarkus diff --git a/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/MockService.java b/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/MockService.java index f54ca193e4..80ec53e9d2 100644 --- a/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/MockService.java +++ b/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/MockService.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.examples; @@ -19,7 +22,7 @@ import java.util.Optional; import java.util.UUID; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; @ApplicationScoped public class MockService { diff --git a/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/OrderService.java b/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/OrderService.java index 516164b9b3..060964bec7 100644 --- a/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/OrderService.java +++ b/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/OrderService.java @@ -1,25 +1,28 @@ /* - * 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.examples; -import javax.enterprise.context.ApplicationScoped; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.enterprise.context.ApplicationScoped; + @ApplicationScoped public class OrderService { diff --git a/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/PaymentService.java b/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/PaymentService.java index 960c190f4f..be1ba5f5f6 100644 --- a/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/PaymentService.java +++ b/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/PaymentService.java @@ -1,26 +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.examples; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; + @ApplicationScoped public class PaymentService { diff --git a/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/Response.java b/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/Response.java index 193443e4ff..5b0540bd49 100644 --- a/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/Response.java +++ b/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/Response.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.examples; diff --git a/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/ServiceException.java b/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/ServiceException.java index 908552aa21..e20f61055d 100644 --- a/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/ServiceException.java +++ b/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/ServiceException.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.examples; diff --git a/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/ShippingService.java b/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/ShippingService.java index 26c06a016c..c71b986fb1 100644 --- a/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/ShippingService.java +++ b/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/ShippingService.java @@ -1,26 +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.examples; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; + @ApplicationScoped public class ShippingService { diff --git a/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/StockService.java b/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/StockService.java index 8c74346bdf..6530da6af1 100644 --- a/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/StockService.java +++ b/kogito-quarkus-examples/process-saga-quarkus/src/main/java/org/kie/kogito/examples/StockService.java @@ -1,26 +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.examples; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; + @ApplicationScoped public class StockService { diff --git a/kogito-quarkus-examples/process-saga-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-saga-quarkus/src/main/resources/application.properties index 112cb50503..4820bb49fa 100644 --- a/kogito-quarkus-examples/process-saga-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-saga-quarkus/src/main/resources/application.properties @@ -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. # #https://quarkus.io/guides/openapi-swaggerui diff --git a/kogito-quarkus-examples/process-saga-quarkus/src/test/java/org/kie/kogito/examples/ProcessSagaIT.java b/kogito-quarkus-examples/process-saga-quarkus/src/test/java/org/kie/kogito/examples/ProcessSagaIT.java index 02a02a792a..77f3dae7c5 100644 --- a/kogito-quarkus-examples/process-saga-quarkus/src/test/java/org/kie/kogito/examples/ProcessSagaIT.java +++ b/kogito-quarkus-examples/process-saga-quarkus/src/test/java/org/kie/kogito/examples/ProcessSagaIT.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.examples; diff --git a/kogito-quarkus-examples/process-scripts-quarkus/README.md b/kogito-quarkus-examples/process-scripts-quarkus/README.md index 8d404152b7..65066692a6 100644 --- a/kogito-quarkus-examples/process-scripts-quarkus/README.md +++ b/kogito-quarkus-examples/process-scripts-quarkus/README.md @@ -28,9 +28,9 @@ This example shows ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - GraalVM 19.3+ installed @@ -61,6 +61,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ```sh @@ -113,7 +118,3 @@ And also in Quarkus log you should see a log entry: ``` Hello john" ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-quarkus-examples/process-scripts-quarkus/operator/process-scripts-quarkus.yaml b/kogito-quarkus-examples/process-scripts-quarkus/operator/process-scripts-quarkus.yaml deleted file mode 100644 index 4324a9bdd9..0000000000 --- a/kogito-quarkus-examples/process-scripts-quarkus/operator/process-scripts-quarkus.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-scripts-quarkus -spec: - type: RemoteSource - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/process-scripts-quarkus - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-scripts-quarkus diff --git a/kogito-quarkus-examples/process-scripts-quarkus/pom.xml b/kogito-quarkus-examples/process-scripts-quarkus/pom.xml index 8515e4db68..bc08aafef0 100644 --- a/kogito-quarkus-examples/process-scripts-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-scripts-quarkus/pom.xml @@ -1,24 +1,44 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-scripts-quarkus Kogito Example :: Process Scripts With Quarkus Kogito scripts invocation - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -48,8 +68,8 @@ quarkus-resteasy-jackson - org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus io.quarkus diff --git a/kogito-quarkus-examples/process-scripts-quarkus/src/main/docker/Dockerfile.jvm b/kogito-quarkus-examples/process-scripts-quarkus/src/main/docker/Dockerfile.jvm index 3f72cf2ffb..097023e9f7 100644 --- a/kogito-quarkus-examples/process-scripts-quarkus/src/main/docker/Dockerfile.jvm +++ b/kogito-quarkus-examples/process-scripts-quarkus/src/main/docker/Dockerfile.jvm @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/process-scripts-quarkus-jvm # ### -FROM fabric8/java-alpine-openjdk11-jre +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.20 ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV AB_ENABLED=jmx_exporter @@ -23,4 +23,4 @@ COPY target/quarkus-app/*.jar /deployments/ COPY target/quarkus-app/app/ /deployments/app/ COPY target/quarkus-app/quarkus/ /deployments/quarkus/ -ENTRYPOINT [ "/deployments/run-java.sh" ] \ No newline at end of file +ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/kogito-quarkus-examples/process-scripts-quarkus/src/main/docker/Dockerfile.native b/kogito-quarkus-examples/process-scripts-quarkus/src/main/docker/Dockerfile.native index b508cbb1d3..a9454a415d 100644 --- a/kogito-quarkus-examples/process-scripts-quarkus/src/main/docker/Dockerfile.native +++ b/kogito-quarkus-examples/process-scripts-quarkus/src/main/docker/Dockerfile.native @@ -7,14 +7,14 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.native -t quarkus/kogito-infinispan-persistence-quarkus . +# docker build -f src/main/docker/Dockerfile.native -t quarkus/process-scripts-quarkus . # # Then run the container using: # -# docker run -i --rm -p 8080:8080 quarkus/kogito-infinispan-persistence-quarkus +# docker run -i --rm -p 8080:8080 quarkus/process-scripts-quarkus # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.4 WORKDIR /work/ COPY target/*-runner /work/application RUN chmod 775 /work diff --git a/kogito-quarkus-examples/process-scripts-quarkus/src/main/resources/META-INF/resources/index.html b/kogito-quarkus-examples/process-scripts-quarkus/src/main/resources/META-INF/resources/index.html deleted file mode 100644 index a965327283..0000000000 --- a/kogito-quarkus-examples/process-scripts-quarkus/src/main/resources/META-INF/resources/index.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - kogito-infinispan-persistence-quarkus - 1.0-SNAPSHOT - - - - - - -
-
-

Congratulations, you have created a new Quarkus application.

- -

Why do you see this?

- -

This page is served by Quarkus. The source is in - src/main/resources/META-INF/resources/index.html.

- -

What can I do from here?

- -

If not already done, run the application in dev mode using: mvn compile quarkus:dev. -

-
    -
  • Add REST resources, Servlets, functions and other services in src/main/java.
  • -
  • Your static assets are located in src/main/resources/META-INF/resources.
  • -
  • Configure your application in src/main/resources/application.properties. -
  • -
- -

How do I get rid of this page?

-

Just delete the src/main/resources/META-INF/resources/index.html file.

-
-
-
-

Application

-
    -
  • GroupId: org.acme
  • -
  • ArtifactId: kogito-infinispan-persistence-quarkus
  • -
  • Version: 1.0-SNAPSHOT
  • -
  • Quarkus Version: 0.19.1
  • -
-
- -
-
- - - - \ No newline at end of file diff --git a/kogito-quarkus-examples/process-scripts-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-scripts-quarkus/src/main/resources/application.properties index 35b7e32bea..a76c2a39bb 100644 --- a/kogito-quarkus-examples/process-scripts-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-scripts-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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/process-scripts-quarkus/src/test/java/org/acme/travels/quarkus/ScriptsProcessTest.java b/kogito-quarkus-examples/process-scripts-quarkus/src/test/java/org/acme/travels/quarkus/ScriptsProcessTest.java index 066d0a4e66..b7874d2061 100644 --- a/kogito-quarkus-examples/process-scripts-quarkus/src/test/java/org/acme/travels/quarkus/ScriptsProcessTest.java +++ b/kogito-quarkus-examples/process-scripts-quarkus/src/test/java/org/acme/travels/quarkus/ScriptsProcessTest.java @@ -1,26 +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.acme.travels.quarkus; import java.util.HashMap; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; - import org.junit.jupiter.api.Test; import org.kie.kogito.Model; import org.kie.kogito.process.Process; @@ -28,6 +28,9 @@ import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/kogito-quarkus-examples/process-scripts-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/process-scripts-quarkus/src/test/resources/application.properties index 3c17236931..a047ea13ba 100644 --- a/kogito-quarkus-examples/process-scripts-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/process-scripts-quarkus/src/test/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. +# + # Quarkus quarkus.http.test-port=0 \ No newline at end of file diff --git a/kogito-quarkus-examples/process-service-calls-quarkus/README.md b/kogito-quarkus-examples/process-service-calls-quarkus/README.md index cc0d37ca74..d0c4e4f7ce 100644 --- a/kogito-quarkus-examples/process-service-calls-quarkus/README.md +++ b/kogito-quarkus-examples/process-service-calls-quarkus/README.md @@ -65,9 +65,9 @@ This example shows ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - GraalVM 19.1+ installed @@ -97,6 +97,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ```sh @@ -170,7 +175,3 @@ curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' -d After the above command you should see a log similar to the following

- -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-quarkus-examples/process-service-calls-quarkus/operator/process-service-calls-quarkus.yaml b/kogito-quarkus-examples/process-service-calls-quarkus/operator/process-service-calls-quarkus.yaml deleted file mode 100644 index b23eecbc4d..0000000000 --- a/kogito-quarkus-examples/process-service-calls-quarkus/operator/process-service-calls-quarkus.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-service-calls-quarkus -spec: - type: RemoteSource - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/process-service-calls-quarkus - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-service-calls-quarkus \ No newline at end of file diff --git a/kogito-quarkus-examples/process-service-calls-quarkus/pom.xml b/kogito-quarkus-examples/process-service-calls-quarkus/pom.xml index 8c439f2359..4d0c13f869 100644 --- a/kogito-quarkus-examples/process-service-calls-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-service-calls-quarkus/pom.xml @@ -1,24 +1,44 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-service-calls-quarkus Kogito Example :: Process Service Calls with Quarkus Kogito service invocation - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -48,8 +68,8 @@ quarkus-resteasy-jackson
- org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus io.quarkus diff --git a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/docker/Dockerfile.jvm b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/docker/Dockerfile.jvm index 5b9b2c40dc..4f14bf4bcf 100644 --- a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/docker/Dockerfile.jvm +++ b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/docker/Dockerfile.jvm @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/process-service-calls-quarkus-jvm # ### -FROM fabric8/java-alpine-openjdk11-jre +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.20 ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV AB_ENABLED=jmx_exporter @@ -23,4 +23,4 @@ COPY target/quarkus-app/*.jar /deployments/ COPY target/quarkus-app/app/ /deployments/app/ COPY target/quarkus-app/quarkus/ /deployments/quarkus/ -ENTRYPOINT [ "/deployments/run-java.sh" ] \ No newline at end of file +ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/docker/Dockerfile.native b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/docker/Dockerfile.native index b508cbb1d3..265fcdb472 100644 --- a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/docker/Dockerfile.native +++ b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/docker/Dockerfile.native @@ -7,14 +7,14 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.native -t quarkus/kogito-infinispan-persistence-quarkus . +# docker build -f src/main/docker/Dockerfile.native -t quarkus/process-service-calls-quarkus . # # Then run the container using: # -# docker run -i --rm -p 8080:8080 quarkus/kogito-infinispan-persistence-quarkus +# docker run -i --rm -p 8080:8080 quarkus/process-service-calls-quarkus # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.4 WORKDIR /work/ COPY target/*-runner /work/application RUN chmod 775 /work diff --git a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/quarkus/Address.java b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/quarkus/Address.java index e0dc7d01de..c2aa39e62b 100644 --- a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/quarkus/Address.java +++ b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/quarkus/Address.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.acme.travels.quarkus; diff --git a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/quarkus/Traveller.java b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/quarkus/Traveller.java index e66eab50d5..d0e9bd8d67 100644 --- a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/quarkus/Traveller.java +++ b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/quarkus/Traveller.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.acme.travels.quarkus; diff --git a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/GreetingTravellerService.java b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/GreetingTravellerService.java index 155659b4fd..699fb39209 100644 --- a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/GreetingTravellerService.java +++ b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/GreetingTravellerService.java @@ -1,26 +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.acme.travels.services; -import javax.enterprise.context.ApplicationScoped; - import org.acme.travels.quarkus.Traveller; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.enterprise.context.ApplicationScoped; + @ApplicationScoped public class GreetingTravellerService { diff --git a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/HelloService.java b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/HelloService.java index 4506a6d8e3..5ee2238e65 100644 --- a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/HelloService.java +++ b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/HelloService.java @@ -1,25 +1,28 @@ /* - * 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.acme.travels.services; -import javax.enterprise.context.ApplicationScoped; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.enterprise.context.ApplicationScoped; + @ApplicationScoped public class HelloService { diff --git a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/StoreTravellerService.java b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/StoreTravellerService.java index 808b07ffa7..ebb149d40e 100644 --- a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/StoreTravellerService.java +++ b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/StoreTravellerService.java @@ -1,27 +1,30 @@ /* - * 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.acme.travels.services; import java.util.HashMap; import java.util.Map; -import javax.enterprise.context.ApplicationScoped; - import org.acme.travels.quarkus.Traveller; +import jakarta.enterprise.context.ApplicationScoped; + @ApplicationScoped public class StoreTravellerService { diff --git a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/TravellerAuditService.java b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/TravellerAuditService.java index 6068492ea6..39253ce944 100644 --- a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/TravellerAuditService.java +++ b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/java/org/acme/travels/services/TravellerAuditService.java @@ -1,26 +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.acme.travels.services; -import javax.enterprise.context.ApplicationScoped; - import org.acme.travels.quarkus.Traveller; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.enterprise.context.ApplicationScoped; + @ApplicationScoped public class TravellerAuditService { diff --git a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/resources/META-INF/resources/index.html b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/resources/META-INF/resources/index.html deleted file mode 100644 index a965327283..0000000000 --- a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/resources/META-INF/resources/index.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - kogito-infinispan-persistence-quarkus - 1.0-SNAPSHOT - - - - - - -
-
-

Congratulations, you have created a new Quarkus application.

- -

Why do you see this?

- -

This page is served by Quarkus. The source is in - src/main/resources/META-INF/resources/index.html.

- -

What can I do from here?

- -

If not already done, run the application in dev mode using: mvn compile quarkus:dev. -

-
    -
  • Add REST resources, Servlets, functions and other services in src/main/java.
  • -
  • Your static assets are located in src/main/resources/META-INF/resources.
  • -
  • Configure your application in src/main/resources/application.properties. -
  • -
- -

How do I get rid of this page?

-

Just delete the src/main/resources/META-INF/resources/index.html file.

-
-
-
-

Application

-
    -
  • GroupId: org.acme
  • -
  • ArtifactId: kogito-infinispan-persistence-quarkus
  • -
  • Version: 1.0-SNAPSHOT
  • -
  • Quarkus Version: 0.19.1
  • -
-
- -
-
- - - - \ No newline at end of file diff --git a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-service-calls-quarkus/src/main/resources/application.properties index 35b7e32bea..a76c2a39bb 100644 --- a/kogito-quarkus-examples/process-service-calls-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-service-calls-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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/process-service-calls-quarkus/src/test/java/org/acme/travels/quarkus/MultiParamServiceProcessTest.java b/kogito-quarkus-examples/process-service-calls-quarkus/src/test/java/org/acme/travels/quarkus/MultiParamServiceProcessTest.java index bd2a390014..0a7a789991 100644 --- a/kogito-quarkus-examples/process-service-calls-quarkus/src/test/java/org/acme/travels/quarkus/MultiParamServiceProcessTest.java +++ b/kogito-quarkus-examples/process-service-calls-quarkus/src/test/java/org/acme/travels/quarkus/MultiParamServiceProcessTest.java @@ -1,26 +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.acme.travels.quarkus; import java.util.HashMap; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; - import org.junit.jupiter.api.Test; import org.kie.kogito.Model; import org.kie.kogito.process.Process; @@ -28,6 +28,9 @@ import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/kogito-quarkus-examples/process-service-calls-quarkus/src/test/java/org/acme/travels/quarkus/TravellersProcessTest.java b/kogito-quarkus-examples/process-service-calls-quarkus/src/test/java/org/acme/travels/quarkus/TravellersProcessTest.java index 0b17a56003..7fe0f5b933 100644 --- a/kogito-quarkus-examples/process-service-calls-quarkus/src/test/java/org/acme/travels/quarkus/TravellersProcessTest.java +++ b/kogito-quarkus-examples/process-service-calls-quarkus/src/test/java/org/acme/travels/quarkus/TravellersProcessTest.java @@ -1,26 +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.acme.travels.quarkus; import java.util.HashMap; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; - import org.junit.jupiter.api.Test; import org.kie.kogito.Model; import org.kie.kogito.process.Process; @@ -28,6 +28,9 @@ import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/kogito-quarkus-examples/process-service-calls-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/process-service-calls-quarkus/src/test/resources/application.properties index 3c17236931..a047ea13ba 100644 --- a/kogito-quarkus-examples/process-service-calls-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/process-service-calls-quarkus/src/test/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. +# + # Quarkus quarkus.http.test-port=0 \ No newline at end of file diff --git a/kogito-quarkus-examples/process-timer-quarkus/README.md b/kogito-quarkus-examples/process-timer-quarkus/README.md index 002b44af58..7f8dc8a1c2 100644 --- a/kogito-quarkus-examples/process-timer-quarkus/README.md +++ b/kogito-quarkus-examples/process-timer-quarkus/README.md @@ -84,9 +84,9 @@ This needs to be given when starting process instance as delay attribute of type ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - GraalVM 19.3+ installed @@ -148,7 +148,7 @@ To be able to use Kogito Job Service as timer service , an additional dependency ```xml - org.kie.kogito + org.kie kogito-addons-quarkus-jobs-management ``` @@ -186,6 +186,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ```sh @@ -316,9 +321,3 @@ Before timer... waiting for R2/PT1S After Timer After Timer ``` - -## Deploy on OpenShift - -This example can run on OpenShift 4 instance. Use [Kogito operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift) to deploy this example and instantiate also the Jobs service. Kogito operator will take care of configuring this example to successfully connect to the Jobs service. - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the Kogito Operator. diff --git a/kogito-quarkus-examples/process-timer-quarkus/operator/jobs-service.yaml b/kogito-quarkus-examples/process-timer-quarkus/operator/jobs-service.yaml deleted file mode 100644 index 448e6810da..0000000000 --- a/kogito-quarkus-examples/process-timer-quarkus/operator/jobs-service.yaml +++ /dev/null @@ -1,24 +0,0 @@ -#uncomment to enable persistence -##Infinispan operator should be pre-installed in namespace -#apiVersion: app.kiegroup.org/v1beta1 -#kind: KogitoInfra -#metadata: -# name: kogito-infinispan-infra -#spec: -# resource: -# apiVersion: infinispan.org/v1 -# kind: Infinispan -#--- -# deploy this service if you wish to enable Jobs Service integration. -# Make sure to follow "Use Kogito Job Service as external timer service" in the README -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoSupportingService -metadata: - name: jobs-service -spec: - serviceType: JobsService - replicas: 1 - #uncomment to enable persistence -# infra: -# - kogito-infinispan-infra - diff --git a/kogito-quarkus-examples/process-timer-quarkus/operator/process-timer-quarkus.yaml b/kogito-quarkus-examples/process-timer-quarkus/operator/process-timer-quarkus.yaml deleted file mode 100644 index a7988c1feb..0000000000 --- a/kogito-quarkus-examples/process-timer-quarkus/operator/process-timer-quarkus.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-timer-quarkus -spec: - type: RemoteSource - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/process-timer-quarkus - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-timer-quarkus \ No newline at end of file diff --git a/kogito-quarkus-examples/process-timer-quarkus/pom.xml b/kogito-quarkus-examples/process-timer-quarkus/pom.xml index 32533e0903..a9e9325cd8 100644 --- a/kogito-quarkus-examples/process-timer-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-timer-quarkus/pom.xml @@ -1,24 +1,44 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-timer-quarkus Kogito Example :: Process Timer with Quarkus Kogito with timers - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -40,8 +60,8 @@ - org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus io.quarkus @@ -58,14 +78,14 @@ - org.kie.kogito + org.kie kogito-addons-quarkus-jobs-management @@ -100,7 +120,7 @@ - org.kie.kogito + org.kie kogito-addons-quarkus-jobs-service-embedded diff --git a/kogito-quarkus-examples/process-timer-quarkus/src/main/docker/Dockerfile.jvm b/kogito-quarkus-examples/process-timer-quarkus/src/main/docker/Dockerfile.jvm index d1b303e72b..f2c963245f 100644 --- a/kogito-quarkus-examples/process-timer-quarkus/src/main/docker/Dockerfile.jvm +++ b/kogito-quarkus-examples/process-timer-quarkus/src/main/docker/Dockerfile.jvm @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/process-timer-quarkus-jvm # ### -FROM fabric8/java-alpine-openjdk11-jre +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.20 ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV AB_ENABLED=jmx_exporter @@ -23,4 +23,4 @@ COPY target/quarkus-app/*.jar /deployments/ COPY target/quarkus-app/app/ /deployments/app/ COPY target/quarkus-app/quarkus/ /deployments/quarkus/ -ENTRYPOINT [ "/deployments/run-java.sh" ] \ No newline at end of file +ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/kogito-quarkus-examples/process-timer-quarkus/src/main/docker/Dockerfile.native b/kogito-quarkus-examples/process-timer-quarkus/src/main/docker/Dockerfile.native index b508cbb1d3..523dd9aff9 100644 --- a/kogito-quarkus-examples/process-timer-quarkus/src/main/docker/Dockerfile.native +++ b/kogito-quarkus-examples/process-timer-quarkus/src/main/docker/Dockerfile.native @@ -7,14 +7,14 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.native -t quarkus/kogito-infinispan-persistence-quarkus . +# docker build -f src/main/docker/Dockerfile.native -t quarkus/process-timer-quarkus . # # Then run the container using: # -# docker run -i --rm -p 8080:8080 quarkus/kogito-infinispan-persistence-quarkus +# docker run -i --rm -p 8080:8080 quarkus/process-timer-quarkus # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.4 WORKDIR /work/ COPY target/*-runner /work/application RUN chmod 775 /work diff --git a/kogito-quarkus-examples/process-timer-quarkus/src/main/resources/META-INF/resources/index.html b/kogito-quarkus-examples/process-timer-quarkus/src/main/resources/META-INF/resources/index.html deleted file mode 100644 index a965327283..0000000000 --- a/kogito-quarkus-examples/process-timer-quarkus/src/main/resources/META-INF/resources/index.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - kogito-infinispan-persistence-quarkus - 1.0-SNAPSHOT - - - - - - -
-
-

Congratulations, you have created a new Quarkus application.

- -

Why do you see this?

- -

This page is served by Quarkus. The source is in - src/main/resources/META-INF/resources/index.html.

- -

What can I do from here?

- -

If not already done, run the application in dev mode using: mvn compile quarkus:dev. -

-
    -
  • Add REST resources, Servlets, functions and other services in src/main/java.
  • -
  • Your static assets are located in src/main/resources/META-INF/resources.
  • -
  • Configure your application in src/main/resources/application.properties. -
  • -
- -

How do I get rid of this page?

-

Just delete the src/main/resources/META-INF/resources/index.html file.

-
-
-
-

Application

-
    -
  • GroupId: org.acme
  • -
  • ArtifactId: kogito-infinispan-persistence-quarkus
  • -
  • Version: 1.0-SNAPSHOT
  • -
  • Quarkus Version: 0.19.1
  • -
-
- -
-
- - - - \ No newline at end of file diff --git a/kogito-quarkus-examples/process-timer-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-timer-quarkus/src/main/resources/application.properties index 9914b9973c..2c3c259f33 100644 --- a/kogito-quarkus-examples/process-timer-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-timer-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. +# + # Packaging #quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/README.md b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/README.md index d86e426542..a01919344a 100644 --- a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/README.md +++ b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/README.md @@ -54,9 +54,9 @@ To learn more about custom lifecycle, look at the following classes: ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - GraalVM 19.3+ installed @@ -88,6 +88,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ```sh @@ -265,7 +270,3 @@ You should see a similar message after performing the second line approval after ```json {"id":"f498de73-e02d-4829-905e-2f768479a4f1", "approver":"admin","firstLineApproval":true, "secondLineApproval":true,"traveller":{"firstName":"John","lastName":"Doe","email":"jon.doe@example.com","nationality":"American","address":{"street":"main street","city":"Boston","zipCode":"10005","country":"US"}}} ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/operator/process-usertasks-lifecycle-quarkus.yaml b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/operator/process-usertasks-lifecycle-quarkus.yaml deleted file mode 100644 index d6c633ebf6..0000000000 --- a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/operator/process-usertasks-lifecycle-quarkus.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-usertasks-lifecycle-quarkus -spec: - type: RemoteSource - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-usertasks-lifecycle-quarkus \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/pom.xml b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/pom.xml index 50dffbd7f2..cbb6821c19 100644 --- a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/pom.xml @@ -1,24 +1,44 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-usertasks-custom-lifecycle-quarkus Kogito Example :: Process Usertasks With Custom Lifecycle Kogito user tasks orchestration with custom life cycle - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -48,16 +68,16 @@ quarkus-resteasy-jackson
- org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus org.kie.kogito process-workitems - org.kie.kogito - kogito-addons-quarkus-task-management + org.jbpm + jbpm-addons-quarkus-task-management io.quarkus @@ -83,12 +103,12 @@ notification - org.kie.kogito - kogito-addons-quarkus-mail + org.jbpm + jbpm-addons-quarkus-mail - org.kie.kogito - kogito-addons-quarkus-task-notification + org.jbpm + jbpm-addons-quarkus-task-notification io.quarkus diff --git a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/docker/Dockerfile.jvm b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/docker/Dockerfile.jvm index 37d2444940..3f58a7bc05 100644 --- a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/docker/Dockerfile.jvm +++ b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/docker/Dockerfile.jvm @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/process-usertasks-custom-lifecycle-quarkus-jvm # ### -FROM fabric8/java-alpine-openjdk11-jre +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.20 ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV AB_ENABLED=jmx_exporter @@ -23,4 +23,4 @@ COPY target/quarkus-app/*.jar /deployments/ COPY target/quarkus-app/app/ /deployments/app/ COPY target/quarkus-app/quarkus/ /deployments/quarkus/ -ENTRYPOINT [ "/deployments/run-java.sh" ] \ No newline at end of file +ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/docker/Dockerfile.native b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/docker/Dockerfile.native index b508cbb1d3..72a3638697 100644 --- a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/docker/Dockerfile.native +++ b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/docker/Dockerfile.native @@ -7,14 +7,14 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.native -t quarkus/kogito-infinispan-persistence-quarkus . +# docker build -f src/main/docker/Dockerfile.native -t quarkus/process-usertasks-custom-lifecycle-quarkus . # # Then run the container using: # -# docker run -i --rm -p 8080:8080 quarkus/kogito-infinispan-persistence-quarkus +# docker run -i --rm -p 8080:8080 quarkus/process-usertasks-custom-lifecycle-quarkus # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.4 WORKDIR /work/ COPY target/*-runner /work/application RUN chmod 775 /work diff --git a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/Address.java b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/Address.java index d808334384..662dfa9b9f 100644 --- a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/Address.java +++ b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/Address.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.acme.travels; diff --git a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/Traveller.java b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/Traveller.java index cf790d4664..c24685803d 100644 --- a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/Traveller.java +++ b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/Traveller.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.acme.travels; diff --git a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/config/CustomWorkItemHandlerConfig.java b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/config/CustomWorkItemHandlerConfig.java index ad0e0178c7..2e973282b8 100644 --- a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/config/CustomWorkItemHandlerConfig.java +++ b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/config/CustomWorkItemHandlerConfig.java @@ -1,26 +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.acme.travels.config; -import javax.enterprise.context.ApplicationScoped; - import org.acme.travels.usertasks.CustomHumanTaskLifeCycle; import org.jbpm.process.instance.impl.humantask.HumanTaskWorkItemHandler; import org.kie.kogito.process.impl.DefaultWorkItemHandlerConfig; +import jakarta.enterprise.context.ApplicationScoped; + /** * Custom work item handler configuration to change default work item handler for user tasks * to take into account custom phases @@ -36,4 +39,4 @@ public class CustomWorkItemHandlerConfig extends DefaultWorkItemHandlerConfig { { register("Human Task", new HumanTaskWorkItemHandler(new CustomHumanTaskLifeCycle())); } -} \ No newline at end of file +} diff --git a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/usertasks/CompleteStartedOnly.java b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/usertasks/CompleteStartedOnly.java index fc3d21d823..7465bf0a4f 100644 --- a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/usertasks/CompleteStartedOnly.java +++ b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/usertasks/CompleteStartedOnly.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.acme.travels.usertasks; diff --git a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/usertasks/CustomHumanTaskLifeCycle.java b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/usertasks/CustomHumanTaskLifeCycle.java index fcaf77a330..c83b80302c 100644 --- a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/usertasks/CustomHumanTaskLifeCycle.java +++ b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/usertasks/CustomHumanTaskLifeCycle.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.acme.travels.usertasks; @@ -20,7 +23,7 @@ import java.util.Map; import org.jbpm.process.instance.impl.humantask.BaseHumanTaskLifeCycle; -import org.jbpm.process.instance.impl.humantask.HumanTaskWorkItemImpl; +import org.jbpm.process.instance.impl.humantask.InternalHumanTaskWorkItem; import org.jbpm.process.instance.impl.humantask.phases.Claim; import org.jbpm.process.instance.impl.humantask.phases.Release; import org.jbpm.process.instance.impl.humantask.phases.Skip; @@ -101,7 +104,7 @@ public Map transitionTo(KogitoWorkItem workItem, KogitoWorkItemM logger.debug("Transition method invoked for work item {} to transition to {}, currently in phase {} and status {}", workItem.getStringId(), transition.phase(), workItem.getPhaseId(), workItem.getPhaseStatus()); - HumanTaskWorkItemImpl humanTaskWorkItem = (HumanTaskWorkItemImpl) workItem; + InternalHumanTaskWorkItem humanTaskWorkItem = (InternalHumanTaskWorkItem) workItem; LifeCyclePhase targetPhase = phases.get(transition.phase()); if (targetPhase == null) { @@ -141,7 +144,6 @@ public Map transitionTo(KogitoWorkItem workItem, KogitoWorkItemM @Override public Map data(KogitoWorkItem workItem) { - - return ((HumanTaskWorkItemImpl) workItem).getResults(); + return ((InternalHumanTaskWorkItem) workItem).getResults(); } } diff --git a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/usertasks/Start.java b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/usertasks/Start.java index 798a3359d7..7a5199de1c 100644 --- a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/usertasks/Start.java +++ b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/java/org/acme/travels/usertasks/Start.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.acme.travels.usertasks; diff --git a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/resources/META-INF/resources/index.html b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/resources/META-INF/resources/index.html deleted file mode 100644 index a965327283..0000000000 --- a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/resources/META-INF/resources/index.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - kogito-infinispan-persistence-quarkus - 1.0-SNAPSHOT - - - - - - -
-
-

Congratulations, you have created a new Quarkus application.

- -

Why do you see this?

- -

This page is served by Quarkus. The source is in - src/main/resources/META-INF/resources/index.html.

- -

What can I do from here?

- -

If not already done, run the application in dev mode using: mvn compile quarkus:dev. -

-
    -
  • Add REST resources, Servlets, functions and other services in src/main/java.
  • -
  • Your static assets are located in src/main/resources/META-INF/resources.
  • -
  • Configure your application in src/main/resources/application.properties. -
  • -
- -

How do I get rid of this page?

-

Just delete the src/main/resources/META-INF/resources/index.html file.

-
-
-
-

Application

-
    -
  • GroupId: org.acme
  • -
  • ArtifactId: kogito-infinispan-persistence-quarkus
  • -
  • Version: 1.0-SNAPSHOT
  • -
  • Quarkus Version: 0.19.1
  • -
-
- -
-
- - - - \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/resources/application.properties index 65107568b0..9566fe15f3 100644 --- a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/test/java/org/acme/travels/custom/lifecycle/quarkus/ApprovalsProcessTest.java b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/test/java/org/acme/travels/custom/lifecycle/quarkus/ApprovalsProcessTest.java index 59efe6c705..573ab8f193 100644 --- a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/test/java/org/acme/travels/custom/lifecycle/quarkus/ApprovalsProcessTest.java +++ b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/test/java/org/acme/travels/custom/lifecycle/quarkus/ApprovalsProcessTest.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.acme.travels.custom.lifecycle.quarkus; @@ -20,9 +23,6 @@ import java.util.List; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; - import org.acme.travels.Address; import org.acme.travels.Traveller; import org.acme.travels.usertasks.Start; @@ -41,6 +41,9 @@ import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; diff --git a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/test/resources/application.properties index 3c17236931..a047ea13ba 100644 --- a/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/src/test/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. +# + # Quarkus quarkus.http.test-port=0 \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/README.md b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/README.md deleted file mode 100644 index 0662085a5d..0000000000 --- a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/README.md +++ /dev/null @@ -1,394 +0,0 @@ -# Process user task orchestration: Hiring - -## Description - -This Quickstart showcases a basic implementation of the **Hiring** process. - -This quickstart project shows very typical user task orchestration, is based on a simple Hiring process -that drives a *Candidate* through different interviews until it gets hired. - -> **_NOTE:_** This example uses keycloak authentication to enable security only in the consoles and not in runtime. -### The Candidate data model - -The *Hiring* example uses a *Candidate* POJO to represent the person that wants to get the job. You can find it in the *org.kie.kogito.hr* package. - -```java -public class Candidate { - - private String name; // Name of the candidate - private String email; // Email of the candidate - private Integer salary; // Expected salary - private String skills; // List of technical skills - - public Candidate(String name, String email, Integer salary, String skills) { - this.name = name; - this.email = email; - this.salary = salary; - this.skills = skills; - } - - // Setters & getters... -} -``` - -### The Business Logic - -The example process consists in two human tasks that will drive the candidate trough two interview with *HR* and *IT* departments represented by the *HR Interview* & *IT interview* User Tasks. - -

- -

- -#### Process data - -

- -The process handles three _Process Variables_: - -* *candidate*: represents the candidate person that wants to get the job. It is an instance of *org.kie.kogito.hiring.Candidate*. -* *hr_approval*: a boolean that determines that HR department approves the hiring. -* *it_approval*: a boolean that determines that IT department approves the hiring. - -### The Hiring process - -Once it starts, the process will move into the *HR Interview task*, this task represents an interview with someone from the company HR department. - -The task will get the *candidate* as an input assignment and as an output it will generate an *approval* boolean that represents assesment of hiring or not hiring the *candidate*. It will be stored on the *hr_approval* process variable - -

- -
HR Interview assignments -

- -After completing the *HR Interview* the candidate moves to the *IT Interview* task with the company IT department. Ashe task will get the *candidate* as an input assignment and as an output it will generate an *approval* boolean that represents assesment of hiring or not hiring the *candidate*. - -

- -
IT Interview assignments -

- - -The required *Kogito and Infrastructure Services* for this example are: - -- Infinispan / Postgresql -- Kafka -- Kogito Data Index -- Kogito Management Console -- Kogito Task Console -- Keycloak server - -## Running the Quickstart - -### Prerequisites - -* Java 11+ installed -* Environment variable JAVA_HOME set accordingly -* Maven 3.8.6+ installed -* Docker and Docker Compose to run the required example infrastructure. - -And when using native image compilation, you will also need: - - GraalVM 20.3+ installed - - Environment variable GRAALVM_HOME set accordingly - - GraalVM native image needs as well native-image extension: https://www.graalvm.org/reference-manual/native-image/ - - Note that GraalVM native image compilation typically requires other packages (glibc-devel, zlib-devel and gcc) to be installed too, please refer to GraalVM installation documentation for more details. - -### Starting the Kogito and Infrastructure Services - -This quickstart provides a docker compose template that starts all the required services. This setup ensures that all services are connected with a default configuration. - -

- -### Run Example with PostgreSQL - -#### Compile Hiring example with profile postgresql - -First thing is to compile the example with the postgresql profile executing: - -For Linux and MacOS: - -- Open a Terminal -- Go to the example folder and run -```sh -mvn clean install -Ppostgresql,container -``` - -#### Start infrastructure services - -You should start all the services before you execute any of the **Hiring** example, to do that please execute: - -For Linux and MacOS: - -1. Open a Terminal -2. Go to docker-compose folder -3. Run the ```startServices.sh``` script - -```bash -sh ./startServices.sh -``` - -or - -```bash -sh ./startServices.sh postgresql -``` - -Once all services bootstrap, the following ports will be assigned on your local machine: - -- PostgreSQL: 5432 -- Kafka: 9092 -- Data Index: 8180 -- Management Console: 8280 -- Task Console: 8380 -- Keycloak: 8480 -- PgAdmin: 8055 -- example-runtime-service: 8080 - -> **_NOTE:_** This step requires the project to be compiled, please consider running a ```mvn clean install -Ppostgresql,container``` command on the project root before running the ```startServices.sh``` script for the first time or any time you modify the project. - -Once started you can simply stop all services by executing the ```docker-compose -f docker-compose-postgresql.yml stop```. - -All created containers can be removed by executing the ```docker-compose -f docker-compose-postgresql.yml rm```. - -#### Run the Hiring example with PostgreSQL - -##### Compile and Run Hiring example process in Local Dev Mode - -Once all the infrastructure services are ready, you can start the Hiring example by doing: - -- Open a Terminal -- Go to the hiring example folder -- Start the example with the command - -```bash -mvn clean package quarkus:dev -Ppostgresql -``` - -NOTE: With dev mode of Quarkus you can take advantage of hot reload for business assets like processes, rules, decision tables and java code. No need to redeploy or restart your running application. - -##### Package and Run in JVM mode - -```sh -mvn clean package -Ppostgresql -java -jar target/quarkus-app/quarkus-run.jar -``` - -or on windows - -```sh -mvn clean package -Ppostgresql -java -jar target\quarkus-app\quarkus-run.jar -``` - -##### Package and Run using Local Native Image -Note that this requires GRAALVM_HOME to point to a valid GraalVM installation - -```sh -mvn clean package -Pnative -Ppostgresql -``` - -To run the generated native executable, generated in `target/`, execute - -```sh -./target/./target/process-usertasks-quarkus-with-console-runner -``` - -### Run Example with Infinispan - -#### Compile Hiring example with profile infinispan - -First thing is to compile the example with the infinispan profile executing: - -For Linux and MacOS: - -1. Open a Terminal -2. Go to the example folder and run -```sh -mvn clean install -Pinfinispan,container -``` -#### Start infrastructure services - -You should start all the services before you execute any of the **Hiring** example, to do that please execute: - -For Linux and MacOS: - -1. Open a Terminal -2. Go to docker-compose folder -3. Run the ```startServices.sh``` script with infinispan argument - -```bash -sh ./startServices.sh infinispan -``` - -Once all services bootstrap, the following ports will be assigned on your local machine: - -- Infinispan: 11222 -- Kafka: 9092 -- Data Index: 8180 -- Management Console: 8280 -- Task Console: 8380 -- Keycloak: 8480 -- example-runtime-service: 8080 - -> **_NOTE:_** This step requires the project to be compiled, please consider running a ```mvn clean install -Pinfinispan,container``` command on the project root before running the ```startServices.sh infinispan``` script for the first time or any time you modify the project. - -Once started you can simply stop all services by executing the ```docker-compose -f docker-compose-infinispan.yml stop```. - -All created containers can be removed by executing the ```docker-compose -f docker-compose-infinispan.yml rm```. - -#### Run the Hiring example with Infinispan - -##### Compile and Run Hiring example process in Local Dev Mode - -Once all the infrastructure services are ready, you can start the Hiring example by doing: - -- Open a Terminal -- Go to the hiring example folder -- Start the example with the command - -```bash -mvn clean package quarkus:dev -Pinfinispan -``` - -NOTE: With dev mode of Quarkus you can take advantage of hot reload for business assets like processes, rules, decision tables and java code. No need to redeploy or restart your running application. - -##### Package and Run in JVM mode - -```sh -mvn clean package -Pinfinispan -java -jar target/quarkus-app/quarkus-run.jar -``` - -or on windows - -```sh -mvn clean package -Pinfinispan -java -jar target\quarkus-app\quarkus-run.jar -``` - -##### Package and Run using Local Native Image -Note that this requires GRAALVM_HOME to point to a valid GraalVM installation - -```sh -mvn clean package -Pnative -Pinfinispan -``` - -To run the generated native executable, generated in `target/`, execute - -```sh -./target/./target/process-usertasks-quarkus-with-console-runner -``` - -### Using Keycloak as Authentication Server - -In this Quickstart we'll be using [Keycloak](https://www.keycloak.org/) as *Authentication Server*. It will be started as a part of the project *Infrastructure Services*, you can check the configuration on the project [docker-compose.yml](docker-compose/docker-compose.yml) in [docker-compose](docker-compose) folder. - -It will install the *Kogito Realm* that comes with a predefined set of users: -| Login | Password | Roles | -| ------------- | ---------- | ------------------- | -| admin | admin | *admin*, *managers* | -| alice | alice | *user* | -| jdoe | jdoe | *managers* | - -Once Keycloak is started, you should be able to access your *Keycloak Server* at [localhost:8480/auth](http://localhost:8480/auth) with *admin* user. - -### Submit a request to start new hiring - -Once the service is up and running you can make use of the **Hiring** application by a sending request to `http://localhost:8080/hiring` with following content: -```json -{ - "candidate": { - "name": "Jon Snow", - "email": "jsnow@example.com", - "salary": 30000, - "skills": "Java, Kogito" - } -} -``` - -In a Terminal you can execute this command to start a **Hiring** process for the "Jon Snow" candidate: -```bash -curl -H "Content-Type: application/json" -H "Accept: application/json" -X POST http://localhost:8080/hiring -d @- << EOF -{ - "candidate": { - "name": "Jon Snow", - "email": "jsnow@example.com", - "salary": 30000, - "skills": "Java, Kogito" - } -} -EOF -``` - -### Show active Hiring process instance at Kogito Management Console - -To access the Kogito Management Console just open your browser and navigate to ``http://localhost:8280``. You'll be redirected to the *Keycloak* log in page. - -

- -

- -Once there, log in using any of the users specified in the [Using Keycloak as Authentication Server](#using-keycloak-as-authentication-server) - -

- -

- -> **_NOTE:_** For more information about how to work with Kogito Management Console, please refer to the [Kogito Documentation](https://docs.jboss.org/kogito/release/latest/html_single/#con-management-console_kogito-developing-process-services) page. - -Check the process instance details to see where is the execution path - -

- -

- -### Execute HR Interview task at Kogito Task Console - -To access the Kogito Task Console just open your browser and navigate to ``http://localhost:8380``. You'll be redirected to the *Keycloak* log in page. - -

- -

- -Once there, log in with an *managers* user (for example *jdoe*) and you should be redirected to the user **Task Inbox**: - -

- -

- -> **_NOTE:_** For more information about how to work with Kogito Task Console, please refer to the [Kogito Documentation](https://docs.jboss.org/kogito/release/latest/html_single/#con-task-console_kogito-developing-process-services) page. - -Access to HR Interview task and complete - -

- -

- -Check the process instance details at Kogito Management Console to see the execution path reflects the completed task - -

- -

- - -### Execute IT Interview task - -Access to Task Console again and verify IT Interview is available -

- -

- -Access to IT Interview task -

- -

- -And after complete the task, check the list of tasks show both completed tasks -

- -

- -Check the process instance details to verify the instance have been completed - -

- -

diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docker-compose/.gitignore b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docker-compose/.gitignore deleted file mode 100644 index b6632dbda5..0000000000 --- a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docker-compose/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.env -svg/ -persistence/ \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docker-compose/docker-compose-infinispan.yml b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docker-compose/docker-compose-infinispan.yml deleted file mode 100755 index d7734a217e..0000000000 --- a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docker-compose/docker-compose-infinispan.yml +++ /dev/null @@ -1,144 +0,0 @@ -version: '2.1' - -services: - - infinispan: - image: infinispan/server:14.0.5.Final - container_name: infinispan - ports: - - "11222:11222" - command: "-c infinispan-demo.xml" - volumes: - - ./infinispan/infinispan.xml:/opt/infinispan/server/conf/infinispan-demo.xml:z - healthcheck: - test: [ "CMD", "curl", "-f", "http://localhost:11222/rest/v2/cache-managers/default/health/status" ] - interval: 1s - timeout: 1s - retries: 50 - - zookeeper: - container_name: zookeeper - image: strimzi/kafka:0.20.1-kafka-2.6.0 - command: [ - "sh", "-c", - "bin/zookeeper-server-start.sh config/zookeeper.properties" - ] - ports: - - "2181:2181" - environment: - LOG_DIR: "/tmp/logs" - - kafka: - image: strimzi/kafka:0.20.1-kafka-2.6.0 - container_name: kafka - command: [ - "sh", "-c", - "bin/kafka-server-start.sh config/server.properties --override inter.broker.listener.name=$${KAFKA_INTER_BROKER_LISTENER_NAME} --override listener.security.protocol.map=$${KAFKA_LISTENER_SECURITY_PROTOCOL_MAP} --override listeners=$${KAFKA_LISTENERS} --override advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS} --override zookeeper.connect=$${KAFKA_ZOOKEEPER_CONNECT}" - ] - depends_on: - - zookeeper - ports: - - "9092:9092" - environment: - KAFKA_BROKER_ID: 0 - KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 - KAFKA_LISTENERS: INTERNAL://kafka:29092,EXTERNAL://kafka:9092 - KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:29092,EXTERNAL://localhost:9092 - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT - KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL - KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true" - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 - LOG_DIR: "/tmp/logs" - - keycloak: - container_name: keycloak - image: quay.io/keycloak/keycloak:legacy - ports: - - "8480:8080" - volumes: - - ./keycloak/kogito-realm.json:/tmp/kogito-realm.json - healthcheck: - test: [ "CMD", "curl", "-f", "http://localhost:8080/auth/realms/kogito" ] - interval: 1s - timeout: 1s - retries: 50 - environment: - KEYCLOAK_USER: admin - KEYCLOAK_PASSWORD: admin - KEYCLOAK_IMPORT: /tmp/kogito-realm.json - - data-index: - container_name: data-index - image: quay.io/kiegroup/kogito-data-index-infinispan:${KOGITO_VERSION} - ports: - - "8180:8080" - depends_on: - kafka: - condition: service_started - infinispan: - condition: service_healthy - volumes: - - ./persistence/:/home/kogito/data/protobufs/ - environment: - QUARKUS_INFINISPAN_CLIENT_USE_AUTH: "false" - QUARKUS_INFINISPAN_CLIENT_HOSTS: infinispan:11222 - KAFKA_BOOTSTRAP_SERVERS: kafka:29092 - QUARKUS_HTTP_CORS_ORIGINS: "/.*/" - KOGITO_DATA_INDEX_PROPS: -Dkogito.protobuf.folder=/home/kogito/data/protobufs/ - - management-console: - container_name: management-console - image: quay.io/kiegroup/kogito-management-console:${KOGITO_VERSION} - ports: - - 8280:8080 - depends_on: - data-index: - condition: service_started - keycloak: - condition: service_healthy - volumes: - - ./svg/:/home/kogito/data/svg/ - environment: - KOGITO_DATAINDEX_HTTP_URL: http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8180/graphql - QUARKUS_HTTP_CORS_ORIGINS: "/.*/" - KOGITO_MANAGEMENT_CONSOLE_PROPS: -Dkogito.consoles.keycloak.config.url=http://localhost:8480/auth -Dkogito.consoles.keycloak.config.health-check-url=http://localhost:8480/auth/realms/kogito/.well-known/openid-configuration -Dkogito.svg.folder.path=/home/kogito/data/svg - - task-console: - container_name: task-console - image: quay.io/kiegroup/kogito-task-console:${KOGITO_VERSION} - ports: - - 8380:8080 - depends_on: - data-index: - condition: service_started - keycloak: - condition: service_healthy - environment: - KOGITO_DATAINDEX_HTTP_URL: http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8180/graphql - QUARKUS_HTTP_CORS_ORIGINS: "/.*/" - KOGITO_TASK_CONSOLE_PROPS: -Dkogito.consoles.keycloak.config.url=http://localhost:8480/auth -Dkogito.consoles.keycloak.config.health-check-url=http://localhost:8480/auth/realms/kogito/.well-known/openid-configuration - - example-runtime-service: - container_name: example-runtime-service - image: dev.local/${USER}/process-usertasks-quarkus-with-console:1.0-SNAPSHOT - ports: - - "8080:8080" - depends_on: - kafka: - condition: service_started - infinispan: - condition: service_healthy - data-index: - condition: service_started - volumes: - - ./../target/classes/META-INF/processSVG/:/home/kogito/data/svg/ - environment: - QUARKUS_INFINISPAN_CLIENT_USE_AUTH: "false" - QUARKUS_INFINISPAN_CLIENT_HOSTS: infinispan:11222 - KAFKA_BOOTSTRAP_SERVERS: kafka:29092 - QUARKUS_DATASOURCE_DB_KIND: infinispan - KOGITO_SERVICE_URL: http://example-runtime-service:8080 - KOGITO_DATAINDEX_HTTP_URL: http://data-index:8180 - QUARKUS_HTTP_CORS_ORIGINS: "/.*/" - extra_hosts: - - "data-index:host-gateway" \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docker-compose/docker-compose-postgresql.yml b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docker-compose/docker-compose-postgresql.yml deleted file mode 100755 index 926d596bde..0000000000 --- a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docker-compose/docker-compose-postgresql.yml +++ /dev/null @@ -1,167 +0,0 @@ -version: '2.1' - -services: - postgres: - image: postgres:13.4-alpine3.14 - ports: - - "5432:5432" - volumes: - - ./sql:/docker-entrypoint-initdb.d/ - healthcheck: - test: [ "CMD", "pg_isready", "-q", "-d", "kogito", "-U", "kogito-user" ] - timeout: 45s - interval: 10s - retries: 50 - environment: - - POSTGRES_USER=postgres - - POSTGRES_PASSWORD=postgres - - pgadmin-compose: - image: dpage/pgadmin4:5.0 - environment: - PGADMIN_DEFAULT_EMAIL: user@user.org - PGADMIN_DEFAULT_PASSWORD: pass - ports: - - 8055:80 - depends_on: - - postgres - container_name: pgadmin-container - - zookeeper: - container_name: zookeeper - image: strimzi/kafka:0.20.1-kafka-2.6.0 - command: [ - "sh", "-c", - "bin/zookeeper-server-start.sh config/zookeeper.properties" - ] - ports: - - "2181:2181" - environment: - LOG_DIR: "/tmp/logs" - - kafka: - image: strimzi/kafka:0.20.1-kafka-2.6.0 - container_name: kafka - command: [ - "sh", "-c", - "bin/kafka-server-start.sh config/server.properties --override inter.broker.listener.name=$${KAFKA_INTER_BROKER_LISTENER_NAME} --override listener.security.protocol.map=$${KAFKA_LISTENER_SECURITY_PROTOCOL_MAP} --override listeners=$${KAFKA_LISTENERS} --override advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS} --override zookeeper.connect=$${KAFKA_ZOOKEEPER_CONNECT}" - ] - depends_on: - - zookeeper - ports: - - "9092:9092" - environment: - KAFKA_BROKER_ID: 0 - KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 - KAFKA_LISTENERS: INTERNAL://kafka:29092,EXTERNAL://kafka:9092 - KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:29092,EXTERNAL://localhost:9092 - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT - KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL - KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true" - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 - LOG_DIR: "/tmp/logs" - - keycloak: - container_name: keycloak - image: quay.io/keycloak/keycloak:legacy - ports: - - "8480:8080" - volumes: - - ./keycloak/kogito-realm.json:/tmp/kogito-realm.json - healthcheck: - test: [ "CMD", "curl", "-f", "http://localhost:8080/auth/realms/kogito" ] - interval: 1s - timeout: 1s - retries: 50 - environment: - DB_VENDOR: POSTGRES - DB_ADDR: postgres - DB_DATABASE: kogito - DB_USER: kogito-user - DB_SCHEMA: public - DB_PASSWORD: kogito-pass - KEYCLOAK_USER: admin - KEYCLOAK_PASSWORD: admin - KEYCLOAK_IMPORT: /tmp/kogito-realm.json - - data-index: - container_name: data-index - image: quay.io/kiegroup/kogito-data-index-postgresql:${KOGITO_VERSION} - ports: - - "8180:8080" - depends_on: - kafka: - condition: service_started - postgres: - condition: service_healthy - volumes: - - ./target/protobuf:/home/kogito/data/protobufs/ - environment: - QUARKUS_DATASOURCE_JDBC_URL: "jdbc:postgresql://postgres:5432/kogito" - QUARKUS_DATASOURCE_USERNAME: kogito-user - QUARKUS_DATASOURCE_PASSWORD: kogito-pass - KAFKA_BOOTSTRAP_SERVERS: kafka:29092 - QUARKUS_HTTP_CORS_ORIGINS: "/.*/" - KOGITO_DATA_INDEX_PROPS: -Dquarkus.hibernate-orm.database.generation=update - - management-console: - container_name: management-console - image: quay.io/kiegroup/kogito-management-console:${KOGITO_VERSION} - ports: - - "8280:8080" - depends_on: - data-index: - condition: service_started - keycloak: - condition: service_healthy - volumes: - - ../target/classes/META-INF/processSVG/:/home/kogito/data/svg/ - environment: - KOGITO_DATAINDEX_HTTP_URL: http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8180/graphql - QUARKUS_HTTP_CORS_ORIGINS: "/.*/" - KOGITO_MANAGEMENT_CONSOLE_PROPS: -Dkogito.consoles.keycloak.config.url=http://localhost:8480/auth - -Dkogito.consoles.keycloak.config.health-check-url=http://localhost:8480/auth/realms/kogito/.well-known/openid-configuration - -Dkogito.svg.folder.path=/home/kogito/data/svg - - task-console: - container_name: task-console - image: quay.io/kiegroup/kogito-task-console:${KOGITO_VERSION} - ports: - - "8380:8080" - depends_on: - data-index: - condition: service_started - keycloak: - condition: service_healthy - environment: - KOGITO_DATAINDEX_HTTP_URL: http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8180/graphql - QUARKUS_HTTP_CORS_ORIGINS: "/.*/" - KOGITO_TASK_CONSOLE_PROPS: -Dkogito.consoles.keycloak.config.url=http://localhost:8480/auth - -Dkogito.consoles.keycloak.config.health-check-url=http://localhost:8480/auth/realms/kogito/.well-known/openid-configuration - - example-runtime-service: - container_name: example-runtime-service - image: dev.local/${USER}/process-usertasks-quarkus-with-console:1.0-SNAPSHOT - ports: - - "8080:8080" - depends_on: - kafka: - condition: service_started - postgres: - condition: service_healthy - data-index: - condition: service_started - volumes: - - ./../target/classes/META-INF/processSVG/:/home/kogito/data/svg/ - environment: - QUARKUS_DATASOURCE_JDBC_URL: "jdbc:postgresql://postgres:5432/kogito" - QUARKUS_DATASOURCE_USERNAME: kogito-user - QUARKUS_DATASOURCE_PASSWORD: kogito-pass - QUARKUS_DATASOURCE_DB_KIND: postgresql - KAFKA_BOOTSTRAP_SERVERS: kafka:29092 - KOGITO_SERVICE_URL: http://example-runtime-service:8080 - KOGITO_DATAINDEX_HTTP_URL: http://data-index:8180 - QUARKUS_FLYWAY_BASELINE_ON_MIGRATE: "true" - QUARKUS_HTTP_CORS_ORIGINS: "/.*/" - extra_hosts: - - "data-index:host-gateway" \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docker-compose/infinispan/infinispan.xml b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docker-compose/infinispan/infinispan.xml deleted file mode 100755 index 4d594bfc24..0000000000 --- a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docker-compose/infinispan/infinispan.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docker-compose/keycloak/kogito-realm.json b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docker-compose/keycloak/kogito-realm.json deleted file mode 100644 index fd3cdc0942..0000000000 --- a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docker-compose/keycloak/kogito-realm.json +++ /dev/null @@ -1,2242 +0,0 @@ -{ - "realm": "kogito", - "notBefore": 0, - "revokeRefreshToken": false, - "refreshTokenMaxReuse": 0, - "accessTokenLifespan": 300, - "accessTokenLifespanForImplicitFlow": 900, - "ssoSessionIdleTimeout": 1800, - "ssoSessionMaxLifespan": 36000, - "ssoSessionIdleTimeoutRememberMe": 0, - "ssoSessionMaxLifespanRememberMe": 0, - "offlineSessionIdleTimeout": 2592000, - "offlineSessionMaxLifespanEnabled": false, - "offlineSessionMaxLifespan": 5184000, - "accessCodeLifespan": 60, - "accessCodeLifespanUserAction": 300, - "accessCodeLifespanLogin": 1800, - "actionTokenGeneratedByAdminLifespan": 43200, - "actionTokenGeneratedByUserLifespan": 300, - "enabled": true, - "sslRequired": "external", - "registrationAllowed": false, - "registrationEmailAsUsername": false, - "rememberMe": false, - "verifyEmail": false, - "loginWithEmailAllowed": true, - "duplicateEmailsAllowed": false, - "resetPasswordAllowed": false, - "editUsernameAllowed": false, - "bruteForceProtected": false, - "permanentLockout": false, - "maxFailureWaitSeconds": 900, - "minimumQuickLoginWaitSeconds": 60, - "waitIncrementSeconds": 60, - "quickLoginCheckMilliSeconds": 1000, - "maxDeltaTimeSeconds": 43200, - "failureFactor": 30, - "roles": { - "realm": [ - { - "name": "managers", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - }, - { - "name": "uma_authorization", - "description": "${role_uma_authorization}", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - }, - { - "name": "admin", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - }, - { - "name": "user", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - }, - { - "name": "HR", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - }, - { - "name": "IT", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - }, - { - "name": "offline_access", - "description": "${role_offline-access}", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - } - ], - "client": { - "realm-management": [ - { - "name": "manage-identity-providers", - "description": "${role_manage-identity-providers}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "impersonation", - "description": "${role_impersonation}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "view-identity-providers", - "description": "${role_view-identity-providers}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "view-realm", - "description": "${role_view-realm}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "query-users", - "description": "${role_query-users}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "manage-clients", - "description": "${role_manage-clients}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "manage-events", - "description": "${role_manage-events}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "realm-admin", - "description": "${role_realm-admin}", - "composite": true, - "composites": { - "client": { - "realm-management": [ - "impersonation", - "manage-identity-providers", - "view-identity-providers", - "view-realm", - "query-users", - "manage-clients", - "manage-events", - "manage-realm", - "view-authorization", - "manage-authorization", - "view-users", - "create-client", - "query-clients", - "query-groups", - "manage-users", - "view-clients", - "view-events", - "query-realms" - ] - } - }, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "manage-realm", - "description": "${role_manage-realm}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "view-authorization", - "description": "${role_view-authorization}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "manage-authorization", - "description": "${role_manage-authorization}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "create-client", - "description": "${role_create-client}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "view-users", - "description": "${role_view-users}", - "composite": true, - "composites": { - "client": { - "realm-management": [ - "query-groups", - "query-users" - ] - } - }, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "query-clients", - "description": "${role_query-clients}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "query-groups", - "description": "${role_query-groups}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "manage-users", - "description": "${role_manage-users}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "view-clients", - "description": "${role_view-clients}", - "composite": true, - "composites": { - "client": { - "realm-management": [ - "query-clients" - ] - } - }, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "view-events", - "description": "${role_view-events}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "query-realms", - "description": "${role_query-realms}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - } - ], - "security-admin-console": [], - "admin-cli": [], - "kogito-service": [ - { - "name": "uma_protection", - "composite": false, - "clientRole": true, - "containerId": "0ac5df91-e044-4051-bd03-106a3a5fb9cc", - "attributes": {} - } - ], - "broker": [ - { - "name": "read-token", - "description": "${role_read-token}", - "composite": false, - "clientRole": true, - "containerId": "53d4fe53-a039-471e-886a-28eddc950e95", - "attributes": {} - } - ], - "account": [ - { - "name": "view-profile", - "description": "${role_view-profile}", - "composite": false, - "clientRole": true, - "containerId": "e55e1234-38fa-432d-8d90-39f5e024688d", - "attributes": {} - }, - { - "name": "manage-account", - "description": "${role_manage-account}", - "composite": true, - "composites": { - "client": { - "account": [ - "manage-account-links" - ] - } - }, - "clientRole": true, - "containerId": "e55e1234-38fa-432d-8d90-39f5e024688d", - "attributes": {} - }, - { - "name": "manage-account-links", - "description": "${role_manage-account-links}", - "composite": false, - "clientRole": true, - "containerId": "e55e1234-38fa-432d-8d90-39f5e024688d", - "attributes": {} - } - ] - } - }, - "groups": [], - "defaultRoles": [ - "uma_authorization", - "offline_access" - ], - "requiredCredentials": [ - "password" - ], - "otpPolicyType": "totp", - "otpPolicyAlgorithm": "HmacSHA1", - "otpPolicyInitialCounter": 0, - "otpPolicyDigits": 6, - "otpPolicyLookAheadWindow": 1, - "otpPolicyPeriod": 30, - "otpSupportedApplications": [ - "FreeOTP", - "Google Authenticator" - ], - "scopeMappings": [ - { - "clientScope": "offline_access", - "roles": [ - "offline_access" - ] - } - ], - "clients": [ - { - "clientId": "account", - "name": "${client_account}", - "baseUrl": "/auth/realms/kogito/account", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "0136c3ef-0dfd-4b13-a6d0-2c8b6358edec", - "defaultRoles": [ - "view-profile", - "manage-account" - ], - "redirectUris": [ - "/auth/realms/kogito/account/*" - ], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "clientId": "admin-cli", - "name": "${client_admin-cli}", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "a951803a-79c7-46a6-8197-e32835286971", - "redirectUris": [], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": false, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": true, - "serviceAccountsEnabled": false, - "publicClient": true, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "clientId": "broker", - "name": "${client_broker}", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "e1f7edd7-e15c-43b4-8736-ff8204d16836", - "redirectUris": [], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "clientId": "kogito-frontend", - "rootUrl": "http://localhost:8082", - "adminUrl": "http://localhost:8082", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "secret", - "redirectUris": [ - "http://localhost:8082/*" - ], - "webOrigins": [ - "http://localhost:8082" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": true, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": { - "saml.assertion.signature": "false", - "saml.force.post.binding": "false", - "saml.multivalued.roles": "false", - "saml.encrypt": "false", - "saml.server.signature": "false", - "saml.server.signature.keyinfo.ext": "false", - "exclude.session.state.from.auth.response": "false", - "saml_force_name_id_format": "false", - "saml.client.signature": "false", - "tls.client.certificate.bound.access.tokens": "false", - "saml.authnstatement": "false", - "display.on.consent.screen": "false", - "saml.onetimeuse.condition": "false" - }, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ], - "access": { - "view": true, - "configure": true, - "manage": true - } - }, - { - "clientId": "kogito-app", - "rootUrl": "http://localhost:8080", - "adminUrl": "http://localhost:8080", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "secret", - "redirectUris": [ - "http://localhost:8080/*" - ], - "webOrigins": [ - "*" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": true, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": { - "saml.assertion.signature": "false", - "saml.force.post.binding": "false", - "saml.multivalued.roles": "false", - "saml.encrypt": "false", - "saml.server.signature": "false", - "saml.server.signature.keyinfo.ext": "false", - "exclude.session.state.from.auth.response": "false", - "saml_force_name_id_format": "false", - "saml.client.signature": "false", - "tls.client.certificate.bound.access.tokens": "false", - "saml.authnstatement": "false", - "display.on.consent.screen": "false", - "saml.onetimeuse.condition": "false" - }, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ], - "access": { - "view": true, - "configure": true, - "manage": true - } - }, - { - "clientId": "kogito-service", - "rootUrl": "", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "secret", - "redirectUris": [ - "*" - ], - "webOrigins": [ - "*" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": true, - "serviceAccountsEnabled": true, - "authorizationServicesEnabled": true, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "protocolMappers": [ - { - "name": "Client ID", - "protocol": "openid-connect", - "protocolMapper": "oidc-usersessionmodel-note-mapper", - "consentRequired": false, - "config": { - "user.session.note": "clientId", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "clientId", - "jsonType.label": "String" - } - }, - { - "name": "Client IP Address", - "protocol": "openid-connect", - "protocolMapper": "oidc-usersessionmodel-note-mapper", - "consentRequired": false, - "config": { - "user.session.note": "clientAddress", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "clientAddress", - "jsonType.label": "String" - } - }, - { - "name": "Client Host", - "protocol": "openid-connect", - "protocolMapper": "oidc-usersessionmodel-note-mapper", - "consentRequired": false, - "config": { - "user.session.note": "clientHost", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "clientHost", - "jsonType.label": "String" - } - } - ], - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ], - "authorizationSettings": { - "allowRemoteResourceManagement": true, - "policyEnforcementMode": "ENFORCING", - "resources": [ - { - "name": "User Resource", - "ownerManagedAccess": false, - "attributes": {}, - "_id": "df1b74a9-3f10-499d-a581-368de48e512b", - "uris": [ - "/api/users/*" - ] - }, - { - "name": "Administration Resource", - "ownerManagedAccess": false, - "attributes": {}, - "_id": "7124e2f1-e6dc-44b4-87ab-24b010090b97", - "uris": [ - "/api/admin/*" - ] - } - ], - "policies": [ - { - "name": "Any User Policy", - "description": "Any user granted with the user role can access something", - "type": "role", - "logic": "POSITIVE", - "decisionStrategy": "UNANIMOUS", - "config": { - "roles": "[{\"id\":\"user\",\"required\":false}]" - } - }, - { - "name": "Only Administrators", - "description": "Only administrators can access", - "type": "role", - "logic": "POSITIVE", - "decisionStrategy": "UNANIMOUS", - "config": { - "roles": "[{\"id\":\"admin\",\"required\":false}]" - } - }, - { - "name": "User Resource Permission", - "type": "resource", - "logic": "POSITIVE", - "decisionStrategy": "UNANIMOUS", - "config": { - "resources": "[\"User Resource\"]", - "applyPolicies": "[\"Any User Policy\"]" - } - }, - { - "name": "Administration Resource Permission", - "type": "resource", - "logic": "POSITIVE", - "decisionStrategy": "UNANIMOUS", - "config": { - "resources": "[\"Administration Resource\"]", - "applyPolicies": "[\"Only Administrators\"]" - } - } - ], - "scopes": [], - "decisionStrategy": "UNANIMOUS" - } - }, - { - "clientId": "kogito-console-react", - "rootUrl": "http://localhost:9000", - "adminUrl": "http://localhost:9000/", - "baseUrl": "http://localhost:9000/", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "**********", - "redirectUris": [ - "http://localhost:9000/*" - ], - "webOrigins": [ - "*" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": true, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": { - "saml.assertion.signature": "false", - "saml.force.post.binding": "false", - "saml.multivalued.roles": "false", - "saml.encrypt": "false", - "saml.server.signature": "false", - "saml.server.signature.keyinfo.ext": "false", - "exclude.session.state.from.auth.response": "false", - "saml_force_name_id_format": "false", - "saml.client.signature": "false", - "tls.client.certificate.bound.access.tokens": "false", - "saml.authnstatement": "false", - "display.on.consent.screen": "false", - "saml.onetimeuse.condition": "false" - }, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "clientId": "kogito-console-quarkus", - "rootUrl": "http://localhost:8380", - "adminUrl": "http://localhost:8380/", - "baseUrl": "http://localhost:8380/", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "**********", - "redirectUris": [ - "http://localhost:8380/*", - "http://localhost:8280/*" - ], - "webOrigins": [ - "*" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": true, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": { - "saml.assertion.signature": "false", - "saml.force.post.binding": "false", - "saml.multivalued.roles": "false", - "saml.encrypt": "false", - "saml.server.signature": "false", - "saml.server.signature.keyinfo.ext": "false", - "exclude.session.state.from.auth.response": "false", - "saml_force_name_id_format": "false", - "saml.client.signature": "false", - "tls.client.certificate.bound.access.tokens": "false", - "saml.authnstatement": "false", - "display.on.consent.screen": "false", - "saml.onetimeuse.condition": "false" - }, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "protocolMappers": [ - { - "name": "groups", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-realm-role-mapper", - "consentRequired": false, - "config": { - "multivalued": "true", - "user.attribute": "foo", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "groups", - "jsonType.label": "String" - } - } - ], - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "clientId": "kogito-jobs-service", - "rootUrl": "http://localhost:8080", - "adminUrl": "http://localhost:8080", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "secret", - "redirectUris": [ - "http://localhost:8080/*" - ], - "webOrigins": [ - "http://localhost:8080" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": true, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": { - "saml.assertion.signature": "false", - "saml.force.post.binding": "false", - "saml.multivalued.roles": "false", - "saml.encrypt": "false", - "saml.server.signature": "false", - "saml.server.signature.keyinfo.ext": "false", - "exclude.session.state.from.auth.response": "false", - "saml_force_name_id_format": "false", - "saml.client.signature": "false", - "tls.client.certificate.bound.access.tokens": "false", - "saml.authnstatement": "false", - "display.on.consent.screen": "false", - "saml.onetimeuse.condition": "false" - }, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ], - "access": { - "view": true, - "configure": true, - "manage": true - } - }, - { - "clientId": "realm-management", - "name": "${client_realm-management}", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "c41b709a-a012-4c69-89d7-4f926dba0619", - "redirectUris": [], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": true, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "clientId": "security-admin-console", - "name": "${client_security-admin-console}", - "baseUrl": "/auth/admin/kogito/console/index.html", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "e571b211-2550-475d-b87f-116ff54091ee", - "redirectUris": [ - "/auth/admin/kogito/console/*" - ], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": true, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "protocolMappers": [ - { - "name": "locale", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "locale", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "locale", - "jsonType.label": "String" - } - } - ], - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - } - ], - "clientScopes": [ - { - "name": "address", - "description": "OpenID Connect built-in scope: address", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "true", - "consent.screen.text": "${addressScopeConsentText}" - }, - "protocolMappers": [ - { - "name": "address", - "protocol": "openid-connect", - "protocolMapper": "oidc-address-mapper", - "consentRequired": false, - "config": { - "user.attribute.formatted": "formatted", - "user.attribute.country": "country", - "user.attribute.postal_code": "postal_code", - "userinfo.token.claim": "true", - "user.attribute.street": "street", - "id.token.claim": "true", - "user.attribute.region": "region", - "access.token.claim": "true", - "user.attribute.locality": "locality" - } - } - ] - }, - { - "name": "email", - "description": "OpenID Connect built-in scope: email", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "true", - "consent.screen.text": "${emailScopeConsentText}" - }, - "protocolMappers": [ - { - "name": "email", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "email", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "email", - "jsonType.label": "String" - } - }, - { - "name": "email verified", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "emailVerified", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "email_verified", - "jsonType.label": "boolean" - } - } - ] - }, - { - "name": "microprofile-jwt", - "description": "Microprofile - JWT built-in scope", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "false" - }, - "protocolMappers": [ - { - "name": "upn", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "username", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "upn", - "jsonType.label": "String" - } - }, - { - "name": "groups", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-realm-role-mapper", - "consentRequired": false, - "config": { - "multivalued": "true", - "user.attribute": "foo", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "groups", - "jsonType.label": "String" - } - } - ] - }, - { - "name": "offline_access", - "description": "OpenID Connect built-in scope: offline_access", - "protocol": "openid-connect", - "attributes": { - "consent.screen.text": "${offlineAccessScopeConsentText}", - "display.on.consent.screen": "true" - } - }, - { - "name": "phone", - "description": "OpenID Connect built-in scope: phone", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "true", - "consent.screen.text": "${phoneScopeConsentText}" - }, - "protocolMappers": [ - { - "name": "phone number verified", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "phoneNumberVerified", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "phone_number_verified", - "jsonType.label": "boolean" - } - }, - { - "name": "phone number", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "phoneNumber", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "phone_number", - "jsonType.label": "String" - } - } - ] - }, - { - "name": "profile", - "description": "OpenID Connect built-in scope: profile", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "true", - "consent.screen.text": "${profileScopeConsentText}" - }, - "protocolMappers": [ - { - "name": "nickname", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "nickname", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "nickname", - "jsonType.label": "String" - } - }, - { - "name": "zoneinfo", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "zoneinfo", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "zoneinfo", - "jsonType.label": "String" - } - }, - { - "name": "updated at", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "updatedAt", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "updated_at", - "jsonType.label": "String" - } - }, - { - "name": "birthdate", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "birthdate", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "birthdate", - "jsonType.label": "String" - } - }, - { - "name": "given name", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "firstName", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "given_name", - "jsonType.label": "String" - } - }, - { - "name": "full name", - "protocol": "openid-connect", - "protocolMapper": "oidc-full-name-mapper", - "consentRequired": false, - "config": { - "id.token.claim": "true", - "access.token.claim": "true", - "userinfo.token.claim": "true" - } - }, - { - "name": "middle name", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "middleName", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "middle_name", - "jsonType.label": "String" - } - }, - { - "name": "username", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "username", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "preferred_username", - "jsonType.label": "String" - } - }, - { - "name": "family name", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "lastName", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "family_name", - "jsonType.label": "String" - } - }, - { - "name": "gender", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "gender", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "gender", - "jsonType.label": "String" - } - }, - { - "name": "picture", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "picture", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "picture", - "jsonType.label": "String" - } - }, - { - "name": "locale", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "locale", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "locale", - "jsonType.label": "String" - } - }, - { - "name": "profile", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "profile", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "profile", - "jsonType.label": "String" - } - }, - { - "name": "website", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "website", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "website", - "jsonType.label": "String" - } - } - ] - }, - { - "name": "role_list", - "description": "SAML role list", - "protocol": "saml", - "attributes": { - "consent.screen.text": "${samlRoleListScopeConsentText}", - "display.on.consent.screen": "true" - }, - "protocolMappers": [ - { - "name": "role list", - "protocol": "saml", - "protocolMapper": "saml-role-list-mapper", - "consentRequired": false, - "config": { - "single": "false", - "attribute.nameformat": "Basic", - "attribute.name": "Role" - } - } - ] - }, - { - "name": "roles", - "description": "OpenID Connect scope for add user roles to the access token", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "false", - "display.on.consent.screen": "true", - "consent.screen.text": "${rolesScopeConsentText}" - }, - "protocolMappers": [ - { - "name": "realm roles", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-realm-role-mapper", - "consentRequired": false, - "config": { - "user.attribute": "foo", - "access.token.claim": "true", - "claim.name": "realm_access.roles", - "jsonType.label": "String", - "multivalued": "true" - } - }, - { - "name": "audience resolve", - "protocol": "openid-connect", - "protocolMapper": "oidc-audience-resolve-mapper", - "consentRequired": false, - "config": {} - }, - { - "name": "client roles", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-client-role-mapper", - "consentRequired": false, - "config": { - "user.attribute": "foo", - "access.token.claim": "true", - "claim.name": "resource_access.${client_id}.roles", - "jsonType.label": "String", - "multivalued": "true" - } - } - ] - }, - { - "name": "web-origins", - "description": "OpenID Connect scope for add allowed web origins to the access token", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "false", - "display.on.consent.screen": "false", - "consent.screen.text": "" - }, - "protocolMappers": [ - { - "name": "allowed web origins", - "protocol": "openid-connect", - "protocolMapper": "oidc-allowed-origins-mapper", - "consentRequired": false, - "config": {} - } - ] - } - ], - "defaultDefaultClientScopes": [ - "role_list", - "profile", - "email", - "roles", - "web-origins" - ], - "defaultOptionalClientScopes": [ - "offline_access", - "address", - "phone", - "microprofile-jwt" - ], - "browserSecurityHeaders": { - "contentSecurityPolicyReportOnly": "", - "xContentTypeOptions": "nosniff", - "xRobotsTag": "none", - "xFrameOptions": "SAMEORIGIN", - "xXSSProtection": "1; mode=block", - "contentSecurityPolicy": "frame-src 'self'; frame-ancestors 'self'; object-src 'none';", - "strictTransportSecurity": "max-age=31536000; includeSubDomains" - }, - "smtpServer": {}, - "eventsEnabled": false, - "eventsListeners": [ - "jboss-logging" - ], - "enabledEventTypes": [], - "adminEventsEnabled": false, - "adminEventsDetailsEnabled": false, - "components": { - "org.keycloak.services.clientregistration.policy.ClientRegistrationPolicy": [ - { - "name": "Allowed Protocol Mapper Types", - "providerId": "allowed-protocol-mappers", - "subType": "anonymous", - "subComponents": {}, - "config": { - "allowed-protocol-mapper-types": [ - "oidc-full-name-mapper", - "saml-user-attribute-mapper", - "saml-user-property-mapper", - "oidc-address-mapper", - "saml-role-list-mapper", - "oidc-sha256-pairwise-sub-mapper", - "oidc-usermodel-attribute-mapper", - "oidc-usermodel-property-mapper" - ] - } - }, - { - "name": "Allowed Client Scopes", - "providerId": "allowed-client-templates", - "subType": "authenticated", - "subComponents": {}, - "config": { - "allow-default-scopes": [ - "true" - ] - } - }, - { - "name": "Allowed Client Scopes", - "providerId": "allowed-client-templates", - "subType": "anonymous", - "subComponents": {}, - "config": { - "allow-default-scopes": [ - "true" - ] - } - }, - { - "name": "Trusted Hosts", - "providerId": "trusted-hosts", - "subType": "anonymous", - "subComponents": {}, - "config": { - "host-sending-registration-request-must-match": [ - "true" - ], - "client-uris-must-match": [ - "true" - ] - } - }, - { - "name": "Full Scope Disabled", - "providerId": "scope", - "subType": "anonymous", - "subComponents": {}, - "config": {} - }, - { - "name": "Max Clients Limit", - "providerId": "max-clients", - "subType": "anonymous", - "subComponents": {}, - "config": { - "max-clients": [ - "200" - ] - } - }, - { - "name": "Consent Required", - "providerId": "consent-required", - "subType": "anonymous", - "subComponents": {}, - "config": {} - }, - { - "name": "Allowed Protocol Mapper Types", - "providerId": "allowed-protocol-mappers", - "subType": "authenticated", - "subComponents": {}, - "config": { - "allowed-protocol-mapper-types": [ - "saml-user-attribute-mapper", - "oidc-full-name-mapper", - "saml-role-list-mapper", - "saml-user-property-mapper", - "oidc-usermodel-attribute-mapper", - "oidc-address-mapper", - "oidc-usermodel-property-mapper", - "oidc-sha256-pairwise-sub-mapper" - ] - } - } - ], - "org.keycloak.keys.KeyProvider": [ - { - "name": "rsa-generated", - "providerId": "rsa-generated", - "subComponents": {}, - "config": { - "privateKey": [ - "MIIEowIBAAKCAQEAn5T13suF8mlS+pJXp0U1bto41nW55wpcs+Rps8ZVCRyJKWqzwSCYnI7lm0rB2wBpAAO4OPoj1zlmVoFmBPsDU9Xf7rjsJb5LIzIQDCZY44aSDZt6RR+gakPiQvlzHyW/RozYpngDJF7TsTD7rdRF1xQ4RprfBF8fwK/xsU7pxbeom5xDHZhz3fiw8s+7UdbmnazDHfAjU58aUrLGgVRfUsuoHjtsptYlOIXEifaeMetXZE+HhqLYRHQPDap5fbBJl773Trosn7N9nmzN4x1xxGj9So21WC5UboQs9sAIVgizc4omjZ5Y4RN9HLH7G4YwJctNntzmnJhDui9zAO+zSQIDAQABAoIBADi+F7rTtVoft0Cfnok8o6Y58/HVxHdxiMryUd95iy0FN4RBi48FTx6D9QKFz25Ws/8sU2n3D51srIXf1u24b1N0/f39RQKaqk7mcyxOylaEuBQcj5pah4ihgKd92UBfBKdKV5LBo6RgD3e2yhbiHr8+UlBQqzH7vOef6Bm6zIbfmi3N88swAJhP0YizRZFklsbmLsK6nkwyro00CHJvPVKSBbM+ad+/zIBsLw56MvNngB5TuFguUgoljd6M1T2z4utmZGlTUqrfE1onAVLJZoGnRohyIr7dJEg6YxWR70PxsgmkDKyeRvet9P1trO0n+OSprusfrC3cHJStabap1V0CgYEA1A/CtsqTnjdYYsB19eumZgdpzUgNc/YEAzZ/OWb8yTLoB2ncci+63A1rXHUXAqJFY7vtjn5mxv7SuASNbUrzq+6KfZvC1x9XEtnczqT/ypunNfxmIZuj8Nuu6vtURguZ8kPPwdkI8toTizRFeRE5ZDBvoQryiEVYugfHaHT5vzsCgYEAwKWODwquI0Lv9BuwdNVrBXQpkKh3ZfYOA7i9xvhxlM7xUu8OMCwwCPn3r7vrW5APjTqX4h330mJ44SLEs+7gbCUs4BbJBLA6g0ChlHa9PTkxp6tk2nDF/B34fxiZSRkE85L+d+at0Dc3hnlzLCJCzJawGpoPniPU9e4w0p4dN0sCgYAsGnMGjS8SUrRhJWHjGXVr9tK8TOXvXhULjgP7rj2Yoqu7Dvs4DFEyft/7RKbad2EzEtyfLA64CDtO5jN7rYDsGxpWcVSeZPg5BXJ0z8AbJTArfCjJiJMZ/rZsTIUEZFlKF2xYBolj6JLz+pUQTtK+0YwF1D8ItFN1rTR9twZSDQKBgQC6sPXNX+VH6LuPTjIf1x8CxwLs3EXxOpV0R9kp9GRl+HJnk6GlT30xhcThufQo5KAdllXQXIhoiuNoEoCbevhj9Vbax1oBQCNERSMRNEzKAx46xd9TzYwgeo7x5E3QR/3DaoVOfu+cY5ZcrF/PulgP2kxJS1mtQD5GIpGP2oinpwKBgGqiqTFPqRcelx76vBvTU+Jp1zM62T4AotbMrSQR/oUvqHe5Ytj/SbZx+wbbHAiyGgV700Mosyviik83YEAbR3kdOPjgYvAJJW2Y3jEMdQ7MwriXz8XLh5BGmYfVjkSOJXed9ua9WlYLKOJeXXv191BbDvrx5NXuJyVVU4vJx3YZ" - ], - "certificate": [ - "MIICnTCCAYUCBgFp4EYIrjANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQDDAdwcm90ZWFuMB4XDTE5MDQwMjIyNTYxOVoXDTI5MDQwMjIyNTc1OVowEjEQMA4GA1UEAwwHcHJvdGVhbjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ+U9d7LhfJpUvqSV6dFNW7aONZ1uecKXLPkabPGVQkciSlqs8EgmJyO5ZtKwdsAaQADuDj6I9c5ZlaBZgT7A1PV3+647CW+SyMyEAwmWOOGkg2bekUfoGpD4kL5cx8lv0aM2KZ4AyRe07Ew+63URdcUOEaa3wRfH8Cv8bFO6cW3qJucQx2Yc934sPLPu1HW5p2swx3wI1OfGlKyxoFUX1LLqB47bKbWJTiFxIn2njHrV2RPh4ai2ER0Dw2qeX2wSZe+9066LJ+zfZ5szeMdccRo/UqNtVguVG6ELPbACFYIs3OKJo2eWOETfRyx+xuGMCXLTZ7c5pyYQ7ovcwDvs0kCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAVtmRKDb4OK5iSA46tagMBkp6L7WuPpCWuHGWwobEP+BecYsShW7zP3s12oA8SNSwbhvu0CRqgzxhuypgf3hKQFVU153Erv4hzkj+8S0s5LR/ZE7tDNY2lzJ3yQKXy3Md7EkuzzvOZ50MTrcSKAanWq/ZW1OTnrtGymj5zGJnTg7mMnJzEIGePxkvPu/QdchiPBLqxfZYm1jsFGY25djOC3N/KmVcRVmPRGuu6D8tBFHlKoPfZYPdbMvsvs24aupHKRcZ+ofTCpK+2Qo8c0pSSqeEYHGmuGqC6lC6ozxtxSABPO9Q1R1tZBU7Kg5HvXUwwmoVS3EGub46YbHqbmWMLg==" - ], - "priority": [ - "100" - ] - } - }, - { - "name": "hmac-generated", - "providerId": "hmac-generated", - "subComponents": {}, - "config": { - "kid": [ - "96afd00e-85cf-4d35-b18e-061d3813d8b2" - ], - "secret": [ - "qBFGKdUGf6xDgKphnRfoFzIzaFHJW4bYnZ9MinPFzN38X5_ctq-2u1q5RdZzeJukXvk2biHB8_s3DxWmmLZFsA" - ], - "priority": [ - "100" - ], - "algorithm": [ - "HS256" - ] - } - }, - { - "name": "aes-generated", - "providerId": "aes-generated", - "subComponents": {}, - "config": { - "kid": [ - "b04473d3-8395-4016-b455-19a9e951106b" - ], - "secret": [ - "x68mMOVdz3qKWzltzReV0g" - ], - "priority": [ - "100" - ] - } - } - ] - }, - "internationalizationEnabled": false, - "supportedLocales": [], - "authenticationFlows": [ - { - "alias": "Handle Existing Account", - "description": "Handle what to do if there is existing account with same email/username like authenticated identity provider", - "providerId": "basic-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "idp-confirm-link", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "idp-email-verification", - "requirement": "ALTERNATIVE", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "requirement": "ALTERNATIVE", - "priority": 30, - "flowAlias": "Verify Existing Account by Re-authentication", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "alias": "Verify Existing Account by Re-authentication", - "description": "Reauthentication of existing account", - "providerId": "basic-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "idp-username-password-form", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "auth-otp-form", - "requirement": "OPTIONAL", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "browser", - "description": "browser based authentication", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "auth-cookie", - "requirement": "ALTERNATIVE", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "auth-spnego", - "requirement": "DISABLED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "identity-provider-redirector", - "requirement": "ALTERNATIVE", - "priority": 25, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "requirement": "ALTERNATIVE", - "priority": 30, - "flowAlias": "forms", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "alias": "clients", - "description": "Base authentication for clients", - "providerId": "client-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "client-secret", - "requirement": "ALTERNATIVE", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "client-jwt", - "requirement": "ALTERNATIVE", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "client-secret-jwt", - "requirement": "ALTERNATIVE", - "priority": 30, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "client-x509", - "requirement": "ALTERNATIVE", - "priority": 40, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "direct grant", - "description": "OpenID Connect Resource Owner Grant", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "direct-grant-validate-username", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "direct-grant-validate-password", - "requirement": "REQUIRED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "direct-grant-validate-otp", - "requirement": "OPTIONAL", - "priority": 30, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "docker auth", - "description": "Used by Docker clients to authenticate against the IDP", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "docker-http-basic-authenticator", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "first broker login", - "description": "Actions taken after first broker login with identity provider account, which is not yet linked to any Keycloak account", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticatorConfig": "review profile config", - "authenticator": "idp-review-profile", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticatorConfig": "create unique user config", - "authenticator": "idp-create-user-if-unique", - "requirement": "ALTERNATIVE", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "requirement": "ALTERNATIVE", - "priority": 30, - "flowAlias": "Handle Existing Account", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "alias": "forms", - "description": "Username, password, otp and other auth forms.", - "providerId": "basic-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "auth-username-password-form", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "auth-otp-form", - "requirement": "OPTIONAL", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "http challenge", - "description": "An authentication flow based on challenge-response HTTP Authentication Schemes", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "no-cookie-redirect", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "basic-auth", - "requirement": "REQUIRED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "basic-auth-otp", - "requirement": "DISABLED", - "priority": 30, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "auth-spnego", - "requirement": "DISABLED", - "priority": 40, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "registration", - "description": "registration flow", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "registration-page-form", - "requirement": "REQUIRED", - "priority": 10, - "flowAlias": "registration form", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "alias": "registration form", - "description": "registration form", - "providerId": "form-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "registration-user-creation", - "requirement": "REQUIRED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "registration-profile-action", - "requirement": "REQUIRED", - "priority": 40, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "registration-password-action", - "requirement": "REQUIRED", - "priority": 50, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "registration-recaptcha-action", - "requirement": "DISABLED", - "priority": 60, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "reset credentials", - "description": "Reset credentials for a user if they forgot their password or something", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "reset-credentials-choose-user", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "reset-credential-email", - "requirement": "REQUIRED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "reset-password", - "requirement": "REQUIRED", - "priority": 30, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "reset-otp", - "requirement": "OPTIONAL", - "priority": 40, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "saml ecp", - "description": "SAML ECP Profile Authentication Flow", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "http-basic-authenticator", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - } - ], - "authenticatorConfig": [ - { - "alias": "create unique user config", - "config": { - "require.password.update.after.registration": "false" - } - }, - { - "alias": "review profile config", - "config": { - "update.profile.on.first.login": "missing" - } - } - ], - "requiredActions": [ - { - "alias": "CONFIGURE_TOTP", - "name": "Configure OTP", - "providerId": "CONFIGURE_TOTP", - "enabled": true, - "defaultAction": false, - "priority": 10, - "config": {} - }, - { - "alias": "terms_and_conditions", - "name": "Terms and Conditions", - "providerId": "terms_and_conditions", - "enabled": false, - "defaultAction": false, - "priority": 20, - "config": {} - }, - { - "alias": "UPDATE_PASSWORD", - "name": "Update Password", - "providerId": "UPDATE_PASSWORD", - "enabled": true, - "defaultAction": false, - "priority": 30, - "config": {} - }, - { - "alias": "UPDATE_PROFILE", - "name": "Update Profile", - "providerId": "UPDATE_PROFILE", - "enabled": true, - "defaultAction": false, - "priority": 40, - "config": {} - }, - { - "alias": "VERIFY_EMAIL", - "name": "Verify Email", - "providerId": "VERIFY_EMAIL", - "enabled": true, - "defaultAction": false, - "priority": 50, - "config": {} - } - ], - "browserFlow": "browser", - "registrationFlow": "registration", - "directGrantFlow": "direct grant", - "resetCredentialsFlow": "reset credentials", - "clientAuthenticationFlow": "clients", - "dockerAuthenticationFlow": "docker auth", - "attributes": { - "_browser_header.xXSSProtection": "1; mode=block", - "_browser_header.xFrameOptions": "SAMEORIGIN", - "_browser_header.strictTransportSecurity": "max-age=31536000; includeSubDomains", - "permanentLockout": "false", - "quickLoginCheckMilliSeconds": "1000", - "_browser_header.xRobotsTag": "none", - "maxFailureWaitSeconds": "900", - "minimumQuickLoginWaitSeconds": "60", - "failureFactor": "30", - "actionTokenGeneratedByUserLifespan": "300", - "maxDeltaTimeSeconds": "43200", - "_browser_header.xContentTypeOptions": "nosniff", - "offlineSessionMaxLifespan": "5184000", - "actionTokenGeneratedByAdminLifespan": "43200", - "_browser_header.contentSecurityPolicyReportOnly": "", - "bruteForceProtected": "false", - "_browser_header.contentSecurityPolicy": "frame-src 'self'; frame-ancestors 'self'; object-src 'none';", - "waitIncrementSeconds": "60", - "offlineSessionMaxLifespanEnabled": "false" - }, - "users": [ - { - "username": "admin", - "enabled": true, - "totp": false, - "emailVerified": false, - "credentials": [ - { - "type": "password", - "hashedSaltedValue": "NICTtwsvSxJ5hL8hLAuleDUv9jwZcuXgxviMXvR++cciyPtiIEStEaJUyfA9DOir59awjPrHOumsclPVjNBplA==", - "salt": "T/2P5o5oxFJUEk68BRURRg==", - "hashIterations": 27500, - "counter": 0, - "algorithm": "pbkdf2-sha256", - "digits": 0, - "period": 0, - "createdDate": 1554245879354, - "config": {} - } - ], - "disableableCredentialTypes": [ - "password" - ], - "requiredActions": [], - "realmRoles": [ - "admin", - "managers", - "user", - "IT", - "HR" - ], - "notBefore": 0, - "groups": [] - }, - { - "username": "alice", - "enabled": true, - "totp": false, - "emailVerified": false, - "credentials": [ - { - "type": "password", - "hashedSaltedValue": "A3okqV2T/ybXTVEgKfosoSjP8Yc9IZbFP/SY4cEd6hag7TABQrQ6nUSuwagGt96l8cw1DTijO75PqX6uiTXMzw==", - "salt": "sl4mXx6T9FypPH/s9TngfQ==", - "hashIterations": 27500, - "counter": 0, - "algorithm": "pbkdf2-sha256", - "digits": 0, - "period": 0, - "createdDate": 1554245879116, - "config": {} - } - ], - "disableableCredentialTypes": [ - "password" - ], - "requiredActions": [], - "realmRoles": [ - "user", - "HR" - ], - "notBefore": 0, - "groups": [] - }, - { - "username": "jdoe", - "enabled": true, - "totp": false, - "emailVerified": false, - "credentials": [ - { - "type": "password", - "hashedSaltedValue": "JV3DUNLjqOadjbBOtC4rvacQI553CGaDGAzBS8MR5ReCr7SwF3E6CsW3T7/XO8ITZAsch8+A/6loeuCoVLLJrg==", - "salt": "uCbOH7HZtyDtMd0E9DG/nw==", - "hashIterations": 27500, - "counter": 0, - "algorithm": "pbkdf2-sha256", - "digits": 0, - "period": 0, - "createdDate": 1554245879227, - "config": {} - } - ], - "disableableCredentialTypes": [ - "password" - ], - "requiredActions": [], - "realmRoles": [ - "managers", - "user", - "IT" - ], - "notBefore": 0, - "groups": [] - } - ], - "keycloakVersion": "6.0.0", - "userManagedAccessAllowed": false -} diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docker-compose/startServices.sh b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docker-compose/startServices.sh deleted file mode 100755 index 25ef49ec24..0000000000 --- a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docker-compose/startServices.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/sh - -DB="postgresql" - -if [ -n "$1" ]; then - if [[ "$1" == "postgresql" || "$1" == "infinispan" ]]; - then - DB="$1" - else - echo "Usage: By default postgresql environments is started if no argument is provided" - echo " start POSTGRESQL docker-compose running: ./startServices.sh postgresql or just ./startServices.sh " - echo " start INFINISPAN docker-compose running: ./startServices.sh infinispan " - exit 1 - fi -fi -echo "Script requires your Kogito Quickstart to be compiled with the right profile: ../mvn clean install -DskipTests -P$DB,container" - -PROJECT_VERSION=$(cd ../ && mvn help:evaluate -Dexpression=project.version -q -DforceStdout) - -echo "Project version: ${PROJECT_VERSION}" - -if [[ $PROJECT_VERSION == *SNAPSHOT ]]; -then - KOGITO_VERSION="latest" -else - KOGITO_VERSION=${PROJECT_VERSION%.*} -fi - -echo "Kogito Image version: ${KOGITO_VERSION}" -echo "KOGITO_VERSION=${KOGITO_VERSION}" > ".env" - -if [ "$(uname)" == "Darwin" ]; then - echo "DOCKER_GATEWAY_HOST=kubernetes.docker.internal" >> ".env" -elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then - echo "DOCKER_GATEWAY_HOST=172.17.0.1" >> ".env" -fi - -if [ "$1" == "infinispan" ]; -then - PERSISTENCE_FOLDER=./persistence - KOGITO_EXAMPLE_PERSISTENCE=../target/classes/META-INF/resources/persistence/protobuf - - rm -rf $PERSISTENCE_FOLDER - - mkdir -p $PERSISTENCE_FOLDER - - if [ -d "$KOGITO_EXAMPLE_PERSISTENCE" ] - then - cp $KOGITO_EXAMPLE_PERSISTENCE/*.proto $PERSISTENCE_FOLDER/ - else - echo "$KOGITO_EXAMPLE_PERSISTENCE does not exist. Have you compiled the project? mvn clean install -DskipTests -P$DB" - exit 1 - fi -fi - -SVG_FOLDER=./svg - -KOGITO_EXAMPLE_SVG_FOLDER=../target/classes/META-INF/processSVG - -mkdir -p $SVG_FOLDER - -if [ -d "$KOGITO_EXAMPLE_SVG_FOLDER" ] -then - cp $KOGITO_EXAMPLE_SVG_FOLDER/*.svg $SVG_FOLDER -else - echo "$KOGITO_EXAMPLE_SVG_FOLDER does not exist. Have you compiled the project?" - exit 1 -fi - -docker-compose -f docker-compose-$DB.yml up \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/MC_details1.png b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/MC_details1.png deleted file mode 100644 index 032c42b7cc..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/MC_details1.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/MC_details2.png b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/MC_details2.png deleted file mode 100644 index 34c63dde5f..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/MC_details2.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/MC_details3.png b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/MC_details3.png deleted file mode 100644 index a006afa0ec..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/MC_details3.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/MC_list1.png b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/MC_list1.png deleted file mode 100644 index acc542434e..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/MC_list1.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/TC_HRInterview.png b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/TC_HRInterview.png deleted file mode 100644 index bd37aaa043..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/TC_HRInterview.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/TC_HRInterview_complete.png b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/TC_HRInterview_complete.png deleted file mode 100644 index 5a92418c6a..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/TC_HRInterview_complete.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/TC_ITInterview.png b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/TC_ITInterview.png deleted file mode 100644 index c6aa8d17e4..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/TC_ITInterview.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/TC_list1.png b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/TC_list1.png deleted file mode 100644 index 273a93d400..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/TC_list1.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/TC_list2.png b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/TC_list2.png deleted file mode 100644 index fd60813c94..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/TC_list2.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/TC_list3.png b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/TC_list3.png deleted file mode 100644 index 5584c84357..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/TC_list3.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/hiring.png b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/hiring.png deleted file mode 100644 index 920d11c15f..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/hiring.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/hr-interview-assignments.png b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/hr-interview-assignments.png deleted file mode 100644 index 62ac3918c1..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/hr-interview-assignments.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/it-interview-assignments.png b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/it-interview-assignments.png deleted file mode 100644 index 64cc9b3381..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/it-interview-assignments.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/keycloak-login.png b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/keycloak-login.png deleted file mode 100644 index 58d85f1f43..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/keycloak-login.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/process-variables.png b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/process-variables.png deleted file mode 100644 index 5f3829d2f7..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/process-variables.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/services.png b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/services.png deleted file mode 100644 index e197b19a4b..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docs/images/services.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/pom.xml b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/pom.xml deleted file mode 100644 index d0a90b39a0..0000000000 --- a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/pom.xml +++ /dev/null @@ -1,239 +0,0 @@ - - - 4.0.0 - - org.kie.kogito.examples - kogito-quarkus-examples - 2.0.0-SNAPSHOT - - - process-usertasks-quarkus-with-console - Kogito Example :: Process with Usertasks Quarkus :: Console - - 2.16.10.Final - quarkus-bom - io.quarkus - 2.16.10.Final - org.kie.kogito - kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT - - - - - ${quarkus.platform.group-id} - ${quarkus.platform.artifact-id} - ${quarkus.platform.version} - pom - import - - - ${kogito.bom.group-id} - ${kogito.bom.artifact-id} - ${kogito.bom.version} - pom - import - - - - - - org.kie.kogito - kogito-quarkus - - - io.quarkus - quarkus-resteasy - - - io.quarkus - quarkus-resteasy-jackson - - - io.quarkus - quarkus-arc - - - - io.quarkus - quarkus-smallrye-reactive-messaging-kafka - - - io.quarkus - quarkus-smallrye-openapi - - - io.quarkus - quarkus-smallrye-health - - - - org.kie.kogito - kogito-addons-quarkus-events-process - - - org.kie.kogito - kogito-addons-quarkus-process-management - - - - org.kie.kogito - kogito-addons-quarkus-process-svg - - - - io.quarkus - quarkus-junit5 - test - - - io.rest-assured - rest-assured - test - - - org.kie.kogito - kogito-quarkus-test-utils - ${version.org.kie.kogito} - test - - - org.kie.kogito - kogito-addons-quarkus-source-files - - - - - ${project.artifactId} - - - ${quarkus.platform.group-id} - quarkus-maven-plugin - ${quarkus-plugin.version} - - - - build - - - - - - - - - - default - - true - - - - org.kie.kogito - kogito-addons-quarkus-persistence-infinispan - - - - - - infinispan - - infinispan - true - - - - org.kie.kogito - kogito-addons-quarkus-persistence-infinispan - - - - - - maven-antrun-plugin - - - package - - run - - - - - - - - - - - - - - - - - - - postgresql - - postgresql - true - - - - org.kie.kogito - kogito-addons-quarkus-persistence-jdbc - - - io.quarkus - quarkus-jdbc-postgresql - - - io.quarkus - quarkus-agroal - - - - - - maven-antrun-plugin - - - package - - run - - - - - - - - - - - - - - - - container - - - container - - - - container - - - - io.quarkus - quarkus-container-image-jib - - - - - - diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/main/java/org/kie/kogito/hr/Candidate.java b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/main/java/org/kie/kogito/hr/Candidate.java deleted file mode 100644 index 1a8b140240..0000000000 --- a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/main/java/org/kie/kogito/hr/Candidate.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2021 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.hr; - -public class Candidate { - - private String name; - private String email; - private Integer salary; - private String skills; - - public Candidate() { - } - - public Candidate(String name, String email, Integer salary, String skills) { - this.name = name; - this.email = email; - this.salary = salary; - this.skills = skills; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public Integer getSalary() { - return salary; - } - - public void setSalary(Integer salary) { - this.salary = salary; - } - - public String getSkills() { - return skills; - } - - public void setSkills(String skills) { - this.skills = skills; - } -} diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/main/resources/META-INF/processSVG/hiring.svg b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/main/resources/META-INF/processSVG/hiring.svg deleted file mode 100644 index af9a9a4c6a..0000000000 --- a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/main/resources/META-INF/processSVG/hiring.svg +++ /dev/null @@ -1 +0,0 @@ -HR InterviewIT Interview \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/main/resources/META-INF/resources/index.html b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/main/resources/META-INF/resources/index.html deleted file mode 100644 index 8556bab48e..0000000000 --- a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/main/resources/META-INF/resources/index.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - - - Kogito quickstart - - - - - - - - - - - - - - -
-
-
-
-

Welcome to Kogito

-

- Cloud-native business automation for building intelligent applications, backed by - battle-tested capabilities. -

- - Get Started - - - Latest updates - -
-
-
-
-
-
-
-

Quick Links

- -
-
-
- - - \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/main/resources/application.properties b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/main/resources/application.properties deleted file mode 100644 index 204497342d..0000000000 --- a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/main/resources/application.properties +++ /dev/null @@ -1,59 +0,0 @@ -# Packaging -#quarkus.package.type=fast-jar - -#https://quarkus.io/guides/openapi-swaggerui -quarkus.http.cors=true -quarkus.smallrye-openapi.path=/docs/openapi.json -quarkus.swagger-ui.always-include=true - -kogito.service.url=http://localhost:8080 -kogito.dataindex.http.url=http://localhost:8180 -kogito.dataindex.ws.url=ws://localhost:8180 -kafka.bootstrap.servers=localhost:9092 -## metadata - -#mp.messaging.outgoing.kogito-processinstances-events.bootstrap.servers=localhost:9092 -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-usertaskinstances-events.bootstrap.servers=localhost:9092 -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.bootstrap.servers=localhost:9092 -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 - - -%postgresql.kogito.persistence.type=jdbc -%postgresql.quarkus.datasource.db-kind=postgresql -%postgresql.quarkus.datasource.username=kogito-user -%postgresql.quarkus.datasource.password=kogito-pass -%postgresql.quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/kogito -%postgresql.quarkus.kogito.devservices.enabled=false -%postgresql.quarkus.flyway.migrate-at-start=true -%infinispan.kogito.persistence.type=infinispan -%infinispan.quarkus.infinispan-client.hosts=localhost:11222 -%infinispan.quarkus.infinispan-client.use-auth=false -%infinispan.quarkus.kogito.devservices.enabled=false - -kogito.users.admin.groups=admin -kogito.users.jdoe.groups=admin -kogito.users.bxf.groups=admin -kogito.users.test.groups=admin -kogito.users.user.groups=user - -quarkus.http.cors.origins=http://localhost:${quarkus.http.port} - -# profile to pack this example into a container, to use it execute activate the maven container profile, -Dcontainer -%container.quarkus.container-image.build=true -%container.quarkus.container-image.push=false -%container.quarkus.container-image.group=${USER} -%container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/main/resources/hiring.bpmn b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/main/resources/hiring.bpmn deleted file mode 100644 index 925ce15331..0000000000 --- a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/main/resources/hiring.bpmn +++ /dev/null @@ -1,257 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - _27F81353-7101-4BDF-BB04-2FD45983C17F - _D762FECA-89D1-40DE-97EC-F69FA9A3E4B3 - - - - - - - _8962C15F-55EC-46F7-B926-5D5A1FD8D35E_TaskNameInputX - _8962C15F-55EC-46F7-B926-5D5A1FD8D35E_candidateInputX - _8962C15F-55EC-46F7-B926-5D5A1FD8D35E_SkippableInputX - - - _8962C15F-55EC-46F7-B926-5D5A1FD8D35E_approveOutputX - - - - _8962C15F-55EC-46F7-B926-5D5A1FD8D35E_TaskNameInputX - - - - - - - candidate - _8962C15F-55EC-46F7-B926-5D5A1FD8D35E_candidateInputX - - - _8962C15F-55EC-46F7-B926-5D5A1FD8D35E_SkippableInputX - - - - - - - _8962C15F-55EC-46F7-B926-5D5A1FD8D35E_approveOutputX - it_approval - - - - jdoe - - - - - _D762FECA-89D1-40DE-97EC-F69FA9A3E4B3 - - - - - - - - _2E69C0D9-AA97-4100-80F3-852553D7622D - _27F81353-7101-4BDF-BB04-2FD45983C17F - - - - - - - _B8C4F63C-81AD-4291-9C1B-84967277EEF6_TaskNameInputX - _B8C4F63C-81AD-4291-9C1B-84967277EEF6_candidateInputX - _B8C4F63C-81AD-4291-9C1B-84967277EEF6_SkippableInputX - - - _B8C4F63C-81AD-4291-9C1B-84967277EEF6_approveOutputX - - - - _B8C4F63C-81AD-4291-9C1B-84967277EEF6_TaskNameInputX - - - - - - - candidate - _B8C4F63C-81AD-4291-9C1B-84967277EEF6_candidateInputX - - - _B8C4F63C-81AD-4291-9C1B-84967277EEF6_SkippableInputX - - - - - - - _B8C4F63C-81AD-4291-9C1B-84967277EEF6_approveOutputX - hr_approval - - - - jdoe - - - - - _2E69C0D9-AA97-4100-80F3-852553D7622D - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - _DEbcYMK_EDmVtvGs7DWZtQ - _DEbcYMK_EDmVtvGs7DWZtQ - - \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/test/java/org/kie/kogito/hr/HiringProcessIT.java b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/test/java/org/kie/kogito/hr/HiringProcessIT.java deleted file mode 100644 index 01c683b6ee..0000000000 --- a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/test/java/org/kie/kogito/hr/HiringProcessIT.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.kie.kogito.hr; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.inject.Inject; -import javax.inject.Named; - -import org.junit.jupiter.api.Test; -import org.kie.kogito.Model; -import org.kie.kogito.auth.IdentityProviders; -import org.kie.kogito.auth.SecurityPolicy; -import org.kie.kogito.process.Process; -import org.kie.kogito.process.ProcessInstance; -import org.kie.kogito.process.WorkItem; -import org.kie.kogito.testcontainers.quarkus.InfinispanQuarkusTestResource; -import org.kie.kogito.testcontainers.quarkus.KafkaQuarkusTestResource; - -import io.quarkus.test.common.QuarkusTestResource; -import io.quarkus.test.junit.QuarkusTest; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; - -@QuarkusTest -@QuarkusTestResource(value = InfinispanQuarkusTestResource.class) -@QuarkusTestResource(value = KafkaQuarkusTestResource.class) -public class HiringProcessIT { - - @Named("hiring") - @Inject - Process hiringProcess; - - @Test - public void testApprovalProcess() { - - assertNotNull(hiringProcess); - - Model m = hiringProcess.createModel(); - Map parameters = new HashMap<>(); - parameters.put("candidate", new Candidate("jdoe", "jdoe@example.com", 30000, "Java, Kogito")); - m.fromMap(parameters); - - ProcessInstance processInstance = hiringProcess.createInstance(m); - processInstance.start(); - assertEquals(org.kie.api.runtime.process.ProcessInstance.STATE_ACTIVE, processInstance.status()); - - SecurityPolicy policy = SecurityPolicy.of(IdentityProviders.of("jdoe", Arrays.asList("HR", "IT"))); - - processInstance.workItems(policy); - - List workItems = processInstance.workItems(policy); - assertEquals(1, workItems.size()); - Map results = new HashMap<>(); - results.put("approve", true); - processInstance.completeWorkItem(workItems.get(0).getId(), results, policy); - - processInstance.workItems(policy); - - workItems = processInstance.workItems(policy); - assertEquals(1, workItems.size()); - - results.put("approve", false); - processInstance.completeWorkItem(workItems.get(0).getId(), results, policy); - assertEquals(org.kie.api.runtime.process.ProcessInstance.STATE_COMPLETED, processInstance.status()); - - Model result = (Model) processInstance.variables(); - assertEquals(3, result.toMap().size()); - assertEquals(true, result.toMap().get("hr_approval")); - assertEquals(false, result.toMap().get("it_approval")); - } -} diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/test/resources/application.properties b/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/test/resources/application.properties deleted file mode 100644 index a3684a9aa3..0000000000 --- a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/src/test/resources/application.properties +++ /dev/null @@ -1,36 +0,0 @@ -# Quarkus -quarkus.http.test-port=0 -quarkus.http.cors=true -quarkus.swagger-ui.always-include=true - -kogito.service.url=http://localhost:8080 -kogito.dataindex.http.url=http://localhost:8180 -kogito.dataindex.ws.url=ws://localhost:8180 - -#Kafka -kafka.bootstrap.servers=localhost:9092 - -#mp.messaging.incoming.kogito_incoming_stream.bootstrap.servers=localhost:9092 -mp.messaging.incoming.kogito_incoming_stream.connector=smallrye-kafka -mp.messaging.incoming.kogito_incoming_stream.topic=visasresponses -mp.messaging.incoming.kogito_incoming_stream.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer - -#mp.messaging.outgoing.kogito_outgoing_stream.bootstrap.servers=localhost:9092 -mp.messaging.outgoing.kogito_outgoing_stream.connector=smallrye-kafka -mp.messaging.outgoing.kogito_outgoing_stream.topic=visaapplications -mp.messaging.outgoing.kogito_outgoing_stream.value.serializer=org.apache.kafka.common.serialization.StringSerializer - -#mp.messaging.outgoing.kogito-processinstances-events.bootstrap.servers=localhost:9092 -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-usertaskinstances-events.bootstrap.servers=localhost:9092 -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.bootstrap.servers=localhost:9092 -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 \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-quarkus/README.md b/kogito-quarkus-examples/process-usertasks-quarkus/README.md index 40f704c0a2..d8075e48b4 100644 --- a/kogito-quarkus-examples/process-usertasks-quarkus/README.md +++ b/kogito-quarkus-examples/process-usertasks-quarkus/README.md @@ -42,9 +42,9 @@ This example shows ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - GraalVM 19.3+ installed @@ -75,6 +75,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ```sh @@ -201,7 +206,3 @@ You should see a similar message after performing the second line approval after ```json {"id":"f498de73-e02d-4829-905e-2f768479a4f1", "approver":"admin","firstLineApproval":true, "secondLineApproval":true,"traveller":{"firstName":"John","lastName":"Doe","email":"jon.doe@example.com","nationality":"American","address":{"street":"main street","city":"Boston","zipCode":"10005","country":"US"}}} ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-quarkus-examples/process-usertasks-quarkus/operator/process-usertasks-quarkus.yaml b/kogito-quarkus-examples/process-usertasks-quarkus/operator/process-usertasks-quarkus.yaml deleted file mode 100644 index 2b3bf4518b..0000000000 --- a/kogito-quarkus-examples/process-usertasks-quarkus/operator/process-usertasks-quarkus.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-usertasks-quarkus -spec: - type: RemoteSource - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/process-usertasks-quarkus - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-usertasks-quarkus \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-quarkus/pom.xml b/kogito-quarkus-examples/process-usertasks-quarkus/pom.xml index 912b403358..38b8af6ebf 100644 --- a/kogito-quarkus-examples/process-usertasks-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-usertasks-quarkus/pom.xml @@ -1,24 +1,44 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-usertasks-quarkus Kogito Example :: Process with Usertasks Quarkus Kogito user tasks orchestration - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -48,8 +68,8 @@ quarkus-resteasy-jackson
- org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus io.quarkus @@ -70,8 +90,8 @@ quarkus-smallrye-health - org.kie.kogito - kogito-addons-quarkus-persistence-rocksdb + org.kie + kie-addons-quarkus-persistence-rocksdb
diff --git a/kogito-quarkus-examples/process-usertasks-quarkus/src/main/docker/Dockerfile.jvm b/kogito-quarkus-examples/process-usertasks-quarkus/src/main/docker/Dockerfile.jvm index ec46ab84c7..885dbfcd2b 100644 --- a/kogito-quarkus-examples/process-usertasks-quarkus/src/main/docker/Dockerfile.jvm +++ b/kogito-quarkus-examples/process-usertasks-quarkus/src/main/docker/Dockerfile.jvm @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/process-usertasks-quarkus-jvm # ### -FROM fabric8/java-alpine-openjdk11-jre +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.20 ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV AB_ENABLED=jmx_exporter @@ -23,4 +23,4 @@ COPY target/quarkus-app/*.jar /deployments/ COPY target/quarkus-app/app/ /deployments/app/ COPY target/quarkus-app/quarkus/ /deployments/quarkus/ -ENTRYPOINT [ "/deployments/run-java.sh" ] \ No newline at end of file +ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/kogito-quarkus-examples/process-usertasks-quarkus/src/main/docker/Dockerfile.native b/kogito-quarkus-examples/process-usertasks-quarkus/src/main/docker/Dockerfile.native index b508cbb1d3..d7370681e1 100644 --- a/kogito-quarkus-examples/process-usertasks-quarkus/src/main/docker/Dockerfile.native +++ b/kogito-quarkus-examples/process-usertasks-quarkus/src/main/docker/Dockerfile.native @@ -7,14 +7,14 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.native -t quarkus/kogito-infinispan-persistence-quarkus . +# docker build -f src/main/docker/Dockerfile.native -t quarkus/process-usertasks-quarkus . # # Then run the container using: # -# docker run -i --rm -p 8080:8080 quarkus/kogito-infinispan-persistence-quarkus +# docker run -i --rm -p 8080:8080 quarkus/process-usertasks-quarkus # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.4 WORKDIR /work/ COPY target/*-runner /work/application RUN chmod 775 /work diff --git a/kogito-quarkus-examples/process-usertasks-quarkus/src/main/java/org/acme/travels/Address.java b/kogito-quarkus-examples/process-usertasks-quarkus/src/main/java/org/acme/travels/Address.java index d808334384..662dfa9b9f 100644 --- a/kogito-quarkus-examples/process-usertasks-quarkus/src/main/java/org/acme/travels/Address.java +++ b/kogito-quarkus-examples/process-usertasks-quarkus/src/main/java/org/acme/travels/Address.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.acme.travels; diff --git a/kogito-quarkus-examples/process-usertasks-quarkus/src/main/java/org/acme/travels/Traveller.java b/kogito-quarkus-examples/process-usertasks-quarkus/src/main/java/org/acme/travels/Traveller.java index cf790d4664..c24685803d 100644 --- a/kogito-quarkus-examples/process-usertasks-quarkus/src/main/java/org/acme/travels/Traveller.java +++ b/kogito-quarkus-examples/process-usertasks-quarkus/src/main/java/org/acme/travels/Traveller.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.acme.travels; diff --git a/kogito-quarkus-examples/process-usertasks-quarkus/src/main/resources/META-INF/resources/index.html b/kogito-quarkus-examples/process-usertasks-quarkus/src/main/resources/META-INF/resources/index.html deleted file mode 100644 index a965327283..0000000000 --- a/kogito-quarkus-examples/process-usertasks-quarkus/src/main/resources/META-INF/resources/index.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - kogito-infinispan-persistence-quarkus - 1.0-SNAPSHOT - - - - - - -
-
-

Congratulations, you have created a new Quarkus application.

- -

Why do you see this?

- -

This page is served by Quarkus. The source is in - src/main/resources/META-INF/resources/index.html.

- -

What can I do from here?

- -

If not already done, run the application in dev mode using: mvn compile quarkus:dev. -

-
    -
  • Add REST resources, Servlets, functions and other services in src/main/java.
  • -
  • Your static assets are located in src/main/resources/META-INF/resources.
  • -
  • Configure your application in src/main/resources/application.properties. -
  • -
- -

How do I get rid of this page?

-

Just delete the src/main/resources/META-INF/resources/index.html file.

-
-
-
-

Application

-
    -
  • GroupId: org.acme
  • -
  • ArtifactId: kogito-infinispan-persistence-quarkus
  • -
  • Version: 1.0-SNAPSHOT
  • -
  • Quarkus Version: 0.19.1
  • -
-
- -
-
- - - - \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-usertasks-quarkus/src/main/resources/application.properties index 35b7e32bea..a76c2a39bb 100644 --- a/kogito-quarkus-examples/process-usertasks-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-usertasks-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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/process-usertasks-quarkus/src/test/java/org/acme/travels/quarkus/ApprovalsProcessTest.java b/kogito-quarkus-examples/process-usertasks-quarkus/src/test/java/org/acme/travels/quarkus/ApprovalsProcessTest.java index 385ee84c01..a5a41285c3 100644 --- a/kogito-quarkus-examples/process-usertasks-quarkus/src/test/java/org/acme/travels/quarkus/ApprovalsProcessTest.java +++ b/kogito-quarkus-examples/process-usertasks-quarkus/src/test/java/org/acme/travels/quarkus/ApprovalsProcessTest.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.acme.travels.quarkus; @@ -20,9 +23,6 @@ import java.util.List; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; - import org.acme.travels.Address; import org.acme.travels.Traveller; import org.jbpm.process.instance.impl.humantask.HumanTaskTransition; @@ -38,6 +38,9 @@ import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/kogito-quarkus-examples/process-usertasks-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/process-usertasks-quarkus/src/test/resources/application.properties index 7c69ad8cd3..e764de0f97 100644 --- a/kogito-quarkus-examples/process-usertasks-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/process-usertasks-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.http.test-port=0 kogito.persistence.rocksdb.clean=true diff --git a/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/README.md b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/README.md index b994a22213..defb90fcf9 100644 --- a/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/README.md +++ b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/README.md @@ -25,9 +25,9 @@ The required *Kogito and Infrastructure Services* for this example are: ### Prerequisites -* Java 11+ installed +* Java 17+ installed * Environment variable JAVA_HOME set accordingly -* Maven 3.8.6+ installed +* Maven 3.9.6+ installed * Docker and Docker Compose to run the required example infrastructure. And when using native image compilation, you will also need: @@ -120,6 +120,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ##### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ```sh diff --git a/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/docker-compose/docker-compose-infinispan.yml b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/docker-compose/docker-compose-infinispan.yml index decc43e722..c57fe3f3d3 100755 --- a/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/docker-compose/docker-compose-infinispan.yml +++ b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/docker-compose/docker-compose-infinispan.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/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/docker-compose/docker-compose-postgresql.yml b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/docker-compose/docker-compose-postgresql.yml index a949921ce9..cab2129fee 100755 --- a/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/docker-compose/docker-compose-postgresql.yml +++ b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/docker-compose/docker-compose-postgresql.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/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/docker-compose/infinispan/infinispan.xml b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/docker-compose/infinispan/infinispan.xml index 4d594bfc24..a466561b9f 100755 --- a/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/docker-compose/infinispan/infinispan.xml +++ b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/docker-compose/infinispan/infinispan.xml @@ -1,3 +1,23 @@ + diff --git a/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/docker-compose/startServices.sh b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/docker-compose/startServices.sh index c2684f9b44..70fccff021 100755 --- a/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/docker-compose/startServices.sh +++ b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/docker-compose/startServices.sh @@ -1,4 +1,23 @@ #!/bin/sh +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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. +# + echo "Script requires your Kogito Quickstart to be compiled" diff --git a/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/pom.xml b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/pom.xml index d2f0609460..d77973eee6 100644 --- a/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/pom.xml +++ b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/pom.xml @@ -1,23 +1,43 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-usertasks-timer-quarkus-with-console Kogito Example :: Process UserTasks with Timer Quarkus :: Console - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -39,8 +59,8 @@ - org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus io.quarkus @@ -69,21 +89,21 @@ - org.kie.kogito - kogito-addons-quarkus-events-process + org.kie + kie-addons-quarkus-events-process - org.kie.kogito - kogito-addons-quarkus-process-management + org.kie + kie-addons-quarkus-process-management - org.kie.kogito + org.kie kogito-addons-quarkus-jobs-management - org.kie.kogito - kogito-addons-quarkus-process-svg + org.kie + kie-addons-quarkus-process-svg @@ -103,8 +123,8 @@ test - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files @@ -134,8 +154,8 @@ - org.kie.kogito - kogito-addons-quarkus-persistence-infinispan + org.kie + kie-addons-quarkus-persistence-infinispan @@ -147,8 +167,8 @@ - org.kie.kogito - kogito-addons-quarkus-persistence-infinispan + org.kie + kie-addons-quarkus-persistence-infinispan @@ -185,8 +205,8 @@ - org.kie.kogito - kogito-addons-quarkus-persistence-jdbc + org.kie + kie-addons-quarkus-persistence-jdbc io.quarkus diff --git a/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/src/main/java/org/kie/kogito/hr/Candidate.java b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/src/main/java/org/kie/kogito/hr/Candidate.java index 1d37a2d4bf..49f29580a5 100644 --- a/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/src/main/java/org/kie/kogito/hr/Candidate.java +++ b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/src/main/java/org/kie/kogito/hr/Candidate.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.hr; public class Candidate { diff --git a/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/src/main/resources/META-INF/resources/index.html b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/src/main/resources/META-INF/resources/index.html index 8556bab48e..c9d1ca0c76 100644 --- a/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/src/main/resources/META-INF/resources/index.html +++ b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/src/main/resources/META-INF/resources/index.html @@ -1,20 +1,23 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this 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/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/src/main/resources/application.properties b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/src/main/resources/application.properties index 0078e4f7a5..932e513803 100644 --- a/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/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. +# + # Packaging #quarkus.package.type=fast-jar @@ -30,6 +49,11 @@ 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 + + #Job-service kogito.jobs-service.url=http://localhost:8580 diff --git a/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/src/test/java/org/kie/kogito/hr/HiringProcessIT.java b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/src/test/java/org/kie/kogito/hr/HiringProcessIT.java index 01c683b6ee..4de5711322 100644 --- a/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/src/test/java/org/kie/kogito/hr/HiringProcessIT.java +++ b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/src/test/java/org/kie/kogito/hr/HiringProcessIT.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.hr; @@ -20,9 +23,6 @@ import java.util.List; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; - import org.junit.jupiter.api.Test; import org.kie.kogito.Model; import org.kie.kogito.auth.IdentityProviders; @@ -36,6 +36,9 @@ import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/src/test/resources/application.properties b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/src/test/resources/application.properties index f8fec0d856..a26bea6b3c 100644 --- a/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/src/test/resources/application.properties +++ b/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/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.http.test-port=0 quarkus.http.cors=true @@ -35,5 +54,9 @@ 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 + #Job-service kogito.jobs-service.url=http://localhost:8580 \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/README.md b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/README.md deleted file mode 100644 index d934c40ae0..0000000000 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/README.md +++ /dev/null @@ -1,283 +0,0 @@ -# Process user task orchestration - -## Description - -A quickstart project shows very typical user task orchestration. It comes with two tasks assigned -to human actors via group assignments - `managers`. So essentially anyone who is a member of that -group can act on the tasks. Though this example applies four eye principles which essentially means -that the user who approved the first task cannot approve the second one. So there must always be at -least two distinct managers involved. - -This example shows - -* working with user tasks -* four eye principle with user tasks -* Task console to execute human task -* Management console tracking process execution - - -

- - -## Build and run - -### Prerequisites - -You will need: - - Java 11+ installed - - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed - - [jq](https://stedolan.github.io/jq) tool installed. You can download it from [here](https://stedolan.github.io/jq/download) - - Docker and Docker Compose to run the required example infrastructure. - -When using native image compilation, you will also need: - - GraalVM 20.3+ installed - - Environment variable GRAALVM_HOME set accordingly - - Note that GraalVM native image compilation typically requires other packages (glibc-devel, zlib-devel and gcc) to be installed too, please refer to GraalVM installation documentation for more details. - -### Starting the Kogito and Infrastructure Services - -This quickstart provides a docker compose template that starts all the required services. This setup ensures that all services are connected with a default configuration. - -

- -You should start all the services before you execute any of the **Approvals** example, to do that please execute: - -For Linux and MacOS: - -1. Open a Terminal -2. Go to the process-usertasks-with-security-oidc-quarkus-with-console folder at kogito-examples -3. Run the ```startServices.sh``` script - -```bash -sh ./startServices.sh -``` - -Once all services bootstrap, the following ports will be assigned on your local machine: - -- Infinispan: 11222 -- Kafka: 9092 -- Data Index: 8180 -- Management Console: 8280 -- Task Console: 8380 -- Keycloak server: 8480 -- example-runtime-service: 8080 - -> **_NOTE:_** This step requires the project to be compiled, please consider running a ```mvn clean install -Pcontainer``` command on the project root before running the ```startServices.sh``` script for the first time or any time you modify the project. - -Once started you can simply stop all services by executing the ```docker-compose stop```. - -All the created containers can be removed by executing the ```docker-compose rm```. - -### Using Keycloak as Authentication Server - -In this Quickstart we'll be using [Keycloak](https://www.keycloak.org/) as *Authentication Server*. It will be started as a part of the project *Infrastructure Services*, you can check the configuration on the project [docker-compose.yml](docker-compose/docker-compose.yml) in [docker-compose](docker-compose) folder. - -It will install the *Kogito Realm* that comes with a predefined set of users: -| Login | Password | Roles | -| ------------- | ---------- | ------------------- | -| admin | admin | *admin*, *managers* | -| alice | alice | *user* | -| jdoe | jdoe | *managers* | - -Once Keycloak is started, you should be able to access your *Keycloak Server* at [localhost:8480/auth](http://localhost:8480/auth) with *admin* user. - -### Security using OpenID Connect - -This Quickstart is taking advantage of the Quarkus OIDC extension that allows an easy integration between the *Kogito* runtime & *Kogito* consoles and *Keycloak*. - -Enabling it in the project can be done by adding the following *maven* dependency: -```xml - - io.quarkus - quarkus-oidc - -``` - -And adding the right configuration on the *application.properties* file: -```properties -quarkus.oidc.auth-server-url=http://localhost:8480/auth/realms/kogito - -quarkus.oidc.client-id=kogito-app -quarkus.oidc.credentials.secret=secret - -quarkus.http.auth.permission.authenticated.paths=/* -quarkus.http.auth.permission.authenticated.policy=authenticated -``` - -> **_NOTE:_** For more information about securing Quarkus applications with OpenID Connect, please refer to [Quarkus Documentation](https://quarkus.io/guides/security-openid-connect) - -It is also possible to enable authentication *Kogito Management Console* & *Kogito Task Console* using OpenID Connect, to do that you must start the consoles using the *keycloak* quarkus profile as a parameter (`-Dquarkus.profile=keycloak`). You can check the configuration on the project [docker-compose.yml](docker-compose/docker-compose.yml) in [docker-compose](docker-compose) folder. - -> **_NOTE:_** For more information about how to secure Kogito Management Console with OpenID Connect, please refer to [Kogito Documentation](https://docs.jboss.org/kogito/release/latest/html_single/#proc-management-console-security_kogito-developing-process-services). -> -> For more information about how to secure Kogito Task Console with OpenID Connect, please refer to [Kogito Documentation](https://docs.jboss.org/kogito/release/latest/html_single/#proc-task-console-security_kogito-developing-process-services) -> -> For more information about authorization on Quarkus applications with OpenID Connect, please refer to [Quarkus Documentation](https://quarkus.io/guides/security-openid-connect-web-authentication) - - -### Compile and Run in Local Dev Mode - -``` -mvn clean compile quarkus:dev -``` - -NOTE: With dev mode of Quarkus you can take advantage of hot reload for business assets like processes, rules, decision tables and java code. No need to redeploy or restart your running application. - -### Package and Run in JVM mode - -```sh -mvn clean package -java -jar target/quarkus-app/quarkus-run.jar -``` - -or on Windows - -```sh -mvn clean package -java -jar target\quarkus-app\quarkus-run.jar -``` - -### Package and Run using Local Native Image -Note that this requires GRAALVM_HOME to point to a valid GraalVM installation - -```sh -mvn clean package -Pnative -``` - -To run the generated native executable, generated in `target/`, execute - -```sh -./target/process-usertasks-with-security-oidc-quarkus-with-console -``` - -### Kogito Management Console - -To access the Kogito Management Console just open your browser and navigate to ``http://localhost:8280``. You'll be redirected to the *Keycloak* log in page. - -

- -

- -Once there, log in using any of the users specified in the [Using Keycloak as Authentication Server](#using-keycloak-as-authentication-server) - -

- -

- -> **_NOTE:_** For more information about how to work with Kogito Management Console, please refer to the [Kogito Documentation](https://docs.jboss.org/kogito/release/latest/html_single/#con-management-console_kogito-developing-process-services) page. - -### Kogito Task Console - -To access the Kogito Task Console just open your browser and navigate to ``http://localhost:8380``. You'll be redirected to the *Keycloak* log in page. - -

- -

- -Once there, log in with an *managers* user (for example *jdoe*) and you should be redirected to the user **Task Inbox**: - -

- -

- -There you'll see all the tasks assigned to the user or to any of the group he belongs to. - - -### Submit a request to start new approval - -The application is using bearer token authorization, the first thing to do is obtain an access token from the Keycloak -Server in order to access the application resources. Obtain an access token for user jdoe executing in a terminal: - -```sh -export access_token=$(\ - curl -X POST http://localhost:8480/auth/realms/kogito/protocol/openid-connect/token \ - --user kogito-app:secret \ - -H 'content-type: application/x-www-form-urlencoded' \ - -d 'username=jdoe&password=jdoe&grant_type=password' | jq --raw-output '.access_token' \ - ) -``` - -To make use of this application it is as simple as putting a sending request to `http://localhost:8080/approvals` with following content - -```json -{ -"traveller" : { - "firstName" : "John", - "lastName" : "Doe", - "email" : "jon.doe@example.com", - "nationality" : "American", - "address" : { - "street" : "main street", - "city" : "Boston", - "zipCode" : "10005", - "country" : "US" } - } -} -``` - -Complete curl command can be found below: - -```sh -curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' -H "Authorization: Bearer "$access_token -d '{"traveller" : { "firstName" : "John", "lastName" : "Doe", "email" : "jon.doe@example.com", "nationality" : "American","address" : { "street" : "main street", "city" : "Boston", "zipCode" : "10005", "country" : "US" }}}' http://localhost:8080/approvals -``` - -### Show active process instances at Kogito Management Console - -To access the Kogito Management Console just open your browser and navigate to ``http://localhost:8280``. - -

- -

- -> **_NOTE:_** For more information about how to work with Kogito Management Console, please refer to the [Kogito Documentation](https://docs.jboss.org/kogito/release/latest/html_single/#con-management-console_kogito-developing-process-services) page. - -Check the process instance details to see where is the execution path - -

- -

- -### Execute 'First Line approval' task at Kogito Task Console - -To access the Kogito Task Console just open your browser and navigate to ``http://localhost:8380`` and you should be redirected to the **Task Inbox**. -Ensure you are logged as a user with role manager to be able to see the First Line approval (i.e: jdoe / jdoe) - -

- -

- -> **_NOTE:_** For more information about how to work with Kogito Task Console, please refer to the [Kogito Documentation](https://docs.jboss.org/kogito/release/latest/html_single/#con-task-console_kogito-developing-process-services) page. - -Access to 'First Line approval' task and complete - -

- -

- -Check the process instance details at Kogito Management Console to see the execution path reflects the completed task - -

- -

- -### Execute 'Second Line approval' task at Kogito Task Console - -Access the Kogito Task Console and ensure you are logged as a user with role manager to be able to see the Second Line approval -following the second eye principle (i.e: admin / admin) - -

- -

- -Access to 'Second Line approval' task and complete - -

- -

- -Check the process instance details at Kogito Management Console, and verify the execution path is reflected in the diagram. - -

- -

diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docker-compose/.gitignore b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docker-compose/.gitignore deleted file mode 100644 index 1689027f92..0000000000 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docker-compose/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.env -persistence/ -svg/ \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docker-compose/README.md b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docker-compose/README.md deleted file mode 100644 index 53a77a9194..0000000000 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docker-compose/README.md +++ /dev/null @@ -1,54 +0,0 @@ -## Kogito and Infrastructure services - -To allow a quick setup of all services required to run this demo, we provide a docker compose template that starts the following services: -- Infinispan -- Kafka -- Keycloak -- Kogito Data Index -- Kogito Management Console -- Kogito Task Console - -This setup ensures that all services are connected using the default configuration as well as provisioning the Travel Agency dashboard to Grafana. - -In order to use it, please ensure you have Docker Compose installed on your machine, otherwise follow the instructions available - in [here](https://docs.docker.com/compose/install/). - -### Starting required services - - Before you execute the **Approvals** example, start all the services by following these steps: - - For Linux and MacOS: - - ./startServices.sh - - For Windows: - - Create a .env file with the content containing the version of the Kogito images you would like to run, example: - - KOGITO_VERSION=1.0.0 - - Then run - - docker-compose up - - Once all services bootstrap, the following ports will be assigned on your local machine: - - Infinispan: 11222 - - Kafka: 9092 - - Keycloak: 8480 - - Data Index: 8180 - - Management Console: 8280 - - Task Console: 8380 - -### Stopping and removing volume data - - To stop all services, simply run: - - docker-compose stop - - It is also recommended to remove any of stopped containers by running: - - docker-compose rm - - For more details please check the Docker Compose documentation. - - docker-compose --help diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docker-compose/docker-compose.yml b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docker-compose/docker-compose.yml deleted file mode 100644 index 53bb1dbe75..0000000000 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docker-compose/docker-compose.yml +++ /dev/null @@ -1,143 +0,0 @@ -version: '2.1' - -services: - - infinispan: - image: infinispan/server:14.0.4.Final - container_name: infinispan - ports: - - "11222:11222" - command: "-c infinispan-demo.xml" - volumes: - - ./infinispan/infinispan.xml:/opt/infinispan/server/conf/infinispan-demo.xml:z - healthcheck: - test: [ "CMD", "curl", "-f", "http://localhost:11222/rest/v2/cache-managers/default/health/status" ] - interval: 1s - timeout: 1s - retries: 50 - - zookeeper: - container_name: zookeeper - image: strimzi/kafka:0.20.1-kafka-2.6.0 - command: [ - "sh", "-c", - "bin/zookeeper-server-start.sh config/zookeeper.properties" - ] - ports: - - "2181:2181" - environment: - LOG_DIR: "/tmp/logs" - - kafka: - image: strimzi/kafka:0.20.1-kafka-2.6.0 - container_name: kafka - command: [ - "sh", "-c", - "bin/kafka-server-start.sh config/server.properties --override inter.broker.listener.name=$${KAFKA_INTER_BROKER_LISTENER_NAME} --override listener.security.protocol.map=$${KAFKA_LISTENER_SECURITY_PROTOCOL_MAP} --override listeners=$${KAFKA_LISTENERS} --override advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS} --override zookeeper.connect=$${KAFKA_ZOOKEEPER_CONNECT}" - ] - depends_on: - - zookeeper - ports: - - "9092:9092" - environment: - KAFKA_BROKER_ID: 0 - KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 - KAFKA_LISTENERS: INTERNAL://kafka:29092,EXTERNAL://kafka:9092 - KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:29092,EXTERNAL://localhost:9092 - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT - KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL - KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true" - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 - LOG_DIR: "/tmp/logs" - - keycloak: - container_name: keycloak - image: quay.io/keycloak/keycloak:legacy - ports: - - "8480:8080" - volumes: - - ./keycloak/kogito-realm.json:/tmp/kogito-realm.json - healthcheck: - test: [ "CMD", "curl", "-f", "http://localhost:8080/auth/realms/kogito" ] - interval: 1s - timeout: 1s - retries: 50 - environment: - KEYCLOAK_USER: admin - KEYCLOAK_PASSWORD: admin - KEYCLOAK_IMPORT: /tmp/kogito-realm.json - - data-index: - container_name: data-index - image: quay.io/kiegroup/kogito-data-index-infinispan:${KOGITO_VERSION} - ports: - - "8180:8080" - depends_on: - kafka: - condition: service_started - infinispan: - condition: service_healthy - volumes: - - ./persistence/:/home/kogito/data/protobufs/ - environment: - QUARKUS_INFINISPAN_CLIENT_HOSTS: infinispan:11222 - QUARKUS_INFINISPAN_CLIENT_USE_AUTH: "false" - KAFKA_BOOTSTRAP_SERVERS: kafka:29092 - QUARKUS_HTTP_CORS_ORIGINS: "/.*/" - KOGITO_DATA_INDEX_PROPS: -Dkogito.protobuf.folder=/home/kogito/data/protobufs/ - - management-console: - container_name: management-console - image: quay.io/kiegroup/kogito-management-console:${KOGITO_VERSION} - ports: - - 8280:8080 - depends_on: - data-index: - condition: service_started - keycloak: - condition: service_healthy - volumes: - - ./svg/:/home/kogito/data/svg/ - environment: - KOGITO_DATAINDEX_HTTP_URL: http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8180/graphql - QUARKUS_HTTP_CORS_ORIGINS: "/.*/" - KOGITO_MANAGEMENT_CONSOLE_PROPS: -Dkogito.consoles.keycloak.config.url=http://localhost:8480/auth -Dkogito.consoles.keycloak.config.health-check-url=http://localhost:8480/auth/realms/kogito/.well-known/openid-configuration -Dkogito.svg.folder.path=/home/kogito/data/svg - - task-console: - container_name: task-console - image: quay.io/kiegroup/kogito-task-console:${KOGITO_VERSION} - ports: - - 8380:8080 - depends_on: - data-index: - condition: service_started - keycloak: - condition: service_healthy - environment: - KOGITO_DATAINDEX_HTTP_URL: http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8180/graphql - QUARKUS_HTTP_CORS_ORIGINS: "/.*/" - KOGITO_TASK_CONSOLE_PROPS: -Dkogito.consoles.keycloak.config.url=http://localhost:8480/auth -Dkogito.consoles.keycloak.config.health-check-url=http://localhost:8480/auth/realms/kogito/.well-known/openid-configuration - - example-runtime-service: - container_name: example-runtime-service - image: dev.local/${USER}/process-usertasks-with-security-oidc-quarkus-with-console:1.0-SNAPSHOT - ports: - - "8080:8080" - depends_on: - kafka: - condition: service_started - infinispan: - condition: service_healthy - data-index: - condition: service_started - volumes: - - ./../target/classes/META-INF/processSVG/:/home/kogito/data/svg/ - environment: - QUARKUS_INFINISPAN_CLIENT_HOSTS: infinispan:11222 - QUARKUS_INFINISPAN_CLIENT_USE_AUTH: "false" - KAFKA_BOOTSTRAP_SERVERS: kafka:29092 - KOGITO_SERVICE_URL: http://example-runtime-service:8080 - KOGITO_DATAINDEX_HTTP_URL: http://data-index:8180 - QUARKUS_HTTP_CORS_ORIGINS: "/.*/" - extra_hosts: - - "data-index:host-gateway" \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docker-compose/infinispan/infinispan.xml b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docker-compose/infinispan/infinispan.xml deleted file mode 100644 index 726675509a..0000000000 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docker-compose/infinispan/infinispan.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docker-compose/keycloak/kogito-realm.json b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docker-compose/keycloak/kogito-realm.json deleted file mode 100644 index fd3cdc0942..0000000000 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docker-compose/keycloak/kogito-realm.json +++ /dev/null @@ -1,2242 +0,0 @@ -{ - "realm": "kogito", - "notBefore": 0, - "revokeRefreshToken": false, - "refreshTokenMaxReuse": 0, - "accessTokenLifespan": 300, - "accessTokenLifespanForImplicitFlow": 900, - "ssoSessionIdleTimeout": 1800, - "ssoSessionMaxLifespan": 36000, - "ssoSessionIdleTimeoutRememberMe": 0, - "ssoSessionMaxLifespanRememberMe": 0, - "offlineSessionIdleTimeout": 2592000, - "offlineSessionMaxLifespanEnabled": false, - "offlineSessionMaxLifespan": 5184000, - "accessCodeLifespan": 60, - "accessCodeLifespanUserAction": 300, - "accessCodeLifespanLogin": 1800, - "actionTokenGeneratedByAdminLifespan": 43200, - "actionTokenGeneratedByUserLifespan": 300, - "enabled": true, - "sslRequired": "external", - "registrationAllowed": false, - "registrationEmailAsUsername": false, - "rememberMe": false, - "verifyEmail": false, - "loginWithEmailAllowed": true, - "duplicateEmailsAllowed": false, - "resetPasswordAllowed": false, - "editUsernameAllowed": false, - "bruteForceProtected": false, - "permanentLockout": false, - "maxFailureWaitSeconds": 900, - "minimumQuickLoginWaitSeconds": 60, - "waitIncrementSeconds": 60, - "quickLoginCheckMilliSeconds": 1000, - "maxDeltaTimeSeconds": 43200, - "failureFactor": 30, - "roles": { - "realm": [ - { - "name": "managers", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - }, - { - "name": "uma_authorization", - "description": "${role_uma_authorization}", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - }, - { - "name": "admin", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - }, - { - "name": "user", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - }, - { - "name": "HR", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - }, - { - "name": "IT", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - }, - { - "name": "offline_access", - "description": "${role_offline-access}", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - } - ], - "client": { - "realm-management": [ - { - "name": "manage-identity-providers", - "description": "${role_manage-identity-providers}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "impersonation", - "description": "${role_impersonation}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "view-identity-providers", - "description": "${role_view-identity-providers}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "view-realm", - "description": "${role_view-realm}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "query-users", - "description": "${role_query-users}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "manage-clients", - "description": "${role_manage-clients}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "manage-events", - "description": "${role_manage-events}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "realm-admin", - "description": "${role_realm-admin}", - "composite": true, - "composites": { - "client": { - "realm-management": [ - "impersonation", - "manage-identity-providers", - "view-identity-providers", - "view-realm", - "query-users", - "manage-clients", - "manage-events", - "manage-realm", - "view-authorization", - "manage-authorization", - "view-users", - "create-client", - "query-clients", - "query-groups", - "manage-users", - "view-clients", - "view-events", - "query-realms" - ] - } - }, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "manage-realm", - "description": "${role_manage-realm}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "view-authorization", - "description": "${role_view-authorization}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "manage-authorization", - "description": "${role_manage-authorization}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "create-client", - "description": "${role_create-client}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "view-users", - "description": "${role_view-users}", - "composite": true, - "composites": { - "client": { - "realm-management": [ - "query-groups", - "query-users" - ] - } - }, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "query-clients", - "description": "${role_query-clients}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "query-groups", - "description": "${role_query-groups}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "manage-users", - "description": "${role_manage-users}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "view-clients", - "description": "${role_view-clients}", - "composite": true, - "composites": { - "client": { - "realm-management": [ - "query-clients" - ] - } - }, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "view-events", - "description": "${role_view-events}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "query-realms", - "description": "${role_query-realms}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - } - ], - "security-admin-console": [], - "admin-cli": [], - "kogito-service": [ - { - "name": "uma_protection", - "composite": false, - "clientRole": true, - "containerId": "0ac5df91-e044-4051-bd03-106a3a5fb9cc", - "attributes": {} - } - ], - "broker": [ - { - "name": "read-token", - "description": "${role_read-token}", - "composite": false, - "clientRole": true, - "containerId": "53d4fe53-a039-471e-886a-28eddc950e95", - "attributes": {} - } - ], - "account": [ - { - "name": "view-profile", - "description": "${role_view-profile}", - "composite": false, - "clientRole": true, - "containerId": "e55e1234-38fa-432d-8d90-39f5e024688d", - "attributes": {} - }, - { - "name": "manage-account", - "description": "${role_manage-account}", - "composite": true, - "composites": { - "client": { - "account": [ - "manage-account-links" - ] - } - }, - "clientRole": true, - "containerId": "e55e1234-38fa-432d-8d90-39f5e024688d", - "attributes": {} - }, - { - "name": "manage-account-links", - "description": "${role_manage-account-links}", - "composite": false, - "clientRole": true, - "containerId": "e55e1234-38fa-432d-8d90-39f5e024688d", - "attributes": {} - } - ] - } - }, - "groups": [], - "defaultRoles": [ - "uma_authorization", - "offline_access" - ], - "requiredCredentials": [ - "password" - ], - "otpPolicyType": "totp", - "otpPolicyAlgorithm": "HmacSHA1", - "otpPolicyInitialCounter": 0, - "otpPolicyDigits": 6, - "otpPolicyLookAheadWindow": 1, - "otpPolicyPeriod": 30, - "otpSupportedApplications": [ - "FreeOTP", - "Google Authenticator" - ], - "scopeMappings": [ - { - "clientScope": "offline_access", - "roles": [ - "offline_access" - ] - } - ], - "clients": [ - { - "clientId": "account", - "name": "${client_account}", - "baseUrl": "/auth/realms/kogito/account", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "0136c3ef-0dfd-4b13-a6d0-2c8b6358edec", - "defaultRoles": [ - "view-profile", - "manage-account" - ], - "redirectUris": [ - "/auth/realms/kogito/account/*" - ], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "clientId": "admin-cli", - "name": "${client_admin-cli}", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "a951803a-79c7-46a6-8197-e32835286971", - "redirectUris": [], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": false, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": true, - "serviceAccountsEnabled": false, - "publicClient": true, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "clientId": "broker", - "name": "${client_broker}", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "e1f7edd7-e15c-43b4-8736-ff8204d16836", - "redirectUris": [], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "clientId": "kogito-frontend", - "rootUrl": "http://localhost:8082", - "adminUrl": "http://localhost:8082", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "secret", - "redirectUris": [ - "http://localhost:8082/*" - ], - "webOrigins": [ - "http://localhost:8082" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": true, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": { - "saml.assertion.signature": "false", - "saml.force.post.binding": "false", - "saml.multivalued.roles": "false", - "saml.encrypt": "false", - "saml.server.signature": "false", - "saml.server.signature.keyinfo.ext": "false", - "exclude.session.state.from.auth.response": "false", - "saml_force_name_id_format": "false", - "saml.client.signature": "false", - "tls.client.certificate.bound.access.tokens": "false", - "saml.authnstatement": "false", - "display.on.consent.screen": "false", - "saml.onetimeuse.condition": "false" - }, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ], - "access": { - "view": true, - "configure": true, - "manage": true - } - }, - { - "clientId": "kogito-app", - "rootUrl": "http://localhost:8080", - "adminUrl": "http://localhost:8080", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "secret", - "redirectUris": [ - "http://localhost:8080/*" - ], - "webOrigins": [ - "*" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": true, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": { - "saml.assertion.signature": "false", - "saml.force.post.binding": "false", - "saml.multivalued.roles": "false", - "saml.encrypt": "false", - "saml.server.signature": "false", - "saml.server.signature.keyinfo.ext": "false", - "exclude.session.state.from.auth.response": "false", - "saml_force_name_id_format": "false", - "saml.client.signature": "false", - "tls.client.certificate.bound.access.tokens": "false", - "saml.authnstatement": "false", - "display.on.consent.screen": "false", - "saml.onetimeuse.condition": "false" - }, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ], - "access": { - "view": true, - "configure": true, - "manage": true - } - }, - { - "clientId": "kogito-service", - "rootUrl": "", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "secret", - "redirectUris": [ - "*" - ], - "webOrigins": [ - "*" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": true, - "serviceAccountsEnabled": true, - "authorizationServicesEnabled": true, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "protocolMappers": [ - { - "name": "Client ID", - "protocol": "openid-connect", - "protocolMapper": "oidc-usersessionmodel-note-mapper", - "consentRequired": false, - "config": { - "user.session.note": "clientId", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "clientId", - "jsonType.label": "String" - } - }, - { - "name": "Client IP Address", - "protocol": "openid-connect", - "protocolMapper": "oidc-usersessionmodel-note-mapper", - "consentRequired": false, - "config": { - "user.session.note": "clientAddress", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "clientAddress", - "jsonType.label": "String" - } - }, - { - "name": "Client Host", - "protocol": "openid-connect", - "protocolMapper": "oidc-usersessionmodel-note-mapper", - "consentRequired": false, - "config": { - "user.session.note": "clientHost", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "clientHost", - "jsonType.label": "String" - } - } - ], - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ], - "authorizationSettings": { - "allowRemoteResourceManagement": true, - "policyEnforcementMode": "ENFORCING", - "resources": [ - { - "name": "User Resource", - "ownerManagedAccess": false, - "attributes": {}, - "_id": "df1b74a9-3f10-499d-a581-368de48e512b", - "uris": [ - "/api/users/*" - ] - }, - { - "name": "Administration Resource", - "ownerManagedAccess": false, - "attributes": {}, - "_id": "7124e2f1-e6dc-44b4-87ab-24b010090b97", - "uris": [ - "/api/admin/*" - ] - } - ], - "policies": [ - { - "name": "Any User Policy", - "description": "Any user granted with the user role can access something", - "type": "role", - "logic": "POSITIVE", - "decisionStrategy": "UNANIMOUS", - "config": { - "roles": "[{\"id\":\"user\",\"required\":false}]" - } - }, - { - "name": "Only Administrators", - "description": "Only administrators can access", - "type": "role", - "logic": "POSITIVE", - "decisionStrategy": "UNANIMOUS", - "config": { - "roles": "[{\"id\":\"admin\",\"required\":false}]" - } - }, - { - "name": "User Resource Permission", - "type": "resource", - "logic": "POSITIVE", - "decisionStrategy": "UNANIMOUS", - "config": { - "resources": "[\"User Resource\"]", - "applyPolicies": "[\"Any User Policy\"]" - } - }, - { - "name": "Administration Resource Permission", - "type": "resource", - "logic": "POSITIVE", - "decisionStrategy": "UNANIMOUS", - "config": { - "resources": "[\"Administration Resource\"]", - "applyPolicies": "[\"Only Administrators\"]" - } - } - ], - "scopes": [], - "decisionStrategy": "UNANIMOUS" - } - }, - { - "clientId": "kogito-console-react", - "rootUrl": "http://localhost:9000", - "adminUrl": "http://localhost:9000/", - "baseUrl": "http://localhost:9000/", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "**********", - "redirectUris": [ - "http://localhost:9000/*" - ], - "webOrigins": [ - "*" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": true, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": { - "saml.assertion.signature": "false", - "saml.force.post.binding": "false", - "saml.multivalued.roles": "false", - "saml.encrypt": "false", - "saml.server.signature": "false", - "saml.server.signature.keyinfo.ext": "false", - "exclude.session.state.from.auth.response": "false", - "saml_force_name_id_format": "false", - "saml.client.signature": "false", - "tls.client.certificate.bound.access.tokens": "false", - "saml.authnstatement": "false", - "display.on.consent.screen": "false", - "saml.onetimeuse.condition": "false" - }, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "clientId": "kogito-console-quarkus", - "rootUrl": "http://localhost:8380", - "adminUrl": "http://localhost:8380/", - "baseUrl": "http://localhost:8380/", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "**********", - "redirectUris": [ - "http://localhost:8380/*", - "http://localhost:8280/*" - ], - "webOrigins": [ - "*" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": true, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": { - "saml.assertion.signature": "false", - "saml.force.post.binding": "false", - "saml.multivalued.roles": "false", - "saml.encrypt": "false", - "saml.server.signature": "false", - "saml.server.signature.keyinfo.ext": "false", - "exclude.session.state.from.auth.response": "false", - "saml_force_name_id_format": "false", - "saml.client.signature": "false", - "tls.client.certificate.bound.access.tokens": "false", - "saml.authnstatement": "false", - "display.on.consent.screen": "false", - "saml.onetimeuse.condition": "false" - }, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "protocolMappers": [ - { - "name": "groups", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-realm-role-mapper", - "consentRequired": false, - "config": { - "multivalued": "true", - "user.attribute": "foo", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "groups", - "jsonType.label": "String" - } - } - ], - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "clientId": "kogito-jobs-service", - "rootUrl": "http://localhost:8080", - "adminUrl": "http://localhost:8080", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "secret", - "redirectUris": [ - "http://localhost:8080/*" - ], - "webOrigins": [ - "http://localhost:8080" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": true, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": { - "saml.assertion.signature": "false", - "saml.force.post.binding": "false", - "saml.multivalued.roles": "false", - "saml.encrypt": "false", - "saml.server.signature": "false", - "saml.server.signature.keyinfo.ext": "false", - "exclude.session.state.from.auth.response": "false", - "saml_force_name_id_format": "false", - "saml.client.signature": "false", - "tls.client.certificate.bound.access.tokens": "false", - "saml.authnstatement": "false", - "display.on.consent.screen": "false", - "saml.onetimeuse.condition": "false" - }, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ], - "access": { - "view": true, - "configure": true, - "manage": true - } - }, - { - "clientId": "realm-management", - "name": "${client_realm-management}", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "c41b709a-a012-4c69-89d7-4f926dba0619", - "redirectUris": [], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": true, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "clientId": "security-admin-console", - "name": "${client_security-admin-console}", - "baseUrl": "/auth/admin/kogito/console/index.html", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "e571b211-2550-475d-b87f-116ff54091ee", - "redirectUris": [ - "/auth/admin/kogito/console/*" - ], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": true, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "protocolMappers": [ - { - "name": "locale", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "locale", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "locale", - "jsonType.label": "String" - } - } - ], - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - } - ], - "clientScopes": [ - { - "name": "address", - "description": "OpenID Connect built-in scope: address", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "true", - "consent.screen.text": "${addressScopeConsentText}" - }, - "protocolMappers": [ - { - "name": "address", - "protocol": "openid-connect", - "protocolMapper": "oidc-address-mapper", - "consentRequired": false, - "config": { - "user.attribute.formatted": "formatted", - "user.attribute.country": "country", - "user.attribute.postal_code": "postal_code", - "userinfo.token.claim": "true", - "user.attribute.street": "street", - "id.token.claim": "true", - "user.attribute.region": "region", - "access.token.claim": "true", - "user.attribute.locality": "locality" - } - } - ] - }, - { - "name": "email", - "description": "OpenID Connect built-in scope: email", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "true", - "consent.screen.text": "${emailScopeConsentText}" - }, - "protocolMappers": [ - { - "name": "email", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "email", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "email", - "jsonType.label": "String" - } - }, - { - "name": "email verified", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "emailVerified", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "email_verified", - "jsonType.label": "boolean" - } - } - ] - }, - { - "name": "microprofile-jwt", - "description": "Microprofile - JWT built-in scope", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "false" - }, - "protocolMappers": [ - { - "name": "upn", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "username", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "upn", - "jsonType.label": "String" - } - }, - { - "name": "groups", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-realm-role-mapper", - "consentRequired": false, - "config": { - "multivalued": "true", - "user.attribute": "foo", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "groups", - "jsonType.label": "String" - } - } - ] - }, - { - "name": "offline_access", - "description": "OpenID Connect built-in scope: offline_access", - "protocol": "openid-connect", - "attributes": { - "consent.screen.text": "${offlineAccessScopeConsentText}", - "display.on.consent.screen": "true" - } - }, - { - "name": "phone", - "description": "OpenID Connect built-in scope: phone", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "true", - "consent.screen.text": "${phoneScopeConsentText}" - }, - "protocolMappers": [ - { - "name": "phone number verified", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "phoneNumberVerified", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "phone_number_verified", - "jsonType.label": "boolean" - } - }, - { - "name": "phone number", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "phoneNumber", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "phone_number", - "jsonType.label": "String" - } - } - ] - }, - { - "name": "profile", - "description": "OpenID Connect built-in scope: profile", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "true", - "consent.screen.text": "${profileScopeConsentText}" - }, - "protocolMappers": [ - { - "name": "nickname", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "nickname", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "nickname", - "jsonType.label": "String" - } - }, - { - "name": "zoneinfo", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "zoneinfo", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "zoneinfo", - "jsonType.label": "String" - } - }, - { - "name": "updated at", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "updatedAt", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "updated_at", - "jsonType.label": "String" - } - }, - { - "name": "birthdate", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "birthdate", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "birthdate", - "jsonType.label": "String" - } - }, - { - "name": "given name", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "firstName", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "given_name", - "jsonType.label": "String" - } - }, - { - "name": "full name", - "protocol": "openid-connect", - "protocolMapper": "oidc-full-name-mapper", - "consentRequired": false, - "config": { - "id.token.claim": "true", - "access.token.claim": "true", - "userinfo.token.claim": "true" - } - }, - { - "name": "middle name", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "middleName", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "middle_name", - "jsonType.label": "String" - } - }, - { - "name": "username", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "username", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "preferred_username", - "jsonType.label": "String" - } - }, - { - "name": "family name", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "lastName", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "family_name", - "jsonType.label": "String" - } - }, - { - "name": "gender", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "gender", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "gender", - "jsonType.label": "String" - } - }, - { - "name": "picture", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "picture", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "picture", - "jsonType.label": "String" - } - }, - { - "name": "locale", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "locale", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "locale", - "jsonType.label": "String" - } - }, - { - "name": "profile", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "profile", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "profile", - "jsonType.label": "String" - } - }, - { - "name": "website", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "website", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "website", - "jsonType.label": "String" - } - } - ] - }, - { - "name": "role_list", - "description": "SAML role list", - "protocol": "saml", - "attributes": { - "consent.screen.text": "${samlRoleListScopeConsentText}", - "display.on.consent.screen": "true" - }, - "protocolMappers": [ - { - "name": "role list", - "protocol": "saml", - "protocolMapper": "saml-role-list-mapper", - "consentRequired": false, - "config": { - "single": "false", - "attribute.nameformat": "Basic", - "attribute.name": "Role" - } - } - ] - }, - { - "name": "roles", - "description": "OpenID Connect scope for add user roles to the access token", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "false", - "display.on.consent.screen": "true", - "consent.screen.text": "${rolesScopeConsentText}" - }, - "protocolMappers": [ - { - "name": "realm roles", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-realm-role-mapper", - "consentRequired": false, - "config": { - "user.attribute": "foo", - "access.token.claim": "true", - "claim.name": "realm_access.roles", - "jsonType.label": "String", - "multivalued": "true" - } - }, - { - "name": "audience resolve", - "protocol": "openid-connect", - "protocolMapper": "oidc-audience-resolve-mapper", - "consentRequired": false, - "config": {} - }, - { - "name": "client roles", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-client-role-mapper", - "consentRequired": false, - "config": { - "user.attribute": "foo", - "access.token.claim": "true", - "claim.name": "resource_access.${client_id}.roles", - "jsonType.label": "String", - "multivalued": "true" - } - } - ] - }, - { - "name": "web-origins", - "description": "OpenID Connect scope for add allowed web origins to the access token", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "false", - "display.on.consent.screen": "false", - "consent.screen.text": "" - }, - "protocolMappers": [ - { - "name": "allowed web origins", - "protocol": "openid-connect", - "protocolMapper": "oidc-allowed-origins-mapper", - "consentRequired": false, - "config": {} - } - ] - } - ], - "defaultDefaultClientScopes": [ - "role_list", - "profile", - "email", - "roles", - "web-origins" - ], - "defaultOptionalClientScopes": [ - "offline_access", - "address", - "phone", - "microprofile-jwt" - ], - "browserSecurityHeaders": { - "contentSecurityPolicyReportOnly": "", - "xContentTypeOptions": "nosniff", - "xRobotsTag": "none", - "xFrameOptions": "SAMEORIGIN", - "xXSSProtection": "1; mode=block", - "contentSecurityPolicy": "frame-src 'self'; frame-ancestors 'self'; object-src 'none';", - "strictTransportSecurity": "max-age=31536000; includeSubDomains" - }, - "smtpServer": {}, - "eventsEnabled": false, - "eventsListeners": [ - "jboss-logging" - ], - "enabledEventTypes": [], - "adminEventsEnabled": false, - "adminEventsDetailsEnabled": false, - "components": { - "org.keycloak.services.clientregistration.policy.ClientRegistrationPolicy": [ - { - "name": "Allowed Protocol Mapper Types", - "providerId": "allowed-protocol-mappers", - "subType": "anonymous", - "subComponents": {}, - "config": { - "allowed-protocol-mapper-types": [ - "oidc-full-name-mapper", - "saml-user-attribute-mapper", - "saml-user-property-mapper", - "oidc-address-mapper", - "saml-role-list-mapper", - "oidc-sha256-pairwise-sub-mapper", - "oidc-usermodel-attribute-mapper", - "oidc-usermodel-property-mapper" - ] - } - }, - { - "name": "Allowed Client Scopes", - "providerId": "allowed-client-templates", - "subType": "authenticated", - "subComponents": {}, - "config": { - "allow-default-scopes": [ - "true" - ] - } - }, - { - "name": "Allowed Client Scopes", - "providerId": "allowed-client-templates", - "subType": "anonymous", - "subComponents": {}, - "config": { - "allow-default-scopes": [ - "true" - ] - } - }, - { - "name": "Trusted Hosts", - "providerId": "trusted-hosts", - "subType": "anonymous", - "subComponents": {}, - "config": { - "host-sending-registration-request-must-match": [ - "true" - ], - "client-uris-must-match": [ - "true" - ] - } - }, - { - "name": "Full Scope Disabled", - "providerId": "scope", - "subType": "anonymous", - "subComponents": {}, - "config": {} - }, - { - "name": "Max Clients Limit", - "providerId": "max-clients", - "subType": "anonymous", - "subComponents": {}, - "config": { - "max-clients": [ - "200" - ] - } - }, - { - "name": "Consent Required", - "providerId": "consent-required", - "subType": "anonymous", - "subComponents": {}, - "config": {} - }, - { - "name": "Allowed Protocol Mapper Types", - "providerId": "allowed-protocol-mappers", - "subType": "authenticated", - "subComponents": {}, - "config": { - "allowed-protocol-mapper-types": [ - "saml-user-attribute-mapper", - "oidc-full-name-mapper", - "saml-role-list-mapper", - "saml-user-property-mapper", - "oidc-usermodel-attribute-mapper", - "oidc-address-mapper", - "oidc-usermodel-property-mapper", - "oidc-sha256-pairwise-sub-mapper" - ] - } - } - ], - "org.keycloak.keys.KeyProvider": [ - { - "name": "rsa-generated", - "providerId": "rsa-generated", - "subComponents": {}, - "config": { - "privateKey": [ - "MIIEowIBAAKCAQEAn5T13suF8mlS+pJXp0U1bto41nW55wpcs+Rps8ZVCRyJKWqzwSCYnI7lm0rB2wBpAAO4OPoj1zlmVoFmBPsDU9Xf7rjsJb5LIzIQDCZY44aSDZt6RR+gakPiQvlzHyW/RozYpngDJF7TsTD7rdRF1xQ4RprfBF8fwK/xsU7pxbeom5xDHZhz3fiw8s+7UdbmnazDHfAjU58aUrLGgVRfUsuoHjtsptYlOIXEifaeMetXZE+HhqLYRHQPDap5fbBJl773Trosn7N9nmzN4x1xxGj9So21WC5UboQs9sAIVgizc4omjZ5Y4RN9HLH7G4YwJctNntzmnJhDui9zAO+zSQIDAQABAoIBADi+F7rTtVoft0Cfnok8o6Y58/HVxHdxiMryUd95iy0FN4RBi48FTx6D9QKFz25Ws/8sU2n3D51srIXf1u24b1N0/f39RQKaqk7mcyxOylaEuBQcj5pah4ihgKd92UBfBKdKV5LBo6RgD3e2yhbiHr8+UlBQqzH7vOef6Bm6zIbfmi3N88swAJhP0YizRZFklsbmLsK6nkwyro00CHJvPVKSBbM+ad+/zIBsLw56MvNngB5TuFguUgoljd6M1T2z4utmZGlTUqrfE1onAVLJZoGnRohyIr7dJEg6YxWR70PxsgmkDKyeRvet9P1trO0n+OSprusfrC3cHJStabap1V0CgYEA1A/CtsqTnjdYYsB19eumZgdpzUgNc/YEAzZ/OWb8yTLoB2ncci+63A1rXHUXAqJFY7vtjn5mxv7SuASNbUrzq+6KfZvC1x9XEtnczqT/ypunNfxmIZuj8Nuu6vtURguZ8kPPwdkI8toTizRFeRE5ZDBvoQryiEVYugfHaHT5vzsCgYEAwKWODwquI0Lv9BuwdNVrBXQpkKh3ZfYOA7i9xvhxlM7xUu8OMCwwCPn3r7vrW5APjTqX4h330mJ44SLEs+7gbCUs4BbJBLA6g0ChlHa9PTkxp6tk2nDF/B34fxiZSRkE85L+d+at0Dc3hnlzLCJCzJawGpoPniPU9e4w0p4dN0sCgYAsGnMGjS8SUrRhJWHjGXVr9tK8TOXvXhULjgP7rj2Yoqu7Dvs4DFEyft/7RKbad2EzEtyfLA64CDtO5jN7rYDsGxpWcVSeZPg5BXJ0z8AbJTArfCjJiJMZ/rZsTIUEZFlKF2xYBolj6JLz+pUQTtK+0YwF1D8ItFN1rTR9twZSDQKBgQC6sPXNX+VH6LuPTjIf1x8CxwLs3EXxOpV0R9kp9GRl+HJnk6GlT30xhcThufQo5KAdllXQXIhoiuNoEoCbevhj9Vbax1oBQCNERSMRNEzKAx46xd9TzYwgeo7x5E3QR/3DaoVOfu+cY5ZcrF/PulgP2kxJS1mtQD5GIpGP2oinpwKBgGqiqTFPqRcelx76vBvTU+Jp1zM62T4AotbMrSQR/oUvqHe5Ytj/SbZx+wbbHAiyGgV700Mosyviik83YEAbR3kdOPjgYvAJJW2Y3jEMdQ7MwriXz8XLh5BGmYfVjkSOJXed9ua9WlYLKOJeXXv191BbDvrx5NXuJyVVU4vJx3YZ" - ], - "certificate": [ - "MIICnTCCAYUCBgFp4EYIrjANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQDDAdwcm90ZWFuMB4XDTE5MDQwMjIyNTYxOVoXDTI5MDQwMjIyNTc1OVowEjEQMA4GA1UEAwwHcHJvdGVhbjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ+U9d7LhfJpUvqSV6dFNW7aONZ1uecKXLPkabPGVQkciSlqs8EgmJyO5ZtKwdsAaQADuDj6I9c5ZlaBZgT7A1PV3+647CW+SyMyEAwmWOOGkg2bekUfoGpD4kL5cx8lv0aM2KZ4AyRe07Ew+63URdcUOEaa3wRfH8Cv8bFO6cW3qJucQx2Yc934sPLPu1HW5p2swx3wI1OfGlKyxoFUX1LLqB47bKbWJTiFxIn2njHrV2RPh4ai2ER0Dw2qeX2wSZe+9066LJ+zfZ5szeMdccRo/UqNtVguVG6ELPbACFYIs3OKJo2eWOETfRyx+xuGMCXLTZ7c5pyYQ7ovcwDvs0kCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAVtmRKDb4OK5iSA46tagMBkp6L7WuPpCWuHGWwobEP+BecYsShW7zP3s12oA8SNSwbhvu0CRqgzxhuypgf3hKQFVU153Erv4hzkj+8S0s5LR/ZE7tDNY2lzJ3yQKXy3Md7EkuzzvOZ50MTrcSKAanWq/ZW1OTnrtGymj5zGJnTg7mMnJzEIGePxkvPu/QdchiPBLqxfZYm1jsFGY25djOC3N/KmVcRVmPRGuu6D8tBFHlKoPfZYPdbMvsvs24aupHKRcZ+ofTCpK+2Qo8c0pSSqeEYHGmuGqC6lC6ozxtxSABPO9Q1R1tZBU7Kg5HvXUwwmoVS3EGub46YbHqbmWMLg==" - ], - "priority": [ - "100" - ] - } - }, - { - "name": "hmac-generated", - "providerId": "hmac-generated", - "subComponents": {}, - "config": { - "kid": [ - "96afd00e-85cf-4d35-b18e-061d3813d8b2" - ], - "secret": [ - "qBFGKdUGf6xDgKphnRfoFzIzaFHJW4bYnZ9MinPFzN38X5_ctq-2u1q5RdZzeJukXvk2biHB8_s3DxWmmLZFsA" - ], - "priority": [ - "100" - ], - "algorithm": [ - "HS256" - ] - } - }, - { - "name": "aes-generated", - "providerId": "aes-generated", - "subComponents": {}, - "config": { - "kid": [ - "b04473d3-8395-4016-b455-19a9e951106b" - ], - "secret": [ - "x68mMOVdz3qKWzltzReV0g" - ], - "priority": [ - "100" - ] - } - } - ] - }, - "internationalizationEnabled": false, - "supportedLocales": [], - "authenticationFlows": [ - { - "alias": "Handle Existing Account", - "description": "Handle what to do if there is existing account with same email/username like authenticated identity provider", - "providerId": "basic-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "idp-confirm-link", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "idp-email-verification", - "requirement": "ALTERNATIVE", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "requirement": "ALTERNATIVE", - "priority": 30, - "flowAlias": "Verify Existing Account by Re-authentication", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "alias": "Verify Existing Account by Re-authentication", - "description": "Reauthentication of existing account", - "providerId": "basic-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "idp-username-password-form", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "auth-otp-form", - "requirement": "OPTIONAL", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "browser", - "description": "browser based authentication", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "auth-cookie", - "requirement": "ALTERNATIVE", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "auth-spnego", - "requirement": "DISABLED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "identity-provider-redirector", - "requirement": "ALTERNATIVE", - "priority": 25, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "requirement": "ALTERNATIVE", - "priority": 30, - "flowAlias": "forms", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "alias": "clients", - "description": "Base authentication for clients", - "providerId": "client-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "client-secret", - "requirement": "ALTERNATIVE", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "client-jwt", - "requirement": "ALTERNATIVE", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "client-secret-jwt", - "requirement": "ALTERNATIVE", - "priority": 30, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "client-x509", - "requirement": "ALTERNATIVE", - "priority": 40, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "direct grant", - "description": "OpenID Connect Resource Owner Grant", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "direct-grant-validate-username", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "direct-grant-validate-password", - "requirement": "REQUIRED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "direct-grant-validate-otp", - "requirement": "OPTIONAL", - "priority": 30, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "docker auth", - "description": "Used by Docker clients to authenticate against the IDP", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "docker-http-basic-authenticator", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "first broker login", - "description": "Actions taken after first broker login with identity provider account, which is not yet linked to any Keycloak account", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticatorConfig": "review profile config", - "authenticator": "idp-review-profile", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticatorConfig": "create unique user config", - "authenticator": "idp-create-user-if-unique", - "requirement": "ALTERNATIVE", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "requirement": "ALTERNATIVE", - "priority": 30, - "flowAlias": "Handle Existing Account", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "alias": "forms", - "description": "Username, password, otp and other auth forms.", - "providerId": "basic-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "auth-username-password-form", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "auth-otp-form", - "requirement": "OPTIONAL", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "http challenge", - "description": "An authentication flow based on challenge-response HTTP Authentication Schemes", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "no-cookie-redirect", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "basic-auth", - "requirement": "REQUIRED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "basic-auth-otp", - "requirement": "DISABLED", - "priority": 30, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "auth-spnego", - "requirement": "DISABLED", - "priority": 40, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "registration", - "description": "registration flow", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "registration-page-form", - "requirement": "REQUIRED", - "priority": 10, - "flowAlias": "registration form", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "alias": "registration form", - "description": "registration form", - "providerId": "form-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "registration-user-creation", - "requirement": "REQUIRED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "registration-profile-action", - "requirement": "REQUIRED", - "priority": 40, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "registration-password-action", - "requirement": "REQUIRED", - "priority": 50, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "registration-recaptcha-action", - "requirement": "DISABLED", - "priority": 60, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "reset credentials", - "description": "Reset credentials for a user if they forgot their password or something", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "reset-credentials-choose-user", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "reset-credential-email", - "requirement": "REQUIRED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "reset-password", - "requirement": "REQUIRED", - "priority": 30, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "reset-otp", - "requirement": "OPTIONAL", - "priority": 40, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "saml ecp", - "description": "SAML ECP Profile Authentication Flow", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "http-basic-authenticator", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - } - ], - "authenticatorConfig": [ - { - "alias": "create unique user config", - "config": { - "require.password.update.after.registration": "false" - } - }, - { - "alias": "review profile config", - "config": { - "update.profile.on.first.login": "missing" - } - } - ], - "requiredActions": [ - { - "alias": "CONFIGURE_TOTP", - "name": "Configure OTP", - "providerId": "CONFIGURE_TOTP", - "enabled": true, - "defaultAction": false, - "priority": 10, - "config": {} - }, - { - "alias": "terms_and_conditions", - "name": "Terms and Conditions", - "providerId": "terms_and_conditions", - "enabled": false, - "defaultAction": false, - "priority": 20, - "config": {} - }, - { - "alias": "UPDATE_PASSWORD", - "name": "Update Password", - "providerId": "UPDATE_PASSWORD", - "enabled": true, - "defaultAction": false, - "priority": 30, - "config": {} - }, - { - "alias": "UPDATE_PROFILE", - "name": "Update Profile", - "providerId": "UPDATE_PROFILE", - "enabled": true, - "defaultAction": false, - "priority": 40, - "config": {} - }, - { - "alias": "VERIFY_EMAIL", - "name": "Verify Email", - "providerId": "VERIFY_EMAIL", - "enabled": true, - "defaultAction": false, - "priority": 50, - "config": {} - } - ], - "browserFlow": "browser", - "registrationFlow": "registration", - "directGrantFlow": "direct grant", - "resetCredentialsFlow": "reset credentials", - "clientAuthenticationFlow": "clients", - "dockerAuthenticationFlow": "docker auth", - "attributes": { - "_browser_header.xXSSProtection": "1; mode=block", - "_browser_header.xFrameOptions": "SAMEORIGIN", - "_browser_header.strictTransportSecurity": "max-age=31536000; includeSubDomains", - "permanentLockout": "false", - "quickLoginCheckMilliSeconds": "1000", - "_browser_header.xRobotsTag": "none", - "maxFailureWaitSeconds": "900", - "minimumQuickLoginWaitSeconds": "60", - "failureFactor": "30", - "actionTokenGeneratedByUserLifespan": "300", - "maxDeltaTimeSeconds": "43200", - "_browser_header.xContentTypeOptions": "nosniff", - "offlineSessionMaxLifespan": "5184000", - "actionTokenGeneratedByAdminLifespan": "43200", - "_browser_header.contentSecurityPolicyReportOnly": "", - "bruteForceProtected": "false", - "_browser_header.contentSecurityPolicy": "frame-src 'self'; frame-ancestors 'self'; object-src 'none';", - "waitIncrementSeconds": "60", - "offlineSessionMaxLifespanEnabled": "false" - }, - "users": [ - { - "username": "admin", - "enabled": true, - "totp": false, - "emailVerified": false, - "credentials": [ - { - "type": "password", - "hashedSaltedValue": "NICTtwsvSxJ5hL8hLAuleDUv9jwZcuXgxviMXvR++cciyPtiIEStEaJUyfA9DOir59awjPrHOumsclPVjNBplA==", - "salt": "T/2P5o5oxFJUEk68BRURRg==", - "hashIterations": 27500, - "counter": 0, - "algorithm": "pbkdf2-sha256", - "digits": 0, - "period": 0, - "createdDate": 1554245879354, - "config": {} - } - ], - "disableableCredentialTypes": [ - "password" - ], - "requiredActions": [], - "realmRoles": [ - "admin", - "managers", - "user", - "IT", - "HR" - ], - "notBefore": 0, - "groups": [] - }, - { - "username": "alice", - "enabled": true, - "totp": false, - "emailVerified": false, - "credentials": [ - { - "type": "password", - "hashedSaltedValue": "A3okqV2T/ybXTVEgKfosoSjP8Yc9IZbFP/SY4cEd6hag7TABQrQ6nUSuwagGt96l8cw1DTijO75PqX6uiTXMzw==", - "salt": "sl4mXx6T9FypPH/s9TngfQ==", - "hashIterations": 27500, - "counter": 0, - "algorithm": "pbkdf2-sha256", - "digits": 0, - "period": 0, - "createdDate": 1554245879116, - "config": {} - } - ], - "disableableCredentialTypes": [ - "password" - ], - "requiredActions": [], - "realmRoles": [ - "user", - "HR" - ], - "notBefore": 0, - "groups": [] - }, - { - "username": "jdoe", - "enabled": true, - "totp": false, - "emailVerified": false, - "credentials": [ - { - "type": "password", - "hashedSaltedValue": "JV3DUNLjqOadjbBOtC4rvacQI553CGaDGAzBS8MR5ReCr7SwF3E6CsW3T7/XO8ITZAsch8+A/6loeuCoVLLJrg==", - "salt": "uCbOH7HZtyDtMd0E9DG/nw==", - "hashIterations": 27500, - "counter": 0, - "algorithm": "pbkdf2-sha256", - "digits": 0, - "period": 0, - "createdDate": 1554245879227, - "config": {} - } - ], - "disableableCredentialTypes": [ - "password" - ], - "requiredActions": [], - "realmRoles": [ - "managers", - "user", - "IT" - ], - "notBefore": 0, - "groups": [] - } - ], - "keycloakVersion": "6.0.0", - "userManagedAccessAllowed": false -} diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docker-compose/startServices.sh b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docker-compose/startServices.sh deleted file mode 100755 index 5baa6b6dfb..0000000000 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docker-compose/startServices.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh - -echo "Script requires your Kogito Quickstart to be compiled with mvn clean install -Pcontainer" - -PROJECT_VERSION=$(cd ../ && mvn help:evaluate -Dexpression=project.version -q -DforceStdout) - -echo "Project version: ${PROJECT_VERSION}" - -if [[ $PROJECT_VERSION == *SNAPSHOT ]]; -then - KOGITO_VERSION="latest" -else - KOGITO_VERSION=${PROJECT_VERSION%.*} -fi - -echo "Kogito Image version: ${KOGITO_VERSION}" -echo "KOGITO_VERSION=${KOGITO_VERSION}" > ".env" - -if [ "$(uname)" == "Darwin" ]; then - echo "DOCKER_GATEWAY_HOST=kubernetes.docker.internal" >> ".env" -elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then - echo "DOCKER_GATEWAY_HOST=172.17.0.1" >> ".env" -fi - -PERSISTENCE_FOLDER=./persistence -KOGITO_EXAMPLE_PERSISTENCE=../target/classes/META-INF/resources/persistence/protobuf - -rm -rf $PERSISTENCE_FOLDER - -mkdir -p $PERSISTENCE_FOLDER - -if [ -d "$KOGITO_EXAMPLE_PERSISTENCE" ] -then - cp $KOGITO_EXAMPLE_PERSISTENCE/*.proto $PERSISTENCE_FOLDER/ -else - echo "$KOGITO_EXAMPLE_PERSISTENCE does not exist. Have you compiled the project?" - exit 1 -fi - -SVG_FOLDER=./svg - -KOGITO_EXAMPLE_SVG_FOLDER=../target/classes/META-INF/processSVG - -mkdir -p $SVG_FOLDER - -if [ -d "$KOGITO_EXAMPLE_SVG_FOLDER" ] -then - cp $KOGITO_EXAMPLE_SVG_FOLDER/*.svg $SVG_FOLDER -else - echo "$KOGITO_EXAMPLE_SVG_FOLDER does not exist. Have you compiled the project?" - exit 1 -fi - -docker-compose up \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/MC_details1.png b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/MC_details1.png deleted file mode 100644 index 5f0a95379c..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/MC_details1.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/MC_details2.png b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/MC_details2.png deleted file mode 100644 index 7ddf2fb204..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/MC_details2.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/MC_details3.png b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/MC_details3.png deleted file mode 100644 index fcc6ba57fb..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/MC_details3.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/MC_list1.png b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/MC_list1.png deleted file mode 100644 index 1caeae2ef2..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/MC_list1.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/MC_list2.png b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/MC_list2.png deleted file mode 100644 index a4c3acce85..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/MC_list2.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/TC_FirstLine.png b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/TC_FirstLine.png deleted file mode 100644 index e0f0f74e56..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/TC_FirstLine.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/TC_SecondLine.png b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/TC_SecondLine.png deleted file mode 100644 index 64edc107ac..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/TC_SecondLine.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/TC_list1.png b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/TC_list1.png deleted file mode 100644 index 0cc967bd1d..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/TC_list1.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/TC_list2.png b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/TC_list2.png deleted file mode 100644 index deabbc048e..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/TC_list2.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/keycloak-login.png b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/keycloak-login.png deleted file mode 100644 index 58d85f1f43..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/keycloak-login.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/management-console.png b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/management-console.png deleted file mode 100644 index 9a6053e529..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/management-console.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/process.png b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/process.png deleted file mode 100644 index 974dfaebaf..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/process.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/services.png b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/services.png deleted file mode 100644 index 64dd2464b7..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/services.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/task-console.png b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/task-console.png deleted file mode 100644 index 08688fe01e..0000000000 Binary files a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/docs/images/task-console.png and /dev/null differ diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/main/java/org/acme/travels/Address.java b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/main/java/org/acme/travels/Address.java deleted file mode 100644 index d808334384..0000000000 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/main/java/org/acme/travels/Address.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR 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; - -public class Address { - - private String street; - private String city; - private String zipCode; - private String country; - - public Address() { - - } - - public Address(String street, String city, String zipCode, String country) { - super(); - this.street = street; - this.city = city; - this.zipCode = zipCode; - this.country = country; - } - - public String getStreet() { - return street; - } - - public void setStreet(String street) { - this.street = street; - } - - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - public String getZipCode() { - return zipCode; - } - - public void setZipCode(String zipCode) { - this.zipCode = zipCode; - } - - public String getCountry() { - return country; - } - - public void setCountry(String country) { - this.country = country; - } - - @Override - public String toString() { - return "Address [street=" + street + ", city=" + city + ", zipCode=" + zipCode + ", country=" + country + "]"; - } -} diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/main/java/org/acme/travels/Traveller.java b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/main/java/org/acme/travels/Traveller.java deleted file mode 100644 index cf790d4664..0000000000 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/main/java/org/acme/travels/Traveller.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR 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; - -public class Traveller { - - private String firstName; - private String lastName; - private String email; - private String nationality; - private Address address; - - public Traveller() { - - } - - public Traveller(String firstName, String lastName, String email, String nationality, Address address) { - super(); - this.firstName = firstName; - this.lastName = lastName; - this.email = email; - this.nationality = nationality; - this.address = address; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public String getNationality() { - return nationality; - } - - public void setNationality(String nationality) { - this.nationality = nationality; - } - - public Address getAddress() { - return address; - } - - public void setAddress(Address address) { - this.address = address; - } - - @Override - public String toString() { - return "Traveller [firstName=" + firstName + ", lastName=" + lastName + ", email=" + email + ", nationality=" - + nationality + ", address=" + address + "]"; - } - -} diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/main/resources/META-INF/processSVG/approvals.svg b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/main/resources/META-INF/processSVG/approvals.svg deleted file mode 100644 index 3d8a564a94..0000000000 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/main/resources/META-INF/processSVG/approvals.svg +++ /dev/null @@ -1 +0,0 @@ -StartProcessFirst Line approvalSecond Line approvalEnd \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/main/resources/META-INF/resources/index.html b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/main/resources/META-INF/resources/index.html deleted file mode 100644 index 8556bab48e..0000000000 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/main/resources/META-INF/resources/index.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - - - Kogito quickstart - - - - - - - - - - - - - - -
-
-
-
-

Welcome to Kogito

-

- Cloud-native business automation for building intelligent applications, backed by - battle-tested capabilities. -

- - Get Started - - - Latest updates - -
-
-
-
-
-
-
-

Quick Links

- -
-
-
- - - \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/main/resources/application.properties b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/main/resources/application.properties deleted file mode 100644 index 3367a0f564..0000000000 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/main/resources/application.properties +++ /dev/null @@ -1,56 +0,0 @@ -# Packaging -#quarkus.package.type=fast-jar - -#https://quarkus.io/guides/openapi-swaggerui -quarkus.http.cors=true -quarkus.smallrye-openapi.path=/docs/openapi.json -quarkus.swagger-ui.always-include=true - -kogito.service.url=http://localhost:8080 -kogito.dataindex.http.url=http://localhost:8180 -kogito.dataindex.ws.url=ws://localhost:8180 - -quarkus.infinispan-client.hosts=localhost:11222 -quarkus.infinispan-client.use-auth=false - -kafka.bootstrap.servers=localhost:9092 - -## main transport - -## metadata - -#mp.messaging.outgoing.kogito-processinstances-events.bootstrap.servers=localhost:9092 -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-usertaskinstances-events.bootstrap.servers=localhost:9092 -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.bootstrap.servers=localhost:9092 -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 - -# security -quarkus.oidc.auth-server-url=http://localhost:8480/auth/realms/kogito - -quarkus.oidc.client-id=kogito-app -quarkus.oidc.credentials.secret=secret - -quarkus.http.auth.permission.authenticated.paths=/* -quarkus.http.auth.permission.authenticated.policy=authenticated - -quarkus.http.cors.origins=http://localhost:${quarkus.http.port} - -# profile to pack this example into a container, to use it execute activate the maven container profile, -Dcontainer -%container.quarkus.container-image.build=true -%container.quarkus.container-image.push=false -%container.quarkus.container-image.group=${USER} -%container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/main/resources/org/acme/travels/approval.bpmn2 b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/main/resources/org/acme/travels/approval.bpmn2 deleted file mode 100644 index a687f98a3e..0000000000 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/main/resources/org/acme/travels/approval.bpmn2 +++ /dev/null @@ -1,304 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SequenceFlow_4 - - - - - - - - SequenceFlow_6 - - - - - - - - SequenceFlow_4 - SequenceFlow_5 - - - - - - - - - - UserTask_1_TaskNameInputX - UserTask_1_travellerInputX - UserTask_1_SkippableInputX - UserTask_1_GroupIdInputX - UserTask_1_PriorityInputX - - - UserTask_1_ActorIdOutputX - UserTask_1_approvedOutputX - - - - UserTask_1_TaskNameInputX - - - - - - - traveller - UserTask_1_travellerInputX - - - UserTask_1_SkippableInputX - - - - - - - UserTask_1_GroupIdInputX - - - - - - - UserTask_1_PriorityInputX - - - - - - - UserTask_1_ActorIdOutputX - approver - - - UserTask_1_approvedOutputX - firstLineApproval - - - - jdoe - - - - - - - - - - SequenceFlow_5 - SequenceFlow_6 - - - - - - - - - - UserTask_2_TaskNameInputX - UserTask_2_ExcludedOwnerIdInputX - UserTask_2_travellerInputX - UserTask_2_SkippableInputX - UserTask_2_GroupIdInputX - UserTask_2_PriorityInputX - - - UserTask_2_approvedOutputX - - - - UserTask_2_TaskNameInputX - - - - - - - approver - UserTask_2_ExcludedOwnerIdInputX - - - traveller - UserTask_2_travellerInputX - - - UserTask_2_SkippableInputX - - - - - - - UserTask_2_GroupIdInputX - - - - - - - UserTask_2_PriorityInputX - - - - - - - UserTask_2_approvedOutputX - secondLineApproval - - - - jdoe - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - _WEN1QMLBEDmKX8ubtsKfug - _WEN1QMLBEDmKX8ubtsKfug - - \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/test/java/org/acme/travels/ApprovalsProcessIT.java b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/test/java/org/acme/travels/ApprovalsProcessIT.java deleted file mode 100644 index 54b0e1f027..0000000000 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/test/java/org/acme/travels/ApprovalsProcessIT.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR 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; - -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.inject.Inject; -import javax.inject.Named; - -import org.jbpm.process.instance.impl.humantask.HumanTaskTransition; -import org.jbpm.process.instance.impl.humantask.phases.Claim; -import org.jbpm.process.instance.impl.workitem.Complete; -import org.junit.jupiter.api.Test; -import org.kie.kogito.Model; -import org.kie.kogito.auth.IdentityProviders; -import org.kie.kogito.auth.SecurityPolicy; -import org.kie.kogito.process.Process; -import org.kie.kogito.process.ProcessInstance; -import org.kie.kogito.process.WorkItem; -import org.kie.kogito.testcontainers.quarkus.InfinispanQuarkusTestResource; -import org.kie.kogito.testcontainers.quarkus.KafkaQuarkusTestResource; -import org.kie.kogito.testcontainers.quarkus.KeycloakQuarkusTestResource; - -import io.quarkus.test.common.QuarkusTestResource; -import io.quarkus.test.junit.QuarkusTest; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; - -@QuarkusTest -@QuarkusTestResource(KeycloakQuarkusTestResource.class) -@QuarkusTestResource(value = InfinispanQuarkusTestResource.class) -@QuarkusTestResource(value = KafkaQuarkusTestResource.class) -public class ApprovalsProcessIT { - - @Named("approvals") - @Inject - Process approvalsProcess; - - @Test - public void testApprovalProcess() { - - assertNotNull(approvalsProcess); - - Model m = approvalsProcess.createModel(); - Map parameters = new HashMap<>(); - parameters.put("traveller", new Traveller("John", "Doe", "john.doe@example.com", "American", new Address("main street", "Boston", "10005", "US"))); - m.fromMap(parameters); - - ProcessInstance processInstance = approvalsProcess.createInstance(m); - processInstance.start(); - assertEquals(org.kie.api.runtime.process.ProcessInstance.STATE_ACTIVE, processInstance.status()); - - SecurityPolicy policy = SecurityPolicy.of(IdentityProviders.of("admin", Arrays.asList("managers"))); - - processInstance.workItems(policy); - - List workItems = processInstance.workItems(policy); - assertEquals(1, workItems.size()); - Map results = new HashMap<>(); - results.put("approved", true); - processInstance.completeWorkItem(workItems.get(0).getId(), results, policy); - - workItems = processInstance.workItems(policy); - assertEquals(0, workItems.size()); - - policy = SecurityPolicy.of(IdentityProviders.of("john", Arrays.asList("managers"))); - - processInstance.workItems(policy); - - workItems = processInstance.workItems(policy); - assertEquals(1, workItems.size()); - - results.put("approved", false); - processInstance.completeWorkItem(workItems.get(0).getId(), results, policy); - assertEquals(org.kie.api.runtime.process.ProcessInstance.STATE_COMPLETED, processInstance.status()); - - Model result = (Model) processInstance.variables(); - assertEquals(4, result.toMap().size()); - assertEquals(result.toMap().get("approver"), "admin"); - assertEquals(result.toMap().get("firstLineApproval"), true); - assertEquals(result.toMap().get("secondLineApproval"), false); - } - - @Test - public void testApprovalProcessViaPhases() { - - assertNotNull(approvalsProcess); - - Model m = approvalsProcess.createModel(); - Map parameters = new HashMap<>(); - parameters.put("traveller", new Traveller("John", "Doe", "john.doe@example.com", "American", new Address("main street", "Boston", "10005", "US"))); - m.fromMap(parameters); - - ProcessInstance processInstance = approvalsProcess.createInstance(m); - processInstance.start(); - assertEquals(org.kie.api.runtime.process.ProcessInstance.STATE_ACTIVE, processInstance.status()); - - SecurityPolicy policy = SecurityPolicy.of(IdentityProviders.of("admin", Arrays.asList("managers"))); - - processInstance.workItems(policy); - - List workItems = processInstance.workItems(policy); - assertEquals(1, workItems.size()); - - processInstance.transitionWorkItem(workItems.get(0).getId(), new HumanTaskTransition(Claim.ID, null, policy)); - processInstance.transitionWorkItem(workItems.get(0).getId(), new HumanTaskTransition(Complete.ID, Collections.singletonMap("approved", true), policy)); - - workItems = processInstance.workItems(policy); - assertEquals(0, workItems.size()); - - policy = SecurityPolicy.of(IdentityProviders.of("john", Arrays.asList("managers"))); - - processInstance.workItems(policy); - - workItems = processInstance.workItems(policy); - assertEquals(1, workItems.size()); - - processInstance.transitionWorkItem(workItems.get(0).getId(), new HumanTaskTransition(Claim.ID, null, policy)); - processInstance.transitionWorkItem(workItems.get(0).getId(), new HumanTaskTransition(Complete.ID, Collections.singletonMap("approved", false), policy)); - - assertEquals(org.kie.api.runtime.process.ProcessInstance.STATE_COMPLETED, processInstance.status()); - - Model result = (Model) processInstance.variables(); - assertEquals(4, result.toMap().size()); - assertEquals(result.toMap().get("approver"), "admin"); - assertEquals(result.toMap().get("firstLineApproval"), true); - assertEquals(result.toMap().get("secondLineApproval"), false); - } -} diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/test/java/org/acme/travels/ApprovalsRestIT.java b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/test/java/org/acme/travels/ApprovalsRestIT.java deleted file mode 100644 index 91c750c06d..0000000000 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/test/java/org/acme/travels/ApprovalsRestIT.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR 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; - -import org.junit.jupiter.api.Test; -import org.keycloak.representations.AccessTokenResponse; -import org.kie.kogito.test.quarkus.QuarkusTestProperty; -import org.kie.kogito.testcontainers.quarkus.KafkaQuarkusTestResource; -import org.kie.kogito.testcontainers.quarkus.KeycloakQuarkusTestResource; - -import io.quarkus.test.common.QuarkusTestResource; -import io.quarkus.test.junit.QuarkusTest; -import io.restassured.http.ContentType; - -import static io.restassured.RestAssured.given; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.CoreMatchers.notNullValue; - -@QuarkusTest -@QuarkusTestResource(KeycloakQuarkusTestResource.class) -@QuarkusTestResource(KafkaQuarkusTestResource.class) -public class ApprovalsRestIT { - - @QuarkusTestProperty(name = "quarkus.oidc.auth-server-url") - private String keycloakUrl; - - @Test - public void testStartApprovalUnauthorized() { - - given() - .body("{\"traveller\" : {\"firstName\" : \"John\",\"lastName\" : \"Doe\",\"email\" : \"john.doe@example.com\",\"nationality\" : \"American\",\"address\" : {\"street\" : \"main street\",\"city\" : \"Boston\",\"zipCode\" : \"10005\",\"country\" : \"US\"}}}") - .contentType(ContentType.JSON) - .when() - .post("/approvals") - .then() - .statusCode(401); - } - - @SuppressWarnings("rawtypes") - @Test - public void testStartApprovalAuthorized() { - - // start new approval - String id = given() - .auth().oauth2(getAccessToken("mary")) - .body("{\"traveller\" : {\"firstName\" : \"John\",\"lastName\" : \"Doe\",\"email\" : \"john.doe@example.com\",\"nationality\" : \"American\",\"address\" : {\"street\" : \"main street\",\"city\" : \"Boston\",\"zipCode\" : \"10005\",\"country\" : \"US\"}}}") - .contentType(ContentType.JSON) - .when() - .post("/approvals") - .then() - .statusCode(201) - .body("id", notNullValue()).extract().path("id"); - // get all active approvals - given() - .auth().oauth2(getAccessToken("mary")) - .accept(ContentType.JSON) - .when() - .get("/approvals") - .then() - .statusCode(200) - .body("$.size()", is(1), "[0].id", is(id)); - - // get just started approval - given() - .auth().oauth2(getAccessToken("mary")) - .accept(ContentType.JSON) - .when() - .get("/approvals/" + id) - .then() - .statusCode(200) - .body("id", is(id)); - - // tasks assigned in just started approval - - String taskInfo = given() - .auth() - .oauth2(getAccessToken("mary")) - .accept(ContentType.JSON) - .when() - .get("/approvals/" + id + "/tasks?user=admin&group=managers") - .then() - .statusCode(200) - .body("$.size", is(1)) - .body("[0].name", is("firstLineApproval")) - .extract() - .path("[0].id"); - - String payload = "{}"; - given() - .auth().oauth2(getAccessToken("mary")) - .contentType(ContentType.JSON) - .accept(ContentType.JSON) - .body(payload) - .when() - .post("/approvals/" + id + "/firstLineApproval/" + taskInfo + "?user=mary&group=managers") - .then() - .statusCode(200) - .body("id", is(id)); - - // lastly abort the approval - given() - .auth().oauth2(getAccessToken("mary")) - .accept(ContentType.JSON) - .when() - .delete("/approvals/" + id) - .then() - .statusCode(200) - .body("id", is(id)); - } - - private String getAccessToken(String userName) { - return given() - .param("grant_type", "password") - .param("username", userName) - .param("password", userName) - .param("client_id", "kogito-app") - .param("client_secret", "secret") - .when() - .post(keycloakUrl + "/protocol/openid-connect/token") - .as(AccessTokenResponse.class).getToken(); - } -} diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/test/java/org/acme/travels/NativeApprovalsRestIT.java b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/test/java/org/acme/travels/NativeApprovalsRestIT.java deleted file mode 100644 index 4cdffa0e72..0000000000 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/test/java/org/acme/travels/NativeApprovalsRestIT.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR 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; - -import org.kie.kogito.testcontainers.quarkus.KafkaQuarkusTestResource; -import org.kie.kogito.testcontainers.quarkus.KeycloakQuarkusTestResource; - -import io.quarkus.test.common.QuarkusTestResource; -import io.quarkus.test.junit.NativeImageTest; - -@NativeImageTest -@QuarkusTestResource(KeycloakQuarkusTestResource.class) -@QuarkusTestResource(KafkaQuarkusTestResource.class) -public class NativeApprovalsRestIT extends ApprovalsRestIT { - // run the same tests only against native image -} \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/test/resources/application.properties b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/test/resources/application.properties deleted file mode 100644 index efb41622ff..0000000000 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/src/test/resources/application.properties +++ /dev/null @@ -1,37 +0,0 @@ -# Quarkus -quarkus.http.test-port=0 - -quarkus.http.auth.permission.authenticated.paths=/* -quarkus.http.auth.permission.authenticated.policy=authenticated -quarkus.oidc.enabled=true -quarkus.oidc.tenant-enabled=true -quarkus.oidc.client-id=kogito-app -quarkus.oidc.credentials.secret=secret - -#Kafka -kafka.bootstrap.servers=localhost:9092 - -#mp.messaging.incoming.kogito_incoming_stream.bootstrap.servers=localhost:9092 -mp.messaging.incoming.kogito_incoming_stream.connector=smallrye-kafka -mp.messaging.incoming.kogito_incoming_stream.topic=visasresponses -mp.messaging.incoming.kogito_incoming_stream.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer - -#mp.messaging.outgoing.kogito_outgoing_stream.bootstrap.servers=localhost:9092 -mp.messaging.outgoing.kogito_outgoing_stream.connector=smallrye-kafka -mp.messaging.outgoing.kogito_outgoing_stream.topic=visaapplications -mp.messaging.outgoing.kogito_outgoing_stream.value.serializer=org.apache.kafka.common.serialization.StringSerializer - -#mp.messaging.outgoing.kogito-processinstances-events.bootstrap.servers=localhost:9092 -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-usertaskinstances-events.bootstrap.servers=localhost:9092 -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.bootstrap.servers=localhost:9092 -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 diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/README.md b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/README.md index 9257226808..f50a0c6a3c 100644 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/README.md +++ b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/README.md @@ -22,9 +22,9 @@ This example shows ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed - [jq](https://stedolan.github.io/jq) tool installed. You can download it from [here](https://stedolan.github.io/jq/download) - Docker @@ -39,7 +39,7 @@ When using native image compilation, you will also need: To start a Keycloak Server you can use Docker and just run the following command: ``` -docker run -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -e KEYCLOAK_IMPORT=/tmp/kogito-realm.json -v /kogito-usertasks-with-security-oidc-quarkus/config/kogito-realm.json:/tmp/kogito-realm.json -p 8281:8080 quay.io/keycloak/keycloak:legacy +docker run -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -e KEYCLOAK_IMPORT=/tmp/kogito-realm.json -v /process-usertasks-with-security-oidc-quarkus/config/kogito-realm.json:/tmp/kogito-realm.json -p 8281:8080 quay.io/keycloak/keycloak:legacy ``` You should be able to access your Keycloak Server at [localhost:8281/auth](http://localhost:8281). @@ -74,6 +74,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ```sh diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/pom.xml b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/pom.xml index f6b3936147..55e2064f32 100644 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/pom.xml @@ -1,24 +1,44 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-usertasks-with-security-oidc-quarkus Kogito Example :: Process Usertasks With Security OIDC Keycloak Quarkus Kogito user tasks orchestration with security enabled on REST api - open id connect adapter(keycloak) - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -56,8 +76,8 @@ quarkus-jsonp
- org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus io.quarkus diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/main/docker/Dockerfile.jvm b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/main/docker/Dockerfile.jvm index d65e7f37cc..6cf7ba8f51 100644 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/main/docker/Dockerfile.jvm +++ b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/main/docker/Dockerfile.jvm @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/process-usertasks-with-security-oidc-quarkus-jvm # ### -FROM fabric8/java-alpine-openjdk11-jre +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.20 ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV AB_ENABLED=jmx_exporter @@ -23,4 +23,4 @@ COPY target/quarkus-app/*.jar /deployments/ COPY target/quarkus-app/app/ /deployments/app/ COPY target/quarkus-app/quarkus/ /deployments/quarkus/ -ENTRYPOINT [ "/deployments/run-java.sh" ] \ No newline at end of file +ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/main/docker/Dockerfile.native b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/main/docker/Dockerfile.native index b508cbb1d3..b097bd97ea 100644 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/main/docker/Dockerfile.native +++ b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/main/docker/Dockerfile.native @@ -7,14 +7,14 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.native -t quarkus/kogito-infinispan-persistence-quarkus . +# docker build -f src/main/docker/Dockerfile.native -t quarkus/process-usertasks-with-security-oidc-quarkus . # # Then run the container using: # -# docker run -i --rm -p 8080:8080 quarkus/kogito-infinispan-persistence-quarkus +# docker run -i --rm -p 8080:8080 quarkus/process-usertasks-with-security-oidc-quarkus # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.4 WORKDIR /work/ COPY target/*-runner /work/application RUN chmod 775 /work diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/main/java/org/acme/travels/Address.java b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/main/java/org/acme/travels/Address.java index d808334384..662dfa9b9f 100644 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/main/java/org/acme/travels/Address.java +++ b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/main/java/org/acme/travels/Address.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.acme.travels; diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/main/java/org/acme/travels/Traveller.java b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/main/java/org/acme/travels/Traveller.java index cf790d4664..c24685803d 100644 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/main/java/org/acme/travels/Traveller.java +++ b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/main/java/org/acme/travels/Traveller.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.acme.travels; diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/main/resources/application.properties index 53adf89eb5..8d42a10095 100644 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-usertasks-with-security-oidc-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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/java/org/acme/travels/ApprovalsProcessIT.java b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/java/org/acme/travels/ApprovalsProcessIT.java index 94a13ad0b0..2d4660efd7 100644 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/java/org/acme/travels/ApprovalsProcessIT.java +++ b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/java/org/acme/travels/ApprovalsProcessIT.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.acme.travels; @@ -21,9 +24,6 @@ import java.util.List; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; - import org.jbpm.process.instance.impl.humantask.HumanTaskTransition; import org.jbpm.process.instance.impl.humantask.phases.Claim; import org.jbpm.process.instance.impl.workitem.Complete; @@ -39,6 +39,9 @@ import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/java/org/acme/travels/ApprovalsRestIT.java b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/java/org/acme/travels/ApprovalsRestIT.java index fc1b1a7546..8ff5644773 100644 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/java/org/acme/travels/ApprovalsRestIT.java +++ b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/java/org/acme/travels/ApprovalsRestIT.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.acme.travels; @@ -69,7 +72,7 @@ public void testStartApprovalAuthorized() { .get("/approvals") .then() .statusCode(200) - .body("$.size()", is(1), "[0].id", is(id)); + .body("size()", is(1), "[0].id", is(id)); // get just started approval given() @@ -91,7 +94,7 @@ public void testStartApprovalAuthorized() { .get("/approvals/" + id + "/tasks?user=admin&group=managers") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("firstLineApproval")) .extract() .path("[0].id"); diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/java/org/acme/travels/NativeApprovalsRestIT.java b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/java/org/acme/travels/NativeApprovalsRestIT.java index 1d1eeaccfd..c56fd81e26 100644 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/java/org/acme/travels/NativeApprovalsRestIT.java +++ b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/java/org/acme/travels/NativeApprovalsRestIT.java @@ -1,26 +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.acme.travels; import org.kie.kogito.testcontainers.quarkus.KeycloakQuarkusTestResource; import io.quarkus.test.common.QuarkusTestResource; -import io.quarkus.test.junit.NativeImageTest; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@NativeImageTest +@QuarkusIntegrationTest @QuarkusTestResource(KeycloakQuarkusTestResource.class) public class NativeApprovalsRestIT extends ApprovalsRestIT { // run the same tests only against native image diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/resources/application.properties index e726e1b146..f0f6fef1c3 100644 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/process-usertasks-with-security-oidc-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.http.test-port=0 quarkus.oidc.enabled=true diff --git a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/README.md b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/README.md index 46029a5d58..bc5f77fb8e 100644 --- a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/README.md +++ b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/README.md @@ -22,9 +22,9 @@ This example shows ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - GraalVM 19.1+ installed @@ -54,6 +54,11 @@ java -jar target\quarkus-app\quarkus-run.jar ``` ### Package and Run using Local Native Image +Note that the following configuration property needs to be added to `application.properties` in order to enable automatic registration of `META-INF/services` entries required by the workflow engine: +``` +quarkus.native.auto-service-loader-registration=true +``` + Note that this requires GRAALVM_HOME to point to a valid GraalVM installation ```sh @@ -173,7 +178,3 @@ plus the approver who made the first one. } } ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/operator/process-tasks-security-quarkus.yaml b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/operator/process-tasks-security-quarkus.yaml deleted file mode 100644 index e586751a5e..0000000000 --- a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/operator/process-tasks-security-quarkus.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-tasks-security-quarkus -spec: - type: RemoteSource - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/process-usertasks-with-security-quarkus - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-tasks-security-quarkus \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/pom.xml b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/pom.xml index 6f84b3d3ed..333fb36a99 100644 --- a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/pom.xml +++ b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/pom.xml @@ -1,24 +1,44 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-usertasks-with-security-quarkus Kogito Example :: Process Usertasks With Security Quarkus Kogito user tasks orchestration with security enabled on REST api - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -48,8 +68,8 @@ quarkus-resteasy-jackson - org.kie.kogito - kogito-quarkus + org.jbpm + jbpm-with-drools-quarkus io.quarkus diff --git a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/main/docker/Dockerfile.jvm b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/main/docker/Dockerfile.jvm index 7b0a73f916..7ae837769e 100644 --- a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/main/docker/Dockerfile.jvm +++ b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/main/docker/Dockerfile.jvm @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/process-usertasks-with-security-quarkus-jvm # ### -FROM fabric8/java-alpine-openjdk11-jre +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.20 ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV AB_ENABLED=jmx_exporter @@ -23,4 +23,4 @@ COPY target/quarkus-app/*.jar /deployments/ COPY target/quarkus-app/app/ /deployments/app/ COPY target/quarkus-app/quarkus/ /deployments/quarkus/ -ENTRYPOINT [ "/deployments/run-java.sh" ] \ No newline at end of file +ENTRYPOINT [ "/deployments/run-java.sh" ] diff --git a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/main/docker/Dockerfile.native b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/main/docker/Dockerfile.native index b508cbb1d3..c930960827 100644 --- a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/main/docker/Dockerfile.native +++ b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/main/docker/Dockerfile.native @@ -7,14 +7,14 @@ # # Then, build the image with: # -# docker build -f src/main/docker/Dockerfile.native -t quarkus/kogito-infinispan-persistence-quarkus . +# docker build -f src/main/docker/Dockerfile.native -t quarkus/process-usertasks-with-security-quarkus . # # Then run the container using: # -# docker run -i --rm -p 8080:8080 quarkus/kogito-infinispan-persistence-quarkus +# docker run -i --rm -p 8080:8080 quarkus/process-usertasks-with-security-quarkus # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.4 WORKDIR /work/ COPY target/*-runner /work/application RUN chmod 775 /work diff --git a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/main/java/org/acme/travels/Address.java b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/main/java/org/acme/travels/Address.java index d808334384..662dfa9b9f 100644 --- a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/main/java/org/acme/travels/Address.java +++ b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/main/java/org/acme/travels/Address.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.acme.travels; diff --git a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/main/java/org/acme/travels/Traveller.java b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/main/java/org/acme/travels/Traveller.java index cf790d4664..c24685803d 100644 --- a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/main/java/org/acme/travels/Traveller.java +++ b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/main/java/org/acme/travels/Traveller.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.acme.travels; diff --git a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/main/resources/META-INF/resources/index.html b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/main/resources/META-INF/resources/index.html deleted file mode 100644 index a965327283..0000000000 --- a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/main/resources/META-INF/resources/index.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - kogito-infinispan-persistence-quarkus - 1.0-SNAPSHOT - - - - - - -
-
-

Congratulations, you have created a new Quarkus application.

- -

Why do you see this?

- -

This page is served by Quarkus. The source is in - src/main/resources/META-INF/resources/index.html.

- -

What can I do from here?

- -

If not already done, run the application in dev mode using: mvn compile quarkus:dev. -

-
    -
  • Add REST resources, Servlets, functions and other services in src/main/java.
  • -
  • Your static assets are located in src/main/resources/META-INF/resources.
  • -
  • Configure your application in src/main/resources/application.properties. -
  • -
- -

How do I get rid of this page?

-

Just delete the src/main/resources/META-INF/resources/index.html file.

-
-
-
-

Application

-
    -
  • GroupId: org.acme
  • -
  • ArtifactId: kogito-infinispan-persistence-quarkus
  • -
  • Version: 1.0-SNAPSHOT
  • -
  • Quarkus Version: 0.19.1
  • -
-
- -
-
- - - - \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/main/resources/application.properties index ae231761e9..8b88c28ac3 100644 --- a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/process-usertasks-with-security-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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/test/java/org/acme/travels/security/quarkus/ApprovalsProcessTest.java b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/test/java/org/acme/travels/security/quarkus/ApprovalsProcessTest.java index b752b25a54..fffafa26b6 100644 --- a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/test/java/org/acme/travels/security/quarkus/ApprovalsProcessTest.java +++ b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/test/java/org/acme/travels/security/quarkus/ApprovalsProcessTest.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.acme.travels.security.quarkus; @@ -20,9 +23,6 @@ import java.util.List; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; - import org.acme.travels.Address; import org.acme.travels.Traveller; import org.jbpm.process.instance.impl.humantask.HumanTaskTransition; @@ -38,6 +38,9 @@ import io.quarkus.test.junit.QuarkusTest; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/test/java/org/acme/travels/security/quarkus/ApprovalsRestTest.java b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/test/java/org/acme/travels/security/quarkus/ApprovalsRestTest.java index fd24726212..5478ab4c4e 100644 --- a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/test/java/org/acme/travels/security/quarkus/ApprovalsRestTest.java +++ b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/test/java/org/acme/travels/security/quarkus/ApprovalsRestTest.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.acme.travels.security.quarkus; @@ -61,7 +64,7 @@ public void testStartApprovalAuthorized() { .get("/approvals") .then() .statusCode(200) - .body("$.size()", is(1), "[0].id", is(id)); + .body("size()", is(1), "[0].id", is(id)); // get just started approval given() @@ -82,7 +85,7 @@ public void testStartApprovalAuthorized() { .get("/approvals/" + id + "/tasks?user=admin&group=managers") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("firstLineApproval")) .extract() .path("[0].id"); diff --git a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/test/resources/application.properties index e91f1514e3..80dc3ee963 100644 --- a/kogito-quarkus-examples/process-usertasks-with-security-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/process-usertasks-with-security-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.http.test-port=0 diff --git a/kogito-quarkus-examples/rules-incubation-api-quarkus/README.md b/kogito-quarkus-examples/rules-incubation-api-quarkus/README.md index 40f0ec36b9..004207a5ac 100644 --- a/kogito-quarkus-examples/rules-incubation-api-quarkus/README.md +++ b/kogito-quarkus-examples/rules-incubation-api-quarkus/README.md @@ -17,9 +17,9 @@ The custom REST endpoint evaluates a rule unit that returns a hello world messag ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed ### Compile and Run in Local Dev Mode diff --git a/kogito-quarkus-examples/rules-incubation-api-quarkus/pom.xml b/kogito-quarkus-examples/rules-incubation-api-quarkus/pom.xml index 75331b945f..a9e98182df 100644 --- a/kogito-quarkus-examples/rules-incubation-api-quarkus/pom.xml +++ b/kogito-quarkus-examples/rules-incubation-api-quarkus/pom.xml @@ -1,23 +1,43 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT rules-incubation-api-quarkus Kogito Example :: Rules Incubation API With Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -47,8 +67,8 @@ quarkus-resteasy-jackson
- org.kie.kogito - kogito-quarkus-rules + org.drools + drools-quarkus-rules io.quarkus diff --git a/kogito-quarkus-examples/rules-incubation-api-quarkus/src/main/java/org/acme/CustomRestRules.java b/kogito-quarkus-examples/rules-incubation-api-quarkus/src/main/java/org/acme/CustomRestRules.java index 923a30f4f5..6eaf9c6148 100644 --- a/kogito-quarkus-examples/rules-incubation-api-quarkus/src/main/java/org/acme/CustomRestRules.java +++ b/kogito-quarkus-examples/rules-incubation-api-quarkus/src/main/java/org/acme/CustomRestRules.java @@ -1,30 +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.acme; import java.util.Map; import java.util.stream.Stream; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; - import org.kie.kogito.examples.Hello; import org.kie.kogito.incubation.application.AppRoot; import org.kie.kogito.incubation.common.DataContext; @@ -32,6 +28,13 @@ import org.kie.kogito.incubation.rules.RuleUnitIds; import org.kie.kogito.incubation.rules.services.RuleUnitService; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; + @Path("/custom-rest-rules") public class CustomRestRules { diff --git a/kogito-quarkus-examples/rules-incubation-api-quarkus/src/main/java/org/kie/kogito/examples/Hello.java b/kogito-quarkus-examples/rules-incubation-api-quarkus/src/main/java/org/kie/kogito/examples/Hello.java index 09fd0a12b4..925f8a30c9 100644 --- a/kogito-quarkus-examples/rules-incubation-api-quarkus/src/main/java/org/kie/kogito/examples/Hello.java +++ b/kogito-quarkus-examples/rules-incubation-api-quarkus/src/main/java/org/kie/kogito/examples/Hello.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.examples; diff --git a/kogito-quarkus-examples/rules-incubation-api-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/rules-incubation-api-quarkus/src/main/resources/application.properties index 9653fcacc1..3b78bb06f7 100644 --- a/kogito-quarkus-examples/rules-incubation-api-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/rules-incubation-api-quarkus/src/main/resources/application.properties @@ -1 +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. +# + kogito.generate.rest.rules=false diff --git a/kogito-quarkus-examples/rules-incubation-api-quarkus/src/main/resources/org/kie/kogito/examples/Hello.drl b/kogito-quarkus-examples/rules-incubation-api-quarkus/src/main/resources/org/kie/kogito/examples/Hello.drl index e6d2073438..6026d730a2 100644 --- a/kogito-quarkus-examples/rules-incubation-api-quarkus/src/main/resources/org/kie/kogito/examples/Hello.drl +++ b/kogito-quarkus-examples/rules-incubation-api-quarkus/src/main/resources/org/kie/kogito/examples/Hello.drl @@ -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.examples; unit Hello; diff --git a/kogito-quarkus-examples/rules-incubation-api-quarkus/src/test/java/org/acme/CustomRestRulesTest.java b/kogito-quarkus-examples/rules-incubation-api-quarkus/src/test/java/org/acme/CustomRestRulesTest.java index a49ebe0935..a26d396514 100644 --- a/kogito-quarkus-examples/rules-incubation-api-quarkus/src/test/java/org/acme/CustomRestRulesTest.java +++ b/kogito-quarkus-examples/rules-incubation-api-quarkus/src/test/java/org/acme/CustomRestRulesTest.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; diff --git a/kogito-quarkus-examples/rules-legacy-quarkus-example/README.md b/kogito-quarkus-examples/rules-legacy-quarkus-example/README.md index 39d07ba0a1..2bfb609983 100644 --- a/kogito-quarkus-examples/rules-legacy-quarkus-example/README.md +++ b/kogito-quarkus-examples/rules-legacy-quarkus-example/README.md @@ -11,9 +11,9 @@ An injectable KieRuntimeBuilder is generated, so you can create Drools v7 KieBas ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVM 21.1.0](https://github.com/graalvm/graalvm-ce-builds/releases/tag/vm-21.1.0) installed diff --git a/kogito-quarkus-examples/rules-legacy-quarkus-example/pom.xml b/kogito-quarkus-examples/rules-legacy-quarkus-example/pom.xml index 3b0a409833..ff79bcf09a 100644 --- a/kogito-quarkus-examples/rules-legacy-quarkus-example/pom.xml +++ b/kogito-quarkus-examples/rules-legacy-quarkus-example/pom.xml @@ -1,23 +1,43 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT rules-legacy-quarkus-example Kogito Example :: Rules Legacy API - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -39,8 +59,8 @@ - org.kie.kogito - kogito-quarkus-rules + org.drools + drools-quarkus-rules io.quarkus diff --git a/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/java/org/kie/kogito/legacy/Applicant.java b/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/java/org/kie/kogito/legacy/Applicant.java index 771c31fe80..5b1b7aaeff 100644 --- a/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/java/org/kie/kogito/legacy/Applicant.java +++ b/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/java/org/kie/kogito/legacy/Applicant.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.legacy; diff --git a/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/java/org/kie/kogito/legacy/FindApprovedLoansEndpoint.java b/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/java/org/kie/kogito/legacy/FindApprovedLoansEndpoint.java index 7eb1ae4e38..7f1e00635d 100644 --- a/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/java/org/kie/kogito/legacy/FindApprovedLoansEndpoint.java +++ b/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/java/org/kie/kogito/legacy/FindApprovedLoansEndpoint.java @@ -1,33 +1,36 @@ /* - * 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.legacy; import java.util.ArrayList; import java.util.List; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; - import org.kie.api.runtime.KieRuntimeBuilder; import org.kie.api.runtime.KieSession; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; + @Path("/find-approved") public class FindApprovedLoansEndpoint { diff --git a/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/java/org/kie/kogito/legacy/LoanApplication.java b/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/java/org/kie/kogito/legacy/LoanApplication.java index 053c5e25b9..5f9e102fd8 100644 --- a/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/java/org/kie/kogito/legacy/LoanApplication.java +++ b/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/java/org/kie/kogito/legacy/LoanApplication.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.legacy; diff --git a/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/java/org/kie/kogito/legacy/LoanDto.java b/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/java/org/kie/kogito/legacy/LoanDto.java index 1db9def3c2..f498e3fc30 100644 --- a/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/java/org/kie/kogito/legacy/LoanDto.java +++ b/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/java/org/kie/kogito/legacy/LoanDto.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.legacy; diff --git a/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/resources/application.properties b/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/resources/application.properties index 35b7e32bea..a76c2a39bb 100644 --- a/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/resources/application.properties +++ b/kogito-quarkus-examples/rules-legacy-quarkus-example/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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/resources/org/kie/kogito/legacy/LoanRules.drl b/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/resources/org/kie/kogito/legacy/LoanRules.drl index e9a24b46c9..913fb100a6 100644 --- a/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/resources/org/kie/kogito/legacy/LoanRules.drl +++ b/kogito-quarkus-examples/rules-legacy-quarkus-example/src/main/resources/org/kie/kogito/legacy/LoanRules.drl @@ -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.legacy; diff --git a/kogito-quarkus-examples/rules-legacy-quarkus-example/src/test/java/org/kie/kogito/NativeRestQueryTestIT.java b/kogito-quarkus-examples/rules-legacy-quarkus-example/src/test/java/org/kie/kogito/NativeRestQueryTestIT.java index 3455e8798f..cfc0e528ff 100644 --- a/kogito-quarkus-examples/rules-legacy-quarkus-example/src/test/java/org/kie/kogito/NativeRestQueryTestIT.java +++ b/kogito-quarkus-examples/rules-legacy-quarkus-example/src/test/java/org/kie/kogito/NativeRestQueryTestIT.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; -import io.quarkus.test.junit.NativeImageTest; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@NativeImageTest +@QuarkusIntegrationTest public class NativeRestQueryTestIT extends RestQueryTest { // Execute the same tests but in native mode. diff --git a/kogito-quarkus-examples/rules-legacy-quarkus-example/src/test/java/org/kie/kogito/RestQueryTest.java b/kogito-quarkus-examples/rules-legacy-quarkus-example/src/test/java/org/kie/kogito/RestQueryTest.java index e8d437ddf1..c0042dccc2 100644 --- a/kogito-quarkus-examples/rules-legacy-quarkus-example/src/test/java/org/kie/kogito/RestQueryTest.java +++ b/kogito-quarkus-examples/rules-legacy-quarkus-example/src/test/java/org/kie/kogito/RestQueryTest.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/kogito-quarkus-examples/rules-legacy-quarkus-example/src/test/resources/application.properties b/kogito-quarkus-examples/rules-legacy-quarkus-example/src/test/resources/application.properties index 3c17236931..a047ea13ba 100644 --- a/kogito-quarkus-examples/rules-legacy-quarkus-example/src/test/resources/application.properties +++ b/kogito-quarkus-examples/rules-legacy-quarkus-example/src/test/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. +# + # Quarkus quarkus.http.test-port=0 \ No newline at end of file diff --git a/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/README.md b/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/README.md new file mode 100644 index 0000000000..677340d850 --- /dev/null +++ b/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/README.md @@ -0,0 +1,135 @@ + +# Rules with Legacy API + Quarkus + Test Scenario example + +## Description + +A simple rule service to validate `Hello` fact and testing it using Scenario Simulation. + +An injectable KieRuntimeBuilder is generated, so you can create Drools v7 KieBase and KieSession out of it. + +## Installing and Running + +### Prerequisites + +You will need: + - Java 17+ installed + - Environment variable JAVA_HOME set accordingly + - Maven 3.9.6+ installed + +When using native image compilation, you will also need: + - [GraalVM 21.1.0](https://github.com/graalvm/graalvm-ce-builds/releases/tag/vm-21.1.0) installed + - Environment variable GRAALVM_HOME set accordingly + - Note that GraalVM native image compilation typically requires other packages (glibc-devel, zlib-devel and gcc) to be installed too. You also need 'native-image' installed in GraalVM (using 'gu install native-image'). Please refer to [GraalVM installation documentation](https://www.graalvm.org/docs/reference-manual/aot-compilation/#prerequisites) for more details. + +### Compile and Run in Local Dev Mode + +```sh +mvn clean compile quarkus:dev +``` + +### Package and Run in JVM mode + +```sh +mvn clean package +java -jar target/quarkus-app/quarkus-run.jar +``` + +or on windows + +```sh +mvn clean package +java -jar target\quarkus-app\quarkus-run.jar +``` + +### Package and Run using Local Native Image +Note that this requires GRAALVM_HOME to point to a valid GraalVM installation + +```sh +mvn clean package -Pnative +``` + +To run the generated native executable, generated in `target/`, execute + +```sh +./target/rules-legacy-quarkus-example-runner +``` + +Note: This does not yet work on Windows, GraalVM and Quarkus should be rolling out support for Windows soon. + +## OpenAPI (Swagger) documentation +[Specification at swagger.io](https://swagger.io/docs/specification/about/) + +You can take a look at the [OpenAPI definition](http://localhost:8080/openapi?format=json) - automatically generated and included in this service - to determine all available operations exposed by this service. For easy readability you can visualize the OpenAPI definition file using a UI tool like for example available [Swagger UI](https://editor.swagger.io). + +In addition, various clients to interact with this service can be easily generated using this OpenAPI definition. + +When running in either Quarkus Development or Native mode, we also leverage the [Quarkus OpenAPI extension](https://quarkus.io/guides/openapi-swaggerui#use-swagger-ui-for-development) that exposes [Swagger UI](http://localhost:8080/swagger-ui/) that you can use to look at available REST endpoints and send test requests. + +## Example Usage + +Once the service is up and running, you can use the following examples to interact with the service. Note that rather than using the curl commands below, you can also use the [swagger UI](http://localhost:8080/swagger-ui/) to send requests. + +### POST /find-approved + +Returns approved Hello from the given fact: + +```sh +curl -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{"approved":false, "greeting":"foo"}' http://localhost:8080/find-approved +``` +or on windows + +```sh +curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" -d "{\"approved\":false, \"greeting\":\"foo\"}" http://localhost:8080/find-approved +``` + +As response the modified Hello is returned. + +Example response: + +```json +{"greeting":"foo","approved":true} +``` + +Returns denied Hello from the given fact: + +```sh +curl -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{"approved":false, "greeting":"bar"}' http://localhost:8080/find-approved +``` +or on windows + +```sh +curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" -d "{\"approved\":false, \"greeting\":\"bar\"}" http://localhost:8080/find-approved +``` + +As response the modified Hello is returned. + +Example response: + +```json +{"greeting":"bar","approved":false} +``` +# Test Scenario usage + +Test Scenario + rules project created inside Business central should work, with the following requirements: +1. use the pom as defined in the current project + +## Caveat +Requires `org.drools:drools-xml-support` dependency +For the moment being, "globals" are unsupported \ No newline at end of file diff --git a/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/pom.xml b/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/pom.xml new file mode 100644 index 0000000000..a34dd57970 --- /dev/null +++ b/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/pom.xml @@ -0,0 +1,134 @@ + + + + 4.0.0 + + org.kie.kogito.examples + kogito-quarkus-examples + 999-SNAPSHOT + + rules-legacy-scesim-quarkus-example + Kogito Example :: Rules Legacy API HELLO - Quarkus :: Test Scenario + + 3.8.4 + quarkus-bom + io.quarkus + 3.8.4 + org.kie.kogito + kogito-bom + 999-SNAPSHOT + 999-SNAPSHOT + + + + + ${quarkus.platform.group-id} + ${quarkus.platform.artifact-id} + ${quarkus.platform.version} + pom + import + + + ${kogito.bom.group-id} + ${kogito.bom.artifact-id} + ${kogito.bom.version} + pom + import + + + org.drools + drools-xml-support + ${version.org.kie.kogito} + test + + + + + + org.drools + drools-quarkus-rules + + + io.quarkus + quarkus-resteasy-jackson + + + io.quarkus + quarkus-resteasy + + + io.quarkus + quarkus-arc + + + io.quarkus + quarkus-smallrye-openapi + + + org.kie.kogito + kogito-drools + + + io.quarkus + quarkus-junit5 + test + + + io.rest-assured + rest-assured + test + + + io.quarkus + quarkus-smallrye-health + + + + org.kie.kogito + kogito-scenario-simulation + test + + + org.drools + drools-xml-support + test + + + + ${project.artifactId} + + + ${quarkus.platform.group-id} + quarkus-maven-plugin + ${quarkus-plugin.version} + + + + build + + + + + + + diff --git a/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/main/java/org/kie/kogito/legacy/Hello.java b/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/main/java/org/kie/kogito/legacy/Hello.java new file mode 100644 index 0000000000..96fa6be094 --- /dev/null +++ b/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/main/java/org/kie/kogito/legacy/Hello.java @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.legacy; + +public class Hello implements java.io.Serializable { + + static final long serialVersionUID = 1L; + + @org.kie.api.definition.type.Label("Greeting") + private java.lang.String greeting; + + @org.kie.api.definition.type.Label(value = "Approved") + private java.lang.Boolean approved; + + public Hello() { + } + + public java.lang.String getGreeting() { + return this.greeting; + } + + public void setGreeting(java.lang.String greeting) { + this.greeting = greeting; + } + + public java.lang.Boolean getApproved() { + return this.approved; + } + + public void setApproved(java.lang.Boolean approved) { + this.approved = approved; + } + + public Hello(java.lang.String greeting, java.lang.Boolean approved) { + this.greeting = greeting; + this.approved = approved; + } + +} \ No newline at end of file diff --git a/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/main/java/org/kie/kogito/legacy/HelloEndpoint.java b/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/main/java/org/kie/kogito/legacy/HelloEndpoint.java new file mode 100644 index 0000000000..ef9c200cca --- /dev/null +++ b/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/main/java/org/kie/kogito/legacy/HelloEndpoint.java @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.legacy; + +import org.kie.api.runtime.KieRuntimeBuilder; +import org.kie.api.runtime.KieSession; + +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; + +@Path("/find-approved") +public class HelloEndpoint { + + @Inject + KieRuntimeBuilder kieRuntimeBuilder; + + @POST() + @Produces(MediaType.APPLICATION_JSON) + @Consumes(MediaType.APPLICATION_JSON) + public Hello executeQuery(Hello hello) { + KieSession session = kieRuntimeBuilder.newKieSession(); + + session.insert(hello); + session.fireAllRules(); + + return hello; + } +} diff --git a/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/main/resources/META-INF/kmodule.xml b/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/main/resources/META-INF/kmodule.xml new file mode 100644 index 0000000000..31b0987760 --- /dev/null +++ b/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/main/resources/META-INF/kmodule.xml @@ -0,0 +1,19 @@ + + \ No newline at end of file diff --git a/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/main/resources/application.properties b/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/main/resources/application.properties new file mode 100644 index 0000000000..a76c2a39bb --- /dev/null +++ b/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/main/resources/application.properties @@ -0,0 +1,23 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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. +# + +# Packaging +# quarkus.package.type=fast-jar + +quarkus.swagger-ui.always-include=true \ No newline at end of file diff --git a/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/main/resources/org/kie/kogito/legacy/HelloRule.drl b/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/main/resources/org/kie/kogito/legacy/HelloRule.drl new file mode 100644 index 0000000000..af997ef75b --- /dev/null +++ b/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/main/resources/org/kie/kogito/legacy/HelloRule.drl @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.legacy; + +import org.kie.kogito.legacy.Hello; + +rule HelloApprove when + $l: Hello( greeting.equals("foo") ) +then + System.out.println("HelloApprove"); + modify($l) { setApproved(true) }; +end + +rule HelloDeny when + $l: Hello( greeting != "foo" ) +then + System.out.println("HelloDeny"); + modify($l) { setApproved(false) }; +end \ No newline at end of file diff --git a/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/test/java/org/kie/kogito/legacy/NativeRestQueryTestIT.java b/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/test/java/org/kie/kogito/legacy/NativeRestQueryTestIT.java new file mode 100644 index 0000000000..fa549686f3 --- /dev/null +++ b/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/test/java/org/kie/kogito/legacy/NativeRestQueryTestIT.java @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.legacy; + +import io.quarkus.test.junit.QuarkusIntegrationTest; + +@QuarkusIntegrationTest +public class NativeRestQueryTestIT extends RestQueryTest { + + // Execute the same tests but in native mode. +} \ No newline at end of file diff --git a/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/test/java/org/kie/kogito/legacy/RestQueryTest.java b/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/test/java/org/kie/kogito/legacy/RestQueryTest.java new file mode 100644 index 0000000000..d77ae64504 --- /dev/null +++ b/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/test/java/org/kie/kogito/legacy/RestQueryTest.java @@ -0,0 +1,89 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.legacy; + +import org.junit.jupiter.api.Test; + +import io.quarkus.test.junit.QuarkusTest; +import io.restassured.http.ContentType; +import io.restassured.response.Response; +import io.restassured.response.ResponseBody; +import io.restassured.response.ValidatableResponse; + +import static io.restassured.RestAssured.given; +import static org.hamcrest.Matchers.is; + +@QuarkusTest +public class RestQueryTest { + + private static final String JSON_APPROVED_PAYLOAD = + "{\n" + + " \"approved\":false,\n" + + " \"greeting\":\"foo\"\n" + + "}"; + private static final String JSON_DENIED_PAYLOAD = + "{\n" + + " \"approved\":false,\n" + + " \"greeting\":\"bar\"\n" + + "}"; + + @Test + public void testApproved() { + Response response = given() + .body(JSON_APPROVED_PAYLOAD) + .contentType(ContentType.JSON) + .when() + .post("/find-approved"); + + ResponseBody body = response.getBody(); + + // To check for sub string presence get the Response body as a String. + // Do a String.contains + String bodyAsString = body.asString(); + System.out.println(bodyAsString); + + ValidatableResponse validatableResponse = response + .then() + .statusCode(200); + validatableResponse + .body("approved", is(true)); + } + + @Test + public void testDenied() { + Response response = given() + .body(JSON_DENIED_PAYLOAD) + .contentType(ContentType.JSON) + .when() + .post("/find-approved"); + + ResponseBody body = response.getBody(); + + // To check for sub string presence get the Response body as a String. + // Do a String.contains + String bodyAsString = body.asString(); + System.out.println(bodyAsString); + + ValidatableResponse validatableResponse = response + .then() + .statusCode(200); + validatableResponse + .body("approved", is(false)); + } +} diff --git a/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/test/java/testscenario/ScenarioJunitActivatorTest.java b/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/test/java/testscenario/ScenarioJunitActivatorTest.java new file mode 100644 index 0000000000..57d2ebc6cf --- /dev/null +++ b/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/test/java/testscenario/ScenarioJunitActivatorTest.java @@ -0,0 +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. + */ +package testscenario; + +import io.quarkus.test.junit.QuarkusTest; + +/** + * Do not remove this file + */ +@QuarkusTest +@org.junit.runner.RunWith(org.drools.scenariosimulation.backend.runner.ScenarioJunitActivator.class) +public class ScenarioJunitActivatorTest { +} \ No newline at end of file diff --git a/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/test/resources/application.properties b/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/test/resources/application.properties new file mode 100644 index 0000000000..0841afd173 --- /dev/null +++ b/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/test/resources/application.properties @@ -0,0 +1,25 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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.http.test-port=0 + +quarkus.log.level=INFO +quarkus.log.category."org.kie.kogito".level=DEBUG +quarkus.log.category."org.drools".level=DEBUG \ No newline at end of file diff --git a/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/test/resources/org/kie/kogito/legacy/HelloScesim.scesim b/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/test/resources/org/kie/kogito/legacy/HelloScesim.scesim new file mode 100644 index 0000000000..ba452b174f --- /dev/null +++ b/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/src/test/resources/org/kie/kogito/legacy/HelloScesim.scesim @@ -0,0 +1,292 @@ + + + + + + + + + + Index + OTHER + + + # + java.lang.Integer + + java.lang.Integer + # + NOT_EXPRESSION + 70.0 + + + + + Description + OTHER + + + Scenario description + java.lang.String + + java.lang.String + Scenario description + NOT_EXPRESSION + 300.0 + + + + + Hello + + + greeting + + + + 1|1 + GIVEN + + + 1|1 + org.kie.kogito.legacy.Hello + + java.lang.String + Hello + greeting + NOT_EXPRESSION + 337.66666666666663 + + + + + Hello + + + greeting + + + + 1|2 + EXPECT + + + 1|1 + org.kie.kogito.legacy.Hello + + java.lang.String + Hello + greeting + NOT_EXPRESSION + 337.66666666666663 + + + + + Hello + + + approved + + + + 1715763614877 + EXPECT + + + 1|1 + org.kie.kogito.legacy.Hello + + java.lang.Boolean + Hello + approved + NOT_EXPRESSION + 337.66666666666663 + + + + + + + + + Scenario description + java.lang.String + + + Description + OTHER + + Approved + + + + # + java.lang.Integer + + + Index + OTHER + + 1 + + + + 1|1 + org.kie.kogito.legacy.Hello + + + 1|1 + GIVEN + + foo + + + + 1|1 + org.kie.kogito.legacy.Hello + + + 1|2 + EXPECT + + foo + + + + 1|1 + org.kie.kogito.legacy.Hello + + + 1715763614877 + EXPECT + + true + + + + + + + + Scenario description + java.lang.String + + + Description + OTHER + + Denied + + + + # + java.lang.Integer + + + Index + OTHER + + 2 + + + + 1|1 + org.kie.kogito.legacy.Hello + + + 1|1 + GIVEN + + bar + + + + 1|1 + org.kie.kogito.legacy.Hello + + + 1|2 + EXPECT + + bar + + + + 1|1 + org.kie.kogito.legacy.Hello + + + 1715763614877 + EXPECT + + false + + + + + + + + + + + + 1|1 + GIVEN + + + Empty + java.lang.Void + + java.lang.Void + INSTANCE 1 + PROPERTY 1 + NOT_EXPRESSION + 114.0 + + + + + + + + + Empty + java.lang.Void + + + 1|1 + GIVEN + + + + + + + + RULE + false + false + + + + + \ No newline at end of file diff --git a/kogito-quarkus-examples/rules-quarkus-helloworld/README.md b/kogito-quarkus-examples/rules-quarkus-helloworld/README.md index 5ad78a8941..1ab5d159af 100644 --- a/kogito-quarkus-examples/rules-quarkus-helloworld/README.md +++ b/kogito-quarkus-examples/rules-quarkus-helloworld/README.md @@ -9,9 +9,9 @@ A minimal hello world rule service. ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVM 19.1.1](https://github.com/oracle/graal/releases/tag/vm-19.1.1) installed @@ -66,7 +66,3 @@ curl -H "Content-Type: application/json" -X POST -d '{"strings":["hello"]}' http ``` the service will return `["hello", "world"]` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-quarkus-examples/rules-quarkus-helloworld/operator/rules-quarkus-helloworld.yaml b/kogito-quarkus-examples/rules-quarkus-helloworld/operator/rules-quarkus-helloworld.yaml deleted file mode 100644 index 512a7177f4..0000000000 --- a/kogito-quarkus-examples/rules-quarkus-helloworld/operator/rules-quarkus-helloworld.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: rules-quarkus-helloworld -spec: - type: RemoteSource - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/rules-quarkus-helloworld - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: rules-quarkus-helloworld diff --git a/kogito-quarkus-examples/rules-quarkus-helloworld/pom.xml b/kogito-quarkus-examples/rules-quarkus-helloworld/pom.xml index 3f593a1550..0dd8873cf0 100755 --- a/kogito-quarkus-examples/rules-quarkus-helloworld/pom.xml +++ b/kogito-quarkus-examples/rules-quarkus-helloworld/pom.xml @@ -1,23 +1,43 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT rules-quarkus-helloworld Kogito Example :: Rules HelloWorld - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -39,8 +59,8 @@ - org.kie.kogito - kogito-quarkus-rules + org.drools + drools-quarkus-rules io.quarkus diff --git a/kogito-quarkus-examples/rules-quarkus-helloworld/src/main/java/org/kie/kogito/examples/Hello.java b/kogito-quarkus-examples/rules-quarkus-helloworld/src/main/java/org/kie/kogito/examples/Hello.java index 8d068badf1..925f8a30c9 100644 --- a/kogito-quarkus-examples/rules-quarkus-helloworld/src/main/java/org/kie/kogito/examples/Hello.java +++ b/kogito-quarkus-examples/rules-quarkus-helloworld/src/main/java/org/kie/kogito/examples/Hello.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.examples; diff --git a/kogito-quarkus-examples/rules-quarkus-helloworld/src/main/java/org/kie/kogito/examples/MyAgendaEventListener.java b/kogito-quarkus-examples/rules-quarkus-helloworld/src/main/java/org/kie/kogito/examples/MyAgendaEventListener.java index 0af433e963..a7e8d712c6 100644 --- a/kogito-quarkus-examples/rules-quarkus-helloworld/src/main/java/org/kie/kogito/examples/MyAgendaEventListener.java +++ b/kogito-quarkus-examples/rules-quarkus-helloworld/src/main/java/org/kie/kogito/examples/MyAgendaEventListener.java @@ -1,28 +1,31 @@ /* - * 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.examples; import java.util.concurrent.atomic.AtomicInteger; -import javax.inject.Singleton; - import org.drools.core.event.DefaultAgendaEventListener; import org.jboss.logging.Logger; import org.kie.api.event.rule.AfterMatchFiredEvent; +import jakarta.inject.Singleton; + @Singleton public class MyAgendaEventListener extends DefaultAgendaEventListener { private static final Logger LOG = Logger.getLogger(MyAgendaEventListener.class); diff --git a/kogito-quarkus-examples/rules-quarkus-helloworld/src/main/resources/META-INF/kmodule.xml b/kogito-quarkus-examples/rules-quarkus-helloworld/src/main/resources/META-INF/kmodule.xml index b0581c07c0..efef3d776f 100755 --- a/kogito-quarkus-examples/rules-quarkus-helloworld/src/main/resources/META-INF/kmodule.xml +++ b/kogito-quarkus-examples/rules-quarkus-helloworld/src/main/resources/META-INF/kmodule.xml @@ -1,3 +1,23 @@ + diff --git a/kogito-quarkus-examples/rules-quarkus-helloworld/src/main/resources/application.properties b/kogito-quarkus-examples/rules-quarkus-helloworld/src/main/resources/application.properties index a0acc615e1..e6ed950f1f 100644 --- a/kogito-quarkus-examples/rules-quarkus-helloworld/src/main/resources/application.properties +++ b/kogito-quarkus-examples/rules-quarkus-helloworld/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. +# + # Packaging # quarkus.package.type=fast-jar \ No newline at end of file diff --git a/kogito-quarkus-examples/rules-quarkus-helloworld/src/main/resources/org/kie/kogito/examples/Hello.drl b/kogito-quarkus-examples/rules-quarkus-helloworld/src/main/resources/org/kie/kogito/examples/Hello.drl index 7aaacc6c99..6026d730a2 100644 --- a/kogito-quarkus-examples/rules-quarkus-helloworld/src/main/resources/org/kie/kogito/examples/Hello.drl +++ b/kogito-quarkus-examples/rules-quarkus-helloworld/src/main/resources/org/kie/kogito/examples/Hello.drl @@ -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.examples; unit Hello; diff --git a/kogito-quarkus-examples/rules-quarkus-helloworld/src/test/java/org/kie/kogito/examples/HelloTest.java b/kogito-quarkus-examples/rules-quarkus-helloworld/src/test/java/org/kie/kogito/examples/HelloTest.java index 689a1fd08c..2a5f8eb0c5 100644 --- a/kogito-quarkus-examples/rules-quarkus-helloworld/src/test/java/org/kie/kogito/examples/HelloTest.java +++ b/kogito-quarkus-examples/rules-quarkus-helloworld/src/test/java/org/kie/kogito/examples/HelloTest.java @@ -1,27 +1,30 @@ /* - * 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.examples; -import javax.inject.Inject; - import org.junit.jupiter.api.Test; import io.quarkus.test.junit.QuarkusTest; import io.restassured.http.ContentType; +import jakarta.inject.Inject; + import static io.restassured.RestAssured.given; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; diff --git a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/README.md b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/README.md index 504e15027f..b73807e272 100644 --- a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/README.md +++ b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/README.md @@ -14,9 +14,9 @@ The main goal behind the addon is to allow Kogito DRL services to be used as par ### Prerequisites You will need: -- Java 11+ installed +- Java 17+ installed - Environment variable JAVA_HOME set accordingly -- Maven 3.8.6+ installed +- Maven 3.9.6+ installed - [Docker Engine](https://docs.docker.com/engine/) and [Docker Compose](https://docs.docker.com/compose/) installed When using native image compilation, you will also need: @@ -30,8 +30,8 @@ Like the other Kogito AddOns, the only required step to enable it is to include ```xml - org.kie.kogito - kogito-addons-quarkus-events-rules + org.drools + drools-addons-quarkus-events-rules ``` diff --git a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/docker-compose.yml b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/docker-compose.yml index f07d3cc400..802976737c 100644 --- a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/docker-compose.yml +++ b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/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' services: diff --git a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/out.txt b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/out.txt deleted file mode 100644 index 9002dae5cc..0000000000 --- a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/out.txt +++ /dev/null @@ -1,1950 +0,0 @@ -[INFO] Scanning for projects... -[INFO] ------------------------------------------------------------------------ -[INFO] Detecting the operating system and CPU architecture -[INFO] ------------------------------------------------------------------------ -[INFO] os.detected.name: linux -[INFO] os.detected.arch: x86_64 -[INFO] os.detected.version: 5.19 -[INFO] os.detected.version.major: 5 -[INFO] os.detected.version.minor: 19 -[INFO] os.detected.release: fedora -[INFO] os.detected.release.version: 36 -[INFO] os.detected.release.like.fedora: true -[INFO] os.detected.classifier: linux-x86_64 -[INFO] -[INFO] -------< org.kie.kogito.examples:ruleunit-event-driven-quarkus >-------- -[INFO] Building Kogito Example :: Rule Unit Event-Driven :: Quarkus 2.0.0-SNAPSHOT -[INFO] --------------------------------[ jar ]--------------------------------- -[INFO] -[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ ruleunit-event-driven-quarkus --- -[INFO] Deleting /home/ftirados/git/kogito-examples/kogito-quarkus-examples/ruleunit-event-driven-quarkus/target -[INFO] -[INFO] --- maven-enforcer-plugin:3.0.0-M2:enforce (enforce-versions) @ ruleunit-event-driven-quarkus --- -[INFO] -[INFO] --- maven-enforcer-plugin:3.0.0-M2:enforce (enforce-java-version) @ ruleunit-event-driven-quarkus --- -[INFO] -[INFO] --- maven-enforcer-plugin:3.0.0-M2:enforce (enforce-maven-version) @ ruleunit-event-driven-quarkus --- -[INFO] -[INFO] --- maven-checkstyle-plugin:3.1.1:check (default) @ ruleunit-event-driven-quarkus --- -[INFO] You have 0 Checkstyle violations. -[INFO] -[INFO] --- buildnumber-maven-plugin:1.4:create (get-scm-revision) @ ruleunit-event-driven-quarkus --- -[INFO] Executing: /bin/sh -c cd '/home/ftirados/git/kogito-examples/kogito-quarkus-examples/ruleunit-event-driven-quarkus' && 'git' 'rev-parse' '--verify' 'HEAD' -[INFO] Working directory: /home/ftirados/git/kogito-examples/kogito-quarkus-examples/ruleunit-event-driven-quarkus -[INFO] Storing buildNumber: b44e1b0f077b5f2905c3a4d4652871e82082f4a6 at timestamp: 1665063468886 -[INFO] Storing buildScmBranch: main -[INFO] -[INFO] --- formatter-maven-plugin:2.13.0:format (default) @ ruleunit-event-driven-quarkus --- -[INFO] Using 'UTF-8' encoding to format source files. -[INFO] Number of files to be formatted: 5 -[INFO] Successfully formatted: 1 file(s) -[INFO] Fail to format: 0 file(s) -[INFO] Skipped: 4 file(s) -[INFO] Read only skipped: 0 file(s) -[INFO] Approximate time taken: 0s -[INFO] -[INFO] --- impsort-maven-plugin:1.5.0:sort (default) @ ruleunit-event-driven-quarkus --- -[INFO] Using compiler compliance level: JAVA_11 -[INFO] Total Files Processed: 5 in 00:00.139 -[INFO] Already Sorted: 4 -[INFO] Needed Sorting: 1 -[INFO] -[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ ruleunit-event-driven-quarkus --- -[debug] execute contextualize -[INFO] Using 'UTF-8' encoding to copy filtered resources. -[INFO] Copying 2 resources -[INFO] -[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ ruleunit-event-driven-quarkus --- -[INFO] Changes detected - recompiling the module! -[INFO] Compiling 4 source files to /home/ftirados/git/kogito-examples/kogito-quarkus-examples/ruleunit-event-driven-quarkus/target/classes -[INFO] -[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ ruleunit-event-driven-quarkus --- -[debug] execute contextualize -[INFO] Using 'UTF-8' encoding to copy filtered resources. -[INFO] Copying 16 resources -[INFO] -[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ ruleunit-event-driven-quarkus --- -[INFO] Changes detected - recompiling the module! -[INFO] Compiling 1 source file to /home/ftirados/git/kogito-examples/kogito-quarkus-examples/ruleunit-event-driven-quarkus/target/test-classes -[WARNING] /home/ftirados/git/kogito-examples/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/test/java/org/kie/kogito/examples/RuleUnitEventDrivenIT.java:[61,13] configure(com.fasterxml.jackson.databind.MapperFeature,boolean) in com.fasterxml.jackson.databind.ObjectMapper has been deprecated -[INFO] -[INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ ruleunit-event-driven-quarkus --- -[INFO] -[INFO] --- maven-jar-plugin:3.1.0:jar (default-jar) @ ruleunit-event-driven-quarkus --- -[INFO] Building jar: /home/ftirados/git/kogito-examples/kogito-quarkus-examples/ruleunit-event-driven-quarkus/target/ruleunit-event-driven-quarkus.jar -[INFO] -[INFO] --- maven-jar-plugin:3.1.0:test-jar (test-jar) @ ruleunit-event-driven-quarkus --- -[INFO] Building jar: /home/ftirados/git/kogito-examples/kogito-quarkus-examples/ruleunit-event-driven-quarkus/target/ruleunit-event-driven-quarkus-tests.jar -[INFO] -[INFO] --- maven-source-plugin:3.0.1:jar-no-fork (attach-sources) @ ruleunit-event-driven-quarkus --- -[INFO] Building jar: /home/ftirados/git/kogito-examples/kogito-quarkus-examples/ruleunit-event-driven-quarkus/target/ruleunit-event-driven-quarkus-sources.jar -[INFO] -[INFO] --- maven-source-plugin:3.0.1:test-jar-no-fork (attach-test-sources) @ ruleunit-event-driven-quarkus --- -[INFO] Building jar: /home/ftirados/git/kogito-examples/kogito-quarkus-examples/ruleunit-event-driven-quarkus/target/ruleunit-event-driven-quarkus-test-sources.jar -[INFO] -[INFO] --- quarkus-maven-plugin:2.13.0.Final:build (default) @ ruleunit-event-driven-quarkus --- -[INFO] Performed addonsConfig discovery, found: AddonsConfig{usePersistence=false, useTracing=false, useMonitoring=false, usePrometheusMonitoring=false, useCloudEvents=true, useExplainability=false, useProcessSVG=false, useEventDrivenDecisions=false, useEventDrivenRules=true} -[INFO] Generator discovery performed, found [processes, rules] -[INFO] Skipping generator 'processes' because disabled -[INFO] [org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor] reflectiveEfestoGeneratedClassBuildItem org.kie.kogito.quarkus.common.deployment.KogitoGeneratedSourcesBuildItem@27405711 -[WARNING] [io.quarkus.config] Unrecognized configuration key "quarkus.swagger-ui.always-include" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo -[INFO] [io.quarkus.arc.processor.BeanProcessor] Found unrecommended usage of private members (use package-private instead) in application beans: - - @PostConstruct callback org.kie.kogito.queries.LoanUnitQueryFindAllApplicationAmountsEventDrivenExecutor#onPostConstruct(), - - @PostConstruct callback org.kie.kogito.queries.LoanUnitQueryFindNotApprovedIdAndAmountEventDrivenExecutor#onPostConstruct(), - - @PostConstruct callback org.kie.kogito.queries.LoanUnitQueryFindApprovedEventDrivenExecutor#onPostConstruct() -[INFO] [io.quarkus.deployment.QuarkusAugmentor] Quarkus augmentation completed in 2671ms -[INFO] -[INFO] --- maven-resources-plugin:2.5:copy-resources (add-it-resources) @ ruleunit-event-driven-quarkus --- -[debug] execute contextualize -[INFO] Using 'UTF-8' encoding to copy filtered resources. -[INFO] Copying 2 resources -[INFO] -[INFO] --- maven-failsafe-plugin:3.0.0-M5:integration-test (integration-test) @ ruleunit-event-driven-quarkus --- -[INFO] -[INFO] ------------------------------------------------------- -[INFO] T E S T S -[INFO] ------------------------------------------------------- -[INFO] Running org.kie.kogito.examples.RuleUnitEventDrivenIT -2022-10-06 15:37:58,032 INFO [org.tes.uti.ImageNameSubstitutor] (main) Found configured ImageNameSubstitutor: Kogito Image Name Substitutor -2022-10-06 15:37:58,034 INFO [org.tes.uti.ImageNameSubstitutor] (main) Image name substitution will be performed by: Chained substitutor of 'DefaultImageNameSubstitutor (composite of 'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor')' and then 'Kogito Image Name Substitutor' -2022-10-06 15:37:58,054 INFO [org.tes.doc.DockerClientProviderStrategy] (pool-3-thread-1) Loaded org.testcontainers.dockerclient.UnixSocketClientProviderStrategy from ~/.testcontainers.properties, will try it first -2022-10-06 15:37:58,389 INFO [org.tes.doc.DockerClientProviderStrategy] (pool-3-thread-1) Found Docker environment with local Unix socket (unix:///var/run/docker.sock) -2022-10-06 15:37:58,390 INFO [org.tes.DockerClientFactory] (pool-3-thread-1) Docker host IP address is localhost -2022-10-06 15:37:58,401 INFO [org.tes.DockerClientFactory] (pool-3-thread-1) Connected to docker: - Server Version: 20.10.18 - API Version: 1.41 - Operating System: Fedora Linux 36 (Workstation Edition) - Total Memory: 31835 MB -2022-10-06 15:37:58,445 INFO [🐳 .11.8]] (pool-3-thread-1) Creating container for image: vectorized/redpanda:v21.11.8 -2022-10-06 15:37:58,465 INFO [🐳 .3.3]] (pool-3-thread-1) Creating container for image: testcontainers/ryuk:0.3.3 -2022-10-06 15:37:58,556 INFO [🐳 .3.3]] (pool-3-thread-1) Container testcontainers/ryuk:0.3.3 is starting: 333c5735674d41dc22a2db02f09cda2f3fa3e24c21d29b039733537745df5644 -2022-10-06 15:37:58,824 INFO [🐳 .3.3]] (pool-3-thread-1) Container testcontainers/ryuk:0.3.3 started in PT0.359444935S -2022-10-06 15:37:58,865 INFO [🐳 .11.8]] (pool-3-thread-1) Container vectorized/redpanda:v21.11.8 is starting: f5b812c0f0a46f2f8f18d9d37e79549e4a39261697be7481d8a4c442cbad0da7 -We'd love to hear about your experience with redpanda: -https://vectorized.io/feedback -Starting redpanda... -Running: -HOSTNAME=f5b812c0f0a4 PWD=/ HOME=/var/lib/redpanda SHLVL=1 PATH=/opt/redpanda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /opt/redpanda/bin/redpanda redpanda --redpanda-cfg /etc/redpanda/redpanda.yaml --memory=1G --lock-memory=false --reserve-memory=0M --overprovisioned --smp=1 -2022-10-06 15:37:59,545 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDOUT: We'd love to hear about your experience with redpanda: -2022-10-06 15:37:59,547 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDOUT: https://vectorized.io/feedback -2022-10-06 15:37:59,547 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDOUT: Starting redpanda... -2022-10-06 15:37:59,548 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDOUT: Running: -2022-10-06 15:37:59,549 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDOUT: HOSTNAME=f5b812c0f0a4 PWD=/ HOME=/var/lib/redpanda SHLVL=1 PATH=/opt/redpanda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /opt/redpanda/bin/redpanda redpanda --redpanda-cfg /etc/redpanda/redpanda.yaml --memory=1G --lock-memory=false --reserve-memory=0M --overprovisioned --smp=1 - - -Welcome to the Redpanda community! - -Slack: https://vectorized.io/slack - is the main way the community interacts with one another in real time :) -Twitter: https://twitter.com/vectorizedio - come say hi! -Github Discussion: https://github.com/vectorizedio/redpanda/discussions - is preferred for longer, async, thoughtful discussions -2022-10-06 15:37:59,573 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDOUT: -GitHub Issues: https://github.com/vectorizedio/redpanda/issues - is reserved only for actual issues. Please use the GitHub for discussions. -Documentation: https://vectorized.io/docs/ - official docs site -Support: https://support.vectorized.io/ - to share private information with the production support vectorized team -2022-10-06 15:37:59,573 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDOUT: -Product Feedback: https://vectorized.io/feedback/ - let us know how we can improve your experience - - -INFO redpanda::main - application.cc:160 - Redpanda v21.11.8 - e7867b4fd34296daa2497ebc352e68b9dbc2a6b5-dirty -INFO redpanda::main - application.cc:168 - kernel=5.19.12-200.fc36.x86_64, nodename=f5b812c0f0a4, machine=x86_64 -2022-10-06 15:37:59,574 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDOUT: Welcome to the Redpanda community! -2022-10-06 15:37:59,574 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDOUT: -2022-10-06 15:37:59,574 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDOUT: Slack: https://vectorized.io/slack - is the main way the community interacts with one another in real time :) -2022-10-06 15:37:59,575 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDOUT: Twitter: https://twitter.com/vectorizedio - come say hi! -2022-10-06 15:37:59,575 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDOUT: Github Discussion: https://github.com/vectorizedio/redpanda/discussions - is preferred for longer, async, thoughtful discussions -2022-10-06 15:37:59,575 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDOUT: GitHub Issues: https://github.com/vectorizedio/redpanda/issues - is reserved only for actual issues. Please use the GitHub for discussions. -2022-10-06 15:37:59,576 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDOUT: Documentation: https://vectorized.io/docs/ - official docs site -2022-10-06 15:37:59,576 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDOUT: Support: https://support.vectorized.io/ - to share private information with the production support vectorized team -2022-10-06 15:37:59,576 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDOUT: Product Feedback: https://vectorized.io/feedback/ - let us know how we can improve your experience -2022-10-06 15:37:59,577 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDOUT: -2022-10-06 15:37:59,577 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDOUT: -2022-10-06 15:37:59,577 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO redpanda::main - application.cc:160 - Redpanda v21.11.8 - e7867b4fd34296daa2497ebc352e68b9dbc2a6b5-dirty -2022-10-06 15:37:59,578 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO redpanda::main - application.cc:168 - kernel=5.19.12-200.fc36.x86_64, nodename=f5b812c0f0a4, machine=x86_64 -INFO 2022-10-06 13:37:59,618 [shard 0] redpanda::main - application.cc:144 - System resources: { cpus: 1, available memory: 1024.000MiB, reserved memory: 0.000bytes} -INFO 2022-10-06 13:37:59,618 [shard 0] redpanda::main - application.cc:152 - File handle limit: 1073741816/1073741816 -2022-10-06 15:37:59,618 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,618 [shard 0] redpanda::main - application.cc:144 - System resources: { cpus: 1, available memory: 1024.000MiB, reserved memory: 0.000bytes} -2022-10-06 15:37:59,619 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,618 [shard 0] redpanda::main - application.cc:152 - File handle limit: 1073741816/1073741816 -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:323 - Configuration: - -config_file: /etc/redpanda/redpanda.yaml -2022-10-06 15:37:59,626 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:323 - Configuration: -node_uuid: m8mqeuQJxPuEdKnEY49cHwypzhCDKCPyfGqcyLSD2of3eQFof -pandaproxy: {} -redpanda: - admin: - - address: 0.0.0.0 - port: 9644 -2022-10-06 15:37:59,626 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: - advertised_kafka_api: - - address: localhost - name: OUTSIDE - port: 49238 - - address: f5b812c0f0a4 - name: PLAINTEXT -2022-10-06 15:37:59,627 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: config_file: /etc/redpanda/redpanda.yaml - port: 29092 - auto_create_topics_enabled: true - data_directory: /var/lib/redpanda/data - developer_mode: true - enable_idempotence: true - enable_transactions: true -2022-10-06 15:37:59,627 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: node_uuid: m8mqeuQJxPuEdKnEY49cHwypzhCDKCPyfGqcyLSD2of3eQFof - kafka_api: - - address: 0.0.0.0 - name: PLAINTEXT - port: 29092 - - address: 0.0.0.0 - name: OUTSIDE - port: 9092 - node_id: 0 - rpc_server: -2022-10-06 15:37:59,627 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: pandaproxy: {} - address: 0.0.0.0 - port: 33145 - seed_servers: [] -rpk: - coredump_dir: /var/lib/redpanda/coredump - enable_memory_locking: false -2022-10-06 15:37:59,628 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: redpanda: - enable_usage_stats: true - overprovisioned: true - tune_aio_events: false - tune_ballast_file: false - tune_clocksource: false - tune_coredump: false - tune_cpu: false -2022-10-06 15:37:59,628 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: admin: - tune_disk_irq: false - tune_disk_nomerges: false - tune_disk_scheduler: false - tune_disk_write_cache: false - tune_fstrim: false - tune_network: false - tune_swappiness: false - tune_transparent_hugepages: false -schema_registry: {} -2022-10-06 15:37:59,628 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: - address: 0.0.0.0 - - -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:327 - Use `rpk config set ` to change values below: -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.metrics_reporter_report_interval:86400000 - cluster metrics reporter report interval -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.metrics_reporter_tick_interval:60000 - Cluster metrics reporter tick interval -2022-10-06 15:37:59,628 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: port: 9644 -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.leader_balancer_idle_timeout:120000 - Leadership rebalancing idle timeout -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.full_raft_configuration_recovery_pattern:{} - Recover raft configuration on start for NTPs matching pattern -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_qdc_min_depth:1 - Minimum queue depth used in kafka queue depth control. -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_qdc_idle_depth:10 - Queue depth when idleness is detected in kafka queue depth control. -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.health_manager_tick_interval:180000 - How often the health manager runs -2022-10-06 15:37:59,629 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: advertised_kafka_api: -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_qdc_max_latency_ms:80 - Max latency threshold for kafka queue depth control depth tracking. -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_qdc_depth_alpha:0.8 - Smoothing factor for kafka queue depth control depth tracking. -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_qdc_window_count:12 - Number of windows used in kafka queue depth control latency tracking. -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.superusers:{} - List of superuser usernames -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_cache_check_interval:30000 - Timeout to check if cache eviction should be triggered -2022-10-06 15:37:59,629 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: - address: localhost -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_cache_size:21474836480 - Max size of archival cache -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_upload_ctrl_d_coeff:0 - derivative coefficient for upload PID controller. -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_qdc_enable:0 - Enable kafka queue depth control. -2022-10-06 15:37:59,629 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: name: OUTSIDE -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_upload_ctrl_p_coeff:-2 - proportional coefficient for upload PID controller -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_upload_ctrl_update_interval_ms:60000 - -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_max_connection_idle_time_ms:5000 - Max https connection idle time (ms) -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_segment_upload_timeout_ms:30000 - Log segment upload timeout (ms) -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_trust_file:{nullopt} - Path to certificate that should be used to validate server certificate during TLS handshake -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_api_endpoint_port:443 - TLS port override -2022-10-06 15:37:59,629 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: port: 49238 -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_disable_tls:0 - Disable TLS for all S3 connections -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_reconciliation_interval_ms:10000 - Interval at which the archival service runs reconciliation (ms) -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_api_endpoint:{nullopt} - Optional API endpoint -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_secret_key:{nullopt} - AWS secret key -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_enable_remote_write:0 - Enable remote write for all topics -2022-10-06 15:37:59,630 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: - address: f5b812c0f0a4 -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_qdc_window_size_ms:1500 - Window size for kafka queue depth control latency tracking. -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_enable_remote_read:0 - Enable remote read for all topics -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.members_backend_retry_ms:5000 - Time between members backend reconciliation loop retries -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.compaction_ctrl_max_shares:1000 - maximum number of IO and CPU shares that compaction process can use -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.compaction_ctrl_min_shares:10 - minimum number of IO and CPU shares that compaction process can use -2022-10-06 15:37:59,630 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: name: PLAINTEXT -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.compaction_ctrl_d_coeff:0.2 - derivative coefficient for compaction PID controller. -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.compaction_ctrl_i_coeff:0 - integral coefficient for compaction PID controller. -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_qdc_depth_update_ms:7000 - Update frequency for kafka queue depth control. -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.compaction_ctrl_p_coeff:-12.5 - proportional coefficient for compaction PID controller. This has to be negative since compaction backlog should decrease when number of compaction shares increases -2022-10-06 15:37:59,630 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: port: 29092 -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.compaction_ctrl_update_interval_ms:30000 - -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.enable_auto_rebalance_on_node_add:0 - Enable automatic partition rebalancing when new nodes are added -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.node_management_operation_timeout_ms:5000 - Timeout for executing node management operations -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.leader_balancer_mute_timeout:300000 - Leadership rebalancing mute timeout -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.id_allocator_batch_size:1000 - Id allocator allocates messages in batches (each batch is a one log record) and then serves requests from memory without touching the log until the batch is exhausted. -2022-10-06 15:37:59,630 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: auto_create_topics_enabled: true -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.id_allocator_log_capacity:100 - Capacity of the id_allocator log in number of messages. Once it reached id_allocator_stm should compact the log. -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.raft_transfer_leader_recovery_timeout_ms:10000 - Timeout waiting for follower recovery when transferring leadership -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.reclaim_max_size:4194304 - Maximum batch cache reclaim size -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.fetch_session_eviction_timeout_ms:60000 - Minimum time before which unused session will get evicted from sessions. Max2022-10-06 15:37:59,631 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: data_directory: /var/lib/redpanda/data -imum time after which inactive session will be deleted is two time given configuration valuecache -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.segment_appender_flush_timeout_ms:1000 - Maximum delay until buffered data is written -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.retention_bytes:{nullopt} - Default max bytes per partition on disk before triggering a compaction -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.join_retry_timeout_ms:5000 - Time between cluster join retries in milliseconds -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.enable_admin_api:1 - Enable the admin API -2022-10-06 15:37:59,631 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: developer_mode: true -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.raft_io_timeout_ms:10000 - Raft I/O timeout -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.zstd_decompress_workspace_bytes:8388608 - Size of the zstd decompression workspace -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.compaction_ctrl_backlog_size:{nullopt} - target backlog size for compaction controller. if not set compaction target compaction backlog would be equal to -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.append_chunk_size:16384 - Size of direct write operations to disk -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.auto_create_topics_enabled:1 - Allow topic auto creation -2022-10-06 15:37:59,631 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: enable_idempotence: true -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.reclaim_stable_window:10000 - Length of time above which growth is reset -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.enable_pid_file:1 - Enable pid file. You probably don't want to change this. -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_group_recovery_timeout_ms:30000 - Kafka group recovery timeout expressed in milliseconds -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.reclaim_growth_window:3000 - Length of time in which reclaim sizes grow -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.raft_smp_max_non_local_requests:0 - Maximum number of x-core requests pending in Raft seastar::smp group. (for more details look at `seastar::smp_service_group` documentation) -2022-10-06 15:37:59,631 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: enable_transactions: true -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.raft_timeout_now_timeout_ms:1000 - Timeout for a timeout now request -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.recovery_append_timeout_ms:5000 - Timeout for append entries requests issued while updating stale follower -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.health_monitor_tick_interval:10000 - How often health monitor refresh cluster state -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.internal_topic_replication_factor:3 - Target replication factor for internal topics -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.replicate_append_timeout_ms:3000 - Timeout for append entries requests issued while replicating entries -2022-10-06 15:37:59,632 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: kafka_api: -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.log_segment_size:1073741824 - How large in bytes should each log segment be (default 1G) -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.disable_batch_cache:0 - Disable batch cache in log manager -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.election_timeout_ms:1500 - Election timeout expressed in milliseconds -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.default_topic_partitions:1 - Default number of partitions per topic -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.wait_for_leader_timeout_ms:5000 - Timeout (ms) to wait for leadership in metadata cache -2022-10-06 15:37:59,632 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: - address: 0.0.0.0 -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_qdc_max_depth:100 - Maximum queue depth used in kafka queue depth control. -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cluster_id:{nullopt} - Cluster identifier -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.transaction_coordinator_delete_retention_ms:604800000 - delete segments older than this - default 1 week -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.storage_read_buffer_size:131072 - Size of each read buffer (one per in-flight read, per log segment) -2022-10-06 15:37:59,632 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: name: PLAINTEXT -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.metadata_status_wait_timeout_ms:2000 - Maximum time to wait in metadata request for cluster health to be refreshed -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.transaction_coordinator_cleanup_policy:delete - Cleanup policy for a transaction coordinator topic -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.max_kafka_throttle_delay_ms:60000 - Fail-safe maximum throttle delay on kafka requests -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.enable_idempotence:1 - Enable idempotent producer -2022-10-06 15:37:59,632 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: port: 29092 -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.id_allocator_replication:1 - Replication factor for an id allocator topic -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.abort_timed_out_transactions_interval_ms:60000 - How often look for the inactive transactions and abort them -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_upload_ctrl_min_shares:100 - minimum number of IO and CPU shares that archival upload can use -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.default_topic_replications:1 - Default replication factor for new topics -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.rpc_server_listen_backlog:{nullopt} - TCP connection queue length for Kafka server and internal RPC server -2022-10-06 15:37:59,633 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: - address: 0.0.0.0 -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.group_topic_partitions:1 - Number of partitions in the internal group membership topic -2022-10-06 15:37:59,633 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: name: OUTSIDE -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.log_compaction_interval_ms:10000 - How often do we trigger background compaction -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_enabled:0 - Enable archival storage -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.delete_retention_ms:604800000 - delete segments older than this - default 1 week -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.abort_index_segment_size:50000 - Capacity (in number of txns) of an abort index segment -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_bucket:{nullopt} - AWS bucket that should be used to store data -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.enable_2022-10-06 15:37:59,633 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: port: 9092 -transactions:1 - Enable transactions -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.metrics_reporter_url:https://m.rp.vectorized.io/v2 - cluster metrics reporter url -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.coproc_max_batch_size:32768 - Maximum amount of bytes to read from one topic read -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.transaction_coordinator_replication:1 - Replication factor for a transaction coordinator topic -2022-10-06 15:37:59,633 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: node_id: 0 -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.metadata_dissemination_retry_delay_ms:320 - Delay before retry a topic lookup in a shard or other meta tables -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.log_message_timestamp_type:CreateTime - Default topic messages timestamp type -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.reclaim_min_size:131072 - Minimum batch cache reclaim size -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_max_connections:20 - Max number of simultaneous uploads to S3 -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.raft_replicate_batch_window_size:1048576 - Max size of requests cached for replication -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.quota_manager_gc_sec:30000 - Quota manager GC frequency in milliseconds -2022-10-06 15:37:59,634 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: rpc_server: -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.rm_violation_recovery_policy:crash - Describes how to recover from an invariant violation happened on the partition level -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.coproc_max_ingest_bytes:655360 - Maximum amount of data to hold from input logs in memory -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.alter_topic_cfg_timeout_ms:5000 - Time to wait for entries replication in controller log when executing alter configuration requst -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_qdc_latency_alpha:0.002 - Smoothing parameter for kafka queue depth control latency tracking. -2022-10-06 15:37:59,634 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: address: 0.0.0.0 -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.log_cleanup_policy:delete - Default topic cleanup policy -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.enable_metrics_reporter:1 - Enable cluster metrics reporter -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.health_monitor_max_metadata_age:10000 - Max age of metadata cached in the health monitor of non controller node -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.raft_heartbeat_interval_ms:150 - Milliseconds for raft leader heartbeats -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_segment_max_upload_interval_sec:{nullopt} - Time that segment can be kept locally without uploading it to the remote storage (sec) -2022-10-06 15:37:59,634 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: port: 33145 -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.readers_cache_eviction_timeout_ms:30000 - Duration after which inactive readers will be evicted from cache -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.enable_coproc:0 - Enable coprocessing mode -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.log_compression_type:producer - Default topic compression type -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.fetch_reads_debounce_timeout:1 - Time to wait for next read in fetch request when requested min bytes wasn't reached -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.release_cache_on_segment_roll:0 - Free cache when segments roll -2022-10-06 15:37:59,634 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: seed_servers: [] -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kvstore_flush_interval:10 - Key-value store flush interval (ms) -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.max_compacted_log_segment_size:5368709120 - Max compacted segment size after consolidation -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.rm_sync_timeout_ms:10000 - Time to wait state catch up before rejecting a request -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.transaction_coordinator_log_segment_size:1073741824 - How large in bytes should each log segment be (default 1G) -2022-10-06 15:37:59,635 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: rpk: -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.tm_violation_recovery_policy:crash - Describes how to recover from an invariant violation happened on the transaction coordinator level -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.group_new_member_join_timeout:30000 - Timeout for new member joins -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_manifest_upload_timeout_ms:10000 - Manifest upload timeout (ms) -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.storage_read_readahead_count:10 - How many additional reads to issue ahead of current read location -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.group_initial_rebalance_delay:300 - Extra delay (ms) added to rebalance phase to wait for new members -2022-10-06 15:37:59,635 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: coredump_dir: /var/lib/redpanda/coredump -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.group_max_session_timeout_ms:300000 - The maximum allowed session timeout for registered consumers. Longer timeouts give consumers more time to process messages in between heartbeats at the cost of a longer time to detect failures. -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.raft_learner_recovery_rate:104857600 - Raft learner recovery rate limit in bytes per sec -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_upload_ctrl_max_shares:1000 - maximum number of IO and CPU shares that archival upload can use -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.group_min_session_timeout_ms:6000 - The minimum allowed session timeout for registered consumers. Shorter timeouts result in quicker failure detection at the cost of more frequent consumer heartbeating, which can overwhelm broker resources. -2022-10-06 15:37:59,635 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: enable_memory_locking: false -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.controller_backend_housekeeping_interval_ms:1000 - Interval between iterations of controller backend housekeeping loop -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.tm_sync_timeout_ms:10000 - Time to wait state catch up before rejecting a request -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.raft_max_concurrent_append_requests_per_follower:16 - Maximum number of concurrent append entries requests sent by leader to one follower -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.seed_server_meta_topic_partitions: - -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.metadata_dissemination_interval_ms:3000 - Interaval for metadata dissemination batching -INF2022-10-06 15:37:59,635 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: enable_usage_stats: true -O 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.default_num_windows:10 - Default number of quota tracking windows -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.enable_sasl:0 - Enable SASL authentication for Kafka connections. -2022-10-06 15:37:59,636 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: overprovisioned: true -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kvstore_max_segment_size:16777216 - Key-value maximum segment size (bytes) -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.min_version: - -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.raft_heartbeat_disconnect_failures:3 - After how many failed heartbeats to forcibly close an unresponsive TCP connection. Set to 0 to disable force disconnection. -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.max_version: - -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.default_window_sec:1000 - Default quota tracking window size in milliseconds -2022-10-06 15:37:59,636 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: tune_aio_events: false -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.fetch_max_bytes:57671680 - Maximum number of bytes returned in fetch request -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.raft_heartbeat_timeout_ms:3000 - raft heartbeat RPC timeout -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_access_key:{nullopt} - AWS access key -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.transactional_id_expiration_ms:604800000 - Producer ids are expired once this time has elapsed after the last write with the given producer id. -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.tx_timeout_delay_ms:1000 - Delay before scheduling next check for timed out transactions -2022-10-06 15:37:59,636 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: tune_ballast_file: false -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.coproc_max_inflight_bytes:10485760 - Maximum amountt of inflight bytes when sending data to wasm engine -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.target_quota_byte_rate:2147483648 - Target quota byte rate (bytes per second) - 2GB default -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.create_topic_timeout_ms:2000 - Timeout (ms) to wait for new topic creation -2022-10-06 15:37:59,636 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: tune_clocksource: false -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.metadata_dissemination_retries:30 - Number of attempts of looking up a topic's meta data like shard before failing a request -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.use_scheduling_groups: - -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.disable_metrics:0 - Disable registering metrics -2022-10-06 15:37:59,637 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: tune_coredump: false -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.rpc_server_tcp_send_buf:{nullopt} - TCP transmit buffer size in bytes. -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.coproc_offset_flush_interval_ms:300000 - Interval for which all coprocessor offsets are flushed to disk -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.enable_leader_balancer:1 - Enable automatic leadership rebalancing -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_initial_backoff_ms:100 - Initial backoff time for exponetial backoff algorithm (ms) -2022-10-06 15:37:59,637 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: tune_cpu: false -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.rpc_server_tcp_recv_buf:{nullopt} - TCP receive buffer size in bytes. -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_max_bytes_per_fetch:67108864 - Limit fetch responses to this many bytes, even if total of partition bytes limits is higher -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.developer_mode:1 - Skips most of the checks performed at startup, not recomended for production use -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_region:{nullopt} - AWS region that houses the bucket used for storage -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.compacted_log_segment_size:268435456 - How large in bytes should each compacted log segment be (default 256MiB) -2022-10-06 15:37:59,637 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: tune_disk_irq: false -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.advertised_kafka_api:{{OUTSIDE:{host: localhost, port: 49238}}, {PLAINTEXT:{host: f5b812c0f0a4, port: 29092}}} - Address of Kafka API published to the clients -INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.coproc_supervisor_server:{host: 127.0.0.1, port: 43189} - IpAddress and port for supervisor service -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.node_id:{0} - Unique id identifying a node in the cluster -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.admin_api_tls:{} - TLS configuration for admin HTTP server -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_api_tls:{} - TLS configuration for Kafka API endpoint -2022-10-06 15:37:59,637 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: tune_disk_nomerges: false -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.advertised_rpc_api:{nullopt} - Address of RPC endpoint published to other cluster members -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_api:{{PLAINTEXT:{host: 0.0.0.0, port: 29092}}, {OUTSIDE:{host: 0.0.0.0, port: 9092}}} - Address and port of an interface to listen for Kafka API requests -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.rpc_server_tls:{ enabled: 0 key/cert files: {nullopt} ca file: {nullopt} client_auth_required: 0 } - TLS configuration for RPC server -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.rpc_server:{host: 0.0.0.0, port: 33145} - IpAddress and port for RPC server -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.dashboard_dir:{nullopt} - serve http dashboard on / url -2022-10-06 15:37:59,638 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: tune_disk_scheduler: false -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.admin:{{:{host: 0.0.0.0, port: 9644}}} - Address and port of admin server -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.enable_central_config:0 - Enable central storage + sync of cluster configuration -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.seed_servers:{} - List of the seed servers used to join current cluster. If the seed_server list is empty the node will be a cluster root and it will form a new cluster -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.admin_api_doc_dir:/usr/share/redpanda/admin-api-doc - Admin API doc directory -2022-10-06 15:37:59,638 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: tune_disk_write_cache: false -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.rack:{nullopt} - Rack identifier -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_cache_directory:{nullopt} - Directory for archival cache. Should be present when `cloud_storage_enabled` is present -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.data_directory:{data_directory="/var/li2022-10-06 15:37:59,638 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: tune_fstrim: false -b/redpanda/data"} - Place where redpanda will keep the data -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy.consumer_instance_timeout_ms:300000 - How long to wait for an idle consumer before removing it -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy.advertised_pandaproxy_api:{} - Rest API address and port to publish to client -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy.api_doc_dir:/usr/share/redpanda/proxy-api-doc - API doc directory -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy.pandaproxy_api_tls:{} - TLS configuration for Pandaproxy api -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy.pandaproxy_api:{{:{host: 0.0.0.0, port: 8082}}} - Rest API listen address and port -2022-10-06 15:37:59,638 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: tune_network: false -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.sasl_mechanism: - The SASL mechanism to use when connecting -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.consumer_heartbeat_interval_ms:500 - Interval (in milliseconds) for consumer heartbeats -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.consumer_rebalance_timeout_ms:2000 - Timeout (in milliseconds) for consumer rebalance -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.consumer_request_max_bytes:1048576 - Max bytes to fetch per request -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.consumer_request_timeout_ms:100 - Interval (in milliseconds) for consumer request timeout -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.scram_username: - Username to use for SCRAM authentication mechanisms -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.produce_batch_delay_ms:100 - Delay (in milliseconds) to wait before sending batch -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.produce_batch_size_bytes:1048576 - Number of bytes to batch before sending to broker -2022-10-06 15:37:59,638 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: tune_swappiness: false -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.consumer_session_timeout_ms:300000 - Timeout (in milliseconds) for consumer session -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.produce_batch_record_count:1000 - Number of records to batch before sending to broker -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.retry_base_backoff_ms:100 - Delay (in milliseconds) for initial retry backoff -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.retries:5 - Number of times to retry a request to a broker -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.scram_password: - Password to use for SCRAM authentication mechanisms -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.broker_tls:{ enabled: 0 key/cert files: {nullopt} ca file: {nullopt} client_auth_required: 0 } - TLS configuration for the brokers -2022-10-06 15:37:59,639 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: tune_transparent_hugepages: false -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.brokers:{{host: 0.0.0.0, port: 29092}} - List of address and port of the brokers -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry.api_doc_dir:/usr/share/redpanda/proxy-api-doc - API doc directory -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry.schema_registry_replication_factor:{nullopt} - Replication factor for internal _schemas topic. If unset, defaults to `default_topic_replication` -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry.schema_registry_api_tls:{} - TLS configuration for Schema Registry API -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry.schema_registry_api:{{:{host: 0.0.0.0, port: 8081}}} - Schema Registry API listen address and port -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.sasl_mechanism: - The SASL mechanism to use when connecting -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.consumer_heartbeat_interval_ms:500 - Interval (in milliseconds) for consumer heartbeats -2022-10-06 15:37:59,639 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: schema_registry: {} -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.consumer_rebalance_timeout_ms:2000 - Timeout (in milliseconds) for consumer rebalance -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.consumer_request_max_bytes:1048576 - Max bytes to fetch per request -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.consumer_request_timeout_ms:100 - Interval (in milliseconds) for consumer request timeout -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.scram_username: - Username to use for SCRAM authentication mechanisms -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.produce_batch_delay_ms:0 - Delay (in milliseconds) to wait before sending batch -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.produce_batch_size_bytes:0 - Number of bytes to batch before sending to broker -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.consumer_session_timeout_ms:10000 - Timeout (in milliseconds) for consumer session -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.produce_batch_record_count:0 - Number of records to batch before sending to broker -2022-10-06 15:37:59,639 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.retry_base_backoff_ms:100 - Delay (in milliseconds) for initial retry backoff -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.retries:5 - Number of times to retry a request to a broker -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.scram_password: - Password to use for SCRAM authentication mechanisms -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.broker_tls:{ enabled: 0 key/cert files: {nullopt} ca file: {nullopt} client_auth_required: 0 } - TLS configuration for the brokers -INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.brokers:{{host: 0.0.0.0, port: 29092}} - List of address and port of the brokers -INFO 2022-10-06 13:37:59,627 [shard 0] syschecks - Writing pid file "/var/lib/redpanda/data/pid.lock" -INFO 2022-10-06 13:37:59,637 [shard 0] storage - directories.h:33 - Checking `/var/lib/redpanda/data` for supported filesystems -ERROR 2022-10-06 13:37:59,637 [shard 0] syschecks - Path: `/var/lib/redpanda/data' is not on XFS. This is a non-supported setup. Expect poor performance. -2022-10-06 15:37:59,640 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: -2022-10-06 15:37:59,640 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:327 - Use `rpk config set ` to change values below: -2022-10-06 15:37:59,640 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.metrics_reporter_report_interval:86400000 - cluster metrics reporter report interval -2022-10-06 15:37:59,640 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.metrics_reporter_tick_interval:60000 - Cluster metrics reporter tick interval -2022-10-06 15:37:59,641 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.leader_balancer_idle_timeout:120000 - Leadership rebalancing idle timeout -2022-10-06 15:37:59,641 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.full_raft_configuration_recovery_pattern:{} - Recover raft configuration on start for NTPs matching pattern -2022-10-06 15:37:59,641 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_qdc_min_depth:1 - Minimum queue depth used in kafka queue depth control. -2022-10-06 15:37:59,642 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_qdc_idle_depth:10 - Queue depth when idleness is detected in kafka queue depth control. -2022-10-06 15:37:59,642 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.health_manager_tick_interval:180000 - How often the health manager runs -2022-10-06 15:37:59,642 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_qdc_max_latency_ms:80 - Max latency threshold for kafka queue depth control depth tracking. -2022-10-06 15:37:59,642 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_qdc_depth_alpha:0.8 - Smoothing factor for kafka queue depth control depth tracking. -2022-10-06 15:37:59,643 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_qdc_window_count:12 - Number of windows used in kafka queue depth control latency tracking. -2022-10-06 15:37:59,643 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.superusers:{} - List of superuser usernames -2022-10-06 15:37:59,643 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_cache_check_interval:30000 - Timeout to check if cache eviction should be triggered -2022-10-06 15:37:59,643 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_cache_size:21474836480 - Max size of archival cache -2022-10-06 15:37:59,644 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_upload_ctrl_d_coeff:0 - derivative coefficient for upload PID controller. -2022-10-06 15:37:59,644 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_qdc_enable:0 - Enable kafka queue depth control. -2022-10-06 15:37:59,644 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_upload_ctrl_p_coeff:-2 - proportional coefficient for upload PID controller -2022-10-06 15:37:59,644 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_upload_ctrl_update_interval_ms:60000 - -2022-10-06 15:37:59,645 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_max_connection_idle_time_ms:5000 - Max https connection idle time (ms) -2022-10-06 15:37:59,645 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_segment_upload_timeout_ms:30000 - Log segment upload timeout (ms) -2022-10-06 15:37:59,645 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_trust_file:{nullopt} - Path to certificate that should be used to validate server certificate during TLS handshake -2022-10-06 15:37:59,646 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_api_endpoint_port:443 - TLS port override -2022-10-06 15:37:59,646 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_disable_tls:0 - Disable TLS for all S3 connections -2022-10-06 15:37:59,646 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_reconciliation_interval_ms:10000 - Interval at which the archival service runs reconciliation (ms) -2022-10-06 15:37:59,646 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_api_endpoint:{nullopt} - Optional API endpoint -2022-10-06 15:37:59,647 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_secret_key:{nullopt} - AWS secret key -2022-10-06 15:37:59,647 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_enable_remote_write:0 - Enable remote write for all topics -2022-10-06 15:37:59,647 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_qdc_window_size_ms:1500 - Window size for kafka queue depth control latency tracking. -2022-10-06 15:37:59,648 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_enable_remote_read:0 - Enable remote read for all topics -2022-10-06 15:37:59,648 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.members_backend_retry_ms:5000 - Time between members backend reconciliation loop retries -2022-10-06 15:37:59,648 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.compaction_ctrl_max_shares:1000 - maximum number of IO and CPU shares that compaction process can use -2022-10-06 15:37:59,648 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.compaction_ctrl_min_shares:10 - minimum number of IO and CPU shares that compaction process can use -2022-10-06 15:37:59,649 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.compaction_ctrl_d_coeff:0.2 - derivative coefficient for compaction PID controller. -2022-10-06 15:37:59,649 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.compaction_ctrl_i_coeff:0 - integral coefficient for compaction PID controller. -2022-10-06 15:37:59,650 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_qdc_depth_update_ms:7000 - Update frequency for kafka queue depth control. -2022-10-06 15:37:59,650 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37: -INFO 2022-10-06 13:37:59,650 [shard 0] redpanda::main - application.cc:654 - Partition manager started -2022-10-06 15:37:59,650 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: 59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.compaction_ctrl_p_coeff:-12.5 - proportional coefficient for compaction PID controller. This has to be negative since compaction backlog should decrease when number of compaction shares increases -2022-10-06 15:37:59,650 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.compaction_ctrl_update_interval_ms:30000 - -2022-10-06 15:37:59,651 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.enable_auto_rebalance_on_node_add:0 - Enable automatic partition rebalancing when new nodes are added -2022-10-06 15:37:59,651 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.node_management_operation_timeout_ms:5000 - Timeout for executing node management operations -2022-10-06 15:37:59,651 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.leader_balancer_mute_timeout:300000 - Leadership rebalancing mute timeout -2022-10-06 15:37:59,652 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.id_allocator_batch_size:1000 - Id allocator allocates messages in batches (each batch is a one log record) and then serves requests from memory without touching the log until the batch is exhausted. -2022-10-06 15:37:59,652 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.id_allocator_log_capacity:100 - Capacity of the id_allocator log in number of messages. Once it reached id_allocator_stm should compact the log. -2022-10-06 15:37:59,652 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.raft_transfer_leader_recovery_timeout_ms:10000 - Timeout waiting for follower recovery when transferring leadership -2022-10-06 15:37:59,653 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.reclaim_max_size:4194304 - Maximum batch cache reclaim size -2022-10-06 15:37:59,653 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.fetch_session_eviction_timeout_ms:60000 - Minimum time before which unused session will get evicted from sessions. Maximum time after which inactive session will be deleted is two time given configuration valuecache -2022-10-06 15:37:59,653 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.segment_appender_flush_timeout_ms:1000 - Maximum delay until buffered data is written -2022-10-06 15:37:59,653 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.retention_bytes:{nullopt} - Default max bytes per partition on disk before triggering a compaction -2022-10-06 15:37:59,653 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.join_retry_timeout_ms:5000 - Time between cluster join retries in milliseconds -2022-10-06 15:37:59,654 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.enable_admin_api:1 - Enable the admin API -2022-10-06 15:37:59,654 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.raft_io_timeout_ms:10000 - Raft I/O timeout -2022-10-06 15:37:59,654 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.zstd_decompress_workspace_bytes:8388608 - Size of the zstd decompression workspace -2022-10-06 15:37:59,654 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.compaction_ctrl_backlog_size:{nullopt} - target backlog size for compaction controller. if not set compaction target compaction backlog would be equal to -2022-10-06 15:37:59,654 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.append_chunk_size:16384 - Size of direct write operations to disk -2022-10-06 15:37:59,655 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.auto_create_topics_enabled:1 - Allow topic auto creation -2022-10-06 15:37:59,655 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.reclaim_stable_window:10000 - Length of time above which growth is reset -2022-10-06 15:37:59,655 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.enable_pid_file:1 - Enable pid file. You probably don't want to change this. -2022-10-06 15:37:59,655 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_group_recovery_timeout_ms:30000 - Kafka group recovery timeout expressed in milliseconds -INFO 2022-10-06 13:37:59,655 [shard 0] cluster - raft0_utils.h:32 - Current node is cluster root -2022-10-06 15:37:59,655 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.reclaim_growth_window:3000 - Length of time in which reclaim sizes grow -2022-10-06 15:37:59,656 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.raft_smp_max_non_local_requests:0 - Maximum number of x-core requests pending in Raft seastar::smp group. (for more details look at `seastar::smp_service_group` documentation) -2022-10-06 15:37:59,656 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.raft_timeout_now_timeout_ms:1000 - Timeout for a timeout now request -2022-10-06 15:37:59,656 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.recovery_append_timeout_ms:5000 - Timeout for append entries requests issued while updating stale follower -2022-10-06 15:37:59,656 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.health_monitor_tick_interval:10000 - How often health monitor refresh cluster state -2022-10-06 15:37:59,656 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.internal_topic_replication_factor:3 - Target replication factor for internal topics -2022-10-06 15:37:59,657 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.replicate_append_timeout_ms:3000 - Timeout for append entries requests issued while replicating entries -2022-10-06 15:37:59,657 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.log_segment_size:1073741824 - How large in bytes should each log segment be (default 1G) -2022-10-06 15:37:59,657 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.disable_batch_cache:0 - Disable batch cache in log manager -2022-10-06 15:37:59,657 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.election_timeout_ms:1500 - Election timeout expressed in milliseconds -2022-10-06 15:37:59,657 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.default_topic_partitions:1 - Default number of partitions per topic -2022-10-06 15:37:59,658 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.wait_for_leader_timeout_ms:5000 - Timeout (ms) to wait for leadership in metadata cache -2022-10-06 15:37:59,658 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_qdc_max_depth:100 - Maximum queue depth used in kafka queue depth control. -2022-10-06 15:37:59,658 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cluster_id:{nullopt} - Cluster identifier -2022-10-06 15:37:59,658 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.transaction_coordinator_delete_retention_ms:604800000 - delete segments older than this - default 1 week -2022-10-06 15:37:59,658 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.storage_read_buffer_size:131072 - Size of each read buffer (one per in-flight read, per log segment) -2022-10-06 15:37:59,659 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.metadata_status_wait_timeout_ms:2000 - Maximum time to wait in metadata request for cluster health to be refreshed -2022-10-06 15:37:59,659 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.transaction_coordinator_cleanup_policy:delete - Cleanup policy for a transaction coordinator topic -2022-10-06 15:37:59,659 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.max_kafka_throttle_delay_ms:60000 - Fail-safe maximum throttle delay on kafka requests -2022-10-06 15:37:59,659 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.enable_idempotence:1 - Enable idempotent producer -2022-10-06 15:37:59,659 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13 -2022-10-06 15:37:59,659 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: :37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.id_allocator_replication:1 - Replication factor for an id allocator topic -2022-10-06 15:37:59,659 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.abort_timed_out_transactions_interval_ms:60000 - How often look for the inactive transactions and abort them -2022-10-06 15:37:59,659 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_upload_ctrl_min_shares:100 - minimum number of IO and CPU shares that archival upload can use -2022-10-06 15:37:59,660 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.default_topic_replications:1 - Default replication factor for new topics -2022-10-06 15:37:59,660 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.rpc_server_listen_backlog:{nullopt} - TCP connection queue length for Kafka server and internal RPC server -2022-10-06 15:37:59,660 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.group_topic_partitions:1 - Number of partitions in the internal group membership topic -2022-10-06 15:37:59,660 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.log_compaction_interval_ms:10000 - How often do we trigger background compaction -2022-10-06 15:37:59,660 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_enabled:0 - Enable archival storage -2022-10-06 15:37:59,661 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.delete_retention_ms:604800000 - delete segments older than this - default 1 week -2022-10-06 15:37:59,661 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.abort_index_segment_size:50000 - Capacity (in number of txns) of an abort index segment -2022-10-06 15:37:59,661 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_bucket:{nullopt} - AWS bucket that should be used to store data -2022-10-06 15:37:59,661 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.enable_transactions:1 - Enable transactions -2022-10-06 15:37:59,661 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.metrics_reporter_url:https://m.rp.vectorized.io/v2 - cluster metrics reporter url -2022-10-06 15:37:59,661 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.coproc_max_batch_size:32768 - Maximum amount of bytes to read from one topic read -2022-10-06 15:37:59,662 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.transaction_coordinator_replication:1 - Replication factor for a transaction coordinator topic -2022-10-06 15:37:59,662 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.metadata_dissemination_retry_delay_ms:320 - Delay before retry a topic lookup in a shard or other meta tables -2022-10-06 15:37:59,662 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.log_message_timestamp_type:CreateTime - Default topic messages timestamp type -2022-10-06 15:37:59,662 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.reclaim_min_size:131072 - Minimum batch cache reclaim size -2022-10-06 15:37:59,662 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_max_connections:20 - Max number of simultaneous uploads to S3 -2022-10-06 15:37:59,662 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.raft_replicate_batch_window_size:1048576 - Max size of requests cached for replication -2022-10-06 15:37:59,663 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.quota_manager_gc_sec:30000 - Quota manager GC frequency in milliseconds -2022-10-06 15:37:59,663 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.rm_violation_recovery_policy:crash - Describes how to recover from an invariant violation happened on the partition level -2022-10-06 15:37:59,663 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.coproc_max_ingest_bytes:655360 - Maximum amount of data to hold from input logs in memory -2022-10-06 15:37:59,663 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.alter_topic_cfg_timeout_ms:5000 - Time to wait for entries replication in controller log when executing alter configuration requst -2022-10-06 15:37:59,663 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_qdc_latency_alpha:0.002 - Smoothing parameter for kafka queue depth control latency tracking. -2022-10-06 15:37:59,663 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.log_cleanup_policy:delete - Default topic cleanup policy -2022-10-06 15:37:59,663 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.enable_metrics_reporter:1 - Enable cluster metrics reporter -2022-10-06 15:37:59,664 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.health_monitor_max_metadata_age:10000 - Max age of metadata cached in the health monitor of non controller node -2022-10-06 15:37:59,664 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.raft_heartbeat_interval_ms:150 - Milliseconds for raft leader heartbeats -2022-10-06 15:37:59,664 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_segment_max_upload_interval_sec:{nullopt} - Time that segment can be kept locally without uploading it to the remote storage (sec) -2022-10-06 15:37:59,664 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.readers_cache_eviction_timeout_ms:30000 - Duration after which inactive readers will be evicted from cache -2022-10-06 15:37:59,664 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.enable_coproc:0 - Enable coprocessing mode -2022-10-06 15:37:59,664 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.log_compression_type:producer - Default topic compression type -2022-10-06 15:37:59,665 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.fetch_reads_debounce_timeout:1 - Time to wait for next read in fetch request when requested min bytes wasn't reached -2022-10-06 15:37:59,665 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.release_cache_on_segment_roll:0 - Free cache when segments roll -2022-10-06 15:37:59,665 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kvstore_flush_interval:10 - Key-value store flush interval (ms) -2022-10-06 15:37:59,665 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.max_compacted_log_segment_size:5368709120 - Max compacted segment size after consolidation -2022-10-06 15:37:59,665 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.rm_sync_timeout_ms:10000 - Time to wait state catch up before rejecting a request -2022-10-06 15:37:59,665 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.transaction_coordinator_log_segment_size:1073741824 - How large in bytes should each log segment be (default 1G) -2022-10-06 15:37:59,665 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.tm_violation_recovery_policy:crash - Describes how to recover from an invariant violation happened on the transaction coordinator level -INFO 2022-10-06 13:37:59,665 [shard 0] storage - segment.cc:635 - Creating new segment /var/lib/redpanda/data/redpanda/kvstore/0_0/0-0-v1.log -2022-10-06 15:37:59,666 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.group_new_member_join_timeout:30000 - Timeout for new member joins -2022-10-06 15:37:59,666 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_manifest_upload_timeout_ms:10000 - Manifest upload timeout (ms) -2022-10-06 15:37:59,666 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.storage_read_readahead_count:10 - How many additional reads to issue ahead of current read location -2022-10-06 15:37:59,666 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.group_initial_rebalance_delay:300 - Extra del -2022-10-06 15:37:59,666 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: ay (ms) added to rebalance phase to wait for new members -2022-10-06 15:37:59,666 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.group_max_session_timeout_ms:300000 - The maximum allowed session timeout for registered consumers. Longer timeouts give consumers more time to process messages in between heartbeats at the cost of a longer time to detect failures. -2022-10-06 15:37:59,666 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.raft_learner_recovery_rate:104857600 - Raft learner recovery rate limit in bytes per sec -2022-10-06 15:37:59,667 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_upload_ctrl_max_shares:1000 - maximum number of IO and CPU shares that archival upload can use -2022-10-06 15:37:59,667 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.group_min_session_timeout_ms:6000 - The minimum allowed session timeout for registered consumers. Shorter timeouts result in quicker failure detection at the cost of more frequent consumer heartbeating, which can overwhelm broker resources. -2022-10-06 15:37:59,667 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.controller_backend_housekeeping_interval_ms:1000 - Interval between iterations of controller backend housekeeping loop -2022-10-06 15:37:59,667 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.tm_sync_timeout_ms:10000 - Time to wait state catch up before rejecting a request -2022-10-06 15:37:59,667 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.raft_max_concurrent_append_requests_per_follower:16 - Maximum number of concurrent append entries requests sent by leader to one follower -2022-10-06 15:37:59,667 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.seed_server_meta_topic_partitions: - -2022-10-06 15:37:59,668 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.metadata_dissemination_interval_ms:3000 - Interaval for metadata dissemination batching -2022-10-06 15:37:59,668 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.default_num_windows:10 - Default number of quota tracking windows -2022-10-06 15:37:59,668 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.enable_sasl:0 - Enable SASL authentication for Kafka connections. -2022-10-06 15:37:59,668 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kvstore_max_segment_size:16777216 - Key-value maximum segment size (bytes) -2022-10-06 15:37:59,668 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.min_version: - -2022-10-06 15:37:59,668 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.raft_heartbeat_disconnect_failures:3 - After how many failed heartbeats to forcibly close an unresponsive TCP connection. Set to 0 to disable force disconnection. -2022-10-06 15:37:59,668 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.max_version: - -2022-10-06 15:37:59,669 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.default_window_sec:1000 - Default quota tracking window size in milliseconds -2022-10-06 15:37:59,669 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.fetch_max_bytes:57671680 - Maximum number of bytes returned in fetch request -2022-10-06 15:37:59,669 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.raft_heartbeat_timeout_ms:3000 - raft heartbeat RPC timeout -2022-10-06 15:37:59,669 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_access_key:{nullopt} - AWS access key -2022-10-06 15:37:59,669 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.transactional_id_expiration_ms:604800000 - Producer ids are expired once this time has elapsed after the last write with the given producer id. -2022-10-06 15:37:59,669 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.tx_timeout_delay_ms:1000 - Delay before scheduling next check for timed out transactions -2022-10-06 15:37:59,669 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.coproc_max_inflight_bytes:10485760 - Maximum amountt of inflight bytes when sending data to wasm engine -2022-10-06 15:37:59,669 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.target_quota_byte_rate:2147483648 - Target quota byte rate (bytes per second) - 2GB default -2022-10-06 15:37:59,669 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.create_topic_timeout_ms:2000 - Timeout (ms) to wait for new topic creation -2022-10-06 15:37:59,670 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.metadata_dissemination_retries:30 - Number of attempts of looking up a topic's meta data like shard before failing a request -2022-10-06 15:37:59,670 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.use_scheduling_groups: - -2022-10-06 15:37:59,670 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.disable_metrics:0 - Disable registering metrics -2022-10-06 15:37:59,670 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.rpc_server_tcp_send_buf:{nullopt} - TCP transmit buffer size in bytes. -2022-10-06 15:37:59,670 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.coproc_offset_flush_interval_ms:300000 - Interval for which all coprocessor offsets are flushed to disk -2022-10-06 15:37:59,670 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.enable_leader_balancer:1 - Enable automatic leadership rebalancing -2022-10-06 15:37:59,670 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_initial_backoff_ms:100 - Initial backoff time for exponetial backoff algorithm (ms) -2022-10-06 15:37:59,671 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.rpc_server_tcp_recv_buf:{nullopt} - TCP receive buffer size in bytes. -2022-10-06 15:37:59,671 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_max_bytes_per_fetch:67108864 - Limit fetch responses to this many bytes, even if total of partition bytes limits is higher -2022-10-06 15:37:59,671 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.developer_mode:1 - Skips most of the checks performed at startup, not recomended for production use -2022-10-06 15:37:59,671 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_region:{nullopt} - AWS region that houses the bucket used for storage -2022-10-06 15:37:59,671 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.compacted_log_segment_size:268435456 - How large in bytes should each compacted log segment be (default 256MiB) -2022-10-06 15:37:59,671 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.advertised_kafka_api:{{OUTSIDE:{host: localhost, port: 49238}}, {PLAINTEXT:{host: f5b812c0f0a4, port: 29092}}} - Address of Kafka API published to the clients -2022-10-06 15:37:59,671 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,626 [shard 0] redpanda::main - application.cc:332 - redpanda.coproc_supervisor_server:{host: 127.0.0.1, port: 43189} - IpAddress and port for supervisor service -2022-10-06 15:37:59,672 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.node_id:{0} - Unique id identifying a node in the cluster -2022-10-06 15:37:59,672 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.admin_api_tls:{} - TLS configuration for admin HTTP server -2022-10-06 15:37:59,672 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_api_tls:{} - TLS configuration for Kafka API endpoint -2022-10-06 15:37:59,672 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.advertised_rpc_api:{nullopt} - Address of RPC endpoint published to other cluster members -2022-10-06 15:37:59,672 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO -2022-10-06 15:37:59,672 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.kafka_api:{{PLAINTEXT:{host: 0.0.0.0, port: 29092}}, {OUTSIDE:{host: 0.0.0.0, port: 9092}}} - Address and port of an interface to listen for Kafka API requests -2022-10-06 15:37:59,673 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.rpc_server_tls:{ enabled: 0 key/cert files: {nullopt} ca file: {nullopt} client_auth_required: 0 } - TLS configuration for RPC server -2022-10-06 15:37:59,673 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.rpc_server:{host: 0.0.0.0, port: 33145} - IpAddress and port for RPC server -2022-10-06 15:37:59,673 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.dashboard_dir:{nullopt} - serve http dashboard on / url -2022-10-06 15:37:59,673 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.admin:{{:{host: 0.0.0.0, port: 9644}}} - Address and port of admin server -2022-10-06 15:37:59,673 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.enable_central_config:0 - Enable central storage + sync of cluster configuration -2022-10-06 15:37:59,673 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.seed_servers:{} - List of the seed servers used to join current cluster. If the seed_server list is empty the node will be a cluster root and it will form a new cluster -2022-10-06 15:37:59,673 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.admin_api_doc_dir:/usr/share/redpanda/admin-api-doc - Admin API doc directory -2022-10-06 15:37:59,674 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.rack:{nullopt} - Rack identifier -2022-10-06 15:37:59,674 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.cloud_storage_cache_directory:{nullopt} - Directory for archival cache. Should be present when `cloud_storage_enabled` is present -2022-10-06 15:37:59,674 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - redpanda.data_directory:{data_directory="/var/lib/redpanda/data"} - Place where redpanda will keep the data -2022-10-06 15:37:59,674 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy.consumer_instance_timeout_ms:300000 - How long to wait for an idle consumer before removing it -2022-10-06 15:37:59,674 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy.advertised_pandaproxy_api:{} - Rest API address and port to publish to client -2022-10-06 15:37:59,674 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy.api_doc_dir:/usr/share/redpanda/proxy-api-doc - API doc directory -2022-10-06 15:37:59,674 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy.pandaproxy_api_tls:{} - TLS configuration for Pandaproxy api -2022-10-06 15:37:59,674 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy.pandaproxy_api:{{:{host: 0.0.0.0, port: 8082}}} - Rest API listen address and port -2022-10-06 15:37:59,675 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.sasl_mechanism: - The SASL mechanism to use when connecting -2022-10-06 15:37:59,675 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.consumer_heartbeat_interval_ms:500 - Interval (in milliseconds) for consumer heartbeats -2022-10-06 15:37:59,675 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.consumer_rebalance_timeout_ms:2000 - Timeout (in milliseconds) for consumer rebalance -2022-10-06 15:37:59,675 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.consumer_request_max_bytes:1048576 - Max bytes to fetch per request -2022-10-06 15:37:59,675 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.consumer_request_timeout_ms:100 - Interval (in milliseconds) for consumer request timeout -2022-10-06 15:37:59,675 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.scram_username: - Username to use for SCRAM authentication mechanisms -2022-10-06 15:37:59,675 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.produce_batch_delay_ms:100 - Delay (in milliseconds) to wait before sending batch -2022-10-06 15:37:59,676 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.produce_batch_size_bytes:1048576 - Number of bytes to batch before sending to broker -2022-10-06 15:37:59,676 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.consumer_session_timeout_ms:300000 - Timeout (in milliseconds) for consumer session -INFO 2022-10-06 13:37:59,675 [shard 0] cluster - partition_manager.cc:80 - Log created manage completed, ntp: {redpanda/controller/0}, rev: 0, 0 segments, 0 bytes -INFO 2022-10-06 13:37:59,676 [shard 0] raft - [group_id:0, {redpanda/controller/0}] consensus.cc:992 - Starting -2022-10-06 15:37:59,676 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.produce_batch_record_count:1000 - Number of records to batch before sending to broker -INFO 2022-10-06 13:37:59,676 [shard 0] raft - [group_id:0, {redpanda/controller/0}] consensus.cc:1024 - Starting with voted_for {id: {-2147483648}, revision: {-9223372036854775808}} term 0 initial_state true -2022-10-06 15:37:59,676 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.retry_base_backoff_ms:100 - Delay (in milliseconds) for initial retry backoff -2022-10-06 15:37:59,676 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.retries:5 - Number of times to retry a request to a broker -2022-10-06 15:37:59,676 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.scram_password: - Password to use for SCRAM authentication mechanisms -2022-10-06 15:37:59,676 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.broker_tls:{ enabled: 0 key/cert files: {nullopt} ca file: {nullopt} client_auth_required: 0 } - TLS configuration for the brokers -2022-10-06 15:37:59,676 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - pandaproxy_client.brokers:{{host: 0.0.0.0, port: 29092}} - List of address and port of the brokers -2022-10-06 15:37:59,677 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry.api_doc_dir:/usr/share/redpanda/proxy-api-doc - API doc directory -2022-10-06 15:37:59,677 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry.schema_registry_replication_factor:{nullopt} - Replication factor for internal _schemas topic. If unset, defaults to `default_topic_replication` -2022-10-06 15:37:59,677 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry.schema_registry_api_tls:{} - TLS configuration for Schema Registry API -2022-10-06 15:37:59,677 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry.schema_registry_api:{{:{host: 0.0.0.0, port: 8081}}} - Schema Registry API listen address and port -2022-10-06 15:37:59,677 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.sasl_mechanism: - The SASL mechanism to use when connecting -2022-10-06 15:37:59,677 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.consumer_heartbeat_interval_ms:500 - Interval (in milliseconds) for consumer heartbeats -2022-10-06 15:37:59,677 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.consumer_rebalance_timeout_ms:2000 - Timeout (in milliseconds) for consumer rebalance -2022-10-06 15:37:59,677 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.consumer_request_max_bytes:1048576 - Max bytes to fetch per request -2022-10-06 15:37:59,678 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.consumer_request_timeout_ms:100 - Interval (in milliseconds) for consumer request timeout -2022-10-06 15:37:59,678 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.scram_username: - Username to use for SCRAM authentication mechanisms -2022-10-06 15:37:59,678 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.produce_batch_delay_ms:0 - Delay (in milliseconds) to wait before sending batch -2022-10-06 15:37:59,678 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application. -2022-10-06 15:37:59,678 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: cc:332 - schema_registry_client.produce_batch_size_bytes:0 - Number of bytes to batch before sending to broker -2022-10-06 15:37:59,678 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.consumer_session_timeout_ms:10000 - Timeout (in milliseconds) for consumer session -2022-10-06 15:37:59,678 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.produce_batch_record_count:0 - Number of records to batch before sending to broker -2022-10-06 15:37:59,678 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.retry_base_backoff_ms:100 - Delay (in milliseconds) for initial retry backoff -2022-10-06 15:37:59,679 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.retries:5 - Number of times to retry a request to a broker -2022-10-06 15:37:59,679 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.scram_password: - Password to use for SCRAM authentication mechanisms -2022-10-06 15:37:59,679 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.broker_tls:{ enabled: 0 key/cert files: {nullopt} ca file: {nullopt} client_auth_required: 0 } - TLS configuration for the brokers -2022-10-06 15:37:59,679 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] redpanda::main - application.cc:332 - schema_registry_client.brokers:{{host: 0.0.0.0, port: 29092}} - List of address and port of the brokers -2022-10-06 15:37:59,679 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,627 [shard 0] syschecks - Writing pid file "/var/lib/redpanda/data/pid.lock" -2022-10-06 15:37:59,679 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,637 [shard 0] storage - directories.h:33 - Checking `/var/lib/redpanda/data` for supported filesystems -2022-10-06 15:37:59,679 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: ERROR 2022-10-06 13:37:59,637 [shard 0] syschecks - Path: `/var/lib/redpanda/data' is not on XFS. This is a non-supported setup. Expect poor performance. -2022-10-06 15:37:59,679 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,650 [shard 0] redpanda::main - application.cc:654 - Partition manager started -2022-10-06 15:37:59,679 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,655 [shard 0] cluster - raft0_utils.h:32 - Current node is cluster root -2022-10-06 15:37:59,679 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,665 [shard 0] storage - segment.cc:635 - Creating new segment /var/lib/redpanda/data/redpanda/kvstore/0_0/0-0-v1.log -2022-10-06 15:37:59,679 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,675 [shard 0] cluster - partition_manager.cc:80 - Log created manage completed, ntp: {redpanda/controller/0}, rev: 0, 0 segments, 0 bytes -2022-10-06 15:37:59,679 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,676 [shard 0] raft - [group_id:0, {redpanda/controller/0}] consensus.cc:992 - Starting -2022-10-06 15:37:59,680 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,676 [shard 0] raft - [group_id:0, {redpanda/controller/0}] consensus.cc:1024 - Starting with voted_for {id: {-2147483648}, revision: {-9223372036854775808}} term 0 initial_state true -INFO 2022-10-06 13:37:59,698 [shard 0] raft - [group_id:0, {redpanda/controller/0}] consensus.cc:1066 - Read bootstrap state: data_seen 0 config_seen 0 eol false commit 0 term 0 prev_idx 0 prev_term 0 config_tracker -9223372036854775808 commit_base_tracker -9223372036854775808 configurations {} -INFO 2022-10-06 13:37:59,698 [shard 0] raft - [group_id:0, {redpanda/controller/0}] consensus.cc:1067 - Current log offsets: {start_offset:-9223372036854775808, committed_offset:-9223372036854775808, committed_offset_term:-9223372036854775808, dirty_offset:-9223372036854775808, dirty_offset_term:-9223372036854775808, last_term_start_offset:-9223372036854775808} -INFO 2022-10-06 13:37:59,698 [shard 0] raft - [group_id:0, {redpanda/controller/0}] consensus.cc:1091 - Truncating configurations at -9223372036854775808 -2022-10-06 15:37:59,698 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,698 [shard 0] raft - [group_id:0, {redpanda/controller/0}] consensus.cc:1066 - Read bootstrap state: data_seen 0 config_seen 0 eol false commit 0 term 0 prev_idx 0 prev_term 0 config_tracker -9223372036854775808 commit_base_tracker -9223372036854775808 configurations {} -2022-10-06 15:37:59,698 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,698 [shard 0] raft - [group_id:0, {redpanda/controller/0}] consensus.cc:1067 - Current log offsets: {start_offset:-9223372036854775808, committed_offset:-9223372036854775808, committed_offset_term:-9223372036854775808, dirty_offset:-9223372036854775808, dirty_offset_term:-9223372036854775808, last_term_start_offset:-9223372036854775808} -2022-10-06 15:37:59,699 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,698 [shard 0] raft - [group_id:0, {redpanda/controller/0}] consensus.cc:1091 - Truncating configurations at -9223372036854775808 -INFO 2022-10-06 13:37:59,720 [shard 0] raft - [group_id:0, {redpanda/controller/0}] consensus.cc:1188 - started raft, log offsets: {start_offset:-9223372036854775808, committed_offset:-9223372036854775808, committed_offset_term:-9223372036854775808, dirty_offset:-9223372036854775808, dirty_offset_term:-9223372036854775808, last_term_start_offset:-9223372036854775808}, term: 0, configuration: {current: {voters: {{id: {0}, revision: {0}}}, learners: {}}, old:{nullopt}, revision: 0, brokers: {{id: 0, kafka_advertised_listeners: {{OUTSIDE:{host: localhost, port: 49238}}, {PLAINTEXT:{host: f5b812c0f0a4, port: 29092}}}, rpc_address: {host: 0.0.0.0, port: 33145}, rack: {nullopt}, properties: {cores 1, mem_available 0, disk_available 0}, membership_state: active}}} -2022-10-06 15:37:59,721 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,720 [shard 0] raft - [group_id:0, {redpanda/controller/0}] consensus.cc:1188 - started raft, log offsets: {start_offset:-9223372036854775808, committed_offset:-9223372036854775808, committed_offset_term:-9223372036854775808, dirty_offset:-9223372036854775808, dirty_offset_term:-9223372036854775808, last_term_start_offset:-9223372036854775808}, term: 0, configuration: {current: {voters: {{id: {0}, revision: {0}}}, learners: {}}, old:{nullopt}, revision: 0, brokers: {{id: 0, kafka_advertised_listeners: {{OUTSIDE:{host: localhost, port: 49238}}, {PLAINTEXT:{host: f5b812c0f0a4, port: 29092}}}, rpc_address: {host: 0.0.0.0, port: 33145}, rack: {nullopt}, properties: {cores 1, mem_available 0, disk_available 0}, membership_state: active}}} -INFO 2022-10-06 13:37:59,731 [shard 0] cluster - members_manager.cc:72 - starting cluster::members_manager... -INFO 2022-10-06 13:37:59,731 [shard 0] cluster - state_machine.cc:29 - Starting state machine for ntp={redpanda/controller/0} -INFO 2022-10-06 13:37:59,732 [shard 0] cluster - leader_balancer.cc:92 - Leader balancer: controller leadership lost -2022-10-06 15:37:59,732 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,731 [shard 0] cluster - members_manager.cc:72 - starting cluster::members_manager... -INFO 2022-10-06 13:37:59,732 [shard 0] redpanda::main - application.cc:1114 - Started RPC server listening at {host: 0.0.0.0, port: 33145} -2022-10-06 15:37:59,732 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,731 [shard 0] cluster - state_machine.cc:29 - Starting state machine for ntp={redpanda/controller/0} -INFO 2022-10-06 13:37:59,732 [shard 0] redpanda::main - application.cc:1174 - Started Kafka API server listening at {{PLAINTEXT:{host: 0.0.0.0, port: 29092}}, {OUTSIDE:{host: 0.0.0.0, port: 9092}}} -2022-10-06 15:37:59,732 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,732 [shard 0] cluster - leader_balancer.cc:92 - Leader balancer: controller leadership lost -INFO 2022-10-06 13:37:59,732 [shard 0] raft - [group_id:0, {redpanda/controller/0}] vote_stm.cc:252 - became the leader term:1 -INFO 2022-10-06 13:37:59,732 [shard 0] cluster - leader_balancer.cc:86 - Leader balancer: controller leadership detected. Starting rebalancer in 30 seconds -2022-10-06 15:37:59,732 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,732 [shard 0] redpanda::main - application.cc:1114 - Started RPC server listening at {host: 0.0.0.0, port: 33145} -INFO 2022-10-06 13:37:59,732 [shard 0] storage - segment.cc:635 - Creating new segment /var/lib/redpanda/data/redpanda/controller/0_0/0-1-v1.log -2022-10-06 15:37:59,733 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,732 [shard 0] redpanda::main - application.cc:1174 - Started Kafka API server listening at {{PLAINTEXT:{host: 0.0.0.0, port: 29092}}, {OUTSIDE:{host: 0.0.0.0, port: 9092}}} -INFO 2022-10-06 13:37:59,732 [shard 0] admin_api_server - admin_server.cc:96 - Started HTTP admin service listening at {{:{host: 0.0.0.0, port: 9644}}} -INFO 2022-10-06 13:37:59,733 [shard 0] redpanda::main - application.cc:1013 - Started Pandaproxy listening at {{:{host: 0.0.0.0, port: 8082}}} -2022-10-06 15:37:59,733 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,732 [shard 0] raft - [group_id:0, {redpanda/controller/0}] vote_stm.cc:252 - became the leader term:1 -2022-10-06 15:37:59,733 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,732 [shard 0] cluster - leader_balancer.cc:86 - Leader balancer: controller leadership detected. Starting rebalancer in 30 seconds -2022-10-06 15:37:59,733 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,732 [shard 0] storage - segment.cc:635 - Creating new segment /var/lib/redpanda/data/redpanda/controller/0_0/0-1-v1.log -2022-10-06 15:37:59,733 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,732 [shard 0] admin_api_server - admin_server.cc:96 - Started HTTP admin service listening at {{:{host: 0.0.0.0, port: 9644}}} -2022-10-06 15:37:59,733 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,733 [shard 0] redpanda::main - application.cc:1013 - Started Pandaproxy listening at {{:{host: 0.0.0.0, port: 8082}}} -2022-10-06 15:37:59,733 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,733 [shard 0] redpanda::main - application.cc:1021 - Started Schema Registry listening at {{:{host: 0.0.0.0, port: 8081}}} -INFO 2022-10-06 13:37:59,733 [shard 0] redpanda::main - application.cc:1021 - Started Schema Registry listening at {{:{host: 0.0.0.0, port: 8081}}} -INFO 2022-10-06 13:37:59,733 [shard 0] redpanda::main - application.cc:1026 - Successfully started Redpanda! -2022-10-06 15:37:59,733 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:37:59,733 [shard 0] redpanda::main - application.cc:1026 - Successfully started Redpanda! -2022-10-06 15:37:59,743 INFO [🐳 .11.8]] (pool-3-thread-1) Container vectorized/redpanda:v21.11.8 started in PT1.336889165S -2022-10-06 15:37:59,743 INFO [org.kie.kog.tes.KogitoKafkaContainer] (pool-3-thread-1) Kafka servers: OUTSIDE://localhost:49238 -Executing "/usr/lib/jvm/java-17-openjdk-17.0.4.1.1-1.fc36.x86_64/bin/java -Dquarkus.http.port=0 -Dquarkus.http.ssl-port=8444 -Dtest.url=http://localhost:0 -Dquarkus.log.file.path=/home/ftirados/git/kogito-examples/kogito-quarkus-examples/ruleunit-event-driven-quarkus/target/test-run/target/quarkus.log -Dquarkus.log.file.enable=true -Dkafka.bootstrap.servers=localhost:49238 -jar /home/ftirados/git/kogito-examples/kogito-quarkus-examples/ruleunit-event-driven-quarkus/target/quarkus-app/quarkus-run.jar" -__ ____ __ _____ ___ __ ____ ______ - --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ - -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \ ---\___\_\____/_/ |_/_/|_/_/|_|\____/___/ -2022-10-06 15:38:00,016 WARN [io.qua.config] (main) Unrecognized configuration key "quarkus.swagger-ui.always-include" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo -2022-10-06 15:38:00,480 INFO [io.sma.rea.mes.kafka] (main) SRMSG18229: Configured topics for channel 'kogito_incoming_stream': [ruleunit-event-driven-requests] -2022-10-06 15:38:00,486 INFO [io.sma.rea.mes.kafka] (main) SRMSG18214: Key deserializer omitted, using String as default -2022-10-06 15:38:00,638 INFO [io.sma.rea.mes.kafka] (main) SRMSG18258: Kafka producer kafka-producer-kogito_outgoing_stream, connected to Kafka brokers 'localhost:49238', is configured to write records to 'ruleunit-event-driven-responses' -2022-10-06 15:38:00,678 INFO [io.sma.rea.mes.kafka] (smallrye-kafka-consumer-thread-0) SRMSG18257: Kafka consumer kafka-consumer-kogito_incoming_stream, connected to Kafka brokers 'localhost:49238', belongs to the 'ruleunit-event-driven-example' consumer group and is configured to poll records from [ruleunit-event-driven-requests] -INFO 2022-10-06 13:38:00,821 [shard 0] cluster - topics_frontend.cc:71 - Create topics {{configuration: { topic: {ns: {kafka}, topic: {ruleunit-event-driven-requests}}, partition_count: 1, replication_factor: 1, properties: { compression: {nullopt}, cleanup_policy_bitflags: {nullopt}, compaction_strategy: {nullopt}, retention_bytes: {}, retention_duration_ms: {}, segment_size: {nullopt}, timestamp_type: {nullopt}, recovery_enabled: {nullopt}, shadow_indexing: {nullopt} }}, custom_assignments: {}}} -2022-10-06 15:38:00,821 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,821 [shard 0] cluster - topics_frontend.cc:71 - Create topics {{configuration: { topic: {ns: {kafka}, topic: {ruleunit-event-driven-requests}}, partition_count: 1, replication_factor: 1, properties: { compression: {nullopt}, cleanup_policy_bitflags: {nullopt}, compaction_strategy: {nullopt}, retention_bytes: {}, retention_duration_ms: {}, segment_size: {nullopt}, timestamp_type: {nullopt}, recovery_enabled: {nullopt}, shadow_indexing: {nullopt} }}, custom_assignments: {}}} -INFO 2022-10-06 13:38:00,845 [shard 0] cluster - partition_manager.cc:80 - Log created manage completed, ntp: {kafka/ruleunit-event-driven-requests/0}, rev: 2, 0 segments, 0 bytes -INFO 2022-10-06 13:38:00,845 [shard 0] raft - [group_id:1, {kafka/ruleunit-event-driven-requests/0}] consensus.cc:992 - Starting -INFO 2022-10-06 13:38:00,845 [shard 0] raft - [group_id:1, {kafka/ruleunit-event-driven-requests/0}] consensus.cc:1024 - Starting with voted_for {id: {-2147483648}, revision: {-9223372036854775808}} term 0 initial_state true -2022-10-06 15:38:00,845 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,845 [shard 0] cluster - partition_manager.cc:80 - Log created manage completed, ntp: {kafka/ruleunit-event-driven-requests/0}, rev: 2, 0 segments, 0 bytes -2022-10-06 15:38:00,845 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,845 [shard 0] raft - [group_id:1, {kafka/ruleunit-event-driven-requests/0}] consensus.cc:992 - Starting -2022-10-06 15:38:00,845 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,845 [shard 0] raft - [group_id:1, {kafka/ruleunit-event-driven-requests/0}] consensus.cc:1024 - Starting with voted_for {id: {-2147483648}, revision: {-9223372036854775808}} term 0 initial_state true -2022-10-06 15:38:00,861 INFO [org.kie.kog.add.qua.mes.com.AbstractQuarkusCloudEventReceiver] (main) Subscribing consumer for class class org.kie.kogito.queries.LoanUnit -2022-10-06 15:38:00,863 INFO [org.kie.kog.add.qua.mes.com.AbstractQuarkusCloudEventReceiver] (main) Subscribing consumer for class class org.kie.kogito.queries.LoanUnit -2022-10-06 15:38:00,866 INFO [org.kie.kog.add.qua.mes.com.QuarkusKogitoExtensionInitializer] (main) Registered Kogito CloudEvent extension -INFO 2022-10-06 13:38:00,867 [shard 0] offset_translator - ntp: {kafka/ruleunit-event-driven-requests/0} - offset_translator.cc:90 - resetting offset translation state -2022-10-06 15:38:00,867 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,867 [shard 0] offset_translator - ntp: {kafka/ruleunit-event-driven-requests/0} - offset_translator.cc:90 - resetting offset translation state -2022-10-06 15:38:00,868 INFO [org.kie.kog.add.qua.mes.com.AbstractQuarkusCloudEventReceiver] (main) Subscribing consumer for class class org.kie.kogito.queries.LoanUnit -INFO 2022-10-06 13:38:00,889 [shard 0] offset_translator - ntp: {kafka/ruleunit-event-driven-requests/0} - offset_translator.cc:141 - started, state: {base offset/delta: {-9223372036854775808}/0, map size: 1, last delta: 0}, highest_known_offset: -9223372036854775808 -INFO 2022-10-06 13:38:00,889 [shard 0] raft - [group_id:1, {kafka/ruleunit-event-driven-requests/0}] consensus.cc:1066 - Read bootstrap state: data_seen 0 config_seen 0 eol false commit 0 term 0 prev_idx 0 prev_term 0 config_tracker -9223372036854775808 commit_base_tracker -9223372036854775808 configurations {} -INFO 2022-10-06 13:38:00,889 [shard 0] raft - [group_id:1, {kafka/ruleunit-event-driven-requests/0}] consensus.cc:1067 - Current log offsets: {start_offset:-9223372036854775808, committed_offset:-9223372036854775808, committed_offset_term:-9223372036854775808, dirty_offset:-9223372036854775808, dirty_offset_term:-9223372036854775808, last_term_start_offset:-9223372036854775808} -INFO 2022-10-06 13:38:00,889 [shard 0] raft - [group_id:1, {kafka/ruleunit-event-driven-requests/0}] consensus.cc:1091 - Truncating configurations at -9223372036854775808 -2022-10-06 15:38:00,890 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,889 [shard 0] offset_translator - ntp: {kafka/ruleunit-event-driven-requests/0} - offset_translator.cc:141 - started, state: {base offset/delta: {-9223372036854775808}/0, map size: 1, last delta: 0}, highest_known_offset: -9223372036854775808 -2022-10-06 15:38:00,890 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,889 [shard 0] raft - [group_id:1, {kafka/ruleunit-event-driven-requests/0}] consensus.cc:1066 - Read bootstrap state: data_seen 0 config_seen 0 eol false commit 0 term 0 prev_idx 0 prev_term 0 config_tracker -9223372036854775808 commit_base_tracker -9223372036854775808 configurations {} -2022-10-06 15:38:00,890 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,889 [shard 0] raft - [group_id:1, {kafka/ruleunit-event-driven-requests/0}] consensus.cc:1067 - Current log offsets: {start_offset:-9223372036854775808, committed_offset:-9223372036854775808, committed_offset_term:-9223372036854775808, dirty_offset:-9223372036854775808, dirty_offset_term:-9223372036854775808, last_term_start_offset:-9223372036854775808} -2022-10-06 15:38:00,890 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,889 [shard 0] raft - [group_id:1, {kafka/ruleunit-event-driven-requests/0}] consensus.cc:1091 - Truncating configurations at -9223372036854775808 -INFO 2022-10-06 13:38:00,911 [shard 0] offset_translator - ntp: {kafka/ruleunit-event-driven-requests/0} - offset_translator.cc:203 - synced with log, state: {base offset/delta: {-9223372036854775808}/0, map size: 1, last delta: 0}, highest_known_offset: -9223372036854775808 -INFO 2022-10-06 13:38:00,911 [shard 0] raft - [group_id:1, {kafka/ruleunit-event-driven-requests/0}] consensus.cc:1188 - started raft, log offsets: {start_offset:-9223372036854775808, committed_offset:-9223372036854775808, committed_offset_term:-9223372036854775808, dirty_offset:-9223372036854775808, dirty_offset_term:-9223372036854775808, last_term_start_offset:-9223372036854775808}, term: 0, configuration: {current: {voters: {{id: {0}, revision: {2}}}, learners: {}}, old:{nullopt}, revision: 2, brokers: {{id: 0, kafka_advertised_listeners: {{OUTSIDE:{host: localhost, port: 49238}}, {PLAINTEXT:{host: f5b812c0f0a4, port: 29092}}}, rpc_address: {host: 0.0.0.0, port: 33145}, rack: {nullopt}, properties: {cores 1, mem_available 0, disk_available 0}, membership_state: active}}} -INFO 2022-10-06 13:38:00,911 [shard 0] cluster - state_machine.cc:29 - Starting state machine for ntp={kafka/ruleunit-event-driven-requests/0} -INFO 2022-10-06 13:38:00,911 [shard 0] cluster - controller_backend.cc:437 - partition operation {type: addition, ntp: {kafka/ruleunit-event-driven-requests/0}, offset: 2, new_assignment: { id: 0, group_id: 1, replicas: {{node_id: 0, shard: 0}} }, previous_assignment: {nullopt}} finished -2022-10-06 15:38:00,912 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,911 [shard 0] offset_translator - ntp: {kafka/ruleunit-event-driven-requests/0} - offset_translator.cc:203 - synced with log, state: {base offset/delta: {-9223372036854775808}/0, map size: 1, last delta: 0}, highest_known_offset: -9223372036854775808 -2022-10-06 15:38:00,912 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,911 [shard 0] raft - [group_id:1, {kafka/ruleunit-event-driven-requests/0}] consensus.cc:1188 - started raft, log offsets: {start_offset:-9223372036854775808, committed_offset:-9223372036854775808, committed_offset_term:-9223372036854775808, dirty_offset:-9223372036854775808, dirty_offset_term:-9223372036854775808, last_term_start_offset:-9223372036854775808}, term: 0, configuration: {current: {voters: {{id: {0}, revision: {2}}}, learners: {}}, old:{nullopt}, revision: 2, brokers: {{id: 0, kafka_advertised_listeners: {{OUTSIDE:{host: localhost, port: 49238}}, {PLAINTEXT:{host: f5b812c0f0a4, port: 29092}}}, rpc_address: {host: 0.0.0.0, port: 33145}, rack: {nullopt}, properties: {cores 1, mem_available 0, disk_available 0}, membership_state: active}}} -2022-10-06 15:38:00,912 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,911 [shard 0] cluster - state_machine.cc:29 - Starting state machine for ntp={kafka/ruleunit-event-driven-requests/0} -2022-10-06 15:38:00,912 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,911 [shard 0] cluster - controller_backend.cc:437 - partition operation {type: addition, ntp: {kafka/ruleunit-event-driven-requests/0}, offset: 2, new_assignment: { id: 0, group_id: 1, replicas: {{node_id: 0, shard: 0}} }, previous_assignment: {nullopt}} finished -INFO 2022-10-06 13:38:00,922 [shard 0] raft - [group_id:1, {kafka/ruleunit-event-driven-requests/0}] vote_stm.cc:252 - became the leader term:1 -INFO 2022-10-06 13:38:00,923 [shard 0] storage - segment.cc:635 - Creating new segment /var/lib/redpanda/data/kafka/ruleunit-event-driven-requests/0_2/0-1-v1.log -2022-10-06 15:38:00,923 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,922 [shard 0] raft - [group_id:1, {kafka/ruleunit-event-driven-requests/0}] vote_stm.cc:252 - became the leader term:1 -2022-10-06 15:38:00,923 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,923 [shard 0] storage - segment.cc:635 - Creating new segment /var/lib/redpanda/data/kafka/ruleunit-event-driven-requests/0_2/0-1-v1.log -2022-10-06 15:38:00,924 INFO [io.quarkus] (main) ruleunit-event-driven-quarkus 2.0.0-SNAPSHOT on JVM (powered by Quarkus 2.13.0.Final) started in 1.112s. Listening on: http://0.0.0.0:41805 -2022-10-06 15:38:00,925 INFO [io.quarkus] (main) Profile prod activated. -2022-10-06 15:38:00,925 INFO [io.quarkus] (main) Installed features: [cdi, kafka-client, kogito-addon-events-rules-extension, kogito-addon-messaging-extension, kogito-rules, resteasy, resteasy-jackson, smallrye-context-propagation, smallrye-health, smallrye-reactive-messaging, smallrye-reactive-messaging-kafka, vertx] -INFO 2022-10-06 13:38:00,930 [shard 0] cluster - topics_frontend.cc:71 - Create topics {{configuration: { topic: {ns: {kafka_internal}, topic: {group}}, partition_count: 1, replication_factor: 1, properties: { compression: {nullopt}, cleanup_policy_bitflags: {compact}, compaction_strategy: {nullopt}, retention_bytes: {}, retention_duration_ms: {}, segment_size: {nullopt}, timestamp_type: {nullopt}, recovery_enabled: {nullopt}, shadow_indexing: {nullopt} }}, custom_assignments: {}}} -2022-10-06 15:38:00,930 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,930 [shard 0] cluster - topics_frontend.cc:71 - Create topics {{configuration: { topic: {ns: {kafka_internal}, topic: {group}}, partition_count: 1, replication_factor: 1, properties: { compression: {nullopt}, cleanup_policy_bitflags: {compact}, compaction_strategy: {nullopt}, retention_bytes: {}, retention_duration_ms: {}, segment_size: {nullopt}, timestamp_type: {nullopt}, recovery_enabled: {nullopt}, shadow_indexing: {nullopt} }}, custom_assignments: {}}} -INFO 2022-10-06 13:38:00,938 [shard 0] cluster - partition_manager.cc:80 - Log created manage completed, ntp: {kafka_internal/group/0}, rev: 4, 0 segments, 0 bytes -INFO 2022-10-06 13:38:00,938 [shard 0] raft - [group_id:2, {kafka_internal/group/0}] consensus.cc:992 - Starting -INFO 2022-10-06 13:38:00,938 [shard 0] raft - [group_id:2, {kafka_internal/group/0}] consensus.cc:1024 - Starting with voted_for {id: {-2147483648}, revision: {-9223372036854775808}} term 0 initial_state true -2022-10-06 15:38:00,938 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,938 [shard 0] cluster - partition_manager.cc:80 - Log created manage completed, ntp: {kafka_internal/group/0}, rev: 4, 0 segments, 0 bytes -2022-10-06 15:38:00,938 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,938 [shard 0] raft - [group_id:2, {kafka_internal/group/0}] consensus.cc:992 - Starting -2022-10-06 15:38:00,938 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,938 [shard 0] raft - [group_id:2, {kafka_internal/group/0}] consensus.cc:1024 - Starting with voted_for {id: {-2147483648}, revision: {-9223372036854775808}} term 0 initial_state true -INFO 2022-10-06 13:38:00,956 [shard 0] raft - [group_id:2, {kafka_internal/group/0}] consensus.cc:1066 - Read bootstrap state: data_seen 0 config_seen 0 eol false commit 0 term 0 prev_idx 0 prev_term 0 config_tracker -9223372036854775808 commit_base_tracker -9223372036854775808 configurations {} -INFO 2022-10-06 13:38:00,956 [shard 0] raft - [group_id:2, {kafka_internal/group/0}] consensus.cc:1067 - Current log offsets: {start_offset:-9223372036854775808, committed_offset:-9223372036854775808, committed_offset_term:-9223372036854775808, dirty_offset:-9223372036854775808, dirty_offset_term:-9223372036854775808, last_term_start_offset:-9223372036854775808} -INFO 2022-10-06 13:38:00,956 [shard 0] raft - [group_id:2, {kafka_internal/group/0}] consensus.cc:1091 - Truncating configurations at -9223372036854775808 -2022-10-06 15:38:00,957 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,956 [shard 0] raft - [group_id:2, {kafka_internal/group/0}] consensus.cc:1066 - Read bootstrap state: data_seen 0 config_seen 0 eol false commit 0 term 0 prev_idx 0 prev_term 0 config_tracker -9223372036854775808 commit_base_tracker -9223372036854775808 configurations {} -2022-10-06 15:38:00,957 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,956 [shard 0] raft - [group_id:2, {kafka_internal/group/0}] consensus.cc:1067 - Current log offsets: {start_offset:-9223372036854775808, committed_offset:-9223372036854775808, committed_offset_term:-9223372036854775808, dirty_offset:-9223372036854775808, dirty_offset_term:-9223372036854775808, last_term_start_offset:-9223372036854775808} -2022-10-06 15:38:00,957 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,956 [shard 0] raft - [group_id:2, {kafka_internal/group/0}] consensus.cc:1091 - Truncating configurations at -9223372036854775808 -INFO 2022-10-06 13:38:00,978 [shard 0] raft - [group_id:2, {kafka_internal/group/0}] consensus.cc:1188 - started raft, log offsets: {start_offset:-9223372036854775808, committed_offset:-9223372036854775808, committed_offset_term:-9223372036854775808, dirty_offset:-9223372036854775808, dirty_offset_term:-9223372036854775808, last_term_start_offset:-9223372036854775808}, term: 0, configuration: {current: {voters: {{id: {0}, revision: {4}}}, learners: {}}, old:{nullopt}, revision: 4, brokers: {{id: 0, kafka_advertised_listeners: {{OUTSIDE:{host: localhost, port: 49238}}, {PLAINTEXT:{host: f5b812c0f0a4, port: 29092}}}, rpc_address: {host: 0.0.0.0, port: 33145}, rack: {nullopt}, properties: {cores 1, mem_available 0, disk_available 0}, membership_state: active}}} -INFO 2022-10-06 13:38:00,978 [shard 0] cluster - controller_backend.cc:437 - partition operation {type: addition, ntp: {kafka_internal/group/0}, offset: 4, new_assignment: { id: 0, group_id: 2, replicas: {{node_id: 0, shard: 0}} }, previous_assignment: {nullopt}} finished -2022-10-06 15:38:00,978 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,978 [shard 0] raft - [group_id:2, {kafka_internal/group/0}] consensus.cc:1188 - started raft, log offsets: {start_offset:-9223372036854775808, committed_offset:-9223372036854775808, committed_offset_term:-9223372036854775808, dirty_offset:-9223372036854775808, dirty_offset_term:-9223372036854775808, last_term_start_offset:-9223372036854775808}, term: 0, configuration: {current: {voters: {{id: {0}, revision: {4}}}, learners: {}}, old:{nullopt}, revision: 4, brokers: {{id: 0, kafka_advertised_listeners: {{OUTSIDE:{host: localhost, port: 49238}}, {PLAINTEXT:{host: f5b812c0f0a4, port: 29092}}}, rpc_address: {host: 0.0.0.0, port: 33145}, rack: {nullopt}, properties: {cores 1, mem_available 0, disk_available 0}, membership_state: active}}} -2022-10-06 15:38:00,979 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,978 [shard 0] cluster - controller_backend.cc:437 - partition operation {type: addition, ntp: {kafka_internal/group/0}, offset: 4, new_assignment: { id: 0, group_id: 2, replicas: {{node_id: 0, shard: 0}} }, previous_assignment: {nullopt}} finished -INFO 2022-10-06 13:38:00,989 [shard 0] raft - [group_id:2, {kafka_internal/group/0}] vote_stm.cc:252 - became the leader term:1 -INFO 2022-10-06 13:38:00,989 [shard 0] storage - segment.cc:635 - Creating new segment /var/lib/redpanda/data/kafka_internal/group/0_4/0-1-v1.log -2022-10-06 15:38:00,989 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,989 [shard 0] raft - [group_id:2, {kafka_internal/group/0}] vote_stm.cc:252 - became the leader term:1 -2022-10-06 15:38:00,990 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:00,989 [shard 0] storage - segment.cc:635 - Creating new segment /var/lib/redpanda/data/kafka_internal/group/0_4/0-1-v1.log -INFO 2022-10-06 13:38:01,067 [shard 0] kafka - fetch_session_cache.cc:106 - fetch session created: 1 -2022-10-06 15:38:01,067 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:01,067 [shard 0] kafka - fetch_session_cache.cc:106 - fetch session created: 1 -2022-10-06 15:38:01,101 INFO [org.apa.kaf.cli.con.ConsumerConfig] (main) ConsumerConfig values: - allow.auto.create.topics = true - auto.commit.interval.ms = 5000 - auto.offset.reset = earliest - bootstrap.servers = [localhost:49238] - check.crcs = true - client.dns.lookup = use_all_dns_ips - client.id = consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-1 - client.rack = - connections.max.idle.ms = 540000 - default.api.timeout.ms = 60000 - enable.auto.commit = false - exclude.internal.topics = true - fetch.max.bytes = 52428800 - fetch.max.wait.ms = 500 - fetch.min.bytes = 1 - group.id = org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer - group.instance.id = null - heartbeat.interval.ms = 3000 - interceptor.classes = [] - internal.leave.group.on.close = true - internal.throw.on.fetch.stable.offset.unsupported = false - isolation.level = read_uncommitted - key.deserializer = class org.apache.kafka.common.serialization.StringDeserializer - max.partition.fetch.bytes = 1048576 - max.poll.interval.ms = 300000 - max.poll.records = 500 - metadata.max.age.ms = 300000 - metric.reporters = [] - metrics.num.samples = 2 - metrics.recording.level = INFO - metrics.sample.window.ms = 30000 - partition.assignment.strategy = [class org.apache.kafka.clients.consumer.RangeAssignor, class org.apache.kafka.clients.consumer.CooperativeStickyAssignor] - receive.buffer.bytes = 65536 - reconnect.backoff.max.ms = 1000 - reconnect.backoff.ms = 50 - request.timeout.ms = 30000 - retry.backoff.ms = 100 - sasl.client.callback.handler.class = null - sasl.jaas.config = null - sasl.kerberos.kinit.cmd = /usr/bin/kinit - sasl.kerberos.min.time.before.relogin = 60000 - sasl.kerberos.service.name = null - sasl.kerberos.ticket.renew.jitter = 0.05 - sasl.kerberos.ticket.renew.window.factor = 0.8 - sasl.login.callback.handler.class = null - sasl.login.class = null - sasl.login.connect.timeout.ms = null - sasl.login.read.timeout.ms = null - sasl.login.refresh.buffer.seconds = 300 - sasl.login.refresh.min.period.seconds = 60 - sasl.login.refresh.window.factor = 0.8 - sasl.login.refresh.window.jitter = 0.05 - sasl.login.retry.backoff.max.ms = 10000 - sasl.login.retry.backoff.ms = 100 - sasl.mechanism = GSSAPI - sasl.oauthbearer.clock.skew.seconds = 30 - sasl.oauthbearer.expected.audience = null - sasl.oauthbearer.expected.issuer = null - sasl.oauthbearer.jwks.endpoint.refresh.ms = 3600000 - sasl.oauthbearer.jwks.endpoint.retry.backoff.max.ms = 10000 - sasl.oauthbearer.jwks.endpoint.retry.backoff.ms = 100 - sasl.oauthbearer.jwks.endpoint.url = null - sasl.oauthbearer.scope.claim.name = scope - sasl.oauthbearer.sub.claim.name = sub - sasl.oauthbearer.token.endpoint.url = null - security.protocol = PLAINTEXT - security.providers = null - send.buffer.bytes = 131072 - session.timeout.ms = 45000 - socket.connection.setup.timeout.max.ms = 30000 - socket.connection.setup.timeout.ms = 10000 - ssl.cipher.suites = null - ssl.enabled.protocols = [TLSv1.2, TLSv1.3] - ssl.endpoint.identification.algorithm = https - ssl.engine.factory.class = null - ssl.key.password = null - ssl.keymanager.algorithm = SunX509 - ssl.keystore.certificate.chain = null - ssl.keystore.key = null - ssl.keystore.location = null - ssl.keystore.password = null - ssl.keystore.type = JKS - ssl.protocol = TLSv1.3 - ssl.provider = null - ssl.secure.random.implementation = null - ssl.trustmanager.algorithm = PKIX - ssl.truststore.certificates = null - ssl.truststore.location = null - ssl.truststore.password = null - ssl.truststore.type = JKS - value.deserializer = class org.apache.kafka.common.serialization.StringDeserializer - -2022-10-06 15:38:01,173 INFO [org.apa.kaf.com.uti.AppInfoParser] (main) Kafka version: 3.2.1 -2022-10-06 15:38:01,173 INFO [org.apa.kaf.com.uti.AppInfoParser] (main) Kafka commitId: b172a0a94f4ebb9f -2022-10-06 15:38:01,173 INFO [org.apa.kaf.com.uti.AppInfoParser] (main) Kafka startTimeMs: 1665063481172 -2022-10-06 15:38:01,174 INFO [org.apa.kaf.cli.con.KafkaConsumer] (pool-4-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-1, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Subscribed to topic(s): ruleunit-event-driven-responses -INFO 2022-10-06 13:38:01,350 [shard 0] cluster - topics_frontend.cc:71 - Create topics {{configuration: { topic: {ns: {kafka}, topic: {ruleunit-event-driven-responses}}, partition_count: 1, replication_factor: 1, properties: { compression: {nullopt}, cleanup_policy_bitflags: {nullopt}, compaction_strategy: {nullopt}, retention_bytes: {}, retention_duration_ms: {}, segment_size: {nullopt}, timestamp_type: {nullopt}, recovery_enabled: {nullopt}, shadow_indexing: {nullopt} }}, custom_assignments: {}}} -2022-10-06 15:38:01,350 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:01,350 [shard 0] cluster - topics_frontend.cc:71 - Create topics {{configuration: { topic: {ns: {kafka}, topic: {ruleunit-event-driven-responses}}, partition_count: 1, replication_factor: 1, properties: { compression: {nullopt}, cleanup_policy_bitflags: {nullopt}, compaction_strategy: {nullopt}, retention_bytes: {}, retention_duration_ms: {}, segment_size: {nullopt}, timestamp_type: {nullopt}, recovery_enabled: {nullopt}, shadow_indexing: {nullopt} }}, custom_assignments: {}}} -INFO 2022-10-06 13:38:01,374 [shard 0] cluster - partition_manager.cc:80 - Log created manage completed, ntp: {kafka/ruleunit-event-driven-responses/0}, rev: 6, 0 segments, 0 bytes -INFO 2022-10-06 13:38:01,374 [shard 0] raft - [group_id:3, {kafka/ruleunit-event-driven-responses/0}] consensus.cc:992 - Starting -INFO 2022-10-06 13:38:01,374 [shard 0] raft - [group_id:3, {kafka/ruleunit-event-driven-responses/0}] consensus.cc:1024 - Starting with voted_for {id: {-2147483648}, revision: {-9223372036854775808}} term 0 initial_state true -2022-10-06 15:38:01,374 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:01,374 [shard 0] cluster - partition_manager.cc:80 - Log created manage completed, ntp: {kafka/ruleunit-event-driven-responses/0}, rev: 6, 0 segments, 0 bytes -2022-10-06 15:38:01,374 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:01,374 [shard 0] raft - [group_id:3, {kafka/ruleunit-event-driven-responses/0}] consensus.cc:992 - Starting -2022-10-06 15:38:01,374 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:01,374 [shard 0] raft - [group_id:3, {kafka/ruleunit-event-driven-responses/0}] consensus.cc:1024 - Starting with voted_for {id: {-2147483648}, revision: {-9223372036854775808}} term 0 initial_state true -INFO 2022-10-06 13:38:01,396 [shard 0] offset_translator - ntp: {kafka/ruleunit-event-driven-responses/0} - offset_translator.cc:90 - resetting offset translation state -2022-10-06 15:38:01,396 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:01,396 [shard 0] offset_translator - ntp: {kafka/ruleunit-event-driven-responses/0} - offset_translator.cc:90 - resetting offset translation state -INFO 2022-10-06 13:38:01,420 [shard 0] offset_translator - ntp: {kafka/ruleunit-event-driven-responses/0} - offset_translator.cc:141 - started, state: {base offset/delta: {-9223372036854775808}/0, map size: 1, last delta: 0}, highest_known_offset: -9223372036854775808 -2022-10-06 15:38:01,421 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:01,420 [shard 0] offset_translator - ntp: {kafka/ruleunit-event-driven-responses/0} - offset_translator.cc:141 - started, state: {base offset/delta: {-9223372036854775808}/0, map size: 1, last delta: 0}, highest_known_offset: -9223372036854775808 -INFO 2022-10-06 13:38:01,420 [shard 0] raft - [group_id:3, {kafka/ruleunit-event-driven-responses/0}] consensus.cc:1066 - Read bootstrap state: data_seen 0 config_seen 0 eol false commit 0 term 0 prev_idx 0 prev_term 0 config_tracker -9223372036854775808 commit_base_tracker -9223372036854775808 configurations {} -INFO 2022-10-06 13:38:01,420 [shard 0] raft - [group_id:3, {kafka/ruleunit-event-driven-responses/0}] consensus.cc:1067 - Current log offsets: {start_offset:-9223372036854775808, committed_offset:-9223372036854775808, committed_offset_term:-9223372036854775808, dirty_offset:-9223372036854775808, dirty_offset_term:-9223372036854775808, last_term_start_offset:-9223372036854775808} -INFO 2022-10-06 13:38:01,420 [shard 0] raft - [group_id:3, {kafka/ruleunit-event-driven-responses/0}] consensus.cc:1091 - Truncating configurations at -9223372036854775808 -2022-10-06 15:38:01,421 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:01,420 [shard 0] raft - [group_id:3, {kafka/ruleunit-event-driven-responses/0}] consensus.cc:1066 - Read bootstrap state: data_seen 0 config_seen 0 eol false commit 0 term 0 prev_idx 0 prev_term 0 config_tracker -9223372036854775808 commit_base_tracker -9223372036854775808 configurations {} -2022-10-06 15:38:01,421 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:01,420 [shard 0] raft - [group_id:3, {kafka/ruleunit-event-driven-responses/0}] consensus.cc:1067 - Current log offsets: {start_offset:-9223372036854775808, committed_offset:-9223372036854775808, committed_offset_term:-9223372036854775808, dirty_offset:-9223372036854775808, dirty_offset_term:-9223372036854775808, last_term_start_offset:-9223372036854775808} -2022-10-06 15:38:01,421 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:01,420 [shard 0] raft - [group_id:3, {kafka/ruleunit-event-driven-responses/0}] consensus.cc:1091 - Truncating configurations at -9223372036854775808 -INFO 2022-10-06 13:38:01,443 [shard 0] offset_translator - ntp: {kafka/ruleunit-event-driven-responses/0} - offset_translator.cc:203 - synced with log, state: {base offset/delta: {-9223372036854775808}/0, map size: 1, last delta: 0}, highest_known_offset: -9223372036854775808 -INFO 2022-10-06 13:38:01,443 [shard 0] raft - [group_id:3, {kafka/ruleunit-event-driven-responses/0}] consensus.cc:1188 - started raft, log offsets: {start_offset:-9223372036854775808, committed_offset:-9223372036854775808, committed_offset_term:-9223372036854775808, dirty_offset:-9223372036854775808, dirty_offset_term:-9223372036854775808, last_term_start_offset:-9223372036854775808}, term: 0, configuration: {current: {voters: {{id: {0}, revision: {6}}}, learners: {}}, old:{nullopt}, revision: 6, brokers: {{id: 0, kafka_advertised_listeners: {{OUTSIDE:{host: localhost, port: 49238}}, {PLAINTEXT:{host: f5b812c0f0a4, port: 29092}}}, rpc_address: {host: 0.0.0.0, port: 33145}, rack: {nullopt}, properties: {cores 1, mem_available 0, disk_available 0}, membership_state: active}}} -INFO 2022-10-06 13:38:01,443 [shard 0] cluster - state_machine.cc:29 - Starting state machine for ntp={kafka/ruleunit-event-driven-responses/0} -INFO 2022-10-06 13:38:01,443 [shard 0] cluster - controller_backend.cc:437 - partition operation {type: addition, ntp: {kafka/ruleunit-event-driven-responses/0}, offset: 6, new_assignment: { id: 0, group_id: 3, replicas: {{node_id: 0, shard: 0}} }, previous_assignment: {nullopt}} finished -2022-10-06 15:38:01,443 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:01,443 [shard 0] offset_translator - ntp: {kafka/ruleunit-event-driven-responses/0} - offset_translator.cc:203 - synced with log, state: {base offset/delta: {-9223372036854775808}/0, map size: 1, last delta: 0}, highest_known_offset: -9223372036854775808 -2022-10-06 15:38:01,443 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:01,443 [shard 0] raft - [group_id:3, {kafka/ruleunit-event-driven-responses/0}] consensus.cc:1188 - started raft, log offsets: {start_offset:-9223372036854775808, committed_offset:-9223372036854775808, committed_offset_term:-9223372036854775808, dirty_offset:-9223372036854775808, dirty_offset_term:-9223372036854775808, last_term_start_offset:-9223372036854775808}, term: 0, configuration: {current: {voters: {{id: {0}, revision: {6}}}, learners: {}}, old:{nullopt}, revision: 6, brokers: {{id: 0, kafka_advertised_listeners: {{OUTSIDE:{host: localhost, port: 49238}}, {PLAINTEXT:{host: f5b812c0f0a4, port: 29092}}}, rpc_address: {host: 0.0.0.0, port: 33145}, rack: {nullopt}, properties: {cores 1, mem_available 0, disk_available 0}, membership_state: active}}} -2022-10-06 15:38:01,443 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:01,443 [shard 0] cluster - state_machine.cc:29 - Starting state machine for ntp={kafka/ruleunit-event-driven-responses/0} -2022-10-06 15:38:01,444 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:01,443 [shard 0] cluster - controller_backend.cc:437 - partition operation {type: addition, ntp: {kafka/ruleunit-event-driven-responses/0}, offset: 6, new_assignment: { id: 0, group_id: 3, replicas: {{node_id: 0, shard: 0}} }, previous_assignment: {nullopt}} finished -INFO 2022-10-06 13:38:01,454 [shard 0] raft - [group_id:3, {kafka/ruleunit-event-driven-responses/0}] vote_stm.cc:252 - became the leader term:1 -INFO 2022-10-06 13:38:01,454 [shard 0] storage - segment.cc:635 - Creating new segment /var/lib/redpanda/data/kafka/ruleunit-event-driven-responses/0_6/0-1-v1.log -2022-10-06 15:38:01,454 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:01,454 [shard 0] raft - [group_id:3, {kafka/ruleunit-event-driven-responses/0}] vote_stm.cc:252 - became the leader term:1 -2022-10-06 15:38:01,454 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:01,454 [shard 0] storage - segment.cc:635 - Creating new segment /var/lib/redpanda/data/kafka/ruleunit-event-driven-responses/0_6/0-1-v1.log -2022-10-06 15:38:01,466 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-4-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-1, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Discovered group coordinator localhost:49238 (id: 2147483647 rack: null) -2022-10-06 15:38:01,468 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-4-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-1, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] (Re-)joining group -2022-10-06 15:38:01,481 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-4-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-1, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Request joining group due to: need to re-join with the given member-id: consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-1-e3bb2d05-e4c5-4e4f-a008-3e574d459031 -2022-10-06 15:38:01,482 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-4-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-1, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Request joining group due to: rebalance failed due to 'The group member needs to have a valid member id before actually entering a consumer group.' (MemberIdRequiredException) -2022-10-06 15:38:01,482 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-4-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-1, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] (Re-)joining group -2022-10-06 15:38:01,483 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-4-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-1, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Successfully joined group with generation Generation{generationId=1, memberId='consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-1-e3bb2d05-e4c5-4e4f-a008-3e574d459031', protocol='range'} -2022-10-06 15:38:01,485 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-4-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-1, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Finished assignment for group at generation 1: {consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-1-e3bb2d05-e4c5-4e4f-a008-3e574d459031=Assignment(partitions=[ruleunit-event-driven-responses-0])} -2022-10-06 15:38:01,490 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-4-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-1, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Successfully synced group in generation Generation{generationId=1, memberId='consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-1-e3bb2d05-e4c5-4e4f-a008-3e574d459031', protocol='range'} -2022-10-06 15:38:01,490 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-4-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-1, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Notifying assignor about the new Assignment(partitions=[ruleunit-event-driven-responses-0]) -2022-10-06 15:38:01,492 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-4-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-1, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Adding newly assigned partitions: ruleunit-event-driven-responses-0 -2022-10-06 15:38:01,498 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-4-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-1, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Found no committed offset for partition ruleunit-event-driven-responses-0 -2022-10-06 15:38:01,507 INFO [org.apa.kaf.cli.con.int.SubscriptionState] (pool-4-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-1, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Resetting offset for partition ruleunit-event-driven-responses-0 to position FetchPosition{offset=0, offsetEpoch=Optional.empty, currentLeader=LeaderAndEpoch{leader=Optional[localhost:49238 (id: 0 rack: null)], epoch=absent}}. -INFO 2022-10-06 13:38:01,512 [shard 0] kafka - fetch_session_cache.cc:106 - fetch session created: 2 -2022-10-06 15:38:01,513 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:01,512 [shard 0] kafka - fetch_session_cache.cc:106 - fetch session created: 2 -2022-10-06 15:38:04,190 INFO [org.apa.kaf.cli.pro.ProducerConfig] (awaitility-thread) ProducerConfig values: - acks = -1 - batch.size = 16384 - bootstrap.servers = [localhost:49238] - buffer.memory = 33554432 - client.dns.lookup = use_all_dns_ips - client.id = org.kie.kogito.test.quarkus.kafka.KafkaTestClientProducer - compression.type = none - connections.max.idle.ms = 540000 - delivery.timeout.ms = 120000 - enable.idempotence = true - interceptor.classes = [] - key.serializer = class org.apache.kafka.common.serialization.StringSerializer - linger.ms = 0 - max.block.ms = 60000 - max.in.flight.requests.per.connection = 5 - max.request.size = 1048576 - metadata.max.age.ms = 300000 - metadata.max.idle.ms = 300000 - metric.reporters = [] - metrics.num.samples = 2 - metrics.recording.level = INFO - metrics.sample.window.ms = 30000 - partitioner.class = class org.apache.kafka.clients.producer.internals.DefaultPartitioner - receive.buffer.bytes = 32768 - reconnect.backoff.max.ms = 1000 - reconnect.backoff.ms = 50 - request.timeout.ms = 30000 - retries = 2147483647 - retry.backoff.ms = 100 - sasl.client.callback.handler.class = null - sasl.jaas.config = null - sasl.kerberos.kinit.cmd = /usr/bin/kinit - sasl.kerberos.min.time.before.relogin = 60000 - sasl.kerberos.service.name = null - sasl.kerberos.ticket.renew.jitter = 0.05 - sasl.kerberos.ticket.renew.window.factor = 0.8 - sasl.login.callback.handler.class = null - sasl.login.class = null - sasl.login.connect.timeout.ms = null - sasl.login.read.timeout.ms = null - sasl.login.refresh.buffer.seconds = 300 - sasl.login.refresh.min.period.seconds = 60 - sasl.login.refresh.window.factor = 0.8 - sasl.login.refresh.window.jitter = 0.05 - sasl.login.retry.backoff.max.ms = 10000 - sasl.login.retry.backoff.ms = 100 - sasl.mechanism = GSSAPI - sasl.oauthbearer.clock.skew.seconds = 30 - sasl.oauthbearer.expected.audience = null - sasl.oauthbearer.expected.issuer = null - sasl.oauthbearer.jwks.endpoint.refresh.ms = 3600000 - sasl.oauthbearer.jwks.endpoint.retry.backoff.max.ms = 10000 - sasl.oauthbearer.jwks.endpoint.retry.backoff.ms = 100 - sasl.oauthbearer.jwks.endpoint.url = null - sasl.oauthbearer.scope.claim.name = scope - sasl.oauthbearer.sub.claim.name = sub - sasl.oauthbearer.token.endpoint.url = null - security.protocol = PLAINTEXT - security.providers = null - send.buffer.bytes = 131072 - socket.connection.setup.timeout.max.ms = 30000 - socket.connection.setup.timeout.ms = 10000 - ssl.cipher.suites = null - ssl.enabled.protocols = [TLSv1.2, TLSv1.3] - ssl.endpoint.identification.algorithm = https - ssl.engine.factory.class = null - ssl.key.password = null - ssl.keymanager.algorithm = SunX509 - ssl.keystore.certificate.chain = null - ssl.keystore.key = null - ssl.keystore.location = null - ssl.keystore.password = null - ssl.keystore.type = JKS - ssl.protocol = TLSv1.3 - ssl.provider = null - ssl.secure.random.implementation = null - ssl.trustmanager.algorithm = PKIX - ssl.truststore.certificates = null - ssl.truststore.location = null - ssl.truststore.password = null - ssl.truststore.type = JKS - transaction.timeout.ms = 60000 - transactional.id = null - value.serializer = class org.apache.kafka.common.serialization.StringSerializer - -2022-10-06 15:38:04,198 INFO [org.apa.kaf.cli.pro.KafkaProducer] (awaitility-thread) [Producer clientId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientProducer] Instantiated an idempotent producer. -2022-10-06 15:38:04,208 INFO [org.apa.kaf.com.uti.AppInfoParser] (awaitility-thread) Kafka version: 3.2.1 -2022-10-06 15:38:04,208 INFO [org.apa.kaf.com.uti.AppInfoParser] (awaitility-thread) Kafka commitId: b172a0a94f4ebb9f -2022-10-06 15:38:04,208 INFO [org.apa.kaf.com.uti.AppInfoParser] (awaitility-thread) Kafka startTimeMs: 1665063484208 -2022-10-06 15:38:04,208 INFO [org.kie.kog.tes.qua.kaf.KafkaTestClient] (awaitility-thread) Publishing event with data { - "specversion": "1.0", - "id": "a89b61a2-5644-487a-8a86-144855c5dce8", - "source": "SomeEventSource", - "type": "RulesRequest", - "subject": "TheSubject", - "kogitoruleunitid": "org.kie.kogito.queries.LoanUnit", - "kogitoruleunitquery": "FindApproved", - "data": { - "maxAmount": 5000, - "loanApplications": [ - { - "id": "ABC10001", - "amount": 2000, - "deposit": 100, - "applicant": { - "age": 45, - "name": "John" - } - }, - { - "id": "ABC10002", - "amount": 5000, - "deposit": 100, - "applicant": { - "age": 25, - "name": "Paul" - } - }, - { - "id": "ABC10015", - "amount": 1000, - "deposit": 100, - "applicant": { - "age": 12, - "name": "George" - } - } - ] - } -} - for topic ruleunit-event-driven-requests -INFO 2022-10-06 13:38:04,211 [shard 0] cluster - topics_frontend.cc:71 - Create topics {{configuration: { topic: {ns: {kafka_internal}, topic: {id_allocator}}, partition_count: 1, replication_factor: 1, properties: { compression: {nullopt}, cleanup_policy_bitflags: {none}, compaction_strategy: {nullopt}, retention_bytes: {}, retention_duration_ms: {}, segment_size: {nullopt}, timestamp_type: {nullopt}, recovery_enabled: {nullopt}, shadow_indexing: {nullopt} }}, custom_assignments: {}}} -2022-10-06 15:38:04,212 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:04,211 [shard 0] cluster - topics_frontend.cc:71 - Create topics {{configuration: { topic: {ns: {kafka_internal}, topic: {id_allocator}}, partition_count: 1, replication_factor: 1, properties: { compression: {nullopt}, cleanup_policy_bitflags: {none}, compaction_strategy: {nullopt}, retention_bytes: {}, retention_duration_ms: {}, segment_size: {nullopt}, timestamp_type: {nullopt}, recovery_enabled: {nullopt}, shadow_indexing: {nullopt} }}, custom_assignments: {}}} -INFO 2022-10-06 13:38:04,229 [shard 0] cluster - partition_manager.cc:80 - Log created manage completed, ntp: {kafka_internal/id_allocator/0}, rev: 8, 0 segments, 0 bytes -INFO 2022-10-06 13:38:04,229 [shard 0] raft - [group_id:4, {kafka_internal/id_allocator/0}] consensus.cc:992 - Starting -INFO 2022-10-06 13:38:04,229 [shard 0] raft - [group_id:4, {kafka_internal/id_allocator/0}] consensus.cc:1024 - Starting with voted_for {id: {-2147483648}, revision: {-9223372036854775808}} term 0 initial_state true -2022-10-06 15:38:04,230 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:04,229 [shard 0] cluster - partition_manager.cc:80 - Log created manage completed, ntp: {kafka_internal/id_allocator/0}, rev: 8, 0 segments, 0 bytes -2022-10-06 15:38:04,230 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:04,229 [shard 0] raft - [group_id:4, {kafka_internal/id_allocator/0}] consensus.cc:992 - Starting -2022-10-06 15:38:04,230 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:04,229 [shard 0] raft - [group_id:4, {kafka_internal/id_allocator/0}] consensus.cc:1024 - Starting with voted_for {id: {-2147483648}, revision: {-9223372036854775808}} term 0 initial_state true -INFO 2022-10-06 13:38:04,251 [shard 0] raft - [group_id:4, {kafka_internal/id_allocator/0}] consensus.cc:1066 - Read bootstrap state: data_seen 0 config_seen 0 eol false commit 0 term 0 prev_idx 0 prev_term 0 config_tracker -9223372036854775808 commit_base_tracker -9223372036854775808 configurations {} -INFO 2022-10-06 13:38:04,251 [shard 0] raft - [group_id:4, {kafka_internal/id_allocator/0}] consensus.cc:1067 - Current log offsets: {start_offset:-9223372036854775808, committed_offset:-9223372036854775808, committed_offset_term:-9223372036854775808, dirty_offset:-9223372036854775808, dirty_offset_term:-9223372036854775808, last_term_start_offset:-9223372036854775808} -INFO 2022-10-06 13:38:04,252 [shard 0] raft - [group_id:4, {kafka_internal/id_allocator/0}] consensus.cc:1091 - Truncating configurations at -9223372036854775808 -2022-10-06 15:38:04,252 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:04,251 [shard 0] raft - [group_id:4, {kafka_internal/id_allocator/0}] consensus.cc:1066 - Read bootstrap state: data_seen 0 config_seen 0 eol false commit 0 term 0 prev_idx 0 prev_term 0 config_tracker -9223372036854775808 commit_base_tracker -9223372036854775808 configurations {} -2022-10-06 15:38:04,252 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:04,251 [shard 0] raft - [group_id:4, {kafka_internal/id_allocator/0}] consensus.cc:1067 - Current log offsets: {start_offset:-9223372036854775808, committed_offset:-9223372036854775808, committed_offset_term:-9223372036854775808, dirty_offset:-9223372036854775808, dirty_offset_term:-9223372036854775808, last_term_start_offset:-9223372036854775808} -2022-10-06 15:38:04,252 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:04,252 [shard 0] raft - [group_id:4, {kafka_internal/id_allocator/0}] consensus.cc:1091 - Truncating configurations at -9223372036854775808 -INFO 2022-10-06 13:38:04,274 [shard 0] raft - [group_id:4, {kafka_internal/id_allocator/0}] consensus.cc:1188 - started raft, log offsets: {start_offset:-9223372036854775808, committed_offset:-9223372036854775808, committed_offset_term:-9223372036854775808, dirty_offset:-9223372036854775808, dirty_offset_term:-9223372036854775808, last_term_start_offset:-9223372036854775808}, term: 0, configuration: {current: {voters: {{id: {0}, revision: {8}}}, learners: {}}, old:{nullopt}, revision: 8, brokers: {{id: 0, kafka_advertised_listeners: {{OUTSIDE:{host: localhost, port: 49238}}, {PLAINTEXT:{host: f5b812c0f0a4, port: 29092}}}, rpc_address: {host: 0.0.0.0, port: 33145}, rack: {nullopt}, properties: {cores 1, mem_available 0, disk_available 0}, membership_state: active}}} -INFO 2022-10-06 13:38:04,274 [shard 0] cluster - state_machine.cc:29 - Starting state machine for ntp={kafka_internal/id_allocator/0} -INFO 2022-10-06 13:38:04,274 [shard 0] cluster - controller_backend.cc:437 - partition operation {type: addition, ntp: {kafka_internal/id_allocator/0}, offset: 8, new_assignment: { id: 0, group_id: 4, replicas: {{node_id: 0, shard: 0}} }, previous_assignment: {nullopt}} finished -2022-10-06 15:38:04,274 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:04,274 [shard 0] raft - [group_id:4, {kafka_internal/id_allocator/0}] consensus.cc:1188 - started raft, log offsets: {start_offset:-9223372036854775808, committed_offset:-9223372036854775808, committed_offset_term:-9223372036854775808, dirty_offset:-9223372036854775808, dirty_offset_term:-9223372036854775808, last_term_start_offset:-9223372036854775808}, term: 0, configuration: {current: {voters: {{id: {0}, revision: {8}}}, learners: {}}, old:{nullopt}, revision: 8, brokers: {{id: 0, kafka_advertised_listeners: {{OUTSIDE:{host: localhost, port: 49238}}, {PLAINTEXT:{host: f5b812c0f0a4, port: 29092}}}, rpc_address: {host: 0.0.0.0, port: 33145}, rack: {nullopt}, properties: {cores 1, mem_available 0, disk_available 0}, membership_state: active}}} -2022-10-06 15:38:04,275 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:04,274 [shard 0] cluster - state_machine.cc:29 - Starting state machine for ntp={kafka_internal/id_allocator/0} -2022-10-06 15:38:04,275 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:04,274 [shard 0] cluster - controller_backend.cc:437 - partition operation {type: addition, ntp: {kafka_internal/id_allocator/0}, offset: 8, new_assignment: { id: 0, group_id: 4, replicas: {{node_id: 0, shard: 0}} }, previous_assignment: {nullopt}} finished -INFO 2022-10-06 13:38:04,285 [shard 0] raft - [group_id:4, {kafka_internal/id_allocator/0}] vote_stm.cc:252 - became the leader term:1 -INFO 2022-10-06 13:38:04,285 [shard 0] storage - segment.cc:635 - Creating new segment /var/lib/redpanda/data/kafka_internal/id_allocator/0_8/0-1-v1.log -2022-10-06 15:38:04,286 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:04,285 [shard 0] raft - [group_id:4, {kafka_internal/id_allocator/0}] vote_stm.cc:252 - became the leader term:1 -2022-10-06 15:38:04,286 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:04,285 [shard 0] storage - segment.cc:635 - Creating new segment /var/lib/redpanda/data/kafka_internal/id_allocator/0_8/0-1-v1.log -2022-10-06 15:38:04,545 INFO [org.apa.kaf.cli.pro.int.TransactionManager] (kafka-producer-network-thread | org.kie.kogito.test.quarkus.kafka.KafkaTestClientProducer) [Producer clientId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientProducer] ProducerId set to 1 with epoch 0 -2022-10-06 15:38:04,579 INFO [org.apa.kaf.cli.pro.KafkaProducer] (awaitility-thread) [Producer clientId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientProducer] Closing the Kafka producer with timeoutMillis = 9223372036854775807 ms. -2022-10-06 15:38:04,582 INFO [org.apa.kaf.com.met.Metrics] (awaitility-thread) Metrics scheduler closed -2022-10-06 15:38:04,582 INFO [org.apa.kaf.com.met.Metrics] (awaitility-thread) Closing reporter org.apache.kafka.common.metrics.JmxReporter -2022-10-06 15:38:04,582 INFO [org.apa.kaf.com.met.Metrics] (awaitility-thread) Metrics reporters closed -2022-10-06 15:38:04,582 INFO [org.apa.kaf.com.uti.AppInfoParser] (awaitility-thread) App info kafka.producer for org.kie.kogito.test.quarkus.kafka.KafkaTestClientProducer unregistered -2022-10-06 15:38:05,587 INFO [io.sma.rea.mes.kafka] (vert.x-eventloop-thread-10) SRMSG18256: Initialize record store for topic-partition 'ruleunit-event-driven-requests-0' at position -1. -2022-10-06 15:38:05,597 DEBUG [org.kie.kog.add.qua.mes.com.AbstractQuarkusCloudEventReceiver] (vert.x-eventloop-thread-10) Received message { - "specversion": "1.0", - "id": "a89b61a2-5644-487a-8a86-144855c5dce8", - "source": "SomeEventSource", - "type": "RulesRequest", - "subject": "TheSubject", - "kogitoruleunitid": "org.kie.kogito.queries.LoanUnit", - "kogitoruleunitquery": "FindApproved", - "data": { - "maxAmount": 5000, - "loanApplications": [ - { - "id": "ABC10001", - "amount": 2000, - "deposit": 100, - "applicant": { - "age": 45, - "name": "John" - } - }, - { - "id": "ABC10002", - "amount": 5000, - "deposit": 100, - "applicant": { - "age": 25, - "name": "Paul" - } - }, - { - "id": "ABC10015", - "amount": 1000, - "deposit": 100, - "applicant": { - "age": 12, - "name": "George" - } - } - ] - } -} - -2022-10-06 15:38:05,617 DEBUG [org.kie.kog.eve.rul.EventDrivenRulesController] (vert.x-eventloop-thread-10) Processing event CloudEventWrapDataEvent [cloudEvent=CloudEvent{id='a89b61a2-5644-487a-8a86-144855c5dce8', source=SomeEventSource, type='RulesRequest', subject='TheSubject', data=JsonCloudEventData{node={"maxAmount":5000,"loanApplications":[{"id":"ABC10001","amount":2000,"deposit":100,"applicant":{"age":45,"name":"John"}},{"id":"ABC10002","amount":5000,"deposit":100,"applicant":{"age":25,"name":"Paul"}},{"id":"ABC10015","amount":1000,"deposit":100,"applicant":{"age":12,"name":"George"}}]}}, extensions={kogitoruleunitquery=FindApproved, kogitoruleunitid=org.kie.kogito.queries.LoanUnit}}] -2022-10-06 15:38:05,719 DEBUG [org.kie.kog.add.qua.mes.com.AbstractQuarkusCloudEventEmitter] (vert.x-eventloop-thread-10) publishing event CloudEvent{id='5a855b0a-c37b-4090-8ff5-ab6b81392d0f', source=find-approved, type='RulesResponse', subject='TheSubject', data=BytesCloudEventData{value=[91, 123, 34, 105, 100, 34, 58, 34, 65, 66, 67, 49, 48, 48, 48, 49, 34, 44, 34, 97, 112, 112, 108, 105, 99, 97, 110, 116, 34, 58, 123, 34, 110, 97, 109, 101, 34, 58, 34, 74, 111, 104, 110, 34, 44, 34, 97, 103, 101, 34, 58, 52, 53, 125, 44, 34, 97, 109, 111, 117, 110, 116, 34, 58, 50, 48, 48, 48, 44, 34, 100, 101, 112, 111, 115, 105, 116, 34, 58, 49, 48, 48, 44, 34, 97, 112, 112, 114, 111, 118, 101, 100, 34, 58, 116, 114, 117, 101, 125, 93]}, extensions={kogitoruleunitquery=FindApproved, kogitoruleunitid=org.kie.kogito.queries.LoanUnit}} for type RulesResponse -2022-10-06 15:38:05,726 DEBUG [org.kie.kog.eve.rul.EventDrivenRulesController] (vert.x-eventloop-thread-10) Processing event CloudEventWrapDataEvent [cloudEvent=CloudEvent{id='a89b61a2-5644-487a-8a86-144855c5dce8', source=SomeEventSource, type='RulesRequest', subject='TheSubject', data=JsonCloudEventData{node={"maxAmount":5000,"loanApplications":[{"id":"ABC10001","amount":2000,"deposit":100,"applicant":{"age":45,"name":"John"}},{"id":"ABC10002","amount":5000,"deposit":100,"applicant":{"age":25,"name":"Paul"}},{"id":"ABC10015","amount":1000,"deposit":100,"applicant":{"age":12,"name":"George"}}]}}, extensions={kogitoruleunitquery=FindApproved, kogitoruleunitid=org.kie.kogito.queries.LoanUnit}}] -2022-10-06 15:38:05,727 DEBUG [org.kie.kog.eve.rul.EventDrivenRulesController] (vert.x-eventloop-thread-10) Invalid request. Event CloudEventWrapDataEvent [cloudEvent=CloudEvent{id='a89b61a2-5644-487a-8a86-144855c5dce8', source=SomeEventSource, type='RulesRequest', subject='TheSubject', data=JsonCloudEventData{node={"maxAmount":5000,"loanApplications":[{"id":"ABC10001","amount":2000,"deposit":100,"applicant":{"age":45,"name":"John"}},{"id":"ABC10002","amount":5000,"deposit":100,"applicant":{"age":25,"name":"Paul"}},{"id":"ABC10015","amount":1000,"deposit":100,"applicant":{"age":12,"name":"George"}}]}}, extensions={kogitoruleunitquery=FindApproved, kogitoruleunitid=org.kie.kogito.queries.LoanUnit}}] with extension KogitoRulesExtension [ruleUnitId=org.kie.kogito.queries.LoanUnit, ruleUnitQuery=FindApproved] is not recognized by executor AbstractEventDrivenQueryExecutor [ruleUnit=org.kie.kogito.queries.LoanUnitRuleUnit@322c39d7, queryName=FindNotApprovedIdAndAmount, objectClass=class org.kie.kogito.queries.LoanUnit] -2022-10-06 15:38:05,728 DEBUG [org.kie.kog.eve.rul.EventDrivenRulesController] (vert.x-eventloop-thread-10) Processing event CloudEventWrapDataEvent [cloudEvent=CloudEvent{id='a89b61a2-5644-487a-8a86-144855c5dce8', source=SomeEventSource, type='RulesRequest', subject='TheSubject', data=JsonCloudEventData{node={"maxAmount":5000,"loanApplications":[{"id":"ABC10001","amount":2000,"deposit":100,"applicant":{"age":45,"name":"John"}},{"id":"ABC10002","amount":5000,"deposit":100,"applicant":{"age":25,"name":"Paul"}},{"id":"ABC10015","amount":1000,"deposit":100,"applicant":{"age":12,"name":"George"}}]}}, extensions={kogitoruleunitquery=FindApproved, kogitoruleunitid=org.kie.kogito.queries.LoanUnit}}] -2022-10-06 15:38:05,728 DEBUG [org.kie.kog.eve.rul.EventDrivenRulesController] (vert.x-eventloop-thread-10) Invalid request. Event CloudEventWrapDataEvent [cloudEvent=CloudEvent{id='a89b61a2-5644-487a-8a86-144855c5dce8', source=SomeEventSource, type='RulesRequest', subject='TheSubject', data=JsonCloudEventData{node={"maxAmount":5000,"loanApplications":[{"id":"ABC10001","amount":2000,"deposit":100,"applicant":{"age":45,"name":"John"}},{"id":"ABC10002","amount":5000,"deposit":100,"applicant":{"age":25,"name":"Paul"}},{"id":"ABC10015","amount":1000,"deposit":100,"applicant":{"age":12,"name":"George"}}]}}, extensions={kogitoruleunitquery=FindApproved, kogitoruleunitid=org.kie.kogito.queries.LoanUnit}}] with extension KogitoRulesExtension [ruleUnitId=org.kie.kogito.queries.LoanUnit, ruleUnitQuery=FindApproved] is not recognized by executor AbstractEventDrivenQueryExecutor [ruleUnit=org.kie.kogito.queries.LoanUnitRuleUnit@322c39d7, queryName=FindAllApplicationAmounts, objectClass=class org.kie.kogito.queries.LoanUnit] -2022-10-06 15:38:05,728 DEBUG [org.kie.kog.add.qua.mes.com.AbstractQuarkusCloudEventReceiver] (vert.x-eventloop-thread-10) Acking message id { - "specversion": "1.0", - "id": "a89b61a2-5644-487a-8a86-144855c5dce8", - "source": "SomeEventSource", - "type": "RulesRequest", - "subject": "TheSubject", - "kogitoruleunitid": "org.kie.kogito.queries.LoanUnit", - "kogitoruleunitquery": "FindApproved", - "data": { - "maxAmount": 5000, - "loanApplications": [ - { - "id": "ABC10001", - "amount": 2000, - "deposit": 100, - "applicant": { - "age": 45, - "name": "John" - } - }, - { - "id": "ABC10002", - "amount": 5000, - "deposit": 100, - "applicant": { - "age": 25, - "name": "Paul" - } - }, - { - "id": "ABC10015", - "amount": 1000, - "deposit": 100, - "applicant": { - "age": 12, - "name": "George" - } - } - ] - } -} - -2022-10-06 15:38:06,750 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-4-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-1, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Revoke previously assigned partitions ruleunit-event-driven-responses-0 -2022-10-06 15:38:06,753 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-4-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-1, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Member consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-1-e3bb2d05-e4c5-4e4f-a008-3e574d459031 sending LeaveGroup request to coordinator localhost:49238 (id: 2147483647 rack: null) due to the consumer is being closed -2022-10-06 15:38:06,754 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-4-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-1, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Resetting generation and member id due to: consumer pro-actively leaving the group -2022-10-06 15:38:06,754 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-4-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-1, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Request joining group due to: consumer pro-actively leaving the group -2022-10-06 15:38:06,755 INFO [org.apa.kaf.com.met.Metrics] (pool-4-thread-1) Metrics scheduler closed -2022-10-06 15:38:06,755 INFO [org.apa.kaf.com.met.Metrics] (pool-4-thread-1) Closing reporter org.apache.kafka.common.metrics.JmxReporter -2022-10-06 15:38:06,755 INFO [org.apa.kaf.com.met.Metrics] (pool-4-thread-1) Metrics reporters closed -2022-10-06 15:38:06,758 INFO [org.apa.kaf.com.uti.AppInfoParser] (pool-4-thread-1) App info kafka.consumer for consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-1 unregistered -2022-10-06 15:38:06,772 INFO [org.apa.kaf.cli.con.ConsumerConfig] (main) ConsumerConfig values: - allow.auto.create.topics = true - auto.commit.interval.ms = 5000 - auto.offset.reset = earliest - bootstrap.servers = [localhost:49238] - check.crcs = true - client.dns.lookup = use_all_dns_ips - client.id = consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-2 - client.rack = - connections.max.idle.ms = 540000 - default.api.timeout.ms = 60000 - enable.auto.commit = false - exclude.internal.topics = true - fetch.max.bytes = 52428800 - fetch.max.wait.ms = 500 - fetch.min.bytes = 1 - group.id = org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer - group.instance.id = null - heartbeat.interval.ms = 3000 - interceptor.classes = [] - internal.leave.group.on.close = true - internal.throw.on.fetch.stable.offset.unsupported = false - isolation.level = read_uncommitted - key.deserializer = class org.apache.kafka.common.serialization.StringDeserializer - max.partition.fetch.bytes = 1048576 - max.poll.interval.ms = 300000 - max.poll.records = 500 - metadata.max.age.ms = 300000 - metric.reporters = [] - metrics.num.samples = 2 - metrics.recording.level = INFO - metrics.sample.window.ms = 30000 - partition.assignment.strategy = [class org.apache.kafka.clients.consumer.RangeAssignor, class org.apache.kafka.clients.consumer.CooperativeStickyAssignor] - receive.buffer.bytes = 65536 - reconnect.backoff.max.ms = 1000 - reconnect.backoff.ms = 50 - request.timeout.ms = 30000 - retry.backoff.ms = 100 - sasl.client.callback.handler.class = null - sasl.jaas.config = null - sasl.kerberos.kinit.cmd = /usr/bin/kinit - sasl.kerberos.min.time.before.relogin = 60000 - sasl.kerberos.service.name = null - sasl.kerberos.ticket.renew.jitter = 0.05 - sasl.kerberos.ticket.renew.window.factor = 0.8 - sasl.login.callback.handler.class = null - sasl.login.class = null - sasl.login.connect.timeout.ms = null - sasl.login.read.timeout.ms = null - sasl.login.refresh.buffer.seconds = 300 - sasl.login.refresh.min.period.seconds = 60 - sasl.login.refresh.window.factor = 0.8 - sasl.login.refresh.window.jitter = 0.05 - sasl.login.retry.backoff.max.ms = 10000 - sasl.login.retry.backoff.ms = 100 - sasl.mechanism = GSSAPI - sasl.oauthbearer.clock.skew.seconds = 30 - sasl.oauthbearer.expected.audience = null - sasl.oauthbearer.expected.issuer = null - sasl.oauthbearer.jwks.endpoint.refresh.ms = 3600000 - sasl.oauthbearer.jwks.endpoint.retry.backoff.max.ms = 10000 - sasl.oauthbearer.jwks.endpoint.retry.backoff.ms = 100 - sasl.oauthbearer.jwks.endpoint.url = null - sasl.oauthbearer.scope.claim.name = scope - sasl.oauthbearer.sub.claim.name = sub - sasl.oauthbearer.token.endpoint.url = null - security.protocol = PLAINTEXT - security.providers = null - send.buffer.bytes = 131072 - session.timeout.ms = 45000 - socket.connection.setup.timeout.max.ms = 30000 - socket.connection.setup.timeout.ms = 10000 - ssl.cipher.suites = null - ssl.enabled.protocols = [TLSv1.2, TLSv1.3] - ssl.endpoint.identification.algorithm = https - ssl.engine.factory.class = null - ssl.key.password = null - ssl.keymanager.algorithm = SunX509 - ssl.keystore.certificate.chain = null - ssl.keystore.key = null - ssl.keystore.location = null - ssl.keystore.password = null - ssl.keystore.type = JKS - ssl.protocol = TLSv1.3 - ssl.provider = null - ssl.secure.random.implementation = null - ssl.trustmanager.algorithm = PKIX - ssl.truststore.certificates = null - ssl.truststore.location = null - ssl.truststore.password = null - ssl.truststore.type = JKS - value.deserializer = class org.apache.kafka.common.serialization.StringDeserializer - -2022-10-06 15:38:06,775 INFO [org.apa.kaf.com.uti.AppInfoParser] (main) Kafka version: 3.2.1 -2022-10-06 15:38:06,775 INFO [org.apa.kaf.com.uti.AppInfoParser] (main) Kafka commitId: b172a0a94f4ebb9f -2022-10-06 15:38:06,775 INFO [org.apa.kaf.com.uti.AppInfoParser] (main) Kafka startTimeMs: 1665063486775 -2022-10-06 15:38:06,775 INFO [org.apa.kaf.cli.con.KafkaConsumer] (pool-5-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-2, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Subscribed to topic(s): ruleunit-event-driven-responses -2022-10-06 15:38:06,778 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-5-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-2, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Discovered group coordinator localhost:49238 (id: 2147483647 rack: null) -2022-10-06 15:38:06,779 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-5-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-2, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] (Re-)joining group -2022-10-06 15:38:06,781 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-5-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-2, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Request joining group due to: need to re-join with the given member-id: consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-2-2f78b085-a7a3-45f8-80be-dc2f159efeef -2022-10-06 15:38:06,781 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-5-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-2, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Request joining group due to: rebalance failed due to 'The group member needs to have a valid member id before actually entering a consumer group.' (MemberIdRequiredException) -2022-10-06 15:38:06,781 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-5-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-2, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] (Re-)joining group -2022-10-06 15:38:06,782 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-5-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-2, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Successfully joined group with generation Generation{generationId=3, memberId='consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-2-2f78b085-a7a3-45f8-80be-dc2f159efeef', protocol='range'} -2022-10-06 15:38:06,782 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-5-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-2, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Finished assignment for group at generation 3: {consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-2-2f78b085-a7a3-45f8-80be-dc2f159efeef=Assignment(partitions=[ruleunit-event-driven-responses-0])} -2022-10-06 15:38:06,783 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-5-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-2, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Successfully synced group in generation Generation{generationId=3, memberId='consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-2-2f78b085-a7a3-45f8-80be-dc2f159efeef', protocol='range'} -2022-10-06 15:38:06,784 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-5-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-2, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Notifying assignor about the new Assignment(partitions=[ruleunit-event-driven-responses-0]) -2022-10-06 15:38:06,784 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-5-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-2, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Adding newly assigned partitions: ruleunit-event-driven-responses-0 -2022-10-06 15:38:06,784 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-5-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-2, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Setting offset for partition ruleunit-event-driven-responses-0 to the committed offset FetchPosition{offset=1, offsetEpoch=Optional.empty, currentLeader=LeaderAndEpoch{leader=Optional[localhost:49238 (id: 0 rack: null)], epoch=absent}} -INFO 2022-10-06 13:38:06,786 [shard 0] kafka - fetch_session_cache.cc:106 - fetch session created: 3 -2022-10-06 15:38:06,787 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:06,786 [shard 0] kafka - fetch_session_cache.cc:106 - fetch session created: 3 -2022-10-06 15:38:09,778 INFO [org.apa.kaf.cli.pro.ProducerConfig] (awaitility-thread) ProducerConfig values: - acks = -1 - batch.size = 16384 - bootstrap.servers = [localhost:49238] - buffer.memory = 33554432 - client.dns.lookup = use_all_dns_ips - client.id = org.kie.kogito.test.quarkus.kafka.KafkaTestClientProducer - compression.type = none - connections.max.idle.ms = 540000 - delivery.timeout.ms = 120000 - enable.idempotence = true - interceptor.classes = [] - key.serializer = class org.apache.kafka.common.serialization.StringSerializer - linger.ms = 0 - max.block.ms = 60000 - max.in.flight.requests.per.connection = 5 - max.request.size = 1048576 - metadata.max.age.ms = 300000 - metadata.max.idle.ms = 300000 - metric.reporters = [] - metrics.num.samples = 2 - metrics.recording.level = INFO - metrics.sample.window.ms = 30000 - partitioner.class = class org.apache.kafka.clients.producer.internals.DefaultPartitioner - receive.buffer.bytes = 32768 - reconnect.backoff.max.ms = 1000 - reconnect.backoff.ms = 50 - request.timeout.ms = 30000 - retries = 2147483647 - retry.backoff.ms = 100 - sasl.client.callback.handler.class = null - sasl.jaas.config = null - sasl.kerberos.kinit.cmd = /usr/bin/kinit - sasl.kerberos.min.time.before.relogin = 60000 - sasl.kerberos.service.name = null - sasl.kerberos.ticket.renew.jitter = 0.05 - sasl.kerberos.ticket.renew.window.factor = 0.8 - sasl.login.callback.handler.class = null - sasl.login.class = null - sasl.login.connect.timeout.ms = null - sasl.login.read.timeout.ms = null - sasl.login.refresh.buffer.seconds = 300 - sasl.login.refresh.min.period.seconds = 60 - sasl.login.refresh.window.factor = 0.8 - sasl.login.refresh.window.jitter = 0.05 - sasl.login.retry.backoff.max.ms = 10000 - sasl.login.retry.backoff.ms = 100 - sasl.mechanism = GSSAPI - sasl.oauthbearer.clock.skew.seconds = 30 - sasl.oauthbearer.expected.audience = null - sasl.oauthbearer.expected.issuer = null - sasl.oauthbearer.jwks.endpoint.refresh.ms = 3600000 - sasl.oauthbearer.jwks.endpoint.retry.backoff.max.ms = 10000 - sasl.oauthbearer.jwks.endpoint.retry.backoff.ms = 100 - sasl.oauthbearer.jwks.endpoint.url = null - sasl.oauthbearer.scope.claim.name = scope - sasl.oauthbearer.sub.claim.name = sub - sasl.oauthbearer.token.endpoint.url = null - security.protocol = PLAINTEXT - security.providers = null - send.buffer.bytes = 131072 - socket.connection.setup.timeout.max.ms = 30000 - socket.connection.setup.timeout.ms = 10000 - ssl.cipher.suites = null - ssl.enabled.protocols = [TLSv1.2, TLSv1.3] - ssl.endpoint.identification.algorithm = https - ssl.engine.factory.class = null - ssl.key.password = null - ssl.keymanager.algorithm = SunX509 - ssl.keystore.certificate.chain = null - ssl.keystore.key = null - ssl.keystore.location = null - ssl.keystore.password = null - ssl.keystore.type = JKS - ssl.protocol = TLSv1.3 - ssl.provider = null - ssl.secure.random.implementation = null - ssl.trustmanager.algorithm = PKIX - ssl.truststore.certificates = null - ssl.truststore.location = null - ssl.truststore.password = null - ssl.truststore.type = JKS - transaction.timeout.ms = 60000 - transactional.id = null - value.serializer = class org.apache.kafka.common.serialization.StringSerializer - -2022-10-06 15:38:09,780 INFO [org.apa.kaf.cli.pro.KafkaProducer] (awaitility-thread) [Producer clientId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientProducer] Instantiated an idempotent producer. -2022-10-06 15:38:09,784 INFO [org.apa.kaf.com.uti.AppInfoParser] (awaitility-thread) Kafka version: 3.2.1 -2022-10-06 15:38:09,784 INFO [org.apa.kaf.com.uti.AppInfoParser] (awaitility-thread) Kafka commitId: b172a0a94f4ebb9f -2022-10-06 15:38:09,784 INFO [org.apa.kaf.com.uti.AppInfoParser] (awaitility-thread) Kafka startTimeMs: 1665063489783 -2022-10-06 15:38:09,784 INFO [org.kie.kog.tes.qua.kaf.KafkaTestClient] (awaitility-thread) Publishing event with data { - "specversion": "1.0", - "id": "a89b61a2-5644-487a-8a86-144855c5dce8", - "source": "SomeEventSource", - "type": "RulesRequest", - "subject": "TheSubject", - "kogitoruleunitid": "org.kie.kogito.queries.LoanUnit", - "kogitoruleunitquery": "FindNotApprovedIdAndAmount", - "data": { - "maxAmount": 5000, - "loanApplications": [ - { - "id": "ABC10001", - "amount": 2000, - "deposit": 100, - "applicant": { - "age": 45, - "name": "John" - } - }, - { - "id": "ABC10002", - "amount": 5000, - "deposit": 100, - "applicant": { - "age": 25, - "name": "Paul" - } - }, - { - "id": "ABC10015", - "amount": 1000, - "deposit": 100, - "applicant": { - "age": 12, - "name": "George" - } - } - ] - } -} - for topic ruleunit-event-driven-requests -2022-10-06 15:38:09,786 INFO [org.apa.kaf.cli.pro.int.TransactionManager] (kafka-producer-network-thread | org.kie.kogito.test.quarkus.kafka.KafkaTestClientProducer) [Producer clientId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientProducer] ProducerId set to 2 with epoch 0 -2022-10-06 15:38:09,790 INFO [org.apa.kaf.cli.pro.KafkaProducer] (awaitility-thread) [Producer clientId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientProducer] Closing the Kafka producer with timeoutMillis = 9223372036854775807 ms. -2022-10-06 15:38:09,791 INFO [org.apa.kaf.com.met.Metrics] (awaitility-thread) Metrics scheduler closed -2022-10-06 15:38:09,791 INFO [org.apa.kaf.com.met.Metrics] (awaitility-thread) Closing reporter org.apache.kafka.common.metrics.JmxReporter -2022-10-06 15:38:09,791 INFO [org.apa.kaf.com.met.Metrics] (awaitility-thread) Metrics reporters closed -2022-10-06 15:38:09,791 INFO [org.apa.kaf.com.uti.AppInfoParser] (awaitility-thread) App info kafka.producer for org.kie.kogito.test.quarkus.kafka.KafkaTestClientProducer unregistered -2022-10-06 15:38:09,791 DEBUG [org.kie.kog.add.qua.mes.com.AbstractQuarkusCloudEventReceiver] (vert.x-eventloop-thread-10) Received message { - "specversion": "1.0", - "id": "a89b61a2-5644-487a-8a86-144855c5dce8", - "source": "SomeEventSource", - "type": "RulesRequest", - "subject": "TheSubject", - "kogitoruleunitid": "org.kie.kogito.queries.LoanUnit", - "kogitoruleunitquery": "FindNotApprovedIdAndAmount", - "data": { - "maxAmount": 5000, - "loanApplications": [ - { - "id": "ABC10001", - "amount": 2000, - "deposit": 100, - "applicant": { - "age": 45, - "name": "John" - } - }, - { - "id": "ABC10002", - "amount": 5000, - "deposit": 100, - "applicant": { - "age": 25, - "name": "Paul" - } - }, - { - "id": "ABC10015", - "amount": 1000, - "deposit": 100, - "applicant": { - "age": 12, - "name": "George" - } - } - ] - } -} - -2022-10-06 15:38:09,792 DEBUG [org.kie.kog.eve.rul.EventDrivenRulesController] (vert.x-eventloop-thread-10) Processing event CloudEventWrapDataEvent [cloudEvent=CloudEvent{id='a89b61a2-5644-487a-8a86-144855c5dce8', source=SomeEventSource, type='RulesRequest', subject='TheSubject', data=JsonCloudEventData{node={"maxAmount":5000,"loanApplications":[{"id":"ABC10001","amount":2000,"deposit":100,"applicant":{"age":45,"name":"John"}},{"id":"ABC10002","amount":5000,"deposit":100,"applicant":{"age":25,"name":"Paul"}},{"id":"ABC10015","amount":1000,"deposit":100,"applicant":{"age":12,"name":"George"}}]}}, extensions={kogitoruleunitquery=FindNotApprovedIdAndAmount, kogitoruleunitid=org.kie.kogito.queries.LoanUnit}}] -2022-10-06 15:38:09,792 DEBUG [org.kie.kog.eve.rul.EventDrivenRulesController] (vert.x-eventloop-thread-10) Invalid request. Event CloudEventWrapDataEvent [cloudEvent=CloudEvent{id='a89b61a2-5644-487a-8a86-144855c5dce8', source=SomeEventSource, type='RulesRequest', subject='TheSubject', data=JsonCloudEventData{node={"maxAmount":5000,"loanApplications":[{"id":"ABC10001","amount":2000,"deposit":100,"applicant":{"age":45,"name":"John"}},{"id":"ABC10002","amount":5000,"deposit":100,"applicant":{"age":25,"name":"Paul"}},{"id":"ABC10015","amount":1000,"deposit":100,"applicant":{"age":12,"name":"George"}}]}}, extensions={kogitoruleunitquery=FindNotApprovedIdAndAmount, kogitoruleunitid=org.kie.kogito.queries.LoanUnit}}] with extension KogitoRulesExtension [ruleUnitId=org.kie.kogito.queries.LoanUnit, ruleUnitQuery=FindNotApprovedIdAndAmount] is not recognized by executor AbstractEventDrivenQueryExecutor [ruleUnit=org.kie.kogito.queries.LoanUnitRuleUnit@322c39d7, queryName=FindApproved, objectClass=class org.kie.kogito.queries.LoanUnit] -2022-10-06 15:38:09,793 DEBUG [org.kie.kog.eve.rul.EventDrivenRulesController] (vert.x-eventloop-thread-10) Processing event CloudEventWrapDataEvent [cloudEvent=CloudEvent{id='a89b61a2-5644-487a-8a86-144855c5dce8', source=SomeEventSource, type='RulesRequest', subject='TheSubject', data=JsonCloudEventData{node={"maxAmount":5000,"loanApplications":[{"id":"ABC10001","amount":2000,"deposit":100,"applicant":{"age":45,"name":"John"}},{"id":"ABC10002","amount":5000,"deposit":100,"applicant":{"age":25,"name":"Paul"}},{"id":"ABC10015","amount":1000,"deposit":100,"applicant":{"age":12,"name":"George"}}]}}, extensions={kogitoruleunitquery=FindNotApprovedIdAndAmount, kogitoruleunitid=org.kie.kogito.queries.LoanUnit}}] -2022-10-06 15:38:09,825 DEBUG [org.kie.kog.add.qua.mes.com.AbstractQuarkusCloudEventEmitter] (vert.x-eventloop-thread-10) publishing event CloudEvent{id='3be203a5-5a72-4ad6-b45a-e4466408277a', source=find-not-approved-id-and-amount, type='RulesResponse', subject='TheSubject', data=BytesCloudEventData{value=[91, 123, 34, 36, 97, 109, 111, 117, 110, 116, 34, 58, 53, 48, 48, 48, 44, 34, 36, 105, 100, 34, 58, 34, 65, 66, 67, 49, 48, 48, 48, 50, 34, 125, 44, 123, 34, 36, 97, 109, 111, 117, 110, 116, 34, 58, 49, 48, 48, 48, 44, 34, 36, 105, 100, 34, 58, 34, 65, 66, 67, 49, 48, 48, 49, 53, 34, 125, 93]}, extensions={kogitoruleunitquery=FindNotApprovedIdAndAmount, kogitoruleunitid=org.kie.kogito.queries.LoanUnit}} for type RulesResponse -2022-10-06 15:38:09,826 DEBUG [org.kie.kog.eve.rul.EventDrivenRulesController] (vert.x-eventloop-thread-10) Processing event CloudEventWrapDataEvent [cloudEvent=CloudEvent{id='a89b61a2-5644-487a-8a86-144855c5dce8', source=SomeEventSource, type='RulesRequest', subject='TheSubject', data=JsonCloudEventData{node={"maxAmount":5000,"loanApplications":[{"id":"ABC10001","amount":2000,"deposit":100,"applicant":{"age":45,"name":"John"}},{"id":"ABC10002","amount":5000,"deposit":100,"applicant":{"age":25,"name":"Paul"}},{"id":"ABC10015","amount":1000,"deposit":100,"applicant":{"age":12,"name":"George"}}]}}, extensions={kogitoruleunitquery=FindNotApprovedIdAndAmount, kogitoruleunitid=org.kie.kogito.queries.LoanUnit}}] -2022-10-06 15:38:09,827 DEBUG [org.kie.kog.eve.rul.EventDrivenRulesController] (vert.x-eventloop-thread-10) Invalid request. Event CloudEventWrapDataEvent [cloudEvent=CloudEvent{id='a89b61a2-5644-487a-8a86-144855c5dce8', source=SomeEventSource, type='RulesRequest', subject='TheSubject', data=JsonCloudEventData{node={"maxAmount":5000,"loanApplications":[{"id":"ABC10001","amount":2000,"deposit":100,"applicant":{"age":45,"name":"John"}},{"id":"ABC10002","amount":5000,"deposit":100,"applicant":{"age":25,"name":"Paul"}},{"id":"ABC10015","amount":1000,"deposit":100,"applicant":{"age":12,"name":"George"}}]}}, extensions={kogitoruleunitquery=FindNotApprovedIdAndAmount, kogitoruleunitid=org.kie.kogito.queries.LoanUnit}}] with extension KogitoRulesExtension [ruleUnitId=org.kie.kogito.queries.LoanUnit, ruleUnitQuery=FindNotApprovedIdAndAmount] is not recognized by executor AbstractEventDrivenQueryExecutor [ruleUnit=org.kie.kogito.queries.LoanUnitRuleUnit@322c39d7, queryName=FindAllApplicationAmounts, objectClass=class org.kie.kogito.queries.LoanUnit] -2022-10-06 15:38:09,827 DEBUG [org.kie.kog.add.qua.mes.com.AbstractQuarkusCloudEventReceiver] (vert.x-eventloop-thread-10) Acking message id { - "specversion": "1.0", - "id": "a89b61a2-5644-487a-8a86-144855c5dce8", - "source": "SomeEventSource", - "type": "RulesRequest", - "subject": "TheSubject", - "kogitoruleunitid": "org.kie.kogito.queries.LoanUnit", - "kogitoruleunitquery": "FindNotApprovedIdAndAmount", - "data": { - "maxAmount": 5000, - "loanApplications": [ - { - "id": "ABC10001", - "amount": 2000, - "deposit": 100, - "applicant": { - "age": 45, - "name": "John" - } - }, - { - "id": "ABC10002", - "amount": 5000, - "deposit": 100, - "applicant": { - "age": 25, - "name": "Paul" - } - }, - { - "id": "ABC10015", - "amount": 1000, - "deposit": 100, - "applicant": { - "age": 12, - "name": "George" - } - } - ] - } -} - -2022-10-06 15:38:10,834 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-5-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-2, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Revoke previously assigned partitions ruleunit-event-driven-responses-0 -2022-10-06 15:38:10,836 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-5-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-2, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Member consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-2-2f78b085-a7a3-45f8-80be-dc2f159efeef sending LeaveGroup request to coordinator localhost:49238 (id: 2147483647 rack: null) due to the consumer is being closed -2022-10-06 15:38:10,836 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-5-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-2, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Resetting generation and member id due to: consumer pro-actively leaving the group -2022-10-06 15:38:10,837 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-5-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-2, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Request joining group due to: consumer pro-actively leaving the group -2022-10-06 15:38:10,837 INFO [org.apa.kaf.com.met.Metrics] (pool-5-thread-1) Metrics scheduler closed -2022-10-06 15:38:10,837 INFO [org.apa.kaf.com.met.Metrics] (pool-5-thread-1) Closing reporter org.apache.kafka.common.metrics.JmxReporter -2022-10-06 15:38:10,837 INFO [org.apa.kaf.com.met.Metrics] (pool-5-thread-1) Metrics reporters closed -2022-10-06 15:38:10,839 INFO [org.apa.kaf.com.uti.AppInfoParser] (pool-5-thread-1) App info kafka.consumer for consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-2 unregistered -2022-10-06 15:38:10,844 INFO [org.apa.kaf.cli.con.ConsumerConfig] (main) ConsumerConfig values: - allow.auto.create.topics = true - auto.commit.interval.ms = 5000 - auto.offset.reset = earliest - bootstrap.servers = [localhost:49238] - check.crcs = true - client.dns.lookup = use_all_dns_ips - client.id = consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-3 - client.rack = - connections.max.idle.ms = 540000 - default.api.timeout.ms = 60000 - enable.auto.commit = false - exclude.internal.topics = true - fetch.max.bytes = 52428800 - fetch.max.wait.ms = 500 - fetch.min.bytes = 1 - group.id = org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer - group.instance.id = null - heartbeat.interval.ms = 3000 - interceptor.classes = [] - internal.leave.group.on.close = true - internal.throw.on.fetch.stable.offset.unsupported = false - isolation.level = read_uncommitted - key.deserializer = class org.apache.kafka.common.serialization.StringDeserializer - max.partition.fetch.bytes = 1048576 - max.poll.interval.ms = 300000 - max.poll.records = 500 - metadata.max.age.ms = 300000 - metric.reporters = [] - metrics.num.samples = 2 - metrics.recording.level = INFO - metrics.sample.window.ms = 30000 - partition.assignment.strategy = [class org.apache.kafka.clients.consumer.RangeAssignor, class org.apache.kafka.clients.consumer.CooperativeStickyAssignor] - receive.buffer.bytes = 65536 - reconnect.backoff.max.ms = 1000 - reconnect.backoff.ms = 50 - request.timeout.ms = 30000 - retry.backoff.ms = 100 - sasl.client.callback.handler.class = null - sasl.jaas.config = null - sasl.kerberos.kinit.cmd = /usr/bin/kinit - sasl.kerberos.min.time.before.relogin = 60000 - sasl.kerberos.service.name = null - sasl.kerberos.ticket.renew.jitter = 0.05 - sasl.kerberos.ticket.renew.window.factor = 0.8 - sasl.login.callback.handler.class = null - sasl.login.class = null - sasl.login.connect.timeout.ms = null - sasl.login.read.timeout.ms = null - sasl.login.refresh.buffer.seconds = 300 - sasl.login.refresh.min.period.seconds = 60 - sasl.login.refresh.window.factor = 0.8 - sasl.login.refresh.window.jitter = 0.05 - sasl.login.retry.backoff.max.ms = 10000 - sasl.login.retry.backoff.ms = 100 - sasl.mechanism = GSSAPI - sasl.oauthbearer.clock.skew.seconds = 30 - sasl.oauthbearer.expected.audience = null - sasl.oauthbearer.expected.issuer = null - sasl.oauthbearer.jwks.endpoint.refresh.ms = 3600000 - sasl.oauthbearer.jwks.endpoint.retry.backoff.max.ms = 10000 - sasl.oauthbearer.jwks.endpoint.retry.backoff.ms = 100 - sasl.oauthbearer.jwks.endpoint.url = null - sasl.oauthbearer.scope.claim.name = scope - sasl.oauthbearer.sub.claim.name = sub - sasl.oauthbearer.token.endpoint.url = null - security.protocol = PLAINTEXT - security.providers = null - send.buffer.bytes = 131072 - session.timeout.ms = 45000 - socket.connection.setup.timeout.max.ms = 30000 - socket.connection.setup.timeout.ms = 10000 - ssl.cipher.suites = null - ssl.enabled.protocols = [TLSv1.2, TLSv1.3] - ssl.endpoint.identification.algorithm = https - ssl.engine.factory.class = null - ssl.key.password = null - ssl.keymanager.algorithm = SunX509 - ssl.keystore.certificate.chain = null - ssl.keystore.key = null - ssl.keystore.location = null - ssl.keystore.password = null - ssl.keystore.type = JKS - ssl.protocol = TLSv1.3 - ssl.provider = null - ssl.secure.random.implementation = null - ssl.trustmanager.algorithm = PKIX - ssl.truststore.certificates = null - ssl.truststore.location = null - ssl.truststore.password = null - ssl.truststore.type = JKS - value.deserializer = class org.apache.kafka.common.serialization.StringDeserializer - -2022-10-06 15:38:10,848 INFO [org.apa.kaf.com.uti.AppInfoParser] (main) Kafka version: 3.2.1 -2022-10-06 15:38:10,848 INFO [org.apa.kaf.com.uti.AppInfoParser] (main) Kafka commitId: b172a0a94f4ebb9f -2022-10-06 15:38:10,849 INFO [org.apa.kaf.com.uti.AppInfoParser] (main) Kafka startTimeMs: 1665063490848 -2022-10-06 15:38:10,849 INFO [org.apa.kaf.cli.con.KafkaConsumer] (pool-6-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-3, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Subscribed to topic(s): ruleunit-event-driven-responses -2022-10-06 15:38:10,854 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-6-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-3, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Discovered group coordinator localhost:49238 (id: 2147483647 rack: null) -2022-10-06 15:38:10,855 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-6-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-3, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] (Re-)joining group -2022-10-06 15:38:10,858 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-6-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-3, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Request joining group due to: need to re-join with the given member-id: consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-3-ca80add5-49c0-419c-a7fb-478bcf468700 -2022-10-06 15:38:10,859 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-6-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-3, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Request joining group due to: rebalance failed due to 'The group member needs to have a valid member id before actually entering a consumer group.' (MemberIdRequiredException) -2022-10-06 15:38:10,859 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-6-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-3, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] (Re-)joining group -2022-10-06 15:38:10,860 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-6-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-3, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Successfully joined group with generation Generation{generationId=5, memberId='consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-3-ca80add5-49c0-419c-a7fb-478bcf468700', protocol='range'} -2022-10-06 15:38:10,860 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-6-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-3, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Finished assignment for group at generation 5: {consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-3-ca80add5-49c0-419c-a7fb-478bcf468700=Assignment(partitions=[ruleunit-event-driven-responses-0])} -2022-10-06 15:38:10,862 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-6-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-3, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Successfully synced group in generation Generation{generationId=5, memberId='consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-3-ca80add5-49c0-419c-a7fb-478bcf468700', protocol='range'} -2022-10-06 15:38:10,863 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-6-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-3, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Notifying assignor about the new Assignment(partitions=[ruleunit-event-driven-responses-0]) -2022-10-06 15:38:10,863 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-6-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-3, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Adding newly assigned partitions: ruleunit-event-driven-responses-0 -2022-10-06 15:38:10,864 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-6-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-3, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Setting offset for partition ruleunit-event-driven-responses-0 to the committed offset FetchPosition{offset=2, offsetEpoch=Optional.empty, currentLeader=LeaderAndEpoch{leader=Optional[localhost:49238 (id: 0 rack: null)], epoch=absent}} -INFO 2022-10-06 13:38:10,868 [shard 0] kafka - fetch_session_cache.cc:106 - fetch session created: 4 -2022-10-06 15:38:10,868 INFO [org.kie.kog.tes.KogitoGenericContainer] (docker-java-stream-617210730) STDERR: INFO 2022-10-06 13:38:10,868 [shard 0] kafka - fetch_session_cache.cc:106 - fetch session created: 4 -2022-10-06 15:38:13,850 INFO [org.apa.kaf.cli.pro.ProducerConfig] (awaitility-thread) ProducerConfig values: - acks = -1 - batch.size = 16384 - bootstrap.servers = [localhost:49238] - buffer.memory = 33554432 - client.dns.lookup = use_all_dns_ips - client.id = org.kie.kogito.test.quarkus.kafka.KafkaTestClientProducer - compression.type = none - connections.max.idle.ms = 540000 - delivery.timeout.ms = 120000 - enable.idempotence = true - interceptor.classes = [] - key.serializer = class org.apache.kafka.common.serialization.StringSerializer - linger.ms = 0 - max.block.ms = 60000 - max.in.flight.requests.per.connection = 5 - max.request.size = 1048576 - metadata.max.age.ms = 300000 - metadata.max.idle.ms = 300000 - metric.reporters = [] - metrics.num.samples = 2 - metrics.recording.level = INFO - metrics.sample.window.ms = 30000 - partitioner.class = class org.apache.kafka.clients.producer.internals.DefaultPartitioner - receive.buffer.bytes = 32768 - reconnect.backoff.max.ms = 1000 - reconnect.backoff.ms = 50 - request.timeout.ms = 30000 - retries = 2147483647 - retry.backoff.ms = 100 - sasl.client.callback.handler.class = null - sasl.jaas.config = null - sasl.kerberos.kinit.cmd = /usr/bin/kinit - sasl.kerberos.min.time.before.relogin = 60000 - sasl.kerberos.service.name = null - sasl.kerberos.ticket.renew.jitter = 0.05 - sasl.kerberos.ticket.renew.window.factor = 0.8 - sasl.login.callback.handler.class = null - sasl.login.class = null - sasl.login.connect.timeout.ms = null - sasl.login.read.timeout.ms = null - sasl.login.refresh.buffer.seconds = 300 - sasl.login.refresh.min.period.seconds = 60 - sasl.login.refresh.window.factor = 0.8 - sasl.login.refresh.window.jitter = 0.05 - sasl.login.retry.backoff.max.ms = 10000 - sasl.login.retry.backoff.ms = 100 - sasl.mechanism = GSSAPI - sasl.oauthbearer.clock.skew.seconds = 30 - sasl.oauthbearer.expected.audience = null - sasl.oauthbearer.expected.issuer = null - sasl.oauthbearer.jwks.endpoint.refresh.ms = 3600000 - sasl.oauthbearer.jwks.endpoint.retry.backoff.max.ms = 10000 - sasl.oauthbearer.jwks.endpoint.retry.backoff.ms = 100 - sasl.oauthbearer.jwks.endpoint.url = null - sasl.oauthbearer.scope.claim.name = scope - sasl.oauthbearer.sub.claim.name = sub - sasl.oauthbearer.token.endpoint.url = null - security.protocol = PLAINTEXT - security.providers = null - send.buffer.bytes = 131072 - socket.connection.setup.timeout.max.ms = 30000 - socket.connection.setup.timeout.ms = 10000 - ssl.cipher.suites = null - ssl.enabled.protocols = [TLSv1.2, TLSv1.3] - ssl.endpoint.identification.algorithm = https - ssl.engine.factory.class = null - ssl.key.password = null - ssl.keymanager.algorithm = SunX509 - ssl.keystore.certificate.chain = null - ssl.keystore.key = null - ssl.keystore.location = null - ssl.keystore.password = null - ssl.keystore.type = JKS - ssl.protocol = TLSv1.3 - ssl.provider = null - ssl.secure.random.implementation = null - ssl.trustmanager.algorithm = PKIX - ssl.truststore.certificates = null - ssl.truststore.location = null - ssl.truststore.password = null - ssl.truststore.type = JKS - transaction.timeout.ms = 60000 - transactional.id = null - value.serializer = class org.apache.kafka.common.serialization.StringSerializer - -2022-10-06 15:38:13,851 INFO [org.apa.kaf.cli.pro.KafkaProducer] (awaitility-thread) [Producer clientId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientProducer] Instantiated an idempotent producer. -2022-10-06 15:38:13,853 INFO [org.apa.kaf.com.uti.AppInfoParser] (awaitility-thread) Kafka version: 3.2.1 -2022-10-06 15:38:13,853 INFO [org.apa.kaf.com.uti.AppInfoParser] (awaitility-thread) Kafka commitId: b172a0a94f4ebb9f -2022-10-06 15:38:13,853 INFO [org.apa.kaf.com.uti.AppInfoParser] (awaitility-thread) Kafka startTimeMs: 1665063493853 -2022-10-06 15:38:13,853 INFO [org.kie.kog.tes.qua.kaf.KafkaTestClient] (awaitility-thread) Publishing event with data { - "specversion": "1.0", - "id": "a89b61a2-5644-487a-8a86-144855c5dce8", - "source": "SomeEventSource", - "type": "RulesRequest", - "subject": "TheSubject", - "kogitoruleunitid": "org.kie.kogito.queries.LoanUnit", - "kogitoruleunitquery": "FindAllApplicationAmounts", - "data": { - "maxAmount": 5000, - "loanApplications": [ - { - "id": "ABC10001", - "amount": 2000, - "deposit": 100, - "applicant": { - "age": 45, - "name": "John" - } - }, - { - "id": "ABC10002", - "amount": 5000, - "deposit": 100, - "applicant": { - "age": 25, - "name": "Paul" - } - }, - { - "id": "ABC10015", - "amount": 1000, - "deposit": 100, - "applicant": { - "age": 12, - "name": "George" - } - } - ] - } -} - for topic ruleunit-event-driven-requests -2022-10-06 15:38:13,856 INFO [org.apa.kaf.cli.pro.int.TransactionManager] (kafka-producer-network-thread | org.kie.kogito.test.quarkus.kafka.KafkaTestClientProducer) [Producer clientId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientProducer] ProducerId set to 3 with epoch 0 -2022-10-06 15:38:13,869 INFO [org.apa.kaf.cli.pro.KafkaProducer] (awaitility-thread) [Producer clientId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientProducer] Closing the Kafka producer with timeoutMillis = 9223372036854775807 ms. -2022-10-06 15:38:13,871 DEBUG [org.kie.kog.add.qua.mes.com.AbstractQuarkusCloudEventReceiver] (vert.x-eventloop-thread-10) Received message { - "specversion": "1.0", - "id": "a89b61a2-5644-487a-8a86-144855c5dce8", - "source": "SomeEventSource", - "type": "RulesRequest", - "subject": "TheSubject", - "kogitoruleunitid": "org.kie.kogito.queries.LoanUnit", - "kogitoruleunitquery": "FindAllApplicationAmounts", - "data": { - "maxAmount": 5000, - "loanApplications": [ - { - "id": "ABC10001", - "amount": 2000, - "deposit": 100, - "applicant": { - "age": 45, - "name": "John" - } - }, - { - "id": "ABC10002", - "amount": 5000, - "deposit": 100, - "applicant": { - "age": 25, - "name": "Paul" - } - }, - { - "id": "ABC10015", - "amount": 1000, - "deposit": 100, - "applicant": { - "age": 12, - "name": "George" - } - } - ] - } -} - -2022-10-06 15:38:13,872 INFO [org.apa.kaf.com.met.Metrics] (awaitility-thread) Metrics scheduler closed -2022-10-06 15:38:13,872 INFO [org.apa.kaf.com.met.Metrics] (awaitility-thread) Closing reporter org.apache.kafka.common.metrics.JmxReporter -2022-10-06 15:38:13,872 INFO [org.apa.kaf.com.met.Metrics] (awaitility-thread) Metrics reporters closed -2022-10-06 15:38:13,872 INFO [org.apa.kaf.com.uti.AppInfoParser] (awaitility-thread) App info kafka.producer for org.kie.kogito.test.quarkus.kafka.KafkaTestClientProducer unregistered -2022-10-06 15:38:13,872 DEBUG [org.kie.kog.eve.rul.EventDrivenRulesController] (vert.x-eventloop-thread-10) Processing event CloudEventWrapDataEvent [cloudEvent=CloudEvent{id='a89b61a2-5644-487a-8a86-144855c5dce8', source=SomeEventSource, type='RulesRequest', subject='TheSubject', data=JsonCloudEventData{node={"maxAmount":5000,"loanApplications":[{"id":"ABC10001","amount":2000,"deposit":100,"applicant":{"age":45,"name":"John"}},{"id":"ABC10002","amount":5000,"deposit":100,"applicant":{"age":25,"name":"Paul"}},{"id":"ABC10015","amount":1000,"deposit":100,"applicant":{"age":12,"name":"George"}}]}}, extensions={kogitoruleunitquery=FindAllApplicationAmounts, kogitoruleunitid=org.kie.kogito.queries.LoanUnit}}] -2022-10-06 15:38:13,873 DEBUG [org.kie.kog.eve.rul.EventDrivenRulesController] (vert.x-eventloop-thread-10) Invalid request. Event CloudEventWrapDataEvent [cloudEvent=CloudEvent{id='a89b61a2-5644-487a-8a86-144855c5dce8', source=SomeEventSource, type='RulesRequest', subject='TheSubject', data=JsonCloudEventData{node={"maxAmount":5000,"loanApplications":[{"id":"ABC10001","amount":2000,"deposit":100,"applicant":{"age":45,"name":"John"}},{"id":"ABC10002","amount":5000,"deposit":100,"applicant":{"age":25,"name":"Paul"}},{"id":"ABC10015","amount":1000,"deposit":100,"applicant":{"age":12,"name":"George"}}]}}, extensions={kogitoruleunitquery=FindAllApplicationAmounts, kogitoruleunitid=org.kie.kogito.queries.LoanUnit}}] with extension KogitoRulesExtension [ruleUnitId=org.kie.kogito.queries.LoanUnit, ruleUnitQuery=FindAllApplicationAmounts] is not recognized by executor AbstractEventDrivenQueryExecutor [ruleUnit=org.kie.kogito.queries.LoanUnitRuleUnit@322c39d7, queryName=FindApproved, objectClass=class org.kie.kogito.queries.LoanUnit] -2022-10-06 15:38:13,874 DEBUG [org.kie.kog.eve.rul.EventDrivenRulesController] (vert.x-eventloop-thread-10) Processing event CloudEventWrapDataEvent [cloudEvent=CloudEvent{id='a89b61a2-5644-487a-8a86-144855c5dce8', source=SomeEventSource, type='RulesRequest', subject='TheSubject', data=JsonCloudEventData{node={"maxAmount":5000,"loanApplications":[{"id":"ABC10001","amount":2000,"deposit":100,"applicant":{"age":45,"name":"John"}},{"id":"ABC10002","amount":5000,"deposit":100,"applicant":{"age":25,"name":"Paul"}},{"id":"ABC10015","amount":1000,"deposit":100,"applicant":{"age":12,"name":"George"}}]}}, extensions={kogitoruleunitquery=FindAllApplicationAmounts, kogitoruleunitid=org.kie.kogito.queries.LoanUnit}}] -2022-10-06 15:38:13,875 DEBUG [org.kie.kog.eve.rul.EventDrivenRulesController] (vert.x-eventloop-thread-10) Invalid request. Event CloudEventWrapDataEvent [cloudEvent=CloudEvent{id='a89b61a2-5644-487a-8a86-144855c5dce8', source=SomeEventSource, type='RulesRequest', subject='TheSubject', data=JsonCloudEventData{node={"maxAmount":5000,"loanApplications":[{"id":"ABC10001","amount":2000,"deposit":100,"applicant":{"age":45,"name":"John"}},{"id":"ABC10002","amount":5000,"deposit":100,"applicant":{"age":25,"name":"Paul"}},{"id":"ABC10015","amount":1000,"deposit":100,"applicant":{"age":12,"name":"George"}}]}}, extensions={kogitoruleunitquery=FindAllApplicationAmounts, kogitoruleunitid=org.kie.kogito.queries.LoanUnit}}] with extension KogitoRulesExtension [ruleUnitId=org.kie.kogito.queries.LoanUnit, ruleUnitQuery=FindAllApplicationAmounts] is not recognized by executor AbstractEventDrivenQueryExecutor [ruleUnit=org.kie.kogito.queries.LoanUnitRuleUnit@322c39d7, queryName=FindNotApprovedIdAndAmount, objectClass=class org.kie.kogito.queries.LoanUnit] -2022-10-06 15:38:13,876 DEBUG [org.kie.kog.eve.rul.EventDrivenRulesController] (vert.x-eventloop-thread-10) Processing event CloudEventWrapDataEvent [cloudEvent=CloudEvent{id='a89b61a2-5644-487a-8a86-144855c5dce8', source=SomeEventSource, type='RulesRequest', subject='TheSubject', data=JsonCloudEventData{node={"maxAmount":5000,"loanApplications":[{"id":"ABC10001","amount":2000,"deposit":100,"applicant":{"age":45,"name":"John"}},{"id":"ABC10002","amount":5000,"deposit":100,"applicant":{"age":25,"name":"Paul"}},{"id":"ABC10015","amount":1000,"deposit":100,"applicant":{"age":12,"name":"George"}}]}}, extensions={kogitoruleunitquery=FindAllApplicationAmounts, kogitoruleunitid=org.kie.kogito.queries.LoanUnit}}] -2022-10-06 15:38:13,921 DEBUG [org.kie.kog.add.qua.mes.com.AbstractQuarkusCloudEventEmitter] (vert.x-eventloop-thread-10) publishing event CloudEvent{id='e3e2b624-cd6e-4f27-8323-7abf530070cb', source=find-all-application-amounts, type='RulesResponse', subject='TheSubject', data=BytesCloudEventData{value=[91, 123, 34, 97, 109, 111, 117, 110, 116, 115, 34, 58, 56, 48, 48, 48, 125, 93]}, extensions={kogitoruleunitquery=FindAllApplicationAmounts, kogitoruleunitid=org.kie.kogito.queries.LoanUnit}} for type RulesResponse -2022-10-06 15:38:13,922 DEBUG [org.kie.kog.add.qua.mes.com.AbstractQuarkusCloudEventReceiver] (vert.x-eventloop-thread-10) Acking message id { - "specversion": "1.0", - "id": "a89b61a2-5644-487a-8a86-144855c5dce8", - "source": "SomeEventSource", - "type": "RulesRequest", - "subject": "TheSubject", - "kogitoruleunitid": "org.kie.kogito.queries.LoanUnit", - "kogitoruleunitquery": "FindAllApplicationAmounts", - "data": { - "maxAmount": 5000, - "loanApplications": [ - { - "id": "ABC10001", - "amount": 2000, - "deposit": 100, - "applicant": { - "age": 45, - "name": "John" - } - }, - { - "id": "ABC10002", - "amount": 5000, - "deposit": 100, - "applicant": { - "age": 25, - "name": "Paul" - } - }, - { - "id": "ABC10015", - "amount": 1000, - "deposit": 100, - "applicant": { - "age": 12, - "name": "George" - } - } - ] - } -} - -2022-10-06 15:38:14,935 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-6-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-3, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Revoke previously assigned partitions ruleunit-event-driven-responses-0 -2022-10-06 15:38:14,937 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-6-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-3, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Member consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-3-ca80add5-49c0-419c-a7fb-478bcf468700 sending LeaveGroup request to coordinator localhost:49238 (id: 2147483647 rack: null) due to the consumer is being closed -2022-10-06 15:38:14,938 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-6-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-3, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Resetting generation and member id due to: consumer pro-actively leaving the group -2022-10-06 15:38:14,938 INFO [org.apa.kaf.cli.con.int.ConsumerCoordinator] (pool-6-thread-1) [Consumer clientId=consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-3, groupId=org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer] Request joining group due to: consumer pro-actively leaving the group -2022-10-06 15:38:14,939 INFO [org.apa.kaf.com.met.Metrics] (pool-6-thread-1) Metrics scheduler closed -2022-10-06 15:38:14,940 INFO [org.apa.kaf.com.met.Metrics] (pool-6-thread-1) Closing reporter org.apache.kafka.common.metrics.JmxReporter -2022-10-06 15:38:14,940 INFO [org.apa.kaf.com.met.Metrics] (pool-6-thread-1) Metrics reporters closed -2022-10-06 15:38:14,944 INFO [org.apa.kaf.com.uti.AppInfoParser] (pool-6-thread-1) App info kafka.consumer for consumer-org.kie.kogito.test.quarkus.kafka.KafkaTestClientConsumer-3 unregistered -[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 19.636 s - in org.kie.kogito.examples.RuleUnitEventDrivenIT -2022-10-06 15:38:15,114 WARN [org.apa.kaf.cli.NetworkClient] (smallrye-kafka-consumer-thread-0) [Consumer clientId=kafka-consumer-kogito_incoming_stream, groupId=ruleunit-event-driven-example] Connection to node 0 (localhost/127.0.0.1:49238) could not be established. Broker may not be available. -2022-10-06 15:38:15,115 WARN [org.apa.kaf.cli.NetworkClient] (kafka-producer-network-thread | kafka-producer-kogito_outgoing_stream) [Producer clientId=kafka-producer-kogito_outgoing_stream] Connection to node 0 (localhost/127.0.0.1:49238) could not be established. Broker may not be available. -[INFO] -[INFO] Results: -[INFO] -[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0 -[INFO] -[INFO] -[INFO] --- maven-failsafe-plugin:3.0.0-M5:integration-test (default) @ ruleunit-event-driven-quarkus --- -[INFO] Skipping execution of surefire because it has already been run for this configuration -[INFO] -[INFO] --- maven-failsafe-plugin:3.0.0-M5:verify (integration-test) @ ruleunit-event-driven-quarkus --- -[INFO] -[INFO] --- maven-failsafe-plugin:3.0.0-M5:verify (default) @ ruleunit-event-driven-quarkus --- -[INFO] -[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ ruleunit-event-driven-quarkus --- -[INFO] Installing /home/ftirados/git/kogito-examples/kogito-quarkus-examples/ruleunit-event-driven-quarkus/target/ruleunit-event-driven-quarkus.jar to /home/ftirados/.m2/repository/org/kie/kogito/examples/ruleunit-event-driven-quarkus/2.0.0-SNAPSHOT/ruleunit-event-driven-quarkus-2.0.0-SNAPSHOT.jar -[INFO] Installing /home/ftirados/git/kogito-examples/kogito-quarkus-examples/ruleunit-event-driven-quarkus/pom.xml to /home/ftirados/.m2/repository/org/kie/kogito/examples/ruleunit-event-driven-quarkus/2.0.0-SNAPSHOT/ruleunit-event-driven-quarkus-2.0.0-SNAPSHOT.pom -[INFO] Installing /home/ftirados/git/kogito-examples/kogito-quarkus-examples/ruleunit-event-driven-quarkus/target/ruleunit-event-driven-quarkus-tests.jar to /home/ftirados/.m2/repository/org/kie/kogito/examples/ruleunit-event-driven-quarkus/2.0.0-SNAPSHOT/ruleunit-event-driven-quarkus-2.0.0-SNAPSHOT-tests.jar -[INFO] Installing /home/ftirados/git/kogito-examples/kogito-quarkus-examples/ruleunit-event-driven-quarkus/target/ruleunit-event-driven-quarkus-sources.jar to /home/ftirados/.m2/repository/org/kie/kogito/examples/ruleunit-event-driven-quarkus/2.0.0-SNAPSHOT/ruleunit-event-driven-quarkus-2.0.0-SNAPSHOT-sources.jar -[INFO] Installing /home/ftirados/git/kogito-examples/kogito-quarkus-examples/ruleunit-event-driven-quarkus/target/ruleunit-event-driven-quarkus-test-sources.jar to /home/ftirados/.m2/repository/org/kie/kogito/examples/ruleunit-event-driven-quarkus/2.0.0-SNAPSHOT/ruleunit-event-driven-quarkus-2.0.0-SNAPSHOT-test-sources.jar -[INFO] ------------------------------------------------------------------------ -[INFO] BUILD SUCCESS -[INFO] ------------------------------------------------------------------------ -[INFO] Total time: 28.313 s -[INFO] Finished at: 2022-10-06T15:38:15+02:00 -[INFO] ------------------------------------------------------------------------ diff --git a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/pom.xml b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/pom.xml index d04d837993..d7f37cc15e 100644 --- a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/pom.xml +++ b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/pom.xml @@ -1,4 +1,24 @@ + @@ -7,19 +27,19 @@ org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT ruleunit-event-driven-quarkus Kogito Example :: Rule Unit Event-Driven :: Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -41,13 +61,13 @@ - org.kie.kogito - kogito-quarkus-rules + org.drools + drools-quarkus-rules - org.kie.kogito - kogito-addons-quarkus-events-rules + org.drools + drools-addons-quarkus-events-rules diff --git a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/main/java/org/kie/kogito/queries/AllAmounts.java b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/main/java/org/kie/kogito/queries/AllAmounts.java index e0c67ef987..0bbb602617 100644 --- a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/main/java/org/kie/kogito/queries/AllAmounts.java +++ b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/main/java/org/kie/kogito/queries/AllAmounts.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.queries; diff --git a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/main/java/org/kie/kogito/queries/Applicant.java b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/main/java/org/kie/kogito/queries/Applicant.java index 175d3a98d5..25d1c54e64 100644 --- a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/main/java/org/kie/kogito/queries/Applicant.java +++ b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/main/java/org/kie/kogito/queries/Applicant.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.queries; diff --git a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/main/java/org/kie/kogito/queries/LoanApplication.java b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/main/java/org/kie/kogito/queries/LoanApplication.java index 70eec1c4e3..8697730bd3 100644 --- a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/main/java/org/kie/kogito/queries/LoanApplication.java +++ b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/main/java/org/kie/kogito/queries/LoanApplication.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.queries; diff --git a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/main/java/org/kie/kogito/queries/LoanUnit.java b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/main/java/org/kie/kogito/queries/LoanUnit.java index 3f68f880e8..4b4ba73582 100644 --- a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/main/java/org/kie/kogito/queries/LoanUnit.java +++ b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/main/java/org/kie/kogito/queries/LoanUnit.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.queries; diff --git a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/main/resources/application.properties b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/main/resources/application.properties index 660bd90391..8548299451 100644 --- a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/main/resources/application.properties +++ b/kogito-quarkus-examples/ruleunit-event-driven-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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/main/resources/org/kie/kogito/queries/RuleUnitQuery.drl b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/main/resources/org/kie/kogito/queries/RuleUnitQuery.drl index 2f14454ead..483c686584 100644 --- a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/main/resources/org/kie/kogito/queries/RuleUnitQuery.drl +++ b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/main/resources/org/kie/kogito/queries/RuleUnitQuery.drl @@ -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.queries; unit LoanUnit; diff --git a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/test/java/org/kie/kogito/examples/RuleUnitEventDrivenIT.java b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/test/java/org/kie/kogito/examples/RuleUnitEventDrivenIT.java index 4d3687a923..84f5177c80 100644 --- a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/test/java/org/kie/kogito/examples/RuleUnitEventDrivenIT.java +++ b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/test/java/org/kie/kogito/examples/RuleUnitEventDrivenIT.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.examples; diff --git a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/test/resources/application.properties b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/test/resources/application.properties index 4396d4ebfb..4242e6e9c1 100644 --- a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/test/resources/application.properties +++ b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/test/resources/application.properties @@ -1 +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. +# + quarkus.kafka.devservices.enabled=false \ No newline at end of file diff --git a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/test/resources/logback-test.xml b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/test/resources/logback-test.xml index e8c716f5ef..bb6af4db85 100644 --- a/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/test/resources/logback-test.xml +++ b/kogito-quarkus-examples/ruleunit-event-driven-quarkus/src/test/resources/logback-test.xml @@ -1,3 +1,23 @@ + diff --git a/kogito-quarkus-examples/ruleunit-quarkus-example/README.md b/kogito-quarkus-examples/ruleunit-quarkus-example/README.md index fbfee94e76..24b5ca60fd 100644 --- a/kogito-quarkus-examples/ruleunit-quarkus-example/README.md +++ b/kogito-quarkus-examples/ruleunit-quarkus-example/README.md @@ -11,9 +11,9 @@ REST endpoints are generated from query rules. You can insert `LoanApplication` ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVM 19.2.1](https://github.com/oracle/graal/releases/tag/vm-19.2.1) installed @@ -123,7 +123,3 @@ Example response: } ] ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-quarkus-examples/ruleunit-quarkus-example/operator/ruleunit-quarkus-example.yaml b/kogito-quarkus-examples/ruleunit-quarkus-example/operator/ruleunit-quarkus-example.yaml deleted file mode 100644 index 4280faddfe..0000000000 --- a/kogito-quarkus-examples/ruleunit-quarkus-example/operator/ruleunit-quarkus-example.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: ruleunit-quarkus-example -spec: - type: RemoteSource - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/ruleunit-quarkus-example - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: ruleunit-quarkus-example \ No newline at end of file diff --git a/kogito-quarkus-examples/ruleunit-quarkus-example/pom.xml b/kogito-quarkus-examples/ruleunit-quarkus-example/pom.xml index 8093fb0f02..fbbc892a42 100644 --- a/kogito-quarkus-examples/ruleunit-quarkus-example/pom.xml +++ b/kogito-quarkus-examples/ruleunit-quarkus-example/pom.xml @@ -1,23 +1,43 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT ruleunit-quarkus-example Kogito Example :: RuleUnit - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -39,8 +59,8 @@ - org.kie.kogito - kogito-quarkus-rules + org.drools + drools-quarkus-rules io.quarkus diff --git a/kogito-quarkus-examples/ruleunit-quarkus-example/src/main/java/org/kie/kogito/queries/AllAmounts.java b/kogito-quarkus-examples/ruleunit-quarkus-example/src/main/java/org/kie/kogito/queries/AllAmounts.java index e0c67ef987..0bbb602617 100644 --- a/kogito-quarkus-examples/ruleunit-quarkus-example/src/main/java/org/kie/kogito/queries/AllAmounts.java +++ b/kogito-quarkus-examples/ruleunit-quarkus-example/src/main/java/org/kie/kogito/queries/AllAmounts.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.queries; diff --git a/kogito-quarkus-examples/ruleunit-quarkus-example/src/main/java/org/kie/kogito/queries/Applicant.java b/kogito-quarkus-examples/ruleunit-quarkus-example/src/main/java/org/kie/kogito/queries/Applicant.java index 175d3a98d5..25d1c54e64 100644 --- a/kogito-quarkus-examples/ruleunit-quarkus-example/src/main/java/org/kie/kogito/queries/Applicant.java +++ b/kogito-quarkus-examples/ruleunit-quarkus-example/src/main/java/org/kie/kogito/queries/Applicant.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.queries; diff --git a/kogito-quarkus-examples/ruleunit-quarkus-example/src/main/java/org/kie/kogito/queries/LoanApplication.java b/kogito-quarkus-examples/ruleunit-quarkus-example/src/main/java/org/kie/kogito/queries/LoanApplication.java index 70eec1c4e3..8697730bd3 100644 --- a/kogito-quarkus-examples/ruleunit-quarkus-example/src/main/java/org/kie/kogito/queries/LoanApplication.java +++ b/kogito-quarkus-examples/ruleunit-quarkus-example/src/main/java/org/kie/kogito/queries/LoanApplication.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.queries; diff --git a/kogito-quarkus-examples/ruleunit-quarkus-example/src/main/java/org/kie/kogito/queries/LoanUnit.java b/kogito-quarkus-examples/ruleunit-quarkus-example/src/main/java/org/kie/kogito/queries/LoanUnit.java index 3f68f880e8..4b4ba73582 100644 --- a/kogito-quarkus-examples/ruleunit-quarkus-example/src/main/java/org/kie/kogito/queries/LoanUnit.java +++ b/kogito-quarkus-examples/ruleunit-quarkus-example/src/main/java/org/kie/kogito/queries/LoanUnit.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.queries; diff --git a/kogito-quarkus-examples/ruleunit-quarkus-example/src/main/resources/application.properties b/kogito-quarkus-examples/ruleunit-quarkus-example/src/main/resources/application.properties index 35b7e32bea..a76c2a39bb 100644 --- a/kogito-quarkus-examples/ruleunit-quarkus-example/src/main/resources/application.properties +++ b/kogito-quarkus-examples/ruleunit-quarkus-example/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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-quarkus-examples/ruleunit-quarkus-example/src/main/resources/org/kie/kogito/queries/RuleUnitQuery.drl b/kogito-quarkus-examples/ruleunit-quarkus-example/src/main/resources/org/kie/kogito/queries/RuleUnitQuery.drl index 2f14454ead..483c686584 100644 --- a/kogito-quarkus-examples/ruleunit-quarkus-example/src/main/resources/org/kie/kogito/queries/RuleUnitQuery.drl +++ b/kogito-quarkus-examples/ruleunit-quarkus-example/src/main/resources/org/kie/kogito/queries/RuleUnitQuery.drl @@ -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.queries; unit LoanUnit; diff --git a/kogito-quarkus-examples/ruleunit-quarkus-example/src/test/java/org/kie/kogito/decisiontable/quarkus/ruleunit/NativeRestQueryTestIT.java b/kogito-quarkus-examples/ruleunit-quarkus-example/src/test/java/org/kie/kogito/decisiontable/quarkus/ruleunit/NativeRestQueryTestIT.java index ae65452de2..6701320843 100644 --- a/kogito-quarkus-examples/ruleunit-quarkus-example/src/test/java/org/kie/kogito/decisiontable/quarkus/ruleunit/NativeRestQueryTestIT.java +++ b/kogito-quarkus-examples/ruleunit-quarkus-example/src/test/java/org/kie/kogito/decisiontable/quarkus/ruleunit/NativeRestQueryTestIT.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.decisiontable.quarkus.ruleunit; -import io.quarkus.test.junit.NativeImageTest; +import io.quarkus.test.junit.QuarkusIntegrationTest; -@NativeImageTest +@QuarkusIntegrationTest public class NativeRestQueryTestIT extends RestQueryTest { // Execute the same tests but in native mode. diff --git a/kogito-quarkus-examples/ruleunit-quarkus-example/src/test/java/org/kie/kogito/decisiontable/quarkus/ruleunit/RestQueryTest.java b/kogito-quarkus-examples/ruleunit-quarkus-example/src/test/java/org/kie/kogito/decisiontable/quarkus/ruleunit/RestQueryTest.java index c9cda39bbd..2260971193 100644 --- a/kogito-quarkus-examples/ruleunit-quarkus-example/src/test/java/org/kie/kogito/decisiontable/quarkus/ruleunit/RestQueryTest.java +++ b/kogito-quarkus-examples/ruleunit-quarkus-example/src/test/java/org/kie/kogito/decisiontable/quarkus/ruleunit/RestQueryTest.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.decisiontable.quarkus.ruleunit; diff --git a/kogito-quarkus-examples/ruleunit-quarkus-example/src/test/resources/application.properties b/kogito-quarkus-examples/ruleunit-quarkus-example/src/test/resources/application.properties index 3c17236931..a047ea13ba 100644 --- a/kogito-quarkus-examples/ruleunit-quarkus-example/src/test/resources/application.properties +++ b/kogito-quarkus-examples/ruleunit-quarkus-example/src/test/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. +# + # Quarkus quarkus.http.test-port=0 \ No newline at end of file diff --git a/kogito-quarkus-examples/trusty-demonstration/README.md b/kogito-quarkus-examples/trusty-demonstration/README.md deleted file mode 100644 index 224c851e77..0000000000 --- a/kogito-quarkus-examples/trusty-demonstration/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Trusty demonstation - -This is a demonstration of the trusty AI tracing capabilities. - -NOTE: In order to play with the demo, ensure that you are on the stable branch or on the branch of a specific release (for example the branch for the release `0.17` is `0.17.x`). -The `main` branch is aligned to the latest changes in all the repositories. This means that `main` might be using some new operator features not included in the release that we use in this demo: don't use it! - -In the two subfolders [kubernetes](/kubernetes) and [docker-compose](/docker-compose) you can find all the instructions to run the demo on `kubernetes` and `docker-compose`. \ No newline at end of file diff --git a/kogito-quarkus-examples/trusty-demonstration/docker-compose/README.md b/kogito-quarkus-examples/trusty-demonstration/docker-compose/README.md deleted file mode 100644 index e1047dbb02..0000000000 --- a/kogito-quarkus-examples/trusty-demonstration/docker-compose/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# Trusty demonstation - -This is a demonstration of the trusty AI tracing capabilities. - -NOTE: In order to play with the demo, ensure that you are on the stable branch or on the branch of a specific release (for example the branch for the release `0.17` is `0.17.x`). -The `main` branch is aligned to the latest changes in all the repositories. This means that `main` might be using some new operator features not included in the release that we use in this demo: don't use it! - -## Requirements - -- docker version > 19.03.12 -- java version > 11 -- maven version > 3.8.1 -- docker-compose version > 1.25.2 - -Note: also previous versions of `docker` and `docker-compose` might work, but they were not tested. - -## Build your kogito runtime application - -In this example, we will use the `dmn-tracing-quarkus` application that you can find in the root of this repository. This kogito application is using the `tracing-addon` so to export the tracing information that will be used by the trusty and explainability services for further analysis. - -Navigate under the folder `kogito-examples/kogito-quarkus-examples/dmn-tracing-quarkus` and run -```bash -mvn clean package -DskipTests -``` - -Copy the generated dashboards from `dmn-tracing-quarkus/target/classes/META-INF/resources/monitoring/dashboards/*` to the directory `trusty-demonstration/docker-compose/grafana/provisioning/dashboards`. - -Now you need to have an account on a remote hub like `quay` or `dockerhub` for example. Assuming that you have an account on `quay` and you are using `docker`, build the image with -```bash -docker build --tag quay.io//dmn-tracing-quarkus:1.0.0 . -``` -replacing the string `` with your namespace (i.e. your username). - -Push the image -```bash -docker push quay.io//dmn-tracing-quarkus:1.0.0 -``` - -## Deploy the services with docker-compose - -Switch to the current directory `trusty-demonstration/docker-compose` and edit the `docker-compose.yml` file and replace the image for the service `kogito-app` with the image tag you've just created (`quay.io//dmn-tracing-quarkus:1.0.0`). - -Then simply start it with - -```bash -docker-compose up -``` - -The applications will be available in few minutes at the following addresses: -- Kogito application: [http://localhost:8080](http://localhost:8080). You can use the swagger-ui at the address [http://localhost:8080/swagger-ui](http://localhost:8080/swagger-ui) and execute a simple request for example with the following payload -```JSON -{"Bribe": 1000,"Client": {"age": 43,"existing payments": 100,"salary": 1950},"Loan": {"duration": 15,"installment": 180}, "SupremeDirector": "Yes"} -``` -- AuditUI: [http://localhost:1338](http://localhost:1338). -- Grafana: [http://localhost:3000](http://localhost:3000). - -For more info about the AuditUI, you can have a look at the [official documentation](https://docs.jboss.org/kogito/release/latest/html_single/#proc-audit-console-using_kogito-dmn-models). Note that the documentation covers the scenario of the AuditUI deployed with the Kogito Operator on Openshift, but the part specific for the AuditUI (alias for trusty-ui) is valid for this scenario as well. \ No newline at end of file diff --git a/kogito-quarkus-examples/trusty-demonstration/docker-compose/docker-compose.yml b/kogito-quarkus-examples/trusty-demonstration/docker-compose/docker-compose.yml deleted file mode 100644 index a0636ab3e9..0000000000 --- a/kogito-quarkus-examples/trusty-demonstration/docker-compose/docker-compose.yml +++ /dev/null @@ -1,109 +0,0 @@ -version: '2' - -services: - zookeeper: - image: wurstmeister/zookeeper:3.4.6 - ports: - - "2181:2181" - environment: - LOG_DIR: "/tmp/logs" - - kafka: - image: wurstmeister/kafka:2.12-2.2.1 - depends_on: - - zookeeper - ports: - - "9092:9092" - expose: - - "9093" - environment: - KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:9093,OUTSIDE://localhost:9092 - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT - KAFKA_LISTENERS: INSIDE://0.0.0.0:9093,OUTSIDE://0.0.0.0:9092 - KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 - KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE - LOG_DIR: "/tmp/logs" - - kafdrop: - image: obsidiandynamics/kafdrop - depends_on: - - kafka - ports: - - "9000:9000" - environment: - KAFKA_BROKERCONNECT: "kafka:9093" - JVM_OPTS: "-Xms32M -Xmx64M" - SERVER_SERVLET_CONTEXTPATH: "/" - - infinispan: - image: infinispan/server:14.0.4.Final - container_name: infinispan - ports: - - "11222:11222" - command: "-c infinispan-demo.xml" - volumes: - - ./infinispan/infinispan.xml:/opt/infinispan/server/conf/infinispan-demo.xml:z - - kogito-app: - image: quay.io//dmn-tracing-quarkus:1.0.0 - ports: - - 8080:8080 - environment: - KAFKA_BOOTSTRAP_SERVERS: kafka:9093 - KOGITO_SERVICE_URL: http://kogito-app:8080 - depends_on: - - kafka - - explainability: - image: quay.io/kiegroup/kogito-explainability:1.5 - depends_on: - - kafka - - kogito-app - environment: - KAFKA_BOOTSTRAP_SERVERS: kafka:9093 - KAFKA_APPLICATION_FAILURE_STRATEGY: "ignore" - ports: - - 1336:8080 - - trusty: - image: quay.io/kiegroup/kogito-trusty-infinispan:1.5 - depends_on: - - kafka - - infinispan - environment: - KAFKA_BOOTSTRAP_SERVERS: kafka:9093 - QUARKUS_INFINISPAN_CLIENT_HOSTS: infinispan:11222 - QUARKUS_INFINISPAN_CLIENT_USE_AUTH: "false" - KAFKA_APPLICATION_FAILURE_STRATEGY: "ignore" - ports: - - 1337:8080 - - trusty-ui: - image: quay.io/kiegroup/kogito-trusty-ui:1.5 - depends_on: - - kafka - environment: - KOGITO_TRUSTY_ENDPOINT: http://localhost:1337 - ports: - - 1338:8080 - - prometheus: - image: prom/prometheus:v2.8.0 - volumes: - - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml - command: - - '--config.file=/etc/prometheus/prometheus.yml' - ports: - - '9090:9090' - depends_on: - - kogito-app - - grafana: - image: grafana/grafana:6.6.1 - depends_on: - - prometheus - ports: - - 3000:3000 - volumes: - - ./grafana/provisioning/:/etc/grafana/provisioning/ - - ./grafana/grafana.ini:/etc/grafana/grafana.ini diff --git a/kogito-quarkus-examples/trusty-demonstration/docker-compose/grafana/grafana.ini b/kogito-quarkus-examples/trusty-demonstration/docker-compose/grafana/grafana.ini deleted file mode 100755 index 208ef27194..0000000000 --- a/kogito-quarkus-examples/trusty-demonstration/docker-compose/grafana/grafana.ini +++ /dev/null @@ -1,3 +0,0 @@ -[auth.anonymous] -enabled = true -org_role = Admin diff --git a/kogito-quarkus-examples/trusty-demonstration/docker-compose/grafana/provisioning/dashboards/dashboard.yml b/kogito-quarkus-examples/trusty-demonstration/docker-compose/grafana/provisioning/dashboards/dashboard.yml deleted file mode 100755 index 437d59118f..0000000000 --- a/kogito-quarkus-examples/trusty-demonstration/docker-compose/grafana/provisioning/dashboards/dashboard.yml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: 1 - -providers: -- name: 'Prometheus' - orgId: 1 - folder: '' - type: file - disableDeletion: true - allowUiUpdates: true - editable: true - options: - path: /etc/grafana/provisioning/dashboards - diff --git a/kogito-quarkus-examples/trusty-demonstration/docker-compose/grafana/provisioning/datasources/datasource.yml b/kogito-quarkus-examples/trusty-demonstration/docker-compose/grafana/provisioning/datasources/datasource.yml deleted file mode 100755 index 4e58703f23..0000000000 --- a/kogito-quarkus-examples/trusty-demonstration/docker-compose/grafana/provisioning/datasources/datasource.yml +++ /dev/null @@ -1,50 +0,0 @@ -# config file version -apiVersion: 1 - -# list of datasources that should be deleted from the database -deleteDatasources: - - name: Prometheus - orgId: 1 - -# list of datasources to insert/update depending -# whats available in the database -datasources: - # name of the datasource. Required -- name: Prometheus - # datasource type. Required - type: prometheus - # access mode. direct or proxy. Required - access: proxy - # org id. will default to orgId 1 if not specified - orgId: 1 - # url - url: http://prometheus:9090 - # database password, if used - password: - # database user, if used - user: - # database name, if used - database: - # enable/disable basic auth - basicAuth: true - # basic auth username - basicAuthUser: admin - # basic auth password - basicAuthPassword: foobar - # enable/disable with credentials headers - withCredentials: - # mark as default datasource. Max one per org - isDefault: true - # fields that will be converted to json and stored in json_data - jsonData: - graphiteVersion: "1.1" - tlsAuth: false - tlsAuthWithCACert: false - # json object of data that will be encrypted. - secureJsonData: - tlsCACert: "..." - tlsClientCert: "..." - tlsClientKey: "..." - version: 1 - # allow users to edit datasources from the UI. - editable: true diff --git a/kogito-quarkus-examples/trusty-demonstration/docker-compose/infinispan/infinispan.xml b/kogito-quarkus-examples/trusty-demonstration/docker-compose/infinispan/infinispan.xml deleted file mode 100644 index 4d594bfc24..0000000000 --- a/kogito-quarkus-examples/trusty-demonstration/docker-compose/infinispan/infinispan.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/kogito-quarkus-examples/trusty-demonstration/docker-compose/prometheus/prometheus.yml b/kogito-quarkus-examples/trusty-demonstration/docker-compose/prometheus/prometheus.yml deleted file mode 100755 index 8c19b01ac8..0000000000 --- a/kogito-quarkus-examples/trusty-demonstration/docker-compose/prometheus/prometheus.yml +++ /dev/null @@ -1,10 +0,0 @@ -# A scrape configuration containing exactly one endpoint to scrape: -scrape_configs: - - job_name: 'kogito-app' - - scrape_interval: 10s - - metrics_path: /q/metrics - - static_configs: - - targets: ['kogito-app:8080'] \ No newline at end of file diff --git a/kogito-quarkus-examples/trusty-demonstration/kubernetes/README.md b/kogito-quarkus-examples/trusty-demonstration/kubernetes/README.md deleted file mode 100644 index 7ee55969c6..0000000000 --- a/kogito-quarkus-examples/trusty-demonstration/kubernetes/README.md +++ /dev/null @@ -1,187 +0,0 @@ -# Trusty demonstation - -This is a demonstration of the trusty AI tracing capabilities. - -NOTE: In order to play with the demo, ensure that you are on the stable branch or on the branch of a specific release (for example the branch for the release `0.17` is `0.17.x`). -The `main` branch is aligned to the latest changes in all the repositories. This means that `main` might be using some new operator features not included in the release that we use in this demo: don't use it! - -## Requirements - -- docker version > 19.03.12 -- minikube version > 1.16.0 -- java version > 11 -- maven version > 3.8.1 -- kubernetes version > 1.20 - -Note: also previous versions of `docker`, `minikube` and `kubernetes` might work, but they were not tested. - -## Build your kogito runtime application - -In this example, we will use the `dmn-tracing-quarkus` application that you can find in the root of this repository. This kogito application is using the `tracing-addon` so to export the tracing information that will be used by the trusty and explainability services for further analysis. - -Navigate under the folder `kogito-examples/kogito-quarkus-examples/dmn-tracing-quarkus` and run -```bash -mvn clean package -DskipTests -``` - -Now you need to have an account on a remote hub like `quay` or `dockerhub` for example. Assuming that you have an account on `quay` and you are using `docker`, build the image with -```bash -docker build --tag quay.io//dmn-tracing-quarkus:1.0.0 . -``` -replacing the string `` with your namespace (i.e. your username). - -Push the image -```bash -docker push quay.io//dmn-tracing-quarkus:1.0.0 -``` - -## Deploy the infrastructure with minishift/kubernetes - -Navigate back to the current directory where this `README.md` file is stored. - -The first step is to start your `minikube` cluster: - -```bash -minikube start -minikube addons enable ingress -minikube addons enable olm -``` - -Create a new project called (for example) `trusty-demo` - -```bash -PROJECT_NAME=trusty-demo -kubectl create namespace "$PROJECT_NAME" -``` - -Set the Kogito release version - -```bash -KOGITO_VERSION=v1.5.0 -``` - -Deploy the kogito operator in the cluster -```bash -wget https://github.com/kiegroup/kogito-operator/releases/download/${KOGITO_VERSION}/kogito-operator.yaml -kubectl apply -f kogito-operator.yaml -``` - -You should see that the `kogito-operator` has one pod running within some minutes: the command `kubectl get pods -n kogito-operator-system` should return something like - -```bash -NAME READY STATUS RESTARTS AGE -kogito-operator-controller-manager-7456474485-hn89d 2/2 Running 0 63s - -``` - -Install the [Infinispan operator](https://operatorhub.io/operator/infinispan/2.0.x/infinispan-operator.v2.0.6) version 2.0.6. -Pay attention that by default the Infinispan operator is installed on the namespace `my-infinispan`. You have to download the `yaml` file and change the namespace of the custom resources accordingly to your namespace. - -```bash -wget https://operatorhub.io/install/2.0.x/infinispan.yaml -sed -i "s/namespace: my-infinispan/namespace: ${PROJECT_NAME}/g" infinispan.yaml -sed -i "s/- my-infinispan/- ${PROJECT_NAME}/g" infinispan.yaml -kubectl apply -f infinispan.yaml -n ${PROJECT_NAME} -``` - -If the infinispan operator does not show under your namespace, please ensure that all the pods under the namespace `olm` are up and running. If the catalog pod is in Crashloop status, the workaround is to delete the pod and wait until it gets redeployed automatically. - -Install `strimzi` operator with - -```bash -TARGET_DIR="." -STRIMZI_VERSION=0.28.0 - -wget "https://github.com/strimzi/strimzi-kafka-operator/releases/download/${STRIMZI_VERSION}/strimzi-${STRIMZI_VERSION}.tar.gz" -P "$TARGET_DIR/" -tar zxf "${TARGET_DIR}/strimzi-${STRIMZI_VERSION}.tar.gz" -C "$TARGET_DIR" -find strimzi-${STRIMZI_VERSION}/install/cluster-operator -name '*RoleBinding*.yaml' -type f -exec sed -i "s/namespace: .*/namespace: ${PROJECT_NAME}/" {} \; -kubectl apply -f strimzi-${STRIMZI_VERSION}/install/cluster-operator/ -n ${PROJECT_NAME} -``` - -Deploy kafka and infinispan resources with -```bash -kubectl apply -f resources/kafka.yaml -n ${PROJECT_NAME} -kubectl apply -f resources/kafka-topics.yaml -n ${PROJECT_NAME} -kubectl apply -f resources/infinispan-minimal.yaml -n ${PROJECT_NAME} -``` - -Deploy the `KogitoInfra` custom resources, so that the Kogito operator bind the kogito applications with the infinispan and kafka resources. -```bash -kubectl apply -f resources/kogito-infra.yaml -n ${PROJECT_NAME} -``` - -Deploy the Trusty service and expose it - -```bash -kubectl apply -f resources/trusty.yaml -n ${PROJECT_NAME} -kubectl expose deployment trusty -n ${PROJECT_NAME} --type=NodePort --name=trusty-np -minikube service trusty-np -n ${PROJECT_NAME} -``` - -Take the exposed address and replace the env variables `KOGITO_TRUSTY_ENDPOINT` and `KOGITO_TRUSTY_WS_URL` in the file `resources/trusty-ui.yaml`. For example, if the address is `http://172.17.0.2:1337`, then the content of the file should be -```bash -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoSupportingService -metadata: - name: trusty-ui -spec: - serviceType: TrustyUI - replicas: 1 - image: quay.io/kiegroup/kogito-trusty-ui:1.4 - env: - - name: KOGITO_TRUSTY_ENDPOINT - value: http://172.17.0.2:1337 - - name: KOGITO_TRUSTY_WS_URL - value: ws://172.17.0.2:1337 -``` - -Modify the content of the file `resources/dmn-tracing-quarkus.yaml` with the information you used in the first section. The content should look like the following - -```yaml -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: dmn-tracing-quarkus - labels: - app: dmn-tracing-quarkus -spec: - replicas: 1 - image: quay.io//dmn-tracing-quarkus:2.0.0-snapshot # <---- replace with your image - infra: - - kogito-kafka-infra - env: - - name: KOGITO_SERVICE_URL - value: http://dmn-tracing-quarkus:8080 -``` - -It's time to deploy all the resources with the commands -```bash -kubectl apply -f resources/trusty-ui.yaml -n ${PROJECT_NAME} -kubectl apply -f resources/explainability.yaml -n ${PROJECT_NAME} -kubectl apply -f resources/dmn-tracing-quarkus.yaml -n ${PROJECT_NAME} -``` - -Expose the Kogito runtime service with - -```bash -kubectl expose deployment dmn-tracing-quarkus -n ${PROJECT_NAME} --type=NodePort --name=dmn-tracing-quarkus-np -minikube service dmn-tracing-quarkus-np -n ${PROJECT_NAME} -``` - -A new tab in your browser should be opened automatically. Navigate under the path `/q/swagger-ui` and execute a post request on the endpoint `LoanEligibility` with the following payload: -```json -{"Bribe": 1000,"Client": {"age": 43,"existing payments": 100,"salary": 1950},"Loan": {"duration": 15,"installment": 180}, "SupremeDirector": "Yes"} -``` - -![SwaggerUI](images/swagger-ui.png) - -Expose the audit ui (alias trusty-ui) with -```bash -kubectl expose deployment trusty-ui -n ${PROJECT_NAME} --type=NodePort --name=trusty-ui-np -minikube service trusty-ui-np -n ${PROJECT_NAME} -``` - -And navigate through the decisions that have been taken by the kogito-runtime service. Enjoy! - -![ExecutionList](images/executionsTrustyUI.png) -![ExecutionDetail](images/executionDetail.png) diff --git a/kogito-quarkus-examples/trusty-demonstration/kubernetes/images/executionDetail.png b/kogito-quarkus-examples/trusty-demonstration/kubernetes/images/executionDetail.png deleted file mode 100644 index 5e59b35a2c..0000000000 Binary files a/kogito-quarkus-examples/trusty-demonstration/kubernetes/images/executionDetail.png and /dev/null differ diff --git a/kogito-quarkus-examples/trusty-demonstration/kubernetes/images/executionsTrustyUI.png b/kogito-quarkus-examples/trusty-demonstration/kubernetes/images/executionsTrustyUI.png deleted file mode 100644 index ad0de61782..0000000000 Binary files a/kogito-quarkus-examples/trusty-demonstration/kubernetes/images/executionsTrustyUI.png and /dev/null differ diff --git a/kogito-quarkus-examples/trusty-demonstration/kubernetes/images/swagger-ui.png b/kogito-quarkus-examples/trusty-demonstration/kubernetes/images/swagger-ui.png deleted file mode 100644 index 5fad0c5d3a..0000000000 Binary files a/kogito-quarkus-examples/trusty-demonstration/kubernetes/images/swagger-ui.png and /dev/null differ diff --git a/kogito-quarkus-examples/trusty-demonstration/kubernetes/resources/dmn-tracing-quarkus.yaml b/kogito-quarkus-examples/trusty-demonstration/kubernetes/resources/dmn-tracing-quarkus.yaml deleted file mode 100644 index c4b98d6e0b..0000000000 --- a/kogito-quarkus-examples/trusty-demonstration/kubernetes/resources/dmn-tracing-quarkus.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: dmn-tracing-quarkus - labels: - app: dmn-tracing-quarkus -spec: - replicas: 1 - image: quay.io//dmn-tracing-quarkus:2.0.0-snapshot # <---- replace with your image - infra: - - kogito-kafka-infra - env: - - name: KOGITO_SERVICE_URL - value: http://dmn-tracing-quarkus:8080 diff --git a/kogito-quarkus-examples/trusty-demonstration/kubernetes/resources/explainability.yaml b/kogito-quarkus-examples/trusty-demonstration/kubernetes/resources/explainability.yaml deleted file mode 100644 index da16dac201..0000000000 --- a/kogito-quarkus-examples/trusty-demonstration/kubernetes/resources/explainability.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoSupportingService -metadata: - name: explainability -spec: - serviceType: Explainability - replicas: 1 - image: quay.io/kiegroup/kogito-explainability:1.5 - infra: - - kogito-kafka-infra diff --git a/kogito-quarkus-examples/trusty-demonstration/kubernetes/resources/infinispan-minimal.yaml b/kogito-quarkus-examples/trusty-demonstration/kubernetes/resources/infinispan-minimal.yaml deleted file mode 100644 index 23de0264b5..0000000000 --- a/kogito-quarkus-examples/trusty-demonstration/kubernetes/resources/infinispan-minimal.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: infinispan.org/v1 -kind: Infinispan -metadata: - name: example-infinispan -spec: - replicas: 2 \ No newline at end of file diff --git a/kogito-quarkus-examples/trusty-demonstration/kubernetes/resources/kafka-topics.yaml b/kogito-quarkus-examples/trusty-demonstration/kubernetes/resources/kafka-topics.yaml deleted file mode 100644 index 8c38cddfa2..0000000000 --- a/kogito-quarkus-examples/trusty-demonstration/kubernetes/resources/kafka-topics.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: kafka.strimzi.io/v1beta2 -kind: KafkaTopic -metadata: - name: trusty-explainability-request - labels: - strimzi.io/cluster: "my-cluster" -spec: - partitions: 1 - replicas: 1 ---- -apiVersion: kafka.strimzi.io/v1beta2 -kind: KafkaTopic -metadata: - name: trusty-explainability-result - labels: - strimzi.io/cluster: "my-cluster" -spec: - partitions: 1 - replicas: 1 ---- -apiVersion: kafka.strimzi.io/v1beta2 -kind: KafkaTopic -metadata: - name: kogito-tracing-decision - labels: - strimzi.io/cluster: "my-cluster" -spec: - partitions: 1 - replicas: 1 ---- -apiVersion: kafka.strimzi.io/v1beta2 -kind: KafkaTopic -metadata: - name: kogito-tracing-model - labels: - strimzi.io/cluster: "my-cluster" -spec: - partitions: 1 - replicas: 1 ---- \ No newline at end of file diff --git a/kogito-quarkus-examples/trusty-demonstration/kubernetes/resources/kafka.yaml b/kogito-quarkus-examples/trusty-demonstration/kubernetes/resources/kafka.yaml deleted file mode 100644 index 23bd177221..0000000000 --- a/kogito-quarkus-examples/trusty-demonstration/kubernetes/resources/kafka.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: kafka.strimzi.io/v1beta2 -kind: Kafka -metadata: - name: my-cluster -spec: - kafka: - replicas: 1 - listeners: - - name: plain - port: 9092 - type: internal - tls: false - - name: tls - port: 9093 - type: internal - tls: true - - name: external - type: nodeport - tls: false - port: 9094 - storage: - type: jbod - volumes: - - id: 0 - type: persistent-claim - size: 100Gi - deleteClaim: false - config: - offsets.topic.replication.factor: 1 - transaction.state.log.replication.factor: 1 - transaction.state.log.min.isr: 1 - zookeeper: - replicas: 1 - storage: - type: persistent-claim - size: 100Gi - deleteClaim: false - entityOperator: - topicOperator: {} - userOperator: {} \ No newline at end of file diff --git a/kogito-quarkus-examples/trusty-demonstration/kubernetes/resources/kogito-infra.yaml b/kogito-quarkus-examples/trusty-demonstration/kubernetes/resources/kogito-infra.yaml deleted file mode 100644 index 0835232c14..0000000000 --- a/kogito-quarkus-examples/trusty-demonstration/kubernetes/resources/kogito-infra.yaml +++ /dev/null @@ -1,21 +0,0 @@ -#Strimzi operator should be pre-installed in namespace -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoInfra -metadata: - name: kogito-kafka-infra -spec: - resource: - apiVersion: kafka.strimzi.io/v1beta2 - kind: Kafka - name: my-cluster ---- -#Infinispan operator should be pre-installed in namespace -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoInfra -metadata: - name: kogito-infinispan-infra -spec: - resource: - apiVersion: infinispan.org/v1 - kind: Infinispan - name: example-infinispan diff --git a/kogito-quarkus-examples/trusty-demonstration/kubernetes/resources/trusty-ui.yaml b/kogito-quarkus-examples/trusty-demonstration/kubernetes/resources/trusty-ui.yaml deleted file mode 100644 index ef714dfa0c..0000000000 --- a/kogito-quarkus-examples/trusty-demonstration/kubernetes/resources/trusty-ui.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoSupportingService -metadata: - name: trusty-ui -spec: - serviceType: TrustyUI - replicas: 1 - image: quay.io/kiegroup/kogito-trusty-ui:1.5 - env: - - name: KOGITO_TRUSTY_ENDPOINT - value: http://172.17.0.2 - - name: KOGITO_TRUSTY_WS_URL - value: ws://172.17.0.2 diff --git a/kogito-quarkus-examples/trusty-demonstration/kubernetes/resources/trusty.yaml b/kogito-quarkus-examples/trusty-demonstration/kubernetes/resources/trusty.yaml deleted file mode 100644 index b7900aa432..0000000000 --- a/kogito-quarkus-examples/trusty-demonstration/kubernetes/resources/trusty.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoSupportingService -metadata: - name: trusty - labels: - app: trusty -spec: - serviceType: TrustyAI - replicas: 1 - image: quay.io/kiegroup/kogito-trusty-infinispan:1.5 - infra: - - kogito-kafka-infra - - kogito-infinispan-infra diff --git a/kogito-quarkus-examples/trusty-tracing-quarkus-devservices/README.md b/kogito-quarkus-examples/trusty-tracing-quarkus-devservices/README.md index fbc13b2051..56f93ed6c1 100644 --- a/kogito-quarkus-examples/trusty-tracing-quarkus-devservices/README.md +++ b/kogito-quarkus-examples/trusty-tracing-quarkus-devservices/README.md @@ -10,9 +10,9 @@ PostgreSQL instance and a User Interface can be launched from Quarkus DevMode to ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed - A Docker environment ### Compile and Run in Local Dev Mode @@ -21,14 +21,9 @@ You will need: mvn clean compile quarkus:dev ``` -The tracing addon emits tracing events to a Kafka broker running within Quarkus DevServices. A [Trusty Service](https://github.com/kiegroup/kogito-apps/tree/main/trusty) +The tracing addon emits tracing events to a Kafka broker running within Quarkus DevServices. A [Trusty Service](https://github.com/apache/incubator-kie-kogito-apps/tree/main/trusty) instance, also running within Quarkus DevServices, consumes the events and stores them in a PostgreSQL instance running -within Quarkus DevServices too. Within Quarkus DevMode the DevMode UI can be launched by pressing [d] or navigating to -http://localhost:8080/q/dev/. - -![DEV-UI](TrustyTracingQuarkusDevUi.png) - -The DevUI can be used to launch the Audit Investigation console from the Kogito Runtime Tools card. +within Quarkus DevServices too. ## Example Usage diff --git a/kogito-quarkus-examples/trusty-tracing-quarkus-devservices/TrustyTracingQuarkusDevUi.png b/kogito-quarkus-examples/trusty-tracing-quarkus-devservices/TrustyTracingQuarkusDevUi.png deleted file mode 100644 index f7b25d92a3..0000000000 Binary files a/kogito-quarkus-examples/trusty-tracing-quarkus-devservices/TrustyTracingQuarkusDevUi.png and /dev/null differ diff --git a/kogito-quarkus-examples/trusty-tracing-quarkus-devservices/pom.xml b/kogito-quarkus-examples/trusty-tracing-quarkus-devservices/pom.xml index 90831591a0..938253bf71 100644 --- a/kogito-quarkus-examples/trusty-tracing-quarkus-devservices/pom.xml +++ b/kogito-quarkus-examples/trusty-tracing-quarkus-devservices/pom.xml @@ -1,23 +1,43 @@ + 4.0.0 org.kie.kogito.examples kogito-quarkus-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT trusty-tracing-quarkus-devservices Kogito Example :: Trusty Tracing - Quarkus DevServices - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -39,16 +59,12 @@ - org.kie.kogito - kogito-quarkus-decisions - - - org.kie.kogito - kogito-addons-quarkus-tracing-decision + org.drools + drools-quarkus-decisions - org.kie.kogito - runtime-tools-quarkus-extension + org.kie + kie-addons-quarkus-tracing-decision io.quarkus diff --git a/kogito-quarkus-examples/trusty-tracing-quarkus-devservices/src/main/resources/application.properties b/kogito-quarkus-examples/trusty-tracing-quarkus-devservices/src/main/resources/application.properties index 0c3ebba2b8..0f10c55a3e 100644 --- a/kogito-quarkus-examples/trusty-tracing-quarkus-devservices/src/main/resources/application.properties +++ b/kogito-quarkus-examples/trusty-tracing-quarkus-devservices/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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-springboot-examples/decisiontable-springboot-example/README.md b/kogito-springboot-examples/decisiontable-springboot-example/README.md index 7433b5f040..e0096074ae 100644 --- a/kogito-springboot-examples/decisiontable-springboot-example/README.md +++ b/kogito-springboot-examples/decisiontable-springboot-example/README.md @@ -131,7 +131,3 @@ Example response: } ] ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-springboot-examples/decisiontable-springboot-example/operator/decisiontable-springboot-example.yaml b/kogito-springboot-examples/decisiontable-springboot-example/operator/decisiontable-springboot-example.yaml deleted file mode 100644 index e74b9eac68..0000000000 --- a/kogito-springboot-examples/decisiontable-springboot-example/operator/decisiontable-springboot-example.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: decisiontable-springboot-example -spec: - type: RemoteSource - runtime: springboot - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/decisiontable-springboot-example - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: decisiontable-springboot-example -spec: - runtime: springboot - diff --git a/kogito-springboot-examples/decisiontable-springboot-example/pom.xml b/kogito-springboot-examples/decisiontable-springboot-example/pom.xml index a6cc7875ee..8c712c0013 100644 --- a/kogito-springboot-examples/decisiontable-springboot-example/pom.xml +++ b/kogito-springboot-examples/decisiontable-springboot-example/pom.xml @@ -1,18 +1,38 @@ + 4.0.0 org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT decisiontable-springboot-example Kogito Example :: Decision Table - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -33,8 +53,8 @@ spring-boot-starter-actuator - org.kie.kogito - kogito-decisions-spring-boot-starter + org.drools + drools-decisions-spring-boot-starter diff --git a/kogito-springboot-examples/decisiontable-springboot-example/src/main/java/org/kie/kogito/queries/Applicant.java b/kogito-springboot-examples/decisiontable-springboot-example/src/main/java/org/kie/kogito/queries/Applicant.java index 175d3a98d5..25d1c54e64 100644 --- a/kogito-springboot-examples/decisiontable-springboot-example/src/main/java/org/kie/kogito/queries/Applicant.java +++ b/kogito-springboot-examples/decisiontable-springboot-example/src/main/java/org/kie/kogito/queries/Applicant.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.queries; diff --git a/kogito-springboot-examples/decisiontable-springboot-example/src/main/java/org/kie/kogito/queries/KogitoSpringbootApplication.java b/kogito-springboot-examples/decisiontable-springboot-example/src/main/java/org/kie/kogito/queries/KogitoSpringbootApplication.java index d6f7c7a33f..c909e15e0c 100644 --- a/kogito-springboot-examples/decisiontable-springboot-example/src/main/java/org/kie/kogito/queries/KogitoSpringbootApplication.java +++ b/kogito-springboot-examples/decisiontable-springboot-example/src/main/java/org/kie/kogito/queries/KogitoSpringbootApplication.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.queries; diff --git a/kogito-springboot-examples/decisiontable-springboot-example/src/main/java/org/kie/kogito/queries/LoanApplication.java b/kogito-springboot-examples/decisiontable-springboot-example/src/main/java/org/kie/kogito/queries/LoanApplication.java index 70eec1c4e3..8697730bd3 100644 --- a/kogito-springboot-examples/decisiontable-springboot-example/src/main/java/org/kie/kogito/queries/LoanApplication.java +++ b/kogito-springboot-examples/decisiontable-springboot-example/src/main/java/org/kie/kogito/queries/LoanApplication.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.queries; diff --git a/kogito-springboot-examples/decisiontable-springboot-example/src/main/java/org/kie/kogito/queries/LoanUnit.java b/kogito-springboot-examples/decisiontable-springboot-example/src/main/java/org/kie/kogito/queries/LoanUnit.java index 3d35a77609..0aa2234202 100644 --- a/kogito-springboot-examples/decisiontable-springboot-example/src/main/java/org/kie/kogito/queries/LoanUnit.java +++ b/kogito-springboot-examples/decisiontable-springboot-example/src/main/java/org/kie/kogito/queries/LoanUnit.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.queries; diff --git a/kogito-springboot-examples/decisiontable-springboot-example/src/main/resources/application.properties b/kogito-springboot-examples/decisiontable-springboot-example/src/main/resources/application.properties index 5f4fb60b55..4e8da841ca 100644 --- a/kogito-springboot-examples/decisiontable-springboot-example/src/main/resources/application.properties +++ b/kogito-springboot-examples/decisiontable-springboot-example/src/main/resources/application.properties @@ -1 +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. +# + server.address=0.0.0.0 \ No newline at end of file diff --git a/kogito-springboot-examples/decisiontable-springboot-example/src/test/java/org/kie/kogito/decisiontable/springboot/RestQueryTest.java b/kogito-springboot-examples/decisiontable-springboot-example/src/test/java/org/kie/kogito/decisiontable/springboot/RestQueryTest.java index 30860d23fb..7710c9c30d 100644 --- a/kogito-springboot-examples/decisiontable-springboot-example/src/test/java/org/kie/kogito/decisiontable/springboot/RestQueryTest.java +++ b/kogito-springboot-examples/decisiontable-springboot-example/src/test/java/org/kie/kogito/decisiontable/springboot/RestQueryTest.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.decisiontable.springboot; @@ -19,7 +22,7 @@ import org.junit.jupiter.api.Test; import org.kie.kogito.queries.KogitoSpringbootApplication; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.annotation.DirtiesContext; import io.restassured.RestAssured; diff --git a/kogito-springboot-examples/decisiontable-springboot-example/src/test/resources/logback-test.xml b/kogito-springboot-examples/decisiontable-springboot-example/src/test/resources/logback-test.xml index 9d5906898a..e8a614e525 100644 --- a/kogito-springboot-examples/decisiontable-springboot-example/src/test/resources/logback-test.xml +++ b/kogito-springboot-examples/decisiontable-springboot-example/src/test/resources/logback-test.xml @@ -1,4 +1,24 @@ + diff --git a/kogito-springboot-examples/dmn-drools-springboot-metrics/README.md b/kogito-springboot-examples/dmn-drools-springboot-metrics/README.md index 2a14643672..c3ba3e7d9f 100644 --- a/kogito-springboot-examples/dmn-drools-springboot-metrics/README.md +++ b/kogito-springboot-examples/dmn-drools-springboot-metrics/README.md @@ -18,8 +18,8 @@ Import the following dependency in your `pom.xml`: ```XML - org.kie.kogito - kogito-addons-springboot-monitoring-prometheus + org.kie + kie-addons-springboot-monitoring-prometheus ``` diff --git a/kogito-springboot-examples/dmn-drools-springboot-metrics/docker-compose.yml b/kogito-springboot-examples/dmn-drools-springboot-metrics/docker-compose.yml index 2ec20caec3..100836d9f3 100644 --- a/kogito-springboot-examples/dmn-drools-springboot-metrics/docker-compose.yml +++ b/kogito-springboot-examples/dmn-drools-springboot-metrics/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' services: @@ -9,7 +28,7 @@ services: prometheus: image: prom/prometheus:v2.8.0 volumes: - - ./docker-compose/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml + - ./docker compose/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml command: - '--config.file=/etc/prometheus/prometheus.yml' ports: @@ -23,5 +42,5 @@ services: ports: - 3000:3000 volumes: - - ./docker-compose/grafana/provisioning/:/etc/grafana/provisioning/ - - ./docker-compose/grafana/grafana.ini:/etc/grafana/grafana.ini + - ./docker compose/grafana/provisioning/:/etc/grafana/provisioning/ + - ./docker compose/grafana/grafana.ini:/etc/grafana/grafana.ini diff --git a/kogito-springboot-examples/dmn-drools-springboot-metrics/docker-compose/grafana/provisioning/dashboards/dashboard.yml b/kogito-springboot-examples/dmn-drools-springboot-metrics/docker-compose/grafana/provisioning/dashboards/dashboard.yml index 437d59118f..1c31f32b3b 100644 --- a/kogito-springboot-examples/dmn-drools-springboot-metrics/docker-compose/grafana/provisioning/dashboards/dashboard.yml +++ b/kogito-springboot-examples/dmn-drools-springboot-metrics/docker-compose/grafana/provisioning/dashboards/dashboard.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. +# + apiVersion: 1 providers: diff --git a/kogito-springboot-examples/dmn-drools-springboot-metrics/docker-compose/grafana/provisioning/datasources/datasource.yml b/kogito-springboot-examples/dmn-drools-springboot-metrics/docker-compose/grafana/provisioning/datasources/datasource.yml index 4e58703f23..14e5b05c55 100644 --- a/kogito-springboot-examples/dmn-drools-springboot-metrics/docker-compose/grafana/provisioning/datasources/datasource.yml +++ b/kogito-springboot-examples/dmn-drools-springboot-metrics/docker-compose/grafana/provisioning/datasources/datasource.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. +# + # config file version apiVersion: 1 diff --git a/kogito-springboot-examples/dmn-drools-springboot-metrics/docker-compose/prometheus/prometheus.yml b/kogito-springboot-examples/dmn-drools-springboot-metrics/docker-compose/prometheus/prometheus.yml index 7674075b47..12fd032396 100644 --- a/kogito-springboot-examples/dmn-drools-springboot-metrics/docker-compose/prometheus/prometheus.yml +++ b/kogito-springboot-examples/dmn-drools-springboot-metrics/docker-compose/prometheus/prometheus.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. +# + # A scrape configuration containing exactly one endpoint to scrape: scrape_configs: # The job name is added as a label `job=` to any timeseries scraped from this config. diff --git a/kogito-springboot-examples/dmn-drools-springboot-metrics/pom.xml b/kogito-springboot-examples/dmn-drools-springboot-metrics/pom.xml index 67de35feea..f696d327b7 100755 --- a/kogito-springboot-examples/dmn-drools-springboot-metrics/pom.xml +++ b/kogito-springboot-examples/dmn-drools-springboot-metrics/pom.xml @@ -1,4 +1,24 @@ + @@ -7,14 +27,14 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT dmn-drools-springboot-metrics Kogito Example :: DMN Metrics SpringBoot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -31,17 +51,17 @@ - org.kie.kogito - kogito-decisions-spring-boot-starter + org.drools + drools-decisions-spring-boot-starter - org.kie.kogito - kogito-rules-spring-boot-starter + org.drools + drools-rules-spring-boot-starter - org.kie.kogito - kogito-addons-springboot-monitoring-prometheus + org.kie + kie-addons-springboot-monitoring-prometheus @@ -181,6 +201,9 @@ com.google.cloud.tools jib-maven-plugin + + registry.access.redhat.com/ubi8/openjdk-17:latest + ${project.groupId}/${project.artifactId}:1.0 diff --git a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/java/org/kie/kogito/app/CustomDMNRuntimeEventListener.java b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/java/org/kie/kogito/app/CustomDMNRuntimeEventListener.java index 8aa7c6e104..d5f45f96a4 100644 --- a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/java/org/kie/kogito/app/CustomDMNRuntimeEventListener.java +++ b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/java/org/kie/kogito/app/CustomDMNRuntimeEventListener.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.app; diff --git a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/java/org/kie/kogito/app/RuleEventListenerConfig.java b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/java/org/kie/kogito/app/RuleEventListenerConfig.java index ec19ada235..df76704f9d 100644 --- a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/java/org/kie/kogito/app/RuleEventListenerConfig.java +++ b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/java/org/kie/kogito/app/RuleEventListenerConfig.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.app; diff --git a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/java/org/kie/kogito/examples/CustomRuleEventListener.java b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/java/org/kie/kogito/examples/CustomRuleEventListener.java index af8bb110d9..d6d43e72ca 100644 --- a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/java/org/kie/kogito/examples/CustomRuleEventListener.java +++ b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/java/org/kie/kogito/examples/CustomRuleEventListener.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.examples; diff --git a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/java/org/kie/kogito/examples/Hello.java b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/java/org/kie/kogito/examples/Hello.java index f9a66b2d24..8ca8eee6c3 100644 --- a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/java/org/kie/kogito/examples/Hello.java +++ b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/java/org/kie/kogito/examples/Hello.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.examples; diff --git a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/java/org/kie/kogito/examples/springboot/KogitoSpringbootApplication.java b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/java/org/kie/kogito/examples/springboot/KogitoSpringbootApplication.java index 73e73fc5fb..c4aa41d1bf 100644 --- a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/java/org/kie/kogito/examples/springboot/KogitoSpringbootApplication.java +++ b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/java/org/kie/kogito/examples/springboot/KogitoSpringbootApplication.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.examples.springboot; diff --git a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/resources/application.properties b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/resources/application.properties index a0057f9a63..9a5525f92f 100644 --- a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/resources/application.properties +++ b/kogito-springboot-examples/dmn-drools-springboot-metrics/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. +# + # Configuration file # key = value management.security.enabled=false diff --git a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/resources/org/kie/kogito/examples/Hello.drl b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/resources/org/kie/kogito/examples/Hello.drl index e6d2073438..6026d730a2 100644 --- a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/resources/org/kie/kogito/examples/Hello.drl +++ b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/main/resources/org/kie/kogito/examples/Hello.drl @@ -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.examples; unit Hello; diff --git a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/filtered-resources/project.properties b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/filtered-resources/project.properties index 301ad794d3..5771872775 100644 --- a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/filtered-resources/project.properties +++ b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/filtered-resources/project.properties @@ -1,17 +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. # + project.version=${project.version} project.artifactId=${project.artifactId} \ No newline at end of file diff --git a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/DashboardsListTest.java b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/DashboardsListTest.java index a0ae9e8eb2..dffabca9c8 100644 --- a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/DashboardsListTest.java +++ b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/DashboardsListTest.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.examples.springboot; @@ -20,9 +23,9 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.boot.test.autoconfigure.actuate.metrics.AutoConfigureMetrics; +import org.springframework.boot.test.autoconfigure.actuate.observability.AutoConfigureObservability; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import io.restassured.RestAssured; import io.restassured.http.ContentType; @@ -30,7 +33,7 @@ import static io.restassured.RestAssured.given; @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = KogitoSpringbootApplication.class) -@AutoConfigureMetrics +@AutoConfigureObservability public class DashboardsListTest { @LocalServerPort diff --git a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/DroolsMetricsTest.java b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/DroolsMetricsTest.java index abebfb6da0..88e3546562 100644 --- a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/DroolsMetricsTest.java +++ b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/DroolsMetricsTest.java @@ -1,25 +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.examples.springboot; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.boot.test.autoconfigure.actuate.metrics.AutoConfigureMetrics; +import org.springframework.boot.test.autoconfigure.actuate.observability.AutoConfigureObservability; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.annotation.DirtiesContext; import io.restassured.RestAssured; @@ -30,7 +33,7 @@ @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = KogitoSpringbootApplication.class) @DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD) -@AutoConfigureMetrics +@AutoConfigureObservability public class DroolsMetricsTest { private static final String PROJECT_VERSION = ProjectMetadataProvider.getProjectVersion(); diff --git a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/GrafanaDockerComposeIT.java b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/GrafanaDockerComposeIT.java index ddcb5668c4..871de1ab3d 100644 --- a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/GrafanaDockerComposeIT.java +++ b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/GrafanaDockerComposeIT.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.examples.springboot; diff --git a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/LoanEligibilityTest.java b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/LoanEligibilityTest.java index 894f46759c..0e45984a67 100644 --- a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/LoanEligibilityTest.java +++ b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/LoanEligibilityTest.java @@ -1,25 +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.examples.springboot; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.boot.test.autoconfigure.actuate.metrics.AutoConfigureMetrics; +import org.springframework.boot.test.autoconfigure.actuate.observability.AutoConfigureObservability; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import io.restassured.RestAssured; import io.restassured.http.ContentType; @@ -29,7 +32,7 @@ import static org.hamcrest.Matchers.is; @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = KogitoSpringbootApplication.class) -@AutoConfigureMetrics +@AutoConfigureObservability public class LoanEligibilityTest { private static final String PROJECT_VERSION = ProjectMetadataProvider.getProjectVersion(); diff --git a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/ProjectMetadataProvider.java b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/ProjectMetadataProvider.java index b295acb4f8..f75edcd276 100644 --- a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/ProjectMetadataProvider.java +++ b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/java/org/kie/kogito/examples/springboot/ProjectMetadataProvider.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.examples.springboot; diff --git a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/resources/logback-test.xml b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/resources/logback-test.xml index e8c716f5ef..bb6af4db85 100644 --- a/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/resources/logback-test.xml +++ b/kogito-springboot-examples/dmn-drools-springboot-metrics/src/test/resources/logback-test.xml @@ -1,3 +1,23 @@ + diff --git a/kogito-springboot-examples/dmn-event-driven-springboot/README.md b/kogito-springboot-examples/dmn-event-driven-springboot/README.md index 407365fb4c..797290755d 100644 --- a/kogito-springboot-examples/dmn-event-driven-springboot/README.md +++ b/kogito-springboot-examples/dmn-event-driven-springboot/README.md @@ -25,8 +25,8 @@ Like the other Kogito AddOns, the only required step to enable it is to include ```xml - org.kie.kogito - kogito-addons-springboot-event-decisions + org.kie + kie-addons-springboot-event-decisions ``` diff --git a/kogito-springboot-examples/dmn-event-driven-springboot/docker-compose.yml b/kogito-springboot-examples/dmn-event-driven-springboot/docker-compose.yml index f07d3cc400..802976737c 100644 --- a/kogito-springboot-examples/dmn-event-driven-springboot/docker-compose.yml +++ b/kogito-springboot-examples/dmn-event-driven-springboot/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' services: diff --git a/kogito-springboot-examples/dmn-event-driven-springboot/pom.xml b/kogito-springboot-examples/dmn-event-driven-springboot/pom.xml index dfb740f571..8af19b7539 100644 --- a/kogito-springboot-examples/dmn-event-driven-springboot/pom.xml +++ b/kogito-springboot-examples/dmn-event-driven-springboot/pom.xml @@ -1,4 +1,24 @@ + @@ -8,14 +28,14 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT dmn-event-driven-springboot Kogito Example :: DMN Event-Driven :: Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -37,12 +57,12 @@ - org.kie.kogito - kogito-decisions-spring-boot-starter + org.drools + drools-decisions-spring-boot-starter - org.kie.kogito - kogito-addons-springboot-events-decisions + org.kie + kie-addons-springboot-events-decisions diff --git a/kogito-springboot-examples/dmn-event-driven-springboot/src/main/java/org/kie/kogito/dmn/springboot/example/KogitoSpringbootApplication.java b/kogito-springboot-examples/dmn-event-driven-springboot/src/main/java/org/kie/kogito/dmn/springboot/example/KogitoSpringbootApplication.java index 3e65b56318..5744b7fb8a 100644 --- a/kogito-springboot-examples/dmn-event-driven-springboot/src/main/java/org/kie/kogito/dmn/springboot/example/KogitoSpringbootApplication.java +++ b/kogito-springboot-examples/dmn-event-driven-springboot/src/main/java/org/kie/kogito/dmn/springboot/example/KogitoSpringbootApplication.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.dmn.springboot.example; diff --git a/kogito-springboot-examples/dmn-event-driven-springboot/src/main/resources/application.properties b/kogito-springboot-examples/dmn-event-driven-springboot/src/main/resources/application.properties index 5a5b573693..92a54e669a 100644 --- a/kogito-springboot-examples/dmn-event-driven-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/dmn-event-driven-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.addon.cloudevents.kafka.kogito_incoming_stream=dmn-event-driven-requests kogito.addon.cloudevents.kafka.kogito_outgoing_stream=dmn-event-driven-responses kogito.addon.tracing.decision.kafka.bootstrapAddress=localhost:9092 diff --git a/kogito-springboot-examples/dmn-event-driven-springboot/src/test/java/org/kie/kogito/examples/DmnEventDrivenIT.java b/kogito-springboot-examples/dmn-event-driven-springboot/src/test/java/org/kie/kogito/examples/DmnEventDrivenIT.java index 5f27725cd9..50a351619f 100644 --- a/kogito-springboot-examples/dmn-event-driven-springboot/src/test/java/org/kie/kogito/examples/DmnEventDrivenIT.java +++ b/kogito-springboot-examples/dmn-event-driven-springboot/src/test/java/org/kie/kogito/examples/DmnEventDrivenIT.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.examples; diff --git a/kogito-springboot-examples/dmn-listener-springboot/README.md b/kogito-springboot-examples/dmn-listener-springboot/README.md index 7da22a86e5..787c6f1553 100644 --- a/kogito-springboot-examples/dmn-listener-springboot/README.md +++ b/kogito-springboot-examples/dmn-listener-springboot/README.md @@ -86,9 +86,3 @@ Example response: "Should the driver be suspended?":"No" } ``` - - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). - diff --git a/kogito-springboot-examples/dmn-listener-springboot/operator/dmn-springboot-example.yaml b/kogito-springboot-examples/dmn-listener-springboot/operator/dmn-springboot-example.yaml deleted file mode 100644 index cc57d67dbe..0000000000 --- a/kogito-springboot-examples/dmn-listener-springboot/operator/dmn-springboot-example.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: dmn-listener-springboot -spec: - type: RemoteSource - runtime: springboot - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/dmn-listener-springboot - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: dmn-listener-springboot -spec: - runtime: springboot - diff --git a/kogito-springboot-examples/dmn-listener-springboot/pom.xml b/kogito-springboot-examples/dmn-listener-springboot/pom.xml index 4bf7103971..da3397efec 100644 --- a/kogito-springboot-examples/dmn-listener-springboot/pom.xml +++ b/kogito-springboot-examples/dmn-listener-springboot/pom.xml @@ -1,4 +1,24 @@ + @@ -8,14 +28,14 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT dmn-listener-springboot Kogito Example :: DMN with listeners - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -37,8 +57,8 @@ - org.kie.kogito - kogito-decisions-spring-boot-starter + org.drools + drools-decisions-spring-boot-starter org.springframework.boot diff --git a/kogito-springboot-examples/dmn-listener-springboot/src/main/java/org/kie/kogito/dmn/springboot/example/listener/ExampleDMNRuntimeEventListener.java b/kogito-springboot-examples/dmn-listener-springboot/src/main/java/org/kie/kogito/dmn/springboot/example/listener/ExampleDMNRuntimeEventListener.java index 6f03197c52..8334fdfc3b 100644 --- a/kogito-springboot-examples/dmn-listener-springboot/src/main/java/org/kie/kogito/dmn/springboot/example/listener/ExampleDMNRuntimeEventListener.java +++ b/kogito-springboot-examples/dmn-listener-springboot/src/main/java/org/kie/kogito/dmn/springboot/example/listener/ExampleDMNRuntimeEventListener.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.dmn.springboot.example.listener; diff --git a/kogito-springboot-examples/dmn-listener-springboot/src/main/java/org/kie/kogito/dmn/springboot/example/listener/ExampleDecisionEventListenerConfig.java b/kogito-springboot-examples/dmn-listener-springboot/src/main/java/org/kie/kogito/dmn/springboot/example/listener/ExampleDecisionEventListenerConfig.java index 6796d66ad7..460be6cdf8 100644 --- a/kogito-springboot-examples/dmn-listener-springboot/src/main/java/org/kie/kogito/dmn/springboot/example/listener/ExampleDecisionEventListenerConfig.java +++ b/kogito-springboot-examples/dmn-listener-springboot/src/main/java/org/kie/kogito/dmn/springboot/example/listener/ExampleDecisionEventListenerConfig.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.dmn.springboot.example.listener; diff --git a/kogito-springboot-examples/dmn-listener-springboot/src/main/java/org/kie/kogito/dmn/springboot/example/listener/KogitoSpringbootApplication.java b/kogito-springboot-examples/dmn-listener-springboot/src/main/java/org/kie/kogito/dmn/springboot/example/listener/KogitoSpringbootApplication.java index 7d9e1d2726..cbe69e4dc8 100644 --- a/kogito-springboot-examples/dmn-listener-springboot/src/main/java/org/kie/kogito/dmn/springboot/example/listener/KogitoSpringbootApplication.java +++ b/kogito-springboot-examples/dmn-listener-springboot/src/main/java/org/kie/kogito/dmn/springboot/example/listener/KogitoSpringbootApplication.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.dmn.springboot.example.listener; diff --git a/kogito-springboot-examples/dmn-listener-springboot/src/main/java/org/kie/kogito/dmn/springboot/example/listener/LoggingDMNRuntimeEventListener.java b/kogito-springboot-examples/dmn-listener-springboot/src/main/java/org/kie/kogito/dmn/springboot/example/listener/LoggingDMNRuntimeEventListener.java index 5475a79af8..3425f71c48 100644 --- a/kogito-springboot-examples/dmn-listener-springboot/src/main/java/org/kie/kogito/dmn/springboot/example/listener/LoggingDMNRuntimeEventListener.java +++ b/kogito-springboot-examples/dmn-listener-springboot/src/main/java/org/kie/kogito/dmn/springboot/example/listener/LoggingDMNRuntimeEventListener.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.dmn.springboot.example.listener; diff --git a/kogito-springboot-examples/dmn-listener-springboot/src/main/resources/application.properties b/kogito-springboot-examples/dmn-listener-springboot/src/main/resources/application.properties index 5f4fb60b55..4e8da841ca 100644 --- a/kogito-springboot-examples/dmn-listener-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/dmn-listener-springboot/src/main/resources/application.properties @@ -1 +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. +# + server.address=0.0.0.0 \ No newline at end of file diff --git a/kogito-springboot-examples/dmn-listener-springboot/src/test/java/org/kie/kogito/dmn/springboot/example/listener/TrafficViolationListenerTest.java b/kogito-springboot-examples/dmn-listener-springboot/src/test/java/org/kie/kogito/dmn/springboot/example/listener/TrafficViolationListenerTest.java index a17dfd4c20..548245ae7c 100644 --- a/kogito-springboot-examples/dmn-listener-springboot/src/test/java/org/kie/kogito/dmn/springboot/example/listener/TrafficViolationListenerTest.java +++ b/kogito-springboot-examples/dmn-listener-springboot/src/test/java/org/kie/kogito/dmn/springboot/example/listener/TrafficViolationListenerTest.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.dmn.springboot.example.listener; @@ -27,7 +30,7 @@ import org.kie.kogito.dmn.springboot.example.mock.MockDMNRuntimeEventListener; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.annotation.DirtiesContext; import io.restassured.RestAssured; diff --git a/kogito-springboot-examples/dmn-listener-springboot/src/test/java/org/kie/kogito/dmn/springboot/example/listener/TrafficViolationTest.java b/kogito-springboot-examples/dmn-listener-springboot/src/test/java/org/kie/kogito/dmn/springboot/example/listener/TrafficViolationTest.java index d440b2f912..64b7ac74d3 100644 --- a/kogito-springboot-examples/dmn-listener-springboot/src/test/java/org/kie/kogito/dmn/springboot/example/listener/TrafficViolationTest.java +++ b/kogito-springboot-examples/dmn-listener-springboot/src/test/java/org/kie/kogito/dmn/springboot/example/listener/TrafficViolationTest.java @@ -1,24 +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.dmn.springboot.example.listener; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.annotation.DirtiesContext; import io.restassured.RestAssured; diff --git a/kogito-springboot-examples/dmn-listener-springboot/src/test/java/org/kie/kogito/dmn/springboot/example/mock/MockDMNRuntimeEventListener.java b/kogito-springboot-examples/dmn-listener-springboot/src/test/java/org/kie/kogito/dmn/springboot/example/mock/MockDMNRuntimeEventListener.java index ca42ac1075..39c46d6228 100644 --- a/kogito-springboot-examples/dmn-listener-springboot/src/test/java/org/kie/kogito/dmn/springboot/example/mock/MockDMNRuntimeEventListener.java +++ b/kogito-springboot-examples/dmn-listener-springboot/src/test/java/org/kie/kogito/dmn/springboot/example/mock/MockDMNRuntimeEventListener.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.dmn.springboot.example.mock; diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/README.md b/kogito-springboot-examples/dmn-pmml-springboot-example/README.md index b64f96cc72..5a80a8c52a 100644 --- a/kogito-springboot-examples/dmn-pmml-springboot-example/README.md +++ b/kogito-springboot-examples/dmn-pmml-springboot-example/README.md @@ -108,10 +108,3 @@ Example response: "Decision":"sunglasses" } ``` - - - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). - diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/operator/dmn-pmml-springboot-example.yaml b/kogito-springboot-examples/dmn-pmml-springboot-example/operator/dmn-pmml-springboot-example.yaml deleted file mode 100644 index 1d5444ccd0..0000000000 --- a/kogito-springboot-examples/dmn-pmml-springboot-example/operator/dmn-pmml-springboot-example.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: dmn-pmml-springboot-example -spec: - type: RemoteSource - runtime: springboot - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/dmn-pmml-springboot-example - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: dmn-pmml-springboot-example -spec: - runtime: springboot - - diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/pom.xml b/kogito-springboot-examples/dmn-pmml-springboot-example/pom.xml index 48564bdf33..1b47ef23c9 100644 --- a/kogito-springboot-examples/dmn-pmml-springboot-example/pom.xml +++ b/kogito-springboot-examples/dmn-pmml-springboot-example/pom.xml @@ -1,4 +1,24 @@ + @@ -7,14 +27,14 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT dmn-pmml-springboot-example Kogito Example :: DMN :: PMML - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -36,12 +56,12 @@ - org.kie.kogito - kogito-decisions-spring-boot-starter + org.drools + drools-decisions-spring-boot-starter - org.kie.kogito - kogito-predictions-spring-boot-starter + org.kie + kie-predictions-spring-boot-starter @@ -88,6 +108,13 @@ + + org.apache.maven.plugins + maven-surefire-plugin + + false + +
diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/src/main/java/org/kie/kogito/dmn/pmml/springboot/example/KogitoSpringbootApplication.java b/kogito-springboot-examples/dmn-pmml-springboot-example/src/main/java/org/kie/kogito/dmn/pmml/springboot/example/KogitoSpringbootApplication.java index 4f4d108346..931b0a405c 100644 --- a/kogito-springboot-examples/dmn-pmml-springboot-example/src/main/java/org/kie/kogito/dmn/pmml/springboot/example/KogitoSpringbootApplication.java +++ b/kogito-springboot-examples/dmn-pmml-springboot-example/src/main/java/org/kie/kogito/dmn/pmml/springboot/example/KogitoSpringbootApplication.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.dmn.pmml.springboot.example; diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/src/main/resources/application.properties b/kogito-springboot-examples/dmn-pmml-springboot-example/src/main/resources/application.properties index 5f4fb60b55..4e8da841ca 100644 --- a/kogito-springboot-examples/dmn-pmml-springboot-example/src/main/resources/application.properties +++ b/kogito-springboot-examples/dmn-pmml-springboot-example/src/main/resources/application.properties @@ -1 +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. +# + server.address=0.0.0.0 \ No newline at end of file diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/CommonTestUtils.java b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/CommonTestUtils.java index 1af710d2ac..ef2c8407fd 100644 --- a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/CommonTestUtils.java +++ b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/CommonTestUtils.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.dmn.pmml.springboot.example; diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNMiningModelTest.java b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNMiningModelTest.java index 3d9de5cda8..2cbf1de1c2 100644 --- a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNMiningModelTest.java +++ b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNMiningModelTest.java @@ -1,24 +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.dmn.pmml.springboot.example; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.annotation.DirtiesContext; import io.restassured.RestAssured; diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNRegressionTest.java b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNRegressionTest.java index 0db95dc71b..b86b286278 100644 --- a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNRegressionTest.java +++ b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNRegressionTest.java @@ -1,24 +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.dmn.pmml.springboot.example; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.annotation.DirtiesContext; import io.restassured.RestAssured; diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNScoreCardTest.java b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNScoreCardTest.java index 6287eaa2aa..0fe2241a09 100644 --- a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNScoreCardTest.java +++ b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNScoreCardTest.java @@ -1,24 +1,27 @@ /* - * 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.dmn.pmml.springboot.example; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.annotation.DirtiesContext; import io.restassured.RestAssured; diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNTreeTest.java b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNTreeTest.java index 3885a8b888..39dac3b284 100644 --- a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNTreeTest.java +++ b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DMNTreeTest.java @@ -1,24 +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.dmn.pmml.springboot.example; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.annotation.DirtiesContext; import io.restassured.RestAssured; diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DecisionTreeTest.java b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DecisionTreeTest.java index 617b877357..007abdb726 100644 --- a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DecisionTreeTest.java +++ b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/DecisionTreeTest.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.dmn.pmml.springboot.example; @@ -21,7 +24,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.annotation.DirtiesContext; import io.restassured.RestAssured; diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/LinRegTest.java b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/LinRegTest.java index 24ff9ec0c8..58c6396c3a 100644 --- a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/LinRegTest.java +++ b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/LinRegTest.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.dmn.pmml.springboot.example; @@ -21,7 +24,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.annotation.DirtiesContext; import io.restassured.RestAssured; diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/MiningModelTest.java b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/MiningModelTest.java index 0c57345b4d..40c83fa21d 100644 --- a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/MiningModelTest.java +++ b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/MiningModelTest.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.dmn.pmml.springboot.example; @@ -21,7 +24,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.annotation.DirtiesContext; import io.restassured.RestAssured; diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/ScoreCardTest.java b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/ScoreCardTest.java index 64a10b51df..f973dba53f 100644 --- a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/ScoreCardTest.java +++ b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/org/kie/kogito/dmn/pmml/springboot/example/ScoreCardTest.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.dmn.pmml.springboot.example; @@ -21,7 +24,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.annotation.DirtiesContext; import io.restassured.RestAssured; diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/testscenario/KogitoScenarioJunitActivatorTest.java b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/testscenario/KogitoScenarioJunitActivatorTest.java index b80780fad8..4b19a12015 100644 --- a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/testscenario/KogitoScenarioJunitActivatorTest.java +++ b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/java/testscenario/KogitoScenarioJunitActivatorTest.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 testscenario; diff --git a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/resources/KiePMMLRegressionTest.scesim b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/resources/KiePMMLRegressionTest.scesim index ce32e9a1d0..f394b4fb2a 100644 --- a/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/resources/KiePMMLRegressionTest.scesim +++ b/kogito-springboot-examples/dmn-pmml-springboot-example/src/test/resources/KiePMMLRegressionTest.scesim @@ -440,7 +440,7 @@ - src/main/resources/KiePMMLRegression.dmn + ../../main/resources/KiePMMLRegression.dmn DMN https://kiegroup.org/dmn/_51A1FD67-8A67-4332-9889-B718BE8B7456 TestRegressionDMN diff --git a/kogito-springboot-examples/dmn-springboot-example/README.md b/kogito-springboot-examples/dmn-springboot-example/README.md index ab8e58e95d..faac896f3f 100644 --- a/kogito-springboot-examples/dmn-springboot-example/README.md +++ b/kogito-springboot-examples/dmn-springboot-example/README.md @@ -84,11 +84,6 @@ Example response: } ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). - ## Developer notes In order to have the DMN generated resources properly scanned by Spring Boot, please ensure the DMN model namespaces diff --git a/kogito-springboot-examples/dmn-springboot-example/operator/dmn-springboot-example.yaml b/kogito-springboot-examples/dmn-springboot-example/operator/dmn-springboot-example.yaml deleted file mode 100644 index 44060129d2..0000000000 --- a/kogito-springboot-examples/dmn-springboot-example/operator/dmn-springboot-example.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: dmn-springboot-example -spec: - type: RemoteSource - runtime: springboot - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/dmn-springboot-example - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: dmn-springboot-example -spec: - runtime: springboot \ No newline at end of file diff --git a/kogito-springboot-examples/dmn-springboot-example/pom.xml b/kogito-springboot-examples/dmn-springboot-example/pom.xml index 1016db26ac..f42eb86e67 100644 --- a/kogito-springboot-examples/dmn-springboot-example/pom.xml +++ b/kogito-springboot-examples/dmn-springboot-example/pom.xml @@ -1,4 +1,24 @@ + @@ -8,14 +28,14 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT dmn-springboot-example Kogito Example :: DMN - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -37,8 +57,8 @@
- org.kie.kogito - kogito-decisions-spring-boot-starter + org.drools + drools-decisions-spring-boot-starter org.springframework.boot diff --git a/kogito-springboot-examples/dmn-springboot-example/src/main/java/org/kie/kogito/dmn/springboot/example/KogitoSpringbootApplication.java b/kogito-springboot-examples/dmn-springboot-example/src/main/java/org/kie/kogito/dmn/springboot/example/KogitoSpringbootApplication.java index a1e86fc7c6..0ae0f6a443 100644 --- a/kogito-springboot-examples/dmn-springboot-example/src/main/java/org/kie/kogito/dmn/springboot/example/KogitoSpringbootApplication.java +++ b/kogito-springboot-examples/dmn-springboot-example/src/main/java/org/kie/kogito/dmn/springboot/example/KogitoSpringbootApplication.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.dmn.springboot.example; diff --git a/kogito-springboot-examples/dmn-springboot-example/src/main/resources/application.properties b/kogito-springboot-examples/dmn-springboot-example/src/main/resources/application.properties index 2d5e584cce..216ad14477 100644 --- a/kogito-springboot-examples/dmn-springboot-example/src/main/resources/application.properties +++ b/kogito-springboot-examples/dmn-springboot-example/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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-springboot-examples/dmn-springboot-example/src/test/java/org/kie/kogito/dmn/springboot/example/TrafficViolationTest.java b/kogito-springboot-examples/dmn-springboot-example/src/test/java/org/kie/kogito/dmn/springboot/example/TrafficViolationTest.java index cdd4237320..dc5fa8801c 100644 --- a/kogito-springboot-examples/dmn-springboot-example/src/test/java/org/kie/kogito/dmn/springboot/example/TrafficViolationTest.java +++ b/kogito-springboot-examples/dmn-springboot-example/src/test/java/org/kie/kogito/dmn/springboot/example/TrafficViolationTest.java @@ -1,24 +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.dmn.springboot.example; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.annotation.DirtiesContext; import io.restassured.RestAssured; diff --git a/kogito-springboot-examples/dmn-springboot-example/src/test/java/testscenario/KogitoScenarioJunitActivatorTest.java b/kogito-springboot-examples/dmn-springboot-example/src/test/java/testscenario/KogitoScenarioJunitActivatorTest.java index b80780fad8..4b19a12015 100644 --- a/kogito-springboot-examples/dmn-springboot-example/src/test/java/testscenario/KogitoScenarioJunitActivatorTest.java +++ b/kogito-springboot-examples/dmn-springboot-example/src/test/java/testscenario/KogitoScenarioJunitActivatorTest.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 testscenario; diff --git a/kogito-springboot-examples/dmn-springboot-example/src/test/resources/TrafficViolationTest.scesim b/kogito-springboot-examples/dmn-springboot-example/src/test/resources/TrafficViolationTest.scesim index ff5d6a2b3e..3a9a5d98f5 100644 --- a/kogito-springboot-examples/dmn-springboot-example/src/test/resources/TrafficViolationTest.scesim +++ b/kogito-springboot-examples/dmn-springboot-example/src/test/resources/TrafficViolationTest.scesim @@ -753,7 +753,7 @@ - src/main/resources/Traffic Violation.dmn + ../../main/resources/Traffic Violation.dmn DMN https://github.com/kiegroup/drools/kie-dmn/_A4BCA8B8-CF08-433F-93B2-A2598F19ECFF Traffic Violation diff --git a/kogito-springboot-examples/dmn-tracing-springboot/README.md b/kogito-springboot-examples/dmn-tracing-springboot/README.md index 5aff354a29..508b4df195 100644 --- a/kogito-springboot-examples/dmn-tracing-springboot/README.md +++ b/kogito-springboot-examples/dmn-tracing-springboot/README.md @@ -108,6 +108,6 @@ Example response: ## Integration example with Trusty Service -When the tracing addon is enabled, the tracing events are emitted and pushed to a Kafka broker. The [Trusty Service](https://github.com/kiegroup/kogito-apps/tree/main/trusty) can consume such events and store them on a storage. The Trusty Service exposes then some api to consume the information that has been collected. +When the tracing addon is enabled, the tracing events are emitted and pushed to a Kafka broker. The [Trusty Service](https://github.com/apache/incubator-kie-kogito-apps/tree/main/trusty) can consume such events and store them on a storage. The Trusty Service exposes then some api to consume the information that has been collected. A `docker-compose` example is provided in the current folder. In particular, when `docker-compose up` is run, a Kafka broker, an Infinispan container and the nightly build of the trusty service are deployed. Once the services are up and running, after a decision has been evaluated, you can access the trusty service swagger at `localhost:8081/swagger-ui.html` and try to query what are the evaluations of the last day at `localhost:8081/v1/executions` for example. diff --git a/kogito-springboot-examples/dmn-tracing-springboot/docker-compose.yml b/kogito-springboot-examples/dmn-tracing-springboot/docker-compose.yml index bb3dd8d506..9edd2032e0 100644 --- a/kogito-springboot-examples/dmn-tracing-springboot/docker-compose.yml +++ b/kogito-springboot-examples/dmn-tracing-springboot/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' services: diff --git a/kogito-springboot-examples/dmn-tracing-springboot/docker-compose/infinispan/infinispan.xml b/kogito-springboot-examples/dmn-tracing-springboot/docker-compose/infinispan/infinispan.xml index f7c28ab38c..49b57f7d93 100644 --- a/kogito-springboot-examples/dmn-tracing-springboot/docker-compose/infinispan/infinispan.xml +++ b/kogito-springboot-examples/dmn-tracing-springboot/docker-compose/infinispan/infinispan.xml @@ -1,3 +1,23 @@ + diff --git a/kogito-springboot-examples/dmn-tracing-springboot/operator/dmn-tracing-springboot.yaml b/kogito-springboot-examples/dmn-tracing-springboot/operator/dmn-tracing-springboot.yaml deleted file mode 100644 index 44060129d2..0000000000 --- a/kogito-springboot-examples/dmn-tracing-springboot/operator/dmn-tracing-springboot.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: dmn-springboot-example -spec: - type: RemoteSource - runtime: springboot - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/dmn-springboot-example - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: dmn-springboot-example -spec: - runtime: springboot \ No newline at end of file diff --git a/kogito-springboot-examples/dmn-tracing-springboot/pom.xml b/kogito-springboot-examples/dmn-tracing-springboot/pom.xml index 458b024c42..c6cb6c754c 100644 --- a/kogito-springboot-examples/dmn-tracing-springboot/pom.xml +++ b/kogito-springboot-examples/dmn-tracing-springboot/pom.xml @@ -1,4 +1,24 @@ + @@ -8,14 +28,14 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT dmn-tracing-springboot Kogito Example :: DMN Tracing - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -37,17 +57,17 @@ - org.kie.kogito - kogito-decisions-spring-boot-starter + org.drools + drools-decisions-spring-boot-starter - org.kie.kogito - kogito-addons-springboot-tracing-decision + org.kie + kie-addons-springboot-tracing-decision - org.kie.kogito - kogito-addons-springboot-monitoring-prometheus + org.kie + kie-addons-springboot-monitoring-prometheus diff --git a/kogito-springboot-examples/dmn-tracing-springboot/src/main/java/org/kie/kogito/dmn/springboot/tracing/KogitoSpringbootApplication.java b/kogito-springboot-examples/dmn-tracing-springboot/src/main/java/org/kie/kogito/dmn/springboot/tracing/KogitoSpringbootApplication.java index f6648ebbae..f3adc6040b 100644 --- a/kogito-springboot-examples/dmn-tracing-springboot/src/main/java/org/kie/kogito/dmn/springboot/tracing/KogitoSpringbootApplication.java +++ b/kogito-springboot-examples/dmn-tracing-springboot/src/main/java/org/kie/kogito/dmn/springboot/tracing/KogitoSpringbootApplication.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.dmn.springboot.tracing; diff --git a/kogito-springboot-examples/dmn-tracing-springboot/src/main/resources/application.properties b/kogito-springboot-examples/dmn-tracing-springboot/src/main/resources/application.properties index 4371e95bd3..c261a88676 100644 --- a/kogito-springboot-examples/dmn-tracing-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/dmn-tracing-springboot/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. +# + server.address=0.0.0.0 kogito.addon.tracing.decision.kafka.bootstrapAddress=localhost:9092 \ No newline at end of file diff --git a/kogito-springboot-examples/dmn-tracing-springboot/src/test/java/org/kie/kogito/dmn/springboot/tracing/LoanEligibilityIT.java b/kogito-springboot-examples/dmn-tracing-springboot/src/test/java/org/kie/kogito/dmn/springboot/tracing/LoanEligibilityIT.java index e3db89f928..5d90bee765 100644 --- a/kogito-springboot-examples/dmn-tracing-springboot/src/test/java/org/kie/kogito/dmn/springboot/tracing/LoanEligibilityIT.java +++ b/kogito-springboot-examples/dmn-tracing-springboot/src/test/java/org/kie/kogito/dmn/springboot/tracing/LoanEligibilityIT.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.dmn.springboot.tracing; @@ -28,7 +31,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.context.ContextConfiguration; import io.restassured.RestAssured; diff --git a/kogito-springboot-examples/dmn-tracing-springboot/src/test/java/org/kie/kogito/dmn/springboot/tracing/matcher/StringMatchesUUIDPattern.java b/kogito-springboot-examples/dmn-tracing-springboot/src/test/java/org/kie/kogito/dmn/springboot/tracing/matcher/StringMatchesUUIDPattern.java index 8c34bb72ad..2819c439a3 100644 --- a/kogito-springboot-examples/dmn-tracing-springboot/src/test/java/org/kie/kogito/dmn/springboot/tracing/matcher/StringMatchesUUIDPattern.java +++ b/kogito-springboot-examples/dmn-tracing-springboot/src/test/java/org/kie/kogito/dmn/springboot/tracing/matcher/StringMatchesUUIDPattern.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.dmn.springboot.tracing.matcher; diff --git a/kogito-springboot-examples/dmn-tracing-springboot/src/test/resources/application.properties b/kogito-springboot-examples/dmn-tracing-springboot/src/test/resources/application.properties index cf952848f6..593c4f8f06 100644 --- a/kogito-springboot-examples/dmn-tracing-springboot/src/test/resources/application.properties +++ b/kogito-springboot-examples/dmn-tracing-springboot/src/test/resources/application.properties @@ -1 +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. +# + kogito.addon.tracing.decision.kafka.bootstrapAddress=${spring.kafka.bootstrap-servers} \ No newline at end of file diff --git a/kogito-springboot-examples/flexible-process-springboot/README.md b/kogito-springboot-examples/flexible-process-springboot/README.md index c0e20b8c13..23b32b1d13 100644 --- a/kogito-springboot-examples/flexible-process-springboot/README.md +++ b/kogito-springboot-examples/flexible-process-springboot/README.md @@ -77,10 +77,6 @@ In addition, various clients to interact with this service can be easily generat When running in either Quarkus Development or Native mode, we also leverage the [Quarkus OpenAPI extension](https://quarkus.io/guides/openapi-swaggerui#use-swagger-ui-for-development) that exposes [Swagger UI](http://localhost:8080/swagger-ui.html) that you can use to look at available REST endpoints and send test requests. -## Deploying with the Kogito Operator - -In the [operator](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). - ## Usage example ### Create a support case diff --git a/kogito-springboot-examples/flexible-process-springboot/operator/flexible-process-springboot.yaml b/kogito-springboot-examples/flexible-process-springboot/operator/flexible-process-springboot.yaml deleted file mode 100644 index d6cedeae15..0000000000 --- a/kogito-springboot-examples/flexible-process-springboot/operator/flexible-process-springboot.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: flexible-process-springboot -spec: - type: RemoteSource - runtime: springboot - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/flexible-process-springboot - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: flexible-process-springboot -spec: - runtime: springboot - diff --git a/kogito-springboot-examples/flexible-process-springboot/pom.xml b/kogito-springboot-examples/flexible-process-springboot/pom.xml index a54b5b752d..3da05ac205 100644 --- a/kogito-springboot-examples/flexible-process-springboot/pom.xml +++ b/kogito-springboot-examples/flexible-process-springboot/pom.xml @@ -1,4 +1,24 @@ + @@ -6,7 +26,7 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT flexible-process-springboot @@ -14,8 +34,8 @@ Kogito service invocation - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -39,8 +59,8 @@ - org.kie.kogito - kogito-processes-spring-boot-starter + org.jbpm + jbpm-spring-boot-starter org.springframework.boot diff --git a/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/model/Comment.java b/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/model/Comment.java index c6e924361e..3257e28ba8 100644 --- a/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/model/Comment.java +++ b/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/model/Comment.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.flexible.example.model; diff --git a/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/model/Product.java b/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/model/Product.java index 9efe281bc8..1dd99f1d9f 100644 --- a/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/model/Product.java +++ b/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/model/Product.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.flexible.example.model; diff --git a/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/model/Questionnaire.java b/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/model/Questionnaire.java index 974f8c7fb1..9586703f97 100644 --- a/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/model/Questionnaire.java +++ b/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/model/Questionnaire.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.flexible.example.model; diff --git a/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/model/State.java b/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/model/State.java index 29b47e5ed5..6efea72c9d 100644 --- a/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/model/State.java +++ b/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/model/State.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.flexible.example.model; diff --git a/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/model/SupportCase.java b/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/model/SupportCase.java index efb4b4ed24..ec880e01ae 100644 --- a/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/model/SupportCase.java +++ b/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/model/SupportCase.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.flexible.example.model; diff --git a/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/service/CommentService.java b/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/service/CommentService.java index 55f280ba70..a41d0ad108 100644 --- a/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/service/CommentService.java +++ b/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/service/CommentService.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.flexible.example.service; diff --git a/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/service/StateService.java b/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/service/StateService.java index ae43868e2c..ca46491fe4 100644 --- a/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/service/StateService.java +++ b/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/service/StateService.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.flexible.example.service; diff --git a/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/service/TriageService.java b/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/service/TriageService.java index 7b0a8f6f40..18e33be24a 100644 --- a/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/service/TriageService.java +++ b/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/flexible/example/service/TriageService.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.flexible.example.service; diff --git a/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/tests/KogitoSpringbootApplication.java b/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/tests/KogitoSpringbootApplication.java index 9fa783e4a1..e80af38acf 100644 --- a/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/tests/KogitoSpringbootApplication.java +++ b/kogito-springboot-examples/flexible-process-springboot/src/main/java/org/kie/kogito/tests/KogitoSpringbootApplication.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.tests; diff --git a/kogito-springboot-examples/flexible-process-springboot/src/main/resources/service-desk.bpmn b/kogito-springboot-examples/flexible-process-springboot/src/main/resources/service-desk.bpmn index b172529784..264cf721c3 100644 --- a/kogito-springboot-examples/flexible-process-springboot/src/main/resources/service-desk.bpmn +++ b/kogito-springboot-examples/flexible-process-springboot/src/main/resources/service-desk.bpmn @@ -1,4 +1,5 @@ - + + @@ -499,11 +500,13 @@ + _AD768963-CBF7-4269-9D43-51FE0D5D2556_TaskNameInputX _AD768963-CBF7-4269-9D43-51FE0D5D2556_SkippableInputX + _AD768963-CBF7-4269-9D43-51FE0D5D2556_GroupIdInputX _AD768963-CBF7-4269-9D43-51FE0D5D2556_evaluationOutputX @@ -524,6 +527,13 @@ + + _AD768963-CBF7-4269-9D43-51FE0D5D2556_GroupIdInputX + + + + + _AD768963-CBF7-4269-9D43-51FE0D5D2556_evaluationOutputX evaluation @@ -743,7 +753,7 @@ supportCase - + diff --git a/kogito-springboot-examples/flexible-process-springboot/src/test/java/org/kie/kogito/flexible/example/springboot/ServiceDeskProcessTest.java b/kogito-springboot-examples/flexible-process-springboot/src/test/java/org/kie/kogito/flexible/example/springboot/ServiceDeskProcessTest.java index cdcfba2ad2..d0f5da8495 100644 --- a/kogito-springboot-examples/flexible-process-springboot/src/test/java/org/kie/kogito/flexible/example/springboot/ServiceDeskProcessTest.java +++ b/kogito-springboot-examples/flexible-process-springboot/src/test/java/org/kie/kogito/flexible/example/springboot/ServiceDeskProcessTest.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.flexible.example.springboot; @@ -27,7 +30,7 @@ import org.kie.kogito.flexible.example.service.TriageService; import org.kie.kogito.tests.KogitoSpringbootApplication; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.annotation.DirtiesContext.ClassMode; @@ -106,6 +109,8 @@ private void addSupportComment(String id) { String location = given() .basePath(BASE_PATH) .contentType(ContentType.JSON) + .queryParam("user", "kelly") + .queryParam("group", "support") .when() .post("/{id}/ReceiveSupportComment", id) .then() @@ -137,9 +142,12 @@ private void addSupportComment(String id) { private void addCustomerComment(String id) { String location = given() - .basePath(BASE_PATH + "/" + id).contentType(ContentType.JSON) + .basePath(BASE_PATH) + .contentType(ContentType.JSON) + .queryParam("user", "Paco") + .queryParam("group", "customer") .when() - .post("/ReceiveCustomerComment") + .post("/{id}/ReceiveCustomerComment", id) .then() .statusCode(201) .header("Location", notNullValue()) @@ -168,20 +176,28 @@ private void addCustomerComment(String id) { } private void resolveCase(String id) { - given().basePath(BASE_PATH + "/" + id).contentType(ContentType.JSON).when().post("/Resolve_Case").then() - .statusCode(200).body("supportCase.state", is(State.RESOLVED.name())); + given() + .basePath(BASE_PATH) + .contentType(ContentType.JSON) + .when() + .post("/{id}/Resolve_Case", id) + .then() + .statusCode(200) + .body("supportCase.state", is(State.RESOLVED.name())); } @SuppressWarnings("unchecked") private void sendQuestionnaire(String id) { String taskId = given() - .basePath(BASE_PATH + "/" + id) + .basePath(BASE_PATH) .contentType(ContentType.JSON) + .queryParam("user", "Paco") + .queryParam("group", "customer") .when() - .get("/tasks") + .get("/{id}/tasks", id) .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("Questionnaire")) .extract() .path("[0].id"); @@ -192,13 +208,13 @@ private void sendQuestionnaire(String id) { params.put("evaluation", 10); given() - .basePath(BASE_PATH + "/" + id) + .basePath(BASE_PATH) .queryParam("user", "Paco") .queryParam("group", "customer") .contentType(ContentType.JSON) .when() .body(params) - .post("/Questionnaire/" + taskId) + .post("/{id}/Questionnaire/{taskId}", id, taskId) .then() .statusCode(200) .body("supportCase.state", is(State.CLOSED.name())) @@ -212,7 +228,7 @@ private void checkAllProcessesFinished() { .basePath(BASE_PATH) .contentType(ContentType.JSON) .when() - .get("/") + .get("") .as(List.class); assertTrue(processes.isEmpty()); diff --git a/kogito-springboot-examples/onboarding-springboot/pom.xml b/kogito-springboot-examples/onboarding-springboot/pom.xml index cbf0db3c57..14ae22674a 100644 --- a/kogito-springboot-examples/onboarding-springboot/pom.xml +++ b/kogito-springboot-examples/onboarding-springboot/pom.xml @@ -1,19 +1,39 @@ + 4.0.0 org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT onboarding-springboot Kogito Example :: Onboarding Example :: Onboarding with Business Process Spring Boot Onboarding function and service orchestration - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -30,20 +50,20 @@ - org.kie.kogito - kogito-processes-spring-boot-starter + org.jbpm + jbpm-spring-boot-starter org.springframework.boot spring-boot-starter-actuator - org.kie.kogito - kogito-addons-springboot-monitoring-prometheus + org.kie + kie-addons-springboot-monitoring-prometheus - org.kie.kogito - kogito-addons-springboot-kubernetes + org.kie + kie-addons-springboot-kubernetes @@ -100,12 +120,12 @@ - org.kie.kogito - kogito-addons-springboot-persistence-infinispan + org.kie + kie-addons-springboot-persistence-infinispan org.infinispan - infinispan-spring-boot-starter-remote + infinispan-spring-boot3-starter-remote diff --git a/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/KogitoOnboardingApplication.java b/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/KogitoOnboardingApplication.java index 2764617167..6b2772ca9d 100644 --- a/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/KogitoOnboardingApplication.java +++ b/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/KogitoOnboardingApplication.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.examples; diff --git a/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/WorkItemHandlerConfig.java b/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/WorkItemHandlerConfig.java index 92d7ecb125..fc2f30843a 100644 --- a/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/WorkItemHandlerConfig.java +++ b/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/WorkItemHandlerConfig.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.examples; @@ -22,8 +25,6 @@ import java.util.List; import java.util.Map; -import javax.annotation.PostConstruct; - import org.kie.kogito.addons.k8s.Endpoint; import org.kie.kogito.addons.k8s.EndpointQueryKey; import org.kie.kogito.addons.k8s.LocalEndpointDiscovery; @@ -35,6 +36,8 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; +import jakarta.annotation.PostConstruct; + @Component public class WorkItemHandlerConfig extends DefaultWorkItemHandlerConfig { diff --git a/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/onboarding/Address.java b/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/onboarding/Address.java index e4adcdbe31..02c910572e 100644 --- a/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/onboarding/Address.java +++ b/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/onboarding/Address.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.examples.onboarding; diff --git a/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/onboarding/DecisionTaskWorkItemHandler.java b/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/onboarding/DecisionTaskWorkItemHandler.java index 60c766bfc3..f958f4591a 100644 --- a/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/onboarding/DecisionTaskWorkItemHandler.java +++ b/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/onboarding/DecisionTaskWorkItemHandler.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.examples.onboarding; diff --git a/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/onboarding/Employee.java b/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/onboarding/Employee.java index 12923c8e7f..c4b43fa3f3 100644 --- a/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/onboarding/Employee.java +++ b/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/onboarding/Employee.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.examples.onboarding; diff --git a/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/onboarding/Payroll.java b/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/onboarding/Payroll.java index d3a99a24e7..aeb82b05ca 100644 --- a/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/onboarding/Payroll.java +++ b/kogito-springboot-examples/onboarding-springboot/src/main/java/org/kie/kogito/examples/onboarding/Payroll.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.examples.onboarding; diff --git a/kogito-springboot-examples/onboarding-springboot/src/main/jkube/knative-service.yaml b/kogito-springboot-examples/onboarding-springboot/src/main/jkube/knative-service.yaml index 1e4a9ec4a7..b622550998 100644 --- a/kogito-springboot-examples/onboarding-springboot/src/main/jkube/knative-service.yaml +++ b/kogito-springboot-examples/onboarding-springboot/src/main/jkube/knative-service.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. +# + apiVersion: serving.knative.dev/v1 kind: Service metadata: diff --git a/kogito-springboot-examples/onboarding-springboot/src/main/jkube/rolebinding.yaml b/kogito-springboot-examples/onboarding-springboot/src/main/jkube/rolebinding.yaml index 66267dbc42..8ca9b3ab85 100644 --- a/kogito-springboot-examples/onboarding-springboot/src/main/jkube/rolebinding.yaml +++ b/kogito-springboot-examples/onboarding-springboot/src/main/jkube/rolebinding.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. +# + apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: diff --git a/kogito-springboot-examples/onboarding-springboot/src/main/resources/META-INF/kmodule.xml b/kogito-springboot-examples/onboarding-springboot/src/main/resources/META-INF/kmodule.xml index 088d681b28..9b0f9364a3 100644 --- a/kogito-springboot-examples/onboarding-springboot/src/main/resources/META-INF/kmodule.xml +++ b/kogito-springboot-examples/onboarding-springboot/src/main/resources/META-INF/kmodule.xml @@ -1 +1,21 @@ + \ No newline at end of file diff --git a/kogito-springboot-examples/onboarding-springboot/src/main/resources/application.properties b/kogito-springboot-examples/onboarding-springboot/src/main/resources/application.properties index 7d7853bdff..3bd02abd12 100644 --- a/kogito-springboot-examples/onboarding-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/onboarding-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.port=8080 infinispan.remote.server-list=localhost:11222 org.acme.kogito.onboarding.local=false \ No newline at end of file diff --git a/kogito-springboot-examples/onboarding-springboot/src/test/java/org/kie/kogito/examples/onboarding/OnboardingEndpointIT.java b/kogito-springboot-examples/onboarding-springboot/src/test/java/org/kie/kogito/examples/onboarding/OnboardingEndpointIT.java index 03279f7644..3cb334537e 100644 --- a/kogito-springboot-examples/onboarding-springboot/src/test/java/org/kie/kogito/examples/onboarding/OnboardingEndpointIT.java +++ b/kogito-springboot-examples/onboarding-springboot/src/test/java/org/kie/kogito/examples/onboarding/OnboardingEndpointIT.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.examples.onboarding; @@ -34,7 +37,7 @@ import org.kie.kogito.testcontainers.springboot.InfinispanSpringBootTestResource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; diff --git a/kogito-springboot-examples/onboarding-springboot/src/test/java/org/kie/kogito/examples/test/RecordedOutputWorkItemHandler.java b/kogito-springboot-examples/onboarding-springboot/src/test/java/org/kie/kogito/examples/test/RecordedOutputWorkItemHandler.java index 98c20ea8b5..05a6799916 100644 --- a/kogito-springboot-examples/onboarding-springboot/src/test/java/org/kie/kogito/examples/test/RecordedOutputWorkItemHandler.java +++ b/kogito-springboot-examples/onboarding-springboot/src/test/java/org/kie/kogito/examples/test/RecordedOutputWorkItemHandler.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.examples.test; diff --git a/kogito-springboot-examples/onboarding-springboot/src/test/java/org/kie/kogito/examples/test/RecordedWorkItemHandlerConfig.java b/kogito-springboot-examples/onboarding-springboot/src/test/java/org/kie/kogito/examples/test/RecordedWorkItemHandlerConfig.java index de8947db89..26b40467a3 100644 --- a/kogito-springboot-examples/onboarding-springboot/src/test/java/org/kie/kogito/examples/test/RecordedWorkItemHandlerConfig.java +++ b/kogito-springboot-examples/onboarding-springboot/src/test/java/org/kie/kogito/examples/test/RecordedWorkItemHandlerConfig.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.examples.test; diff --git a/kogito-springboot-examples/onboarding-springboot/src/test/resources/application.properties b/kogito-springboot-examples/onboarding-springboot/src/test/resources/application.properties index b133bd7e89..dd21c89b8d 100644 --- a/kogito-springboot-examples/onboarding-springboot/src/test/resources/application.properties +++ b/kogito-springboot-examples/onboarding-springboot/src/test/resources/application.properties @@ -1,2 +1,23 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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.port=8080 org.acme.kogito.onboarding.local=true +spring.main.cloud-platform=KUBERNETES +spring.cloud.bootstrap.enabled=true \ No newline at end of file diff --git a/kogito-springboot-examples/pmml-event-driven-springboot/README.md b/kogito-springboot-examples/pmml-event-driven-springboot/README.md index 1b48d14087..33a1fd3cc3 100644 --- a/kogito-springboot-examples/pmml-event-driven-springboot/README.md +++ b/kogito-springboot-examples/pmml-event-driven-springboot/README.md @@ -25,8 +25,8 @@ Like the other Kogito AddOns, the only required step to enable it is to include ```xml - org.kie.kogito - kogito-addons-springboot-event-predictions + org.kie + kie-addons-springboot-event-predictions ``` diff --git a/kogito-springboot-examples/pmml-event-driven-springboot/docker-compose.yml b/kogito-springboot-examples/pmml-event-driven-springboot/docker-compose.yml index f07d3cc400..802976737c 100644 --- a/kogito-springboot-examples/pmml-event-driven-springboot/docker-compose.yml +++ b/kogito-springboot-examples/pmml-event-driven-springboot/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' services: diff --git a/kogito-springboot-examples/pmml-event-driven-springboot/pom.xml b/kogito-springboot-examples/pmml-event-driven-springboot/pom.xml index 9a46b97a15..3f8d5163d7 100644 --- a/kogito-springboot-examples/pmml-event-driven-springboot/pom.xml +++ b/kogito-springboot-examples/pmml-event-driven-springboot/pom.xml @@ -1,4 +1,24 @@ + @@ -7,14 +27,14 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT pmml-event-driven-springboot Kogito Example :: PMML Event-Driven - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -31,12 +51,12 @@ - org.kie.kogito - kogito-predictions-spring-boot-starter + org.kie + kie-predictions-spring-boot-starter - org.kie.kogito - kogito-addons-springboot-events-predictions + org.kie + kie-addons-springboot-events-predictions diff --git a/kogito-springboot-examples/pmml-event-driven-springboot/src/main/java/org/kie/kogito/pmml/springboot/example/KogitoSpringbootApplication.java b/kogito-springboot-examples/pmml-event-driven-springboot/src/main/java/org/kie/kogito/pmml/springboot/example/KogitoSpringbootApplication.java index 96dbd9d8d6..fd0a488f11 100644 --- a/kogito-springboot-examples/pmml-event-driven-springboot/src/main/java/org/kie/kogito/pmml/springboot/example/KogitoSpringbootApplication.java +++ b/kogito-springboot-examples/pmml-event-driven-springboot/src/main/java/org/kie/kogito/pmml/springboot/example/KogitoSpringbootApplication.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.pmml.springboot.example; diff --git a/kogito-springboot-examples/pmml-event-driven-springboot/src/main/resources/application.properties b/kogito-springboot-examples/pmml-event-driven-springboot/src/main/resources/application.properties index 29279a57f8..b6841a92a2 100644 --- a/kogito-springboot-examples/pmml-event-driven-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/pmml-event-driven-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.addon.cloudevents.kafka.kogito_incoming_stream=pmml-event-driven-requests kogito.addon.cloudevents.kafka.kogito_outgoing_stream=pmml-event-driven-responses kogito.addon.tracing.decision.kafka.bootstrapAddress=localhost:9092 diff --git a/kogito-springboot-examples/pmml-event-driven-springboot/src/test/java/org/kie/kogito/examples/PmmlEventDrivenIT.java b/kogito-springboot-examples/pmml-event-driven-springboot/src/test/java/org/kie/kogito/examples/PmmlEventDrivenIT.java index f125539a2f..dbf5b604b2 100644 --- a/kogito-springboot-examples/pmml-event-driven-springboot/src/test/java/org/kie/kogito/examples/PmmlEventDrivenIT.java +++ b/kogito-springboot-examples/pmml-event-driven-springboot/src/test/java/org/kie/kogito/examples/PmmlEventDrivenIT.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.examples; diff --git a/kogito-springboot-examples/pmml-event-driven-springboot/src/test/resources/logback-test.xml b/kogito-springboot-examples/pmml-event-driven-springboot/src/test/resources/logback-test.xml index e8c716f5ef..bb6af4db85 100644 --- a/kogito-springboot-examples/pmml-event-driven-springboot/src/test/resources/logback-test.xml +++ b/kogito-springboot-examples/pmml-event-driven-springboot/src/test/resources/logback-test.xml @@ -1,3 +1,23 @@ + diff --git a/kogito-springboot-examples/pmml-springboot-example/README.md b/kogito-springboot-examples/pmml-springboot-example/README.md index 456ca115cd..5dd7fdf712 100644 --- a/kogito-springboot-examples/pmml-springboot-example/README.md +++ b/kogito-springboot-examples/pmml-springboot-example/README.md @@ -154,8 +154,3 @@ Example response: "categoricalResult":1.381666666666666 } ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). - diff --git a/kogito-springboot-examples/pmml-springboot-example/operator/pmml-springboot-example.yaml b/kogito-springboot-examples/pmml-springboot-example/operator/pmml-springboot-example.yaml deleted file mode 100644 index 2d1c8dcd3d..0000000000 --- a/kogito-springboot-examples/pmml-springboot-example/operator/pmml-springboot-example.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: pmml-springboot-example -spec: - type: RemoteSource - runtime: springboot - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-springboot-examples/pmml-springboot-example - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: pmml-springboot-example -spec: - runtime: springboot \ No newline at end of file diff --git a/kogito-springboot-examples/pmml-springboot-example/pom.xml b/kogito-springboot-examples/pmml-springboot-example/pom.xml index 8f7ef4a2f8..4c037773aa 100644 --- a/kogito-springboot-examples/pmml-springboot-example/pom.xml +++ b/kogito-springboot-examples/pmml-springboot-example/pom.xml @@ -1,4 +1,24 @@ + @@ -7,14 +27,14 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT pmml-springboot-example Kogito Example :: PMML - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -31,8 +51,8 @@ - org.kie.kogito - kogito-predictions-spring-boot-starter + org.kie + kie-predictions-spring-boot-starter org.springframework.boot diff --git a/kogito-springboot-examples/pmml-springboot-example/src/main/java/org/kie/kogito/pmml/springboot/example/KogitoSpringbootApplication.java b/kogito-springboot-examples/pmml-springboot-example/src/main/java/org/kie/kogito/pmml/springboot/example/KogitoSpringbootApplication.java index a2c900d261..fd0a488f11 100644 --- a/kogito-springboot-examples/pmml-springboot-example/src/main/java/org/kie/kogito/pmml/springboot/example/KogitoSpringbootApplication.java +++ b/kogito-springboot-examples/pmml-springboot-example/src/main/java/org/kie/kogito/pmml/springboot/example/KogitoSpringbootApplication.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.pmml.springboot.example; diff --git a/kogito-springboot-examples/pmml-springboot-example/src/main/resources/application.properties b/kogito-springboot-examples/pmml-springboot-example/src/main/resources/application.properties index 7303c9f975..93226a8305 100644 --- a/kogito-springboot-examples/pmml-springboot-example/src/main/resources/application.properties +++ b/kogito-springboot-examples/pmml-springboot-example/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. +# + server.address=0.0.0.0 diff --git a/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/CommonTestUtils.java b/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/CommonTestUtils.java index 32415993c1..3a7c40ff9a 100644 --- a/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/CommonTestUtils.java +++ b/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/CommonTestUtils.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.pmml.springboot.example; diff --git a/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/LinRegTest.java b/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/LinRegTest.java index e2be1f17ab..11ee03e192 100644 --- a/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/LinRegTest.java +++ b/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/LinRegTest.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.pmml.springboot.example; @@ -21,7 +24,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.annotation.DirtiesContext; import io.restassured.RestAssured; diff --git a/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/MiningModelTest.java b/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/MiningModelTest.java index 875c7a2f1f..3909803d4f 100644 --- a/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/MiningModelTest.java +++ b/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/MiningModelTest.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.pmml.springboot.example; @@ -21,7 +24,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.annotation.DirtiesContext; import io.restassured.RestAssured; diff --git a/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/SampleMineTest.java b/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/SampleMineTest.java index 686593bf21..0de0e14083 100644 --- a/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/SampleMineTest.java +++ b/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/SampleMineTest.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.pmml.springboot.example; @@ -21,7 +24,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.annotation.DirtiesContext; import io.restassured.RestAssured; diff --git a/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/SimpleScorecardTest.java b/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/SimpleScorecardTest.java index 0ab88633a0..bec55efda8 100644 --- a/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/SimpleScorecardTest.java +++ b/kogito-springboot-examples/pmml-springboot-example/src/test/java/org/kie/kogito/pmml/springboot/example/SimpleScorecardTest.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.pmml.springboot.example; @@ -21,7 +24,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.annotation.DirtiesContext; import io.restassured.RestAssured; diff --git a/kogito-springboot-examples/pom.xml b/kogito-springboot-examples/pom.xml index df57d4a323..3becc1edd0 100644 --- a/kogito-springboot-examples/pom.xml +++ b/kogito-springboot-examples/pom.xml @@ -1,4 +1,24 @@ + @@ -7,18 +27,22 @@ org.kie.kogito.examples kogito-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT kogito-springboot-examples pom Kogito Example :: Spring Boot + + org.kie.kogito.examples.springboot + + org.infinispan - infinispan-spring-boot-starter-remote + infinispan-spring-boot3-starter-remote ${version.org.infinispan} @@ -60,32 +84,16 @@ process-springboot-example process-timer-springboot process-usertasks-custom-lifecycle-springboot - process-usertasks-springboot-with-console process-usertasks-springboot - process-usertasks-with-security-oidc-springboot-with-console process-usertasks-with-security-oidc-springboot process-usertasks-with-security-springboot rules-legacy-springboot-example + rules-legacy-scesim-springboot-example ruleunit-event-driven-springboot ruleunit-springboot-example - - - productized - - - productized - - - - springboot @@ -118,9 +126,7 @@ process-springboot-example process-timer-springboot process-usertasks-custom-lifecycle-springboot - process-usertasks-springboot-with-console process-usertasks-springboot - process-usertasks-with-security-oidc-springboot-with-console process-usertasks-with-security-oidc-springboot process-usertasks-with-security-springboot ruleunit-springboot-example diff --git a/kogito-springboot-examples/process-business-rules-springboot/README.md b/kogito-springboot-examples/process-business-rules-springboot/README.md index ce7d99f049..a4caef0ff5 100644 --- a/kogito-springboot-examples/process-business-rules-springboot/README.md +++ b/kogito-springboot-examples/process-business-rules-springboot/README.md @@ -226,7 +226,3 @@ Should return something similar to } ``` and there should be no outstanding task for the person anymore. - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-springboot-examples/process-business-rules-springboot/operator/process-business-rules-springboot.yaml b/kogito-springboot-examples/process-business-rules-springboot/operator/process-business-rules-springboot.yaml deleted file mode 100644 index 2ada0f5528..0000000000 --- a/kogito-springboot-examples/process-business-rules-springboot/operator/process-business-rules-springboot.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-business-rules-springboot -spec: - type: RemoteSource - runtime: springboot - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/process-business-rules-springboot - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-business-rules-springboot -spec: - runtime: springboot \ No newline at end of file diff --git a/kogito-springboot-examples/process-business-rules-springboot/pom.xml b/kogito-springboot-examples/process-business-rules-springboot/pom.xml index e770ea884d..eab978f2d7 100644 --- a/kogito-springboot-examples/process-business-rules-springboot/pom.xml +++ b/kogito-springboot-examples/process-business-rules-springboot/pom.xml @@ -1,4 +1,24 @@ + @@ -6,7 +26,7 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT Kogito Example :: Process Business Rules Spring Boot @@ -14,8 +34,8 @@ Kogito business rules invocation - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -32,12 +52,12 @@ - org.kie.kogito - kogito-processes-spring-boot-starter + org.jbpm + jbpm-spring-boot-starter - org.kie.kogito - kogito-rules-spring-boot-starter + org.drools + drools-rules-spring-boot-starter diff --git a/kogito-springboot-examples/process-business-rules-springboot/src/main/java/org/acme/travels/Person.java b/kogito-springboot-examples/process-business-rules-springboot/src/main/java/org/acme/travels/Person.java index bfc9d2a8cd..77b60c13f2 100644 --- a/kogito-springboot-examples/process-business-rules-springboot/src/main/java/org/acme/travels/Person.java +++ b/kogito-springboot-examples/process-business-rules-springboot/src/main/java/org/acme/travels/Person.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.acme.travels; diff --git a/kogito-springboot-examples/process-business-rules-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.java b/kogito-springboot-examples/process-business-rules-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.java index 4b2388ce3c..356e47d49e 100644 --- a/kogito-springboot-examples/process-business-rules-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.java +++ b/kogito-springboot-examples/process-business-rules-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.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.tests; diff --git a/kogito-springboot-examples/process-business-rules-springboot/src/main/resources/META-INF/kmodule.xml b/kogito-springboot-examples/process-business-rules-springboot/src/main/resources/META-INF/kmodule.xml index 2ba4076c16..41665a75bb 100644 --- a/kogito-springboot-examples/process-business-rules-springboot/src/main/resources/META-INF/kmodule.xml +++ b/kogito-springboot-examples/process-business-rules-springboot/src/main/resources/META-INF/kmodule.xml @@ -1 +1,21 @@ + \ No newline at end of file diff --git a/kogito-springboot-examples/process-business-rules-springboot/src/main/resources/application.properties b/kogito-springboot-examples/process-business-rules-springboot/src/main/resources/application.properties index 2d5e584cce..216ad14477 100644 --- a/kogito-springboot-examples/process-business-rules-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/process-business-rules-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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-springboot-examples/process-business-rules-springboot/src/main/resources/org/acme/travels/person-rules.drl b/kogito-springboot-examples/process-business-rules-springboot/src/main/resources/org/acme/travels/person-rules.drl index 5b51b0fd49..9e253576e0 100644 --- a/kogito-springboot-examples/process-business-rules-springboot/src/main/resources/org/acme/travels/person-rules.drl +++ b/kogito-springboot-examples/process-business-rules-springboot/src/main/resources/org/acme/travels/person-rules.drl @@ -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.acme.travels diff --git a/kogito-springboot-examples/process-business-rules-springboot/src/test/java/org/acme/travels/PersonsProcessTest.java b/kogito-springboot-examples/process-business-rules-springboot/src/test/java/org/acme/travels/PersonsProcessTest.java index aefc9e3487..b9b189740f 100644 --- a/kogito-springboot-examples/process-business-rules-springboot/src/test/java/org/acme/travels/PersonsProcessTest.java +++ b/kogito-springboot-examples/process-business-rules-springboot/src/test/java/org/acme/travels/PersonsProcessTest.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.acme.travels; diff --git a/kogito-springboot-examples/process-decisions-rest-springboot/README.md b/kogito-springboot-examples/process-decisions-rest-springboot/README.md index fd42534ac3..6afb4cc6de 100644 --- a/kogito-springboot-examples/process-decisions-rest-springboot/README.md +++ b/kogito-springboot-examples/process-decisions-rest-springboot/README.md @@ -305,8 +305,3 @@ After the Curl command, you should see a similar console log } ``` In this case the driver license is expired when the DRL is evaluated because the DriverService generated an expired date for the driver's license thus DMN is not evaluated, so the `validLicense` is `false` and `trafficViolationResponse` is `null`. - - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). \ No newline at end of file diff --git a/kogito-springboot-examples/process-decisions-rest-springboot/pom.xml b/kogito-springboot-examples/process-decisions-rest-springboot/pom.xml index ce8928da69..757640cc02 100644 --- a/kogito-springboot-examples/process-decisions-rest-springboot/pom.xml +++ b/kogito-springboot-examples/process-decisions-rest-springboot/pom.xml @@ -1,19 +1,39 @@ + 4.0.0 org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-decisions-rest-springboot Kogito Example :: Process :: Decisions :: REST :: Spring Boot Process with DMN and DRL integration through REST - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -35,12 +55,12 @@ - org.kie.kogito - kogito-processes-spring-boot-starter + org.jbpm + jbpm-spring-boot-starter - org.kie.kogito - kogito-decisions-spring-boot-starter + org.drools + drools-decisions-spring-boot-starter diff --git a/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/Driver.java b/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/Driver.java index f77a47b749..32d9bb013a 100644 --- a/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/Driver.java +++ b/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/Driver.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.traffic; import java.util.Date; @@ -58,6 +60,14 @@ public Driver(String id, String name, String state, String city, Integer points, this.licenseExpiration = licenseExpiration; } + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + public String getName() { return name; } diff --git a/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/DriverService.java b/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/DriverService.java index c6e2e44bb9..e751e995ad 100644 --- a/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/DriverService.java +++ b/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/DriverService.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.traffic; import java.time.ZonedDateTime; diff --git a/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/Fine.java b/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/Fine.java index 4b6873829e..928562fb5f 100644 --- a/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/Fine.java +++ b/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/Fine.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.traffic; diff --git a/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/KogitoApplication.java b/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/KogitoApplication.java index e761b023d5..387360e781 100644 --- a/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/KogitoApplication.java +++ b/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/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.traffic; diff --git a/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/LicenseValidationRestService.java b/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/LicenseValidationRestService.java index efcefb779c..58c54bc7ac 100644 --- a/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/LicenseValidationRestService.java +++ b/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/LicenseValidationRestService.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.traffic; diff --git a/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/LicenseValidationService.java b/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/LicenseValidationService.java index 53fd44ed58..29f4bef1b4 100644 --- a/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/LicenseValidationService.java +++ b/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/LicenseValidationService.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.traffic; diff --git a/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/TrafficViolationResponse.java b/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/TrafficViolationResponse.java index cd550b1c03..a178948d7f 100644 --- a/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/TrafficViolationResponse.java +++ b/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/TrafficViolationResponse.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.traffic; diff --git a/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/TrafficViolationRestService.java b/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/TrafficViolationRestService.java index 5b4b78550a..b849093bc3 100644 --- a/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/TrafficViolationRestService.java +++ b/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/TrafficViolationRestService.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.traffic; diff --git a/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/Violation.java b/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/Violation.java index 56446af2d2..170dd2dda0 100644 --- a/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/Violation.java +++ b/kogito-springboot-examples/process-decisions-rest-springboot/src/main/java/org/kie/kogito/traffic/Violation.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.traffic; import java.math.BigDecimal; diff --git a/kogito-springboot-examples/process-decisions-rest-springboot/src/main/resources/LicenseValidationService.drl b/kogito-springboot-examples/process-decisions-rest-springboot/src/main/resources/LicenseValidationService.drl index 799c78abd4..b408466b45 100644 --- a/kogito-springboot-examples/process-decisions-rest-springboot/src/main/resources/LicenseValidationService.drl +++ b/kogito-springboot-examples/process-decisions-rest-springboot/src/main/resources/LicenseValidationService.drl @@ -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.traffic diff --git a/kogito-springboot-examples/process-decisions-rest-springboot/src/main/resources/application.properties b/kogito-springboot-examples/process-decisions-rest-springboot/src/main/resources/application.properties index ea71bdd948..bd014d347a 100644 --- a/kogito-springboot-examples/process-decisions-rest-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/process-decisions-rest-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 server.port=8080 # REST diff --git a/kogito-springboot-examples/process-decisions-rest-springboot/src/test/java/org/kie/kogito/traffic/TrafficProcessIT.java b/kogito-springboot-examples/process-decisions-rest-springboot/src/test/java/org/kie/kogito/traffic/TrafficProcessIT.java index 5eedf8de77..7671f13687 100644 --- a/kogito-springboot-examples/process-decisions-rest-springboot/src/test/java/org/kie/kogito/traffic/TrafficProcessIT.java +++ b/kogito-springboot-examples/process-decisions-rest-springboot/src/test/java/org/kie/kogito/traffic/TrafficProcessIT.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.traffic; diff --git a/kogito-springboot-examples/process-decisions-rules-springboot/README.md b/kogito-springboot-examples/process-decisions-rules-springboot/README.md index 69289d2ec6..20354bf578 100644 --- a/kogito-springboot-examples/process-decisions-rules-springboot/README.md +++ b/kogito-springboot-examples/process-decisions-rules-springboot/README.md @@ -314,8 +314,3 @@ After the Curl command, you should see a similar console log } ``` In this case the driver license is expired when the DRL is evaluated because the DriverService generated an expired date for the driver's license thus DMN is not evaluated, so the `validLicense` is `false`, `suspended` and `fine` are `null`. - - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). \ No newline at end of file diff --git a/kogito-springboot-examples/process-decisions-rules-springboot/pom.xml b/kogito-springboot-examples/process-decisions-rules-springboot/pom.xml index 72beacfa13..916d17e4df 100644 --- a/kogito-springboot-examples/process-decisions-rules-springboot/pom.xml +++ b/kogito-springboot-examples/process-decisions-rules-springboot/pom.xml @@ -1,19 +1,39 @@ + 4.0.0 org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-decisions-rules-springboot Kogito Example :: Process :: Decisions :: Rules :: Spring Boot Process with DRL, DMN and DRL integration - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -35,12 +55,12 @@ - org.kie.kogito - kogito-processes-spring-boot-starter + org.jbpm + jbpm-spring-boot-starter - org.kie.kogito - kogito-decisions-spring-boot-starter + org.drools + drools-decisions-spring-boot-starter diff --git a/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/DriverService.java b/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/DriverService.java index 9db51425a8..3518f83871 100644 --- a/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/DriverService.java +++ b/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/DriverService.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.traffic; import java.time.ZonedDateTime; diff --git a/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/Fine.java b/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/Fine.java index 4b6873829e..928562fb5f 100644 --- a/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/Fine.java +++ b/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/Fine.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.traffic; diff --git a/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/KogitoApplication.java b/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/KogitoApplication.java index 6009267b46..5e7ea292a0 100644 --- a/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/KogitoApplication.java +++ b/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/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.traffic; diff --git a/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/Violation.java b/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/Violation.java index 56446af2d2..170dd2dda0 100644 --- a/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/Violation.java +++ b/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/Violation.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.traffic; import java.math.BigDecimal; diff --git a/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/licensevalidated/LicenseValidatedService.java b/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/licensevalidated/LicenseValidatedService.java index b6a0374e9d..374e5efa23 100644 --- a/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/licensevalidated/LicenseValidatedService.java +++ b/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/licensevalidated/LicenseValidatedService.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.traffic.licensevalidated; diff --git a/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/licensevalidated/Validated.java b/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/licensevalidated/Validated.java index 90c51f09e3..a24f9189e0 100644 --- a/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/licensevalidated/Validated.java +++ b/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/licensevalidated/Validated.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.traffic.licensevalidated; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; diff --git a/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/licensevalidation/Driver.java b/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/licensevalidation/Driver.java index 6ee8bfbb04..cfe7d07937 100644 --- a/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/licensevalidation/Driver.java +++ b/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/licensevalidation/Driver.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.traffic.licensevalidation; import java.util.Date; @@ -59,6 +61,14 @@ public Driver(String id, String name, String state, String city, Integer points, this.licenseExpiration = licenseExpiration; } + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + public String getName() { return name; } diff --git a/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/licensevalidation/LicenseValidationService.java b/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/licensevalidation/LicenseValidationService.java index 2d56c89eea..278b5fb470 100644 --- a/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/licensevalidation/LicenseValidationService.java +++ b/kogito-springboot-examples/process-decisions-rules-springboot/src/main/java/org/kie/kogito/traffic/licensevalidation/LicenseValidationService.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.traffic.licensevalidation; diff --git a/kogito-springboot-examples/process-decisions-rules-springboot/src/main/resources/LicenseValidatedService.drl b/kogito-springboot-examples/process-decisions-rules-springboot/src/main/resources/LicenseValidatedService.drl index 5dd428e835..f3b50665c7 100644 --- a/kogito-springboot-examples/process-decisions-rules-springboot/src/main/resources/LicenseValidatedService.drl +++ b/kogito-springboot-examples/process-decisions-rules-springboot/src/main/resources/LicenseValidatedService.drl @@ -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.traffic.licensevalidated diff --git a/kogito-springboot-examples/process-decisions-rules-springboot/src/main/resources/LicenseValidationService.drl b/kogito-springboot-examples/process-decisions-rules-springboot/src/main/resources/LicenseValidationService.drl index 324866bfa3..da7439087d 100644 --- a/kogito-springboot-examples/process-decisions-rules-springboot/src/main/resources/LicenseValidationService.drl +++ b/kogito-springboot-examples/process-decisions-rules-springboot/src/main/resources/LicenseValidationService.drl @@ -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.traffic.licensevalidation diff --git a/kogito-springboot-examples/process-decisions-rules-springboot/src/main/resources/application.properties b/kogito-springboot-examples/process-decisions-rules-springboot/src/main/resources/application.properties index e1261b7a7e..37162bfd23 100644 --- a/kogito-springboot-examples/process-decisions-rules-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/process-decisions-rules-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 kogito.generate.rest.decisions=false kogito.generate.rest.processes=true diff --git a/kogito-springboot-examples/process-decisions-rules-springboot/src/test/java/org.kie.kogito.traffic/TrafficProcessIT.java b/kogito-springboot-examples/process-decisions-rules-springboot/src/test/java/org.kie.kogito.traffic/TrafficProcessIT.java index 35fe70cf43..abc87fb620 100644 --- a/kogito-springboot-examples/process-decisions-rules-springboot/src/test/java/org.kie.kogito.traffic/TrafficProcessIT.java +++ b/kogito-springboot-examples/process-decisions-rules-springboot/src/test/java/org.kie.kogito.traffic/TrafficProcessIT.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.traffic; @@ -22,7 +25,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import io.restassured.RestAssured; import io.restassured.http.ContentType; diff --git a/kogito-springboot-examples/process-decisions-springboot/README.md b/kogito-springboot-examples/process-decisions-springboot/README.md index e549d18fe8..340100da45 100644 --- a/kogito-springboot-examples/process-decisions-springboot/README.md +++ b/kogito-springboot-examples/process-decisions-springboot/README.md @@ -257,8 +257,3 @@ After the Curl command, you should see a similar console log } ``` In this case the driver license is expired when the DRL is evaluated because the DriverService generated an expired date for the driver's license thus DMN is not evaluated, so the `validLicense` is `false`, `suspended` and `fine` are `null`. - - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). \ No newline at end of file diff --git a/kogito-springboot-examples/process-decisions-springboot/pom.xml b/kogito-springboot-examples/process-decisions-springboot/pom.xml index 24b7e98096..cfce235bf7 100644 --- a/kogito-springboot-examples/process-decisions-springboot/pom.xml +++ b/kogito-springboot-examples/process-decisions-springboot/pom.xml @@ -1,19 +1,39 @@ + 4.0.0 org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-decisions-springboot Kogito Example :: Process :: Decisions :: Spring Boot Process with DMN and DRL integration - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -35,12 +55,12 @@ - org.kie.kogito - kogito-processes-spring-boot-starter + org.jbpm + jbpm-spring-boot-starter - org.kie.kogito - kogito-decisions-spring-boot-starter + org.drools + drools-decisions-spring-boot-starter diff --git a/kogito-springboot-examples/process-decisions-springboot/src/main/java/org/kie/kogito/traffic/Driver.java b/kogito-springboot-examples/process-decisions-springboot/src/main/java/org/kie/kogito/traffic/Driver.java index f77a47b749..32d9bb013a 100644 --- a/kogito-springboot-examples/process-decisions-springboot/src/main/java/org/kie/kogito/traffic/Driver.java +++ b/kogito-springboot-examples/process-decisions-springboot/src/main/java/org/kie/kogito/traffic/Driver.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.traffic; import java.util.Date; @@ -58,6 +60,14 @@ public Driver(String id, String name, String state, String city, Integer points, this.licenseExpiration = licenseExpiration; } + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + public String getName() { return name; } diff --git a/kogito-springboot-examples/process-decisions-springboot/src/main/java/org/kie/kogito/traffic/DriverService.java b/kogito-springboot-examples/process-decisions-springboot/src/main/java/org/kie/kogito/traffic/DriverService.java index c6e2e44bb9..e751e995ad 100644 --- a/kogito-springboot-examples/process-decisions-springboot/src/main/java/org/kie/kogito/traffic/DriverService.java +++ b/kogito-springboot-examples/process-decisions-springboot/src/main/java/org/kie/kogito/traffic/DriverService.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.traffic; import java.time.ZonedDateTime; diff --git a/kogito-springboot-examples/process-decisions-springboot/src/main/java/org/kie/kogito/traffic/Fine.java b/kogito-springboot-examples/process-decisions-springboot/src/main/java/org/kie/kogito/traffic/Fine.java index 4b6873829e..928562fb5f 100644 --- a/kogito-springboot-examples/process-decisions-springboot/src/main/java/org/kie/kogito/traffic/Fine.java +++ b/kogito-springboot-examples/process-decisions-springboot/src/main/java/org/kie/kogito/traffic/Fine.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.traffic; diff --git a/kogito-springboot-examples/process-decisions-springboot/src/main/java/org/kie/kogito/traffic/KogitoApplication.java b/kogito-springboot-examples/process-decisions-springboot/src/main/java/org/kie/kogito/traffic/KogitoApplication.java index 6009267b46..5e7ea292a0 100644 --- a/kogito-springboot-examples/process-decisions-springboot/src/main/java/org/kie/kogito/traffic/KogitoApplication.java +++ b/kogito-springboot-examples/process-decisions-springboot/src/main/java/org/kie/kogito/traffic/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.traffic; diff --git a/kogito-springboot-examples/process-decisions-springboot/src/main/java/org/kie/kogito/traffic/LicenseValidationService.java b/kogito-springboot-examples/process-decisions-springboot/src/main/java/org/kie/kogito/traffic/LicenseValidationService.java index 53fd44ed58..29f4bef1b4 100644 --- a/kogito-springboot-examples/process-decisions-springboot/src/main/java/org/kie/kogito/traffic/LicenseValidationService.java +++ b/kogito-springboot-examples/process-decisions-springboot/src/main/java/org/kie/kogito/traffic/LicenseValidationService.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.traffic; diff --git a/kogito-springboot-examples/process-decisions-springboot/src/main/java/org/kie/kogito/traffic/Violation.java b/kogito-springboot-examples/process-decisions-springboot/src/main/java/org/kie/kogito/traffic/Violation.java index 56446af2d2..170dd2dda0 100644 --- a/kogito-springboot-examples/process-decisions-springboot/src/main/java/org/kie/kogito/traffic/Violation.java +++ b/kogito-springboot-examples/process-decisions-springboot/src/main/java/org/kie/kogito/traffic/Violation.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.traffic; import java.math.BigDecimal; diff --git a/kogito-springboot-examples/process-decisions-springboot/src/main/resources/LicenseValidationService.drl b/kogito-springboot-examples/process-decisions-springboot/src/main/resources/LicenseValidationService.drl index 799c78abd4..b408466b45 100644 --- a/kogito-springboot-examples/process-decisions-springboot/src/main/resources/LicenseValidationService.drl +++ b/kogito-springboot-examples/process-decisions-springboot/src/main/resources/LicenseValidationService.drl @@ -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.traffic diff --git a/kogito-springboot-examples/process-decisions-springboot/src/main/resources/application.properties b/kogito-springboot-examples/process-decisions-springboot/src/main/resources/application.properties index e1261b7a7e..37162bfd23 100644 --- a/kogito-springboot-examples/process-decisions-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/process-decisions-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 kogito.generate.rest.decisions=false kogito.generate.rest.processes=true diff --git a/kogito-springboot-examples/process-decisions-springboot/src/test/java/org.kie.kogito.traffic/TrafficProcessIT.java b/kogito-springboot-examples/process-decisions-springboot/src/test/java/org.kie.kogito.traffic/TrafficProcessIT.java index b3e8048df7..e023a62700 100644 --- a/kogito-springboot-examples/process-decisions-springboot/src/test/java/org.kie.kogito.traffic/TrafficProcessIT.java +++ b/kogito-springboot-examples/process-decisions-springboot/src/test/java/org.kie.kogito.traffic/TrafficProcessIT.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.traffic; @@ -22,7 +25,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import io.restassured.RestAssured; import io.restassured.http.ContentType; diff --git a/kogito-springboot-examples/process-infinispan-persistence-springboot/README.md b/kogito-springboot-examples/process-infinispan-persistence-springboot/README.md index 012cff730a..2d0f0c8606 100644 --- a/kogito-springboot-examples/process-infinispan-persistence-springboot/README.md +++ b/kogito-springboot-examples/process-infinispan-persistence-springboot/README.md @@ -176,7 +176,3 @@ where uuid is the id of the deal review and tuuid is the id of the user task you ``` Review of the deal very good work for traveller Doe ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-springboot-examples/process-infinispan-persistence-springboot/operator/process-infinispan-persistence-springboot.yaml b/kogito-springboot-examples/process-infinispan-persistence-springboot/operator/process-infinispan-persistence-springboot.yaml deleted file mode 100644 index 7f9abd7ecb..0000000000 --- a/kogito-springboot-examples/process-infinispan-persistence-springboot/operator/process-infinispan-persistence-springboot.yaml +++ /dev/null @@ -1,35 +0,0 @@ -#Infinispan operator should be pre-installed in namespace -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoInfra -metadata: - name: kogito-infinispan-infra -spec: - resource: - apiVersion: infinispan.org/v1 - kind: Infinispan ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-infinispan-persistence-springboot -spec: - type: RemoteSource - runtime: springboot - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/process-infinispan-persistence-springboot - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-infinispan-persistence-springboot -spec: - runtime: springboot - infra: - - kogito-infinispan-infra \ No newline at end of file diff --git a/kogito-springboot-examples/process-infinispan-persistence-springboot/pom.xml b/kogito-springboot-examples/process-infinispan-persistence-springboot/pom.xml index fa6e8e5f3b..8bdb6faa44 100644 --- a/kogito-springboot-examples/process-infinispan-persistence-springboot/pom.xml +++ b/kogito-springboot-examples/process-infinispan-persistence-springboot/pom.xml @@ -1,4 +1,24 @@ + @@ -6,7 +26,7 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-infinispan-persistence-springboot @@ -14,8 +34,8 @@ Kogito with Infinispan persistence - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -40,8 +60,8 @@ - org.kie.kogito - kogito-processes-spring-boot-starter + org.jbpm + jbpm-spring-boot-starter org.springframework.boot @@ -49,7 +69,7 @@ org.infinispan - infinispan-spring-boot-starter-remote + infinispan-spring-boot3-starter-remote @@ -58,8 +78,8 @@ kogito-api - org.kie.kogito - kogito-addons-springboot-persistence-infinispan + org.kie + kie-addons-springboot-persistence-infinispan diff --git a/kogito-springboot-examples/process-infinispan-persistence-springboot/src/main/java/org/acme/deals/Address.java b/kogito-springboot-examples/process-infinispan-persistence-springboot/src/main/java/org/acme/deals/Address.java index 0322a9086f..0d8d3c41fa 100644 --- a/kogito-springboot-examples/process-infinispan-persistence-springboot/src/main/java/org/acme/deals/Address.java +++ b/kogito-springboot-examples/process-infinispan-persistence-springboot/src/main/java/org/acme/deals/Address.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.acme.deals; diff --git a/kogito-springboot-examples/process-infinispan-persistence-springboot/src/main/java/org/acme/deals/KogitoApplication.java b/kogito-springboot-examples/process-infinispan-persistence-springboot/src/main/java/org/acme/deals/KogitoApplication.java index ecc589a487..f4c7598b4d 100644 --- a/kogito-springboot-examples/process-infinispan-persistence-springboot/src/main/java/org/acme/deals/KogitoApplication.java +++ b/kogito-springboot-examples/process-infinispan-persistence-springboot/src/main/java/org/acme/deals/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.acme.deals; diff --git a/kogito-springboot-examples/process-infinispan-persistence-springboot/src/main/java/org/acme/deals/Traveller.java b/kogito-springboot-examples/process-infinispan-persistence-springboot/src/main/java/org/acme/deals/Traveller.java index 86c281ad50..68accdafa5 100644 --- a/kogito-springboot-examples/process-infinispan-persistence-springboot/src/main/java/org/acme/deals/Traveller.java +++ b/kogito-springboot-examples/process-infinispan-persistence-springboot/src/main/java/org/acme/deals/Traveller.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.acme.deals; diff --git a/kogito-springboot-examples/process-infinispan-persistence-springboot/src/main/resources/application.properties b/kogito-springboot-examples/process-infinispan-persistence-springboot/src/main/resources/application.properties index 954bf6700b..0e6d6b70aa 100644 --- a/kogito-springboot-examples/process-infinispan-persistence-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/process-infinispan-persistence-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 infinispan.remote.server-list=127.0.0.1:11222 \ No newline at end of file diff --git a/kogito-springboot-examples/process-infinispan-persistence-springboot/src/test/java/org/acme/deals/DealsRestIT.java b/kogito-springboot-examples/process-infinispan-persistence-springboot/src/test/java/org/acme/deals/DealsRestIT.java index 6495d06f88..d6e146ea01 100644 --- a/kogito-springboot-examples/process-infinispan-persistence-springboot/src/test/java/org/acme/deals/DealsRestIT.java +++ b/kogito-springboot-examples/process-infinispan-persistence-springboot/src/test/java/org/acme/deals/DealsRestIT.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.acme.deals; @@ -21,7 +24,7 @@ import org.junit.jupiter.api.Test; import org.kie.kogito.testcontainers.springboot.InfinispanSpringBootTestResource; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.context.ContextConfiguration; import io.restassured.RestAssured; @@ -62,7 +65,7 @@ public void testDealsRest() { given().accept(ContentType.JSON) .when().get("/deals") .then().statusCode(200) - .body("$.size()", is(1)) + .body("size()", is(1)) .body("[0].id", is(dealId)) .body("[0].name", is(deal)); @@ -75,7 +78,7 @@ public void testDealsRest() { String dealReviewId = given().accept(ContentType.JSON) .when().get("/dealreviews") .then().statusCode(200) - .body("$.size()", is(1)) + .body("size()", is(1)) .body("[0].id", notNullValue()) .body("[0].deal", is(deal)) .extract().path("[0].id"); @@ -84,7 +87,7 @@ public void testDealsRest() { String taskId = given().accept(ContentType.JSON) .when().get("/dealreviews/{uuid}/tasks?user=john", dealReviewId) .then().statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("review")) .body("[0].parameters.deal", is(deal)) .extract().path("[0].id"); @@ -100,12 +103,12 @@ public void testDealsRest() { //verify no deals to review given().accept(ContentType.JSON) .when().get("/dealreviews") - .then().statusCode(200).body("$.size()", is(0)); + .then().statusCode(200).body("size()", is(0)); //verify no deals given().accept(ContentType.JSON) .when().get("/deals") - .then().statusCode(200).body("$.size()", is(0)); + .then().statusCode(200).body("size()", is(0)); } @Test diff --git a/kogito-springboot-examples/process-infinispan-persistence-springboot/src/test/resources/application.properties b/kogito-springboot-examples/process-infinispan-persistence-springboot/src/test/resources/application.properties index 5f4fb60b55..4e8da841ca 100644 --- a/kogito-springboot-examples/process-infinispan-persistence-springboot/src/test/resources/application.properties +++ b/kogito-springboot-examples/process-infinispan-persistence-springboot/src/test/resources/application.properties @@ -1 +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. +# + server.address=0.0.0.0 \ No newline at end of file diff --git a/kogito-springboot-examples/process-kafka-multi-springboot/README.md b/kogito-springboot-examples/process-kafka-multi-springboot/README.md index a16c6273f8..a9272de1a7 100644 --- a/kogito-springboot-examples/process-kafka-multi-springboot/README.md +++ b/kogito-springboot-examples/process-kafka-multi-springboot/README.md @@ -137,11 +137,11 @@ Content (cloud event format) ```json { - "specversion": "0.3", + "specversion": "1.0", "id": "21627e26-31eb-43e7-8343-92a696fd96b1", "source": "", - "type": "travellers", - "time": "2022-02-24T13:25:16+0000", + "type": "travellers", + "time": "2022-02-24T13:25:16Z", "data": { "firstName" : "Jan", "lastName" : "Kowalski", @@ -153,7 +153,7 @@ Content (cloud event format) One liner ```json -{"specversion": "0.3","id": "21627e26-31eb-43e7-8343-92a696fd96b1","source": "","type": "travellers", "time": "2022-02-24T13:25:16+0000","data": { "firstName" : "Jan", "lastName" : "Kowalski", "email" : "jan.kowalski@example.com", "nationality" : "Polish"}} +{"specversion": "1.0","id": "21627e26-31eb-43e7-8343-92a696fd96b1","source": "","type": "travellers", "time": "2022-02-24T13:25:16Z","data": { "firstName" : "Jan", "lastName" : "Kowalski", "email" : "jan.kowalski@example.com", "nationality" : "Polish"}} ``` this will then trigger the successful processing of the traveller and put another message on `processedtravellers` topic. @@ -169,11 +169,11 @@ With the following content (Cloud Event Format) ```json { - "specversion": "0.3", + "specversion": "1.0", "id": "31627e26-31eb-43e7-8343-92a696fd96b1", "source": "", "type": "travellers", - "time": "2022-02-24T13:25:16+0000", + "time": "2022-02-24T13:25:16Z", "data": { "firstName" : "John", "lastName" : "Doe", @@ -186,11 +186,7 @@ With the following content (Cloud Event Format) One Liner ```json -{"specversion": "0.3","id": "31627e26-31eb-43e7-8343-92a696fd96b1","source": "","type": "travellers", "time": "2022-02-24T13:25:16+0000","data": { "firstName" : "John", "lastName" : "Doe", "email" : "john.doe@example.com", "nationality" : "American"}} +{"specversion": "1.0","id": "31627e26-31eb-43e7-8343-92a696fd96b1","source": "","type": "travellers", "time": "2022-02-24T13:25:16Z","data": { "firstName" : "John", "lastName" : "Doe", "email" : "john.doe@example.com", "nationality" : "American"}} ``` this will result in message being send to `cancelledtravelers` topic. - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-springboot-examples/process-kafka-multi-springboot/operator/process-kafka-multi-springboot.yaml b/kogito-springboot-examples/process-kafka-multi-springboot/operator/process-kafka-multi-springboot.yaml deleted file mode 100644 index d41f4b987c..0000000000 --- a/kogito-springboot-examples/process-kafka-multi-springboot/operator/process-kafka-multi-springboot.yaml +++ /dev/null @@ -1,35 +0,0 @@ -#Strimzi operator should be pre-installed in namespace -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoInfra -metadata: - name: kogito-kafka-infra -spec: - resource: - apiVersion: kafka.strimzi.io/v1beta2 - kind: Kafka ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-kafka-quickstart-springboot -spec: - type: RemoteSource - runtime: springboot - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/process-kafka-multi-springboot - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-kafka-multi-springboot -spec: - runtime: springboot - infra: - - kogito-kafka-infra diff --git a/kogito-springboot-examples/process-kafka-multi-springboot/pom.xml b/kogito-springboot-examples/process-kafka-multi-springboot/pom.xml index a0ac301010..b19e6f4227 100644 --- a/kogito-springboot-examples/process-kafka-multi-springboot/pom.xml +++ b/kogito-springboot-examples/process-kafka-multi-springboot/pom.xml @@ -1,4 +1,24 @@ + @@ -6,7 +26,7 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-kafka-multi-springboot @@ -14,8 +34,8 @@ Kogito with Kafka - Spring Boot, using multiple channels - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -40,18 +60,18 @@ spring-kafka - org.kie.kogito - kogito-addons-springboot-messaging + org.kie + kie-addons-springboot-messaging com.fasterxml.jackson.core jackson-databind - + - org.kie.kogito - kogito-processes-spring-boot-starter + org.jbpm + jbpm-spring-boot-starter diff --git a/kogito-springboot-examples/process-kafka-multi-springboot/src/main/java/org/acme/travel/Traveller.java b/kogito-springboot-examples/process-kafka-multi-springboot/src/main/java/org/acme/travel/Traveller.java index 75e93ab4ba..d3b7ca64bd 100644 --- a/kogito-springboot-examples/process-kafka-multi-springboot/src/main/java/org/acme/travel/Traveller.java +++ b/kogito-springboot-examples/process-kafka-multi-springboot/src/main/java/org/acme/travel/Traveller.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.acme.travel; diff --git a/kogito-springboot-examples/process-kafka-multi-springboot/src/main/java/org/kie/kogito/tests/KogitoKafkaMultiSpringbootApplication.java b/kogito-springboot-examples/process-kafka-multi-springboot/src/main/java/org/kie/kogito/tests/KogitoKafkaMultiSpringbootApplication.java index a612a99eaa..47257edab8 100644 --- a/kogito-springboot-examples/process-kafka-multi-springboot/src/main/java/org/kie/kogito/tests/KogitoKafkaMultiSpringbootApplication.java +++ b/kogito-springboot-examples/process-kafka-multi-springboot/src/main/java/org/kie/kogito/tests/KogitoKafkaMultiSpringbootApplication.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.tests; diff --git a/kogito-springboot-examples/process-kafka-multi-springboot/src/main/resources/META-INF/kmodule.xml b/kogito-springboot-examples/process-kafka-multi-springboot/src/main/resources/META-INF/kmodule.xml index 2ba4076c16..41665a75bb 100644 --- a/kogito-springboot-examples/process-kafka-multi-springboot/src/main/resources/META-INF/kmodule.xml +++ b/kogito-springboot-examples/process-kafka-multi-springboot/src/main/resources/META-INF/kmodule.xml @@ -1 +1,21 @@ + \ No newline at end of file diff --git a/kogito-springboot-examples/process-kafka-multi-springboot/src/main/resources/application.properties b/kogito-springboot-examples/process-kafka-multi-springboot/src/main/resources/application.properties index ec4abe15f1..4f1a6cdf99 100644 --- a/kogito-springboot-examples/process-kafka-multi-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/process-kafka-multi-springboot/src/main/resources/application.properties @@ -1,6 +1,25 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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. +# + spring.kafka.bootstrap-servers=localhost:9092 spring.kafka.consumer.group-id=travellers-group spring.kafka.consumer.auto-offset-reset=earliest -kogito.addon.cloudevents.kafka.kogito_incoming_stream=travellers +kogito.addon.cloudevents.kafka.kogito_incoming_stream.travellers=travellers kogito.addon.cloudevents.kafka.kogito_outgoing_stream=processedtravellers kogito.addon.cloudevents.kafka.kogito_outgoing_stream.no\u0020travel=cancelledtravellers \ No newline at end of file diff --git a/kogito-springboot-examples/process-kafka-multi-springboot/src/main/resources/travellers.drl b/kogito-springboot-examples/process-kafka-multi-springboot/src/main/resources/travellers.drl index 7bee0205bc..36696d32f7 100644 --- a/kogito-springboot-examples/process-kafka-multi-springboot/src/main/resources/travellers.drl +++ b/kogito-springboot-examples/process-kafka-multi-springboot/src/main/resources/travellers.drl @@ -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 defaultPackage diff --git a/kogito-springboot-examples/process-kafka-multi-springboot/src/test/java/org/acme/travel/tests/multimessaging/springboot/MultiMessagingIT.java b/kogito-springboot-examples/process-kafka-multi-springboot/src/test/java/org/acme/travel/tests/multimessaging/springboot/MultiMessagingIT.java index eeb7a740ab..d06810462f 100644 --- a/kogito-springboot-examples/process-kafka-multi-springboot/src/test/java/org/acme/travel/tests/multimessaging/springboot/MultiMessagingIT.java +++ b/kogito-springboot-examples/process-kafka-multi-springboot/src/test/java/org/acme/travel/tests/multimessaging/springboot/MultiMessagingIT.java @@ -1,20 +1,24 @@ /* - * 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.acme.travel.tests.multimessaging.springboot; +import java.io.UncheckedIOException; import java.net.URI; import java.time.OffsetDateTime; import java.util.Arrays; @@ -111,8 +115,8 @@ private String generateCloudEvent(Traveller traveller) { .withTime(OffsetDateTime.now()) .withData(objectMapper.writeValueAsString(traveller).getBytes()) .build()); - } catch (Exception e) { - throw new RuntimeException(e); + } catch (JsonProcessingException e) { + throw new UncheckedIOException(e); } } diff --git a/kogito-springboot-examples/process-kafka-quickstart-springboot/README.md b/kogito-springboot-examples/process-kafka-quickstart-springboot/README.md index 22e6164fe3..894885e0f4 100644 --- a/kogito-springboot-examples/process-kafka-quickstart-springboot/README.md +++ b/kogito-springboot-examples/process-kafka-quickstart-springboot/README.md @@ -130,11 +130,11 @@ Content (cloud event format) ```json { - "specversion": "0.3", + "specversion": "1.0", "id": "21627e26-31eb-43e7-8343-92a696fd96b1", "source": "", "type": "travellers", - "time": "2022-02-24T13:25:16+0000", + "time": "2022-02-24T13:25:16Z", "data": { "firstName" : "Jan", "lastName" : "Kowalski", @@ -146,7 +146,7 @@ Content (cloud event format) One liner ```json -{"specversion": "0.3","id": "21627e26-31eb-43e7-8343-92a696fd96b1","source": "","type": "travellers", "time": "2022-02-24T13:25:16+0000","data": { "firstName" : "Jan", "lastName" : "Kowalski", "email" : "jan.kowalski@example.com", "nationality" : "Polish"}} +{"specversion": "1.0","id": "21627e26-31eb-43e7-8343-92a696fd96b1","source": "","type": "travellers", "time": "2022-02-24T13:25:16Z","data": { "firstName" : "Jan", "lastName" : "Kowalski", "email" : "jan.kowalski@example.com", "nationality" : "Polish"}} ``` this will then trigger the successful processing of the traveller and put another message on `processedtravellers` topic. @@ -162,11 +162,11 @@ With the following content (Cloud Event Format) ```json { - "specversion": "0.3", + "specversion": "1.0", "id": "31627e26-31eb-43e7-8343-92a696fd96b1", "source": "", "type": "travellers", - "time": "2022-02-24T13:25:16+0000", + "time": "2022-02-24T13:25:16Z", "data": { "firstName" : "John", "lastName" : "Doe", @@ -179,11 +179,7 @@ With the following content (Cloud Event Format) One Liner ```json -{"specversion": "0.3","id": "31627e26-31eb-43e7-8343-92a696fd96b1","source": "","type": "travellers", "time": "2022-02-24T13:25:16+0000","data": { "firstName" : "John", "lastName" : "Doe", "email" : "john.doe@example.com", "nationality" : "American"}} +{"specversion": "1.0","id": "31627e26-31eb-43e7-8343-92a696fd96b1","source": "","type": "travellers", "time": "2022-02-24T13:25:16Z","data": { "firstName" : "John", "lastName" : "Doe", "email" : "john.doe@example.com", "nationality" : "American"}} ``` this will not result in message being send to `processedtravelers` topic. - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-springboot-examples/process-kafka-quickstart-springboot/operator/process-kafka-quickstart-springboot.yaml b/kogito-springboot-examples/process-kafka-quickstart-springboot/operator/process-kafka-quickstart-springboot.yaml deleted file mode 100644 index 6fb8ee1cdc..0000000000 --- a/kogito-springboot-examples/process-kafka-quickstart-springboot/operator/process-kafka-quickstart-springboot.yaml +++ /dev/null @@ -1,35 +0,0 @@ -#Strimzi operator should be pre-installed in namespace -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoInfra -metadata: - name: kogito-kafka-infra -spec: - resource: - apiVersion: kafka.strimzi.io/v1beta2 - kind: Kafka ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-kafka-quickstart-springboot -spec: - type: RemoteSource - runtime: springboot - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/process-kafka-quickstart-springboot - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-kafka-quickstart-springboot -spec: - runtime: springboot - infra: - - kogito-kafka-infra \ No newline at end of file diff --git a/kogito-springboot-examples/process-kafka-quickstart-springboot/pom.xml b/kogito-springboot-examples/process-kafka-quickstart-springboot/pom.xml index aee4a36fde..96b266c079 100644 --- a/kogito-springboot-examples/process-kafka-quickstart-springboot/pom.xml +++ b/kogito-springboot-examples/process-kafka-quickstart-springboot/pom.xml @@ -1,4 +1,24 @@ + @@ -6,7 +26,7 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-kafka-quickstart-springboot @@ -14,8 +34,8 @@ Kogito with Kafka - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -40,18 +60,18 @@ spring-kafka - org.kie.kogito - kogito-addons-springboot-messaging + org.kie + kie-addons-springboot-messaging com.fasterxml.jackson.core jackson-databind - + - org.kie.kogito - kogito-processes-spring-boot-starter + org.jbpm + jbpm-spring-boot-starter diff --git a/kogito-springboot-examples/process-kafka-quickstart-springboot/src/main/java/org/acme/travel/Traveller.java b/kogito-springboot-examples/process-kafka-quickstart-springboot/src/main/java/org/acme/travel/Traveller.java index 75e93ab4ba..d3b7ca64bd 100644 --- a/kogito-springboot-examples/process-kafka-quickstart-springboot/src/main/java/org/acme/travel/Traveller.java +++ b/kogito-springboot-examples/process-kafka-quickstart-springboot/src/main/java/org/acme/travel/Traveller.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.acme.travel; diff --git a/kogito-springboot-examples/process-kafka-quickstart-springboot/src/main/java/org/kie/kogito/tests/KogitoKafkaQuickstartSpringbootApplication.java b/kogito-springboot-examples/process-kafka-quickstart-springboot/src/main/java/org/kie/kogito/tests/KogitoKafkaQuickstartSpringbootApplication.java index 1f5f5d89ec..aaa691d719 100644 --- a/kogito-springboot-examples/process-kafka-quickstart-springboot/src/main/java/org/kie/kogito/tests/KogitoKafkaQuickstartSpringbootApplication.java +++ b/kogito-springboot-examples/process-kafka-quickstart-springboot/src/main/java/org/kie/kogito/tests/KogitoKafkaQuickstartSpringbootApplication.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.tests; diff --git a/kogito-springboot-examples/process-kafka-quickstart-springboot/src/main/resources/META-INF/kmodule.xml b/kogito-springboot-examples/process-kafka-quickstart-springboot/src/main/resources/META-INF/kmodule.xml index 2ba4076c16..41665a75bb 100644 --- a/kogito-springboot-examples/process-kafka-quickstart-springboot/src/main/resources/META-INF/kmodule.xml +++ b/kogito-springboot-examples/process-kafka-quickstart-springboot/src/main/resources/META-INF/kmodule.xml @@ -1 +1,21 @@ + \ No newline at end of file diff --git a/kogito-springboot-examples/process-kafka-quickstart-springboot/src/main/resources/application.properties b/kogito-springboot-examples/process-kafka-quickstart-springboot/src/main/resources/application.properties index 6b66b5d5d4..830c94e828 100644 --- a/kogito-springboot-examples/process-kafka-quickstart-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/process-kafka-quickstart-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. +# + spring.kafka.bootstrap-servers=localhost:9092 spring.kafka.consumer.group-id=travellers-group spring.kafka.consumer.auto-offset-reset=earliest diff --git a/kogito-springboot-examples/process-kafka-quickstart-springboot/src/main/resources/travellers.drl b/kogito-springboot-examples/process-kafka-quickstart-springboot/src/main/resources/travellers.drl index 7bee0205bc..36696d32f7 100644 --- a/kogito-springboot-examples/process-kafka-quickstart-springboot/src/main/resources/travellers.drl +++ b/kogito-springboot-examples/process-kafka-quickstart-springboot/src/main/resources/travellers.drl @@ -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 defaultPackage diff --git a/kogito-springboot-examples/process-kafka-quickstart-springboot/src/test/java/org/acme/travel/tests/messaging/springboot/MessagingIT.java b/kogito-springboot-examples/process-kafka-quickstart-springboot/src/test/java/org/acme/travel/tests/messaging/springboot/MessagingIT.java index ac65f63520..a2d912c580 100644 --- a/kogito-springboot-examples/process-kafka-quickstart-springboot/src/test/java/org/acme/travel/tests/messaging/springboot/MessagingIT.java +++ b/kogito-springboot-examples/process-kafka-quickstart-springboot/src/test/java/org/acme/travel/tests/messaging/springboot/MessagingIT.java @@ -1,20 +1,25 @@ /* - * 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.acme.travel.tests.messaging.springboot; +import java.io.IOException; +import java.io.UncheckedIOException; import java.net.URI; import java.time.OffsetDateTime; import java.util.Optional; @@ -105,8 +110,8 @@ private String generateCloudEvent(Traveller traveller) { .withTime(OffsetDateTime.now()) .withData(objectMapper.writeValueAsString(traveller).getBytes()) .build()); - } catch (Exception e) { - throw new RuntimeException(e); + } catch (IOException e) { + throw new UncheckedIOException(e); } } diff --git a/kogito-springboot-examples/process-mongodb-persistence-springboot/operator/process-mongodb-persistence-springboot.yaml b/kogito-springboot-examples/process-mongodb-persistence-springboot/operator/process-mongodb-persistence-springboot.yaml deleted file mode 100644 index 2ccb23b2fa..0000000000 --- a/kogito-springboot-examples/process-mongodb-persistence-springboot/operator/process-mongodb-persistence-springboot.yaml +++ /dev/null @@ -1,29 +0,0 @@ -## MongoDB operator should be pre-installed in namespace -apiVersion: app.kiegroup.org/v1alpha1 -kind: KogitoInfra -metadata: - name: kogito-mongodb -spec: - resource: - apiVersion: mongodb.com/v1 - kind: MongoDB ---- -apiVersion: app.kiegroup.org/v1alpha1 -kind: KogitoBuild -metadata: - name: process-mongodb -spec: - type: RemoteSource - gitSource: - contextDir: kogito-quarkus-examples/process-mongodb-persistence-springboot - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1alpha1 -kind: KogitoRuntime -metadata: - name: process-mongodb -spec: - infra: - - kogito-mongodb \ No newline at end of file diff --git a/kogito-springboot-examples/process-mongodb-persistence-springboot/pom.xml b/kogito-springboot-examples/process-mongodb-persistence-springboot/pom.xml index 252f7d39e0..7254b0f4fd 100644 --- a/kogito-springboot-examples/process-mongodb-persistence-springboot/pom.xml +++ b/kogito-springboot-examples/process-mongodb-persistence-springboot/pom.xml @@ -1,4 +1,24 @@ + @@ -6,7 +26,7 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-mongodb-persistence-springboot @@ -15,8 +35,8 @@ true - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -41,10 +61,10 @@ spring-boot-starter-data-mongodb - + - org.kie.kogito - kogito-processes-spring-boot-starter + org.jbpm + jbpm-spring-boot-starter org.kie.kogito @@ -52,8 +72,8 @@ - org.kie.kogito - kogito-addons-springboot-persistence-mongodb + org.kie + kie-addons-springboot-persistence-mongodb @@ -112,8 +132,8 @@ - org.kie.kogito - kogito-addons-springboot-events-process-kafka + org.kie + kie-addons-springboot-events-process-kafka diff --git a/kogito-springboot-examples/process-mongodb-persistence-springboot/src/main/java/org/acme/travels/Address.java b/kogito-springboot-examples/process-mongodb-persistence-springboot/src/main/java/org/acme/travels/Address.java index ff19d83056..cad01a7f09 100644 --- a/kogito-springboot-examples/process-mongodb-persistence-springboot/src/main/java/org/acme/travels/Address.java +++ b/kogito-springboot-examples/process-mongodb-persistence-springboot/src/main/java/org/acme/travels/Address.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.acme.travels; diff --git a/kogito-springboot-examples/process-mongodb-persistence-springboot/src/main/java/org/acme/travels/KogitoApplication.java b/kogito-springboot-examples/process-mongodb-persistence-springboot/src/main/java/org/acme/travels/KogitoApplication.java index 6450a769a9..210f11ef5e 100644 --- a/kogito-springboot-examples/process-mongodb-persistence-springboot/src/main/java/org/acme/travels/KogitoApplication.java +++ b/kogito-springboot-examples/process-mongodb-persistence-springboot/src/main/java/org/acme/travels/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.acme.travels; diff --git a/kogito-springboot-examples/process-mongodb-persistence-springboot/src/main/java/org/acme/travels/Traveller.java b/kogito-springboot-examples/process-mongodb-persistence-springboot/src/main/java/org/acme/travels/Traveller.java index 274a7b15c7..6cacf7f882 100644 --- a/kogito-springboot-examples/process-mongodb-persistence-springboot/src/main/java/org/acme/travels/Traveller.java +++ b/kogito-springboot-examples/process-mongodb-persistence-springboot/src/main/java/org/acme/travels/Traveller.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.acme.travels; diff --git a/kogito-springboot-examples/process-mongodb-persistence-springboot/src/main/resources/application.properties b/kogito-springboot-examples/process-mongodb-persistence-springboot/src/main/resources/application.properties index 5489ee9de9..b9ffa0c39c 100644 --- a/kogito-springboot-examples/process-mongodb-persistence-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/process-mongodb-persistence-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 kogito.persistence.type=mongodb diff --git a/kogito-springboot-examples/process-mongodb-persistence-springboot/src/test/java/org/acme/deals/DealsRestIT.java b/kogito-springboot-examples/process-mongodb-persistence-springboot/src/test/java/org/acme/deals/DealsRestIT.java index 66682d68d6..d5d3ab15f2 100644 --- a/kogito-springboot-examples/process-mongodb-persistence-springboot/src/test/java/org/acme/deals/DealsRestIT.java +++ b/kogito-springboot-examples/process-mongodb-persistence-springboot/src/test/java/org/acme/deals/DealsRestIT.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.acme.deals; @@ -20,7 +23,7 @@ import org.junit.jupiter.api.Test; import org.kie.kogito.testcontainers.springboot.MongoDBSpringBootTestResource; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.context.ContextConfiguration; import io.restassured.RestAssured; @@ -55,7 +58,7 @@ public void testDealsRest() { // test getting the created deal given().accept(ContentType.JSON) .when().get("/deals") - .then().log().ifValidationFails().statusCode(200).body("$.size()", is(1), "[0].id", is(dealId)); + .then().log().ifValidationFails().statusCode(200).body("size()", is(1), "[0].id", is(dealId)); // test getting order by id given().accept(ContentType.JSON) @@ -65,12 +68,12 @@ public void testDealsRest() { // get deals for review String dealReviewId = given().accept(ContentType.JSON) .when().get("/dealreviews") - .then().log().ifValidationFails().statusCode(200).body("$.size()", is(1)).body("[0].id", notNullValue()).extract().path("[0].id"); + .then().log().ifValidationFails().statusCode(200).body("size()", is(1)).body("[0].id", notNullValue()).extract().path("[0].id"); // get task for john String taskId = given().accept(ContentType.JSON) .when().get("/dealreviews/{uuid}/tasks?user=john", dealReviewId) - .then().log().ifValidationFails().statusCode(200).body("$.size", is(1)).extract().path("[0].id"); + .then().log().ifValidationFails().statusCode(200).body("size()", is(1)).extract().path("[0].id"); // complete review task given().contentType(ContentType.JSON).accept(ContentType.JSON).body("{\"review\" : \"very good work\"}") @@ -80,11 +83,11 @@ public void testDealsRest() { //verify no deals to review given().accept(ContentType.JSON) .when().get("/dealreviews") - .then().log().ifValidationFails().statusCode(200).body("$.size()", is(0)); + .then().log().ifValidationFails().statusCode(200).body("size()", is(0)); //verify no deals given().accept(ContentType.JSON) .when().get("/deals") - .then().log().ifValidationFails().statusCode(200).body("$.size()", is(0)); + .then().log().ifValidationFails().statusCode(200).body("size()", is(0)); } } diff --git a/kogito-springboot-examples/process-monitoring-springboot/Dockerfile b/kogito-springboot-examples/process-monitoring-springboot/Dockerfile index 5fdfd45843..423ef68398 100644 --- a/kogito-springboot-examples/process-monitoring-springboot/Dockerfile +++ b/kogito-springboot-examples/process-monitoring-springboot/Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/kiegroup/kogito-runtime-jvm:latest +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.20 ENV RUNTIME_TYPE springboot diff --git a/kogito-springboot-examples/process-monitoring-springboot/README.md b/kogito-springboot-examples/process-monitoring-springboot/README.md index c6829345bc..4ec50b0d17 100644 --- a/kogito-springboot-examples/process-monitoring-springboot/README.md +++ b/kogito-springboot-examples/process-monitoring-springboot/README.md @@ -20,8 +20,8 @@ Import the following dependency in your `pom.xml`: ```XML - org.kie.kogito - kogito-addons-springboot-monitoring-prometheus + org.kie + kie-addons-springboot-monitoring-prometheus ``` diff --git a/kogito-springboot-examples/process-monitoring-springboot/docker-compose.yml b/kogito-springboot-examples/process-monitoring-springboot/docker-compose.yml index fedca2a135..fe2cf90c14 100644 --- a/kogito-springboot-examples/process-monitoring-springboot/docker-compose.yml +++ b/kogito-springboot-examples/process-monitoring-springboot/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' services: diff --git a/kogito-springboot-examples/process-monitoring-springboot/docker-compose/grafana/provisioning/dashboards/dashboard.yml b/kogito-springboot-examples/process-monitoring-springboot/docker-compose/grafana/provisioning/dashboards/dashboard.yml index 437d59118f..1c31f32b3b 100644 --- a/kogito-springboot-examples/process-monitoring-springboot/docker-compose/grafana/provisioning/dashboards/dashboard.yml +++ b/kogito-springboot-examples/process-monitoring-springboot/docker-compose/grafana/provisioning/dashboards/dashboard.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. +# + apiVersion: 1 providers: diff --git a/kogito-springboot-examples/process-monitoring-springboot/docker-compose/grafana/provisioning/datasources/datasource.yml b/kogito-springboot-examples/process-monitoring-springboot/docker-compose/grafana/provisioning/datasources/datasource.yml index 4e58703f23..14e5b05c55 100644 --- a/kogito-springboot-examples/process-monitoring-springboot/docker-compose/grafana/provisioning/datasources/datasource.yml +++ b/kogito-springboot-examples/process-monitoring-springboot/docker-compose/grafana/provisioning/datasources/datasource.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. +# + # config file version apiVersion: 1 diff --git a/kogito-springboot-examples/process-monitoring-springboot/docker-compose/prometheus/prometheus.yml b/kogito-springboot-examples/process-monitoring-springboot/docker-compose/prometheus/prometheus.yml index fb725455ae..7792b98923 100644 --- a/kogito-springboot-examples/process-monitoring-springboot/docker-compose/prometheus/prometheus.yml +++ b/kogito-springboot-examples/process-monitoring-springboot/docker-compose/prometheus/prometheus.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. +# + # A scrape configuration containing exactly one endpoint to scrape: scrape_configs: # The job name is added as a label `job=` to any timeseries scraped from this config. diff --git a/kogito-springboot-examples/process-monitoring-springboot/pom.xml b/kogito-springboot-examples/process-monitoring-springboot/pom.xml index 06d75a9cfd..9c811e618b 100644 --- a/kogito-springboot-examples/process-monitoring-springboot/pom.xml +++ b/kogito-springboot-examples/process-monitoring-springboot/pom.xml @@ -1,4 +1,24 @@ + @@ -6,15 +26,15 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-monitoring-springboot Kogito Example :: Process Monitoring :: Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -31,12 +51,12 @@ - org.kie.kogito - kogito-processes-spring-boot-starter + org.jbpm + jbpm-spring-boot-starter - org.kie.kogito - kogito-addons-springboot-monitoring-prometheus + org.kie + kie-addons-springboot-monitoring-prometheus diff --git a/kogito-springboot-examples/process-monitoring-springboot/src/main/java/org/kie/kogito/examples/springboot/CalculationService.java b/kogito-springboot-examples/process-monitoring-springboot/src/main/java/org/kie/kogito/examples/springboot/CalculationService.java index 6538ad0d69..ea85410576 100644 --- a/kogito-springboot-examples/process-monitoring-springboot/src/main/java/org/kie/kogito/examples/springboot/CalculationService.java +++ b/kogito-springboot-examples/process-monitoring-springboot/src/main/java/org/kie/kogito/examples/springboot/CalculationService.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.examples.springboot; diff --git a/kogito-springboot-examples/process-monitoring-springboot/src/main/java/org/kie/kogito/examples/springboot/DemoApplication.java b/kogito-springboot-examples/process-monitoring-springboot/src/main/java/org/kie/kogito/examples/springboot/DemoApplication.java index 977c3f2bb0..7ccd4f7953 100644 --- a/kogito-springboot-examples/process-monitoring-springboot/src/main/java/org/kie/kogito/examples/springboot/DemoApplication.java +++ b/kogito-springboot-examples/process-monitoring-springboot/src/main/java/org/kie/kogito/examples/springboot/DemoApplication.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.examples.springboot; diff --git a/kogito-springboot-examples/process-monitoring-springboot/src/main/java/org/kie/kogito/examples/springboot/demo/Order.java b/kogito-springboot-examples/process-monitoring-springboot/src/main/java/org/kie/kogito/examples/springboot/demo/Order.java index 1a207d4f1f..937f24c14e 100755 --- a/kogito-springboot-examples/process-monitoring-springboot/src/main/java/org/kie/kogito/examples/springboot/demo/Order.java +++ b/kogito-springboot-examples/process-monitoring-springboot/src/main/java/org/kie/kogito/examples/springboot/demo/Order.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.examples.springboot.demo; diff --git a/kogito-springboot-examples/process-monitoring-springboot/src/main/resources/application.properties b/kogito-springboot-examples/process-monitoring-springboot/src/main/resources/application.properties index 5a5ed70ee8..07510c65a9 100644 --- a/kogito-springboot-examples/process-monitoring-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/process-monitoring-springboot/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. +# + management.security.enabled=false management.endpoints.web.exposure.include=metrics,prometheus \ No newline at end of file diff --git a/kogito-springboot-examples/process-monitoring-springboot/src/test/filtered-resources/project.properties b/kogito-springboot-examples/process-monitoring-springboot/src/test/filtered-resources/project.properties index 301ad794d3..5771872775 100644 --- a/kogito-springboot-examples/process-monitoring-springboot/src/test/filtered-resources/project.properties +++ b/kogito-springboot-examples/process-monitoring-springboot/src/test/filtered-resources/project.properties @@ -1,17 +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. # + project.version=${project.version} project.artifactId=${project.artifactId} \ No newline at end of file diff --git a/kogito-springboot-examples/process-monitoring-springboot/src/test/java/org/kie/kogito/examples/springboot/DashboardGenerationTest.java b/kogito-springboot-examples/process-monitoring-springboot/src/test/java/org/kie/kogito/examples/springboot/DashboardGenerationTest.java index abc62570ff..f81951073a 100644 --- a/kogito-springboot-examples/process-monitoring-springboot/src/test/java/org/kie/kogito/examples/springboot/DashboardGenerationTest.java +++ b/kogito-springboot-examples/process-monitoring-springboot/src/test/java/org/kie/kogito/examples/springboot/DashboardGenerationTest.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.examples.springboot; import java.util.List; @@ -23,7 +25,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.context.junit.jupiter.SpringExtension; import io.restassured.RestAssured; diff --git a/kogito-springboot-examples/process-monitoring-springboot/src/test/java/org/kie/kogito/examples/springboot/ProcessMetricsTest.java b/kogito-springboot-examples/process-monitoring-springboot/src/test/java/org/kie/kogito/examples/springboot/ProcessMetricsTest.java index 67e78bfa51..f6e3731441 100644 --- a/kogito-springboot-examples/process-monitoring-springboot/src/test/java/org/kie/kogito/examples/springboot/ProcessMetricsTest.java +++ b/kogito-springboot-examples/process-monitoring-springboot/src/test/java/org/kie/kogito/examples/springboot/ProcessMetricsTest.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.examples.springboot; import org.junit.jupiter.api.BeforeEach; @@ -23,9 +25,9 @@ import org.kie.kogito.process.Process; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.boot.test.autoconfigure.actuate.metrics.AutoConfigureMetrics; +import org.springframework.boot.test.autoconfigure.actuate.observability.AutoConfigureObservability; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.context.junit.jupiter.SpringExtension; import io.restassured.RestAssured; @@ -40,7 +42,7 @@ @ExtendWith(SpringExtension.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = DemoApplication.class) -@AutoConfigureMetrics +@AutoConfigureObservability public class ProcessMetricsTest { private static final String PROJECT_VERSION = ProjectMetadataProvider.getProjectVersion(); @@ -85,7 +87,7 @@ public void testProcessMetricsSpringboot() { // test getting the created order given().accept(ContentType.JSON).when().get("/orders").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId)); + .body("size()", is(1), "[0].id", is(firstCreatedId)); given() .when() @@ -106,15 +108,15 @@ public void testProcessMetricsSpringboot() { PROJECT_ARTIFACT_ID, PROJECT_VERSION))) .body(containsString( String.format( - "kogito_work_item_duration_seconds_max{artifactId=\"%s\",name=\"org.kie.kogito.examples.springboot.CalculationService_calculateTotal_3_Handler\",version=\"%s\",}", + "kogito_work_item_duration_seconds_max{artifactId=\"%s\",name=\"org.kie.kogito.examples.springboot.CalculationService_calculateTotal_ServiceTask_1_Handler\",version=\"%s\",}", PROJECT_ARTIFACT_ID, PROJECT_VERSION))) .body(containsString( String.format( - "kogito_work_item_duration_seconds_count{artifactId=\"%s\",name=\"org.kie.kogito.examples.springboot.CalculationService_calculateTotal_3_Handler\",version=\"%s\",}", + "kogito_work_item_duration_seconds_count{artifactId=\"%s\",name=\"org.kie.kogito.examples.springboot.CalculationService_calculateTotal_ServiceTask_1_Handler\",version=\"%s\",}", PROJECT_ARTIFACT_ID, PROJECT_VERSION))) .body(containsString( String.format( - "kogito_work_item_duration_seconds_sum{artifactId=\"%s\",name=\"org.kie.kogito.examples.springboot.CalculationService_calculateTotal_3_Handler\",version=\"%s\",}", + "kogito_work_item_duration_seconds_sum{artifactId=\"%s\",name=\"org.kie.kogito.examples.springboot.CalculationService_calculateTotal_ServiceTask_1_Handler\",version=\"%s\",}", PROJECT_ARTIFACT_ID, PROJECT_VERSION))); } } diff --git a/kogito-springboot-examples/process-monitoring-springboot/src/test/java/org/kie/kogito/examples/springboot/ProjectMetadataProvider.java b/kogito-springboot-examples/process-monitoring-springboot/src/test/java/org/kie/kogito/examples/springboot/ProjectMetadataProvider.java index 326ea6ab00..54b28ea618 100644 --- a/kogito-springboot-examples/process-monitoring-springboot/src/test/java/org/kie/kogito/examples/springboot/ProjectMetadataProvider.java +++ b/kogito-springboot-examples/process-monitoring-springboot/src/test/java/org/kie/kogito/examples/springboot/ProjectMetadataProvider.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.examples.springboot; diff --git a/kogito-springboot-examples/process-outbox-mongodb-springboot/README.md b/kogito-springboot-examples/process-outbox-mongodb-springboot/README.md index cf375bf3e9..82624b5d82 100644 --- a/kogito-springboot-examples/process-outbox-mongodb-springboot/README.md +++ b/kogito-springboot-examples/process-outbox-mongodb-springboot/README.md @@ -36,7 +36,7 @@ curl -d '{"approver" : "john", "order" : {"orderNumber" : "12345", "shipped" : f

-6. With the Kafka broker info from step 8, run the Kogito Data Index Service with MongoDB to consume Kafka messages: https://github.com/kiegroup/kogito-runtimes/wiki/Data-Index-Service +6. With the Kafka broker info from step 8, run the Kogito Data Index Service with MongoDB to consume Kafka messages: https://github.com/apache/incubator-kie-kogito-runtimes/wiki/Data-Index-Service 7. Shut down the cluster ```shell diff --git a/kogito-springboot-examples/process-outbox-mongodb-springboot/docker-clean.sh b/kogito-springboot-examples/process-outbox-mongodb-springboot/docker-clean.sh index dbffac43ae..2cc73b8666 100755 --- a/kogito-springboot-examples/process-outbox-mongodb-springboot/docker-clean.sh +++ b/kogito-springboot-examples/process-outbox-mongodb-springboot/docker-clean.sh @@ -1,4 +1,23 @@ #!/bin/sh +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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. +# + # Helper script to remove any cache from previous build docker-compose stop diff --git a/kogito-springboot-examples/process-outbox-mongodb-springboot/docker-compose.yml b/kogito-springboot-examples/process-outbox-mongodb-springboot/docker-compose.yml index db1077beb4..6cb1988707 100644 --- a/kogito-springboot-examples/process-outbox-mongodb-springboot/docker-compose.yml +++ b/kogito-springboot-examples/process-outbox-mongodb-springboot/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' services: kafka: diff --git a/kogito-springboot-examples/process-outbox-mongodb-springboot/mongodb/init.sh b/kogito-springboot-examples/process-outbox-mongodb-springboot/mongodb/init.sh index 9281d34184..636e455018 100644 --- a/kogito-springboot-examples/process-outbox-mongodb-springboot/mongodb/init.sh +++ b/kogito-springboot-examples/process-outbox-mongodb-springboot/mongodb/init.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 -euxo pipefail diff --git a/kogito-springboot-examples/process-outbox-mongodb-springboot/mongodb/launch.sh b/kogito-springboot-examples/process-outbox-mongodb-springboot/mongodb/launch.sh index 04786f1502..09c955e69f 100644 --- a/kogito-springboot-examples/process-outbox-mongodb-springboot/mongodb/launch.sh +++ b/kogito-springboot-examples/process-outbox-mongodb-springboot/mongodb/launch.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 -m diff --git a/kogito-springboot-examples/process-outbox-mongodb-springboot/pom.xml b/kogito-springboot-examples/process-outbox-mongodb-springboot/pom.xml index 703fb4bcad..bb8aacbd91 100644 --- a/kogito-springboot-examples/process-outbox-mongodb-springboot/pom.xml +++ b/kogito-springboot-examples/process-outbox-mongodb-springboot/pom.xml @@ -1,4 +1,24 @@ + @@ -6,7 +26,7 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-outbox-mongodb-springboot @@ -15,8 +35,8 @@ 1.7 - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -41,20 +61,20 @@ kogito-api
- org.kie.kogito - kogito-processes-spring-boot-starter + org.jbpm + jbpm-spring-boot-starter org.springframework.boot spring-boot-starter-data-mongodb - org.kie.kogito - kogito-addons-springboot-persistence-mongodb + org.kie + kie-addons-springboot-persistence-mongodb - org.kie.kogito - kogito-addons-springboot-events-mongodb + org.kie + kie-addons-springboot-events-mongodb diff --git a/kogito-springboot-examples/process-outbox-mongodb-springboot/sidecar/launch.sh b/kogito-springboot-examples/process-outbox-mongodb-springboot/sidecar/launch.sh index 5d9ce0fbde..51f265d29c 100644 --- a/kogito-springboot-examples/process-outbox-mongodb-springboot/sidecar/launch.sh +++ b/kogito-springboot-examples/process-outbox-mongodb-springboot/sidecar/launch.sh @@ -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. +# + set -euxo pipefail until mongo -u "$MONGODB_USER" -p "$MONGODB_PASSWORD" --host "$MONGODB_RS"/"$MONGODB_HOST" admin --eval "print(\"waited for connection\")"; do diff --git a/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/java/org/kie/kogito/examples/CalculationService.java b/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/java/org/kie/kogito/examples/CalculationService.java index d0f4303280..8eef0cb589 100644 --- a/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/java/org/kie/kogito/examples/CalculationService.java +++ b/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/java/org/kie/kogito/examples/CalculationService.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.examples; diff --git a/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/java/org/kie/kogito/examples/CorsConfig.java b/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/java/org/kie/kogito/examples/CorsConfig.java index a48d7bdef4..001604dfc7 100644 --- a/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/java/org/kie/kogito/examples/CorsConfig.java +++ b/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/java/org/kie/kogito/examples/CorsConfig.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.examples; diff --git a/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/java/org/kie/kogito/examples/DemoApplication.java b/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/java/org/kie/kogito/examples/DemoApplication.java index ce8ce7e79d..d0400d3c54 100644 --- a/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/java/org/kie/kogito/examples/DemoApplication.java +++ b/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/java/org/kie/kogito/examples/DemoApplication.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.examples; diff --git a/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/java/org/kie/kogito/examples/PersonValidationService.java b/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/java/org/kie/kogito/examples/PersonValidationService.java index af854584cb..022478f873 100644 --- a/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/java/org/kie/kogito/examples/PersonValidationService.java +++ b/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/java/org/kie/kogito/examples/PersonValidationService.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.examples; diff --git a/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/java/org/kie/kogito/examples/demo/Order.java b/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/java/org/kie/kogito/examples/demo/Order.java index 753b87aecd..d3770e78cf 100755 --- a/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/java/org/kie/kogito/examples/demo/Order.java +++ b/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/java/org/kie/kogito/examples/demo/Order.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.examples.demo; diff --git a/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/java/org/kie/kogito/examples/demo/Person.java b/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/java/org/kie/kogito/examples/demo/Person.java index c38f75fe3c..92aa205134 100644 --- a/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/java/org/kie/kogito/examples/demo/Person.java +++ b/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/java/org/kie/kogito/examples/demo/Person.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.examples.demo; diff --git a/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/resources/META-INF/kmodule.xml b/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/resources/META-INF/kmodule.xml index 2ba4076c16..41665a75bb 100755 --- a/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/resources/META-INF/kmodule.xml +++ b/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/resources/META-INF/kmodule.xml @@ -1 +1,21 @@ + \ No newline at end of file diff --git a/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/resources/application.properties b/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/resources/application.properties index 808b034978..f886ecc152 100644 --- a/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/process-outbox-mongodb-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=mongodb kogito.persistence.transaction.enabled=true spring.data.mongodb.uri=mongodb://${MONGODB_USERNAME}:${MONGODB_PASSWORD}@${MONGODB_HOST}/kogito?authSource=${MONGODB_AUTH_SOURCE} diff --git a/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/resources/org/kie/kogito/examples/PersonValidationService.drl b/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/resources/org/kie/kogito/examples/PersonValidationService.drl index 81e156389c..9d0fdc6ce1 100644 --- a/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/resources/org/kie/kogito/examples/PersonValidationService.drl +++ b/kogito-springboot-examples/process-outbox-mongodb-springboot/src/main/resources/org/kie/kogito/examples/PersonValidationService.drl @@ -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.examples unit PersonValidationService diff --git a/kogito-springboot-examples/process-outbox-mongodb-springboot/src/test/java/org/kie/kogito/springboot/outbox/OutboxIT.java b/kogito-springboot-examples/process-outbox-mongodb-springboot/src/test/java/org/kie/kogito/springboot/outbox/OutboxIT.java index 0d476bce81..1379657c3d 100644 --- a/kogito-springboot-examples/process-outbox-mongodb-springboot/src/test/java/org/kie/kogito/springboot/outbox/OutboxIT.java +++ b/kogito-springboot-examples/process-outbox-mongodb-springboot/src/test/java/org/kie/kogito/springboot/outbox/OutboxIT.java @@ -1,30 +1,30 @@ /* - * 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.springboot.outbox; -import java.nio.file.Path; -import java.nio.file.Paths; import java.time.Duration; import java.util.Set; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.function.Consumer; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.kie.kogito.test.springboot.kafka.KafkaTestClient; import org.slf4j.Logger; @@ -32,9 +32,6 @@ import org.testcontainers.containers.DockerComposeContainer; import org.testcontainers.containers.output.OutputFrame; import org.testcontainers.containers.output.Slf4jLogConsumer; -import org.testcontainers.containers.wait.strategy.Wait; -import org.testcontainers.junit.jupiter.Container; -import org.testcontainers.junit.jupiter.Testcontainers; import com.jayway.jsonpath.JsonPath; @@ -45,7 +42,7 @@ import static org.hamcrest.Matchers.hasSize; import static org.junit.jupiter.api.Assertions.assertTrue; -@Testcontainers +//@Testcontainers public class OutboxIT { private static final Logger LOGGER = LoggerFactory.getLogger(OutboxIT.class); @@ -54,12 +51,11 @@ public class OutboxIT { private static final String PROCESS_EVENTS_TOPIC = "kogito-processinstances-events"; private static final String USERTASK_EVENTS_TOPIC = "kogito-usertaskinstances-events"; - private static final String VARIABLE_EVENTS_TOPIC = "kogito-variables-events"; private static final int KOGITO_PORT = 8080; private static final int KAFKA_PORT = 9092; private static final int DEBEZIUM_PORT = 8083; - @Container + //@Container private static DockerComposeContainer COMPOSE; private int kogitoPort; @@ -69,33 +65,33 @@ public class OutboxIT { private KafkaTestClient kafkaClient; static { - Path path = Paths.get("../../docker-compose.yml"); - if (!path.toFile().exists()) { - path = Paths.get("docker-compose.yml"); - } - COMPOSE = new DockerComposeContainer<>(path.toFile()); - COMPOSE.withPull(false); - COMPOSE.withServices("kafka", "mongodb", "connect", "sidecar", "kogito"); - COMPOSE.withExposedService("kogito", KOGITO_PORT); - COMPOSE.withExposedService("kafka", KAFKA_PORT); - COMPOSE.withExposedService("connect", DEBEZIUM_PORT); - COMPOSE.withLogConsumer("kafka", logger()); - COMPOSE.withLogConsumer("connect", logger()); - COMPOSE.withLogConsumer("sidecar", logger()); - COMPOSE.withLogConsumer("kogito", logger()); - COMPOSE.waitingFor("kafka", Wait.forListeningPort()); - COMPOSE.waitingFor("sidecar", Wait.forListeningPort()); - COMPOSE.waitingFor("kogito", Wait.forListeningPort()); - COMPOSE.withLocalCompose(true); - //See https://github.com/testcontainers/testcontainers-java/issues/4565 - COMPOSE.withOptions("--compatibility"); + // Path path = Paths.get("../../docker-compose.yml"); + // if (!path.toFile().exists()) { + // path = Paths.get("docker-compose.yml"); + // } + // COMPOSE = new DockerComposeContainer<>(path.toFile()); + // COMPOSE.withPull(false); + // COMPOSE.withServices("kafka", "mongodb", "connect", "sidecar", "kogito"); + // COMPOSE.withExposedService("kogito", KOGITO_PORT); + // COMPOSE.withExposedService("kafka", KAFKA_PORT); + // COMPOSE.withExposedService("connect", DEBEZIUM_PORT); + // COMPOSE.withLogConsumer("kafka", logger()); + // COMPOSE.withLogConsumer("connect", logger()); + // COMPOSE.withLogConsumer("sidecar", logger()); + // COMPOSE.withLogConsumer("kogito", logger()); + // COMPOSE.waitingFor("kafka", Wait.forListeningPort()); + // COMPOSE.waitingFor("sidecar", Wait.forListeningPort()); + // COMPOSE.waitingFor("kogito", Wait.forListeningPort()); + // COMPOSE.withLocalCompose(true); + // //See https://github.com/testcontainers/testcontainers-java/issues/4565 + // COMPOSE.withOptions("--compatibility"); } private static Consumer logger() { return new Slf4jLogConsumer(LOGGER); } - @BeforeEach + // @BeforeEach void setup() { kogitoPort = COMPOSE.getServicePort("kogito", KOGITO_PORT); debeziumPort = COMPOSE.getServicePort("connect", DEBEZIUM_PORT); @@ -103,7 +99,7 @@ void setup() { kafkaClient = new KafkaTestClient("localhost:" + kafkaPort); } - @AfterEach + // @AfterEach void close() { if (kafkaClient != null) { kafkaClient.shutdown(); @@ -111,6 +107,7 @@ void close() { } @Test + @Disabled public void testSendProcessEvents() throws InterruptedException { // Check Debezium (Kafka, MongoDB) readiness await().ignoreExceptions() @@ -153,18 +150,25 @@ public void testSendProcessEvents() throws InterruptedException { CountDownLatch processEventCounter = new CountDownLatch(2); CountDownLatch userTaskEventCounter = new CountDownLatch(1); kafkaClient.consume(Set.of(PROCESS_EVENTS_TOPIC, USERTASK_EVENTS_TOPIC), message -> { + LOGGER.info("ProcessInstanceVariableDataEvent: {}", message); String type = JsonPath.read(message, "$.type"); - if ("ProcessInstanceEvent".equals(type)) { - String orderNumber = JsonPath.read(message, "$.data.variables.order.orderNumber"); - boolean shipped = JsonPath.read(message, "$.data.variables.order.shipped"); - if ("23570".equals(orderNumber) && !shipped) { - processEventCounter.countDown(); + if ("ProcessInstanceVariableDataEvent".equals(type)) { + String varName = JsonPath.read(message, "$.data.variableName"); + if ("order".equals(varName)) { + String orderNumber = JsonPath.read(message, "$.data.variableValue.orderNumber"); + boolean shipped = JsonPath.read(message, "$.data.variableValue.shipped"); + if ("23570".equals(orderNumber) && !shipped) { + processEventCounter.countDown(); + } } - } else if ("UserTaskInstanceEvent".equals(type)) { - String orderNumber = JsonPath.read(message, "$.data.inputs.input1.orderNumber"); - boolean shipped = JsonPath.read(message, "$.data.inputs.input1.shipped"); - if ("23570".equals(orderNumber) && !shipped) { - userTaskEventCounter.countDown(); + } else if ("UserTaskInstanceVariableDataEvent".equals(type)) { + String varName = JsonPath.read(message, "$.data.variableName"); + if ("input1".equals(varName)) { + String orderNumber = JsonPath.read(message, "$.data.variableValue.orderNumber"); + boolean shipped = JsonPath.read(message, "$.data.variableValue.shipped"); + if ("23570".equals(orderNumber) && !shipped) { + userTaskEventCounter.countDown(); + } } } }); @@ -192,8 +196,8 @@ public void testSendProcessEvents() throws InterruptedException { .get("/connectors/{connector}/topics") .then() .statusCode(200) - .body("kogito-connector.topics", hasSize(3)) - .body("kogito-connector.topics", hasItems(PROCESS_EVENTS_TOPIC, USERTASK_EVENTS_TOPIC, VARIABLE_EVENTS_TOPIC))); + .body("kogito-connector.topics", hasSize(2)) + .body("kogito-connector.topics", hasItems(PROCESS_EVENTS_TOPIC, USERTASK_EVENTS_TOPIC))); // Check process events pushed assertTrue(processEventCounter.await(TIMEOUT.getSeconds(), TimeUnit.SECONDS)); diff --git a/kogito-springboot-examples/process-outbox-mongodb-springboot/src/test/resources/logback.xml b/kogito-springboot-examples/process-outbox-mongodb-springboot/src/test/resources/logback.xml index 2403345628..fc0c0e4a01 100644 --- a/kogito-springboot-examples/process-outbox-mongodb-springboot/src/test/resources/logback.xml +++ b/kogito-springboot-examples/process-outbox-mongodb-springboot/src/test/resources/logback.xml @@ -1,20 +1,24 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this 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/kogito-springboot-examples/process-performance-springboot/pom.xml b/kogito-springboot-examples/process-performance-springboot/pom.xml index 2c3f44867b..78d1619f5d 100755 --- a/kogito-springboot-examples/process-performance-springboot/pom.xml +++ b/kogito-springboot-examples/process-performance-springboot/pom.xml @@ -1,4 +1,24 @@ + org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-performance-springboot Kogito Example :: Springboot Performance test Springboot Performance test - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -51,17 +71,22 @@ spring-kafka
- org.kie.kogito - kogito-addons-springboot-messaging + org.kie + kie-addons-springboot-messaging - org.kie.kogito - kogito-spring-boot-starter + org.jbpm + jbpm-with-drools-spring-boot-starter - + org.springdoc - springdoc-openapi-ui + springdoc-openapi-starter-webmvc-ui org.springframework.boot diff --git a/kogito-springboot-examples/process-performance-springboot/src/main/java/org/kie/kogito/tests/KogitoPerformanceSpringbootApplication.java b/kogito-springboot-examples/process-performance-springboot/src/main/java/org/kie/kogito/tests/KogitoPerformanceSpringbootApplication.java index eefdb3ab8a..afac4cb42d 100644 --- a/kogito-springboot-examples/process-performance-springboot/src/main/java/org/kie/kogito/tests/KogitoPerformanceSpringbootApplication.java +++ b/kogito-springboot-examples/process-performance-springboot/src/main/java/org/kie/kogito/tests/KogitoPerformanceSpringbootApplication.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.tests; import org.springframework.boot.SpringApplication; diff --git a/kogito-springboot-examples/process-performance-springboot/src/main/resources/application.properties b/kogito-springboot-examples/process-performance-springboot/src/main/resources/application.properties index b91bae1d7f..6037acdf38 100644 --- a/kogito-springboot-examples/process-performance-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/process-performance-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. +# + spring.kafka.bootstrap-servers=localhost:9092 spring.kafka.consumer.group-id=travellers-group diff --git a/kogito-springboot-examples/process-postgresql-persistence-springboot/docker-compose/docker-compose.yml b/kogito-springboot-examples/process-postgresql-persistence-springboot/docker-compose/docker-compose.yml index 2ea6d1b571..8a810481bd 100644 --- a/kogito-springboot-examples/process-postgresql-persistence-springboot/docker-compose/docker-compose.yml +++ b/kogito-springboot-examples/process-postgresql-persistence-springboot/docker-compose/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/kogito-springboot-examples/process-postgresql-persistence-springboot/pom.xml b/kogito-springboot-examples/process-postgresql-persistence-springboot/pom.xml index b64ac9d404..609187c4eb 100644 --- a/kogito-springboot-examples/process-postgresql-persistence-springboot/pom.xml +++ b/kogito-springboot-examples/process-postgresql-persistence-springboot/pom.xml @@ -1,4 +1,24 @@ + @@ -6,7 +26,7 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-postgresql-persistence-springboot @@ -14,8 +34,8 @@ Kogito with PostgreSQL persistence - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -38,16 +58,16 @@ - org.kie.kogito - kogito-processes-spring-boot-starter + org.jbpm + jbpm-spring-boot-starter org.kie.kogito kogito-api - org.kie.kogito - kogito-addons-springboot-persistence-jdbc + org.kie + kie-addons-springboot-persistence-jdbc org.postgresql @@ -110,8 +130,8 @@ - org.kie.kogito - kogito-addons-springboot-events-process-kafka + org.kie + kie-addons-springboot-events-process-kafka diff --git a/kogito-springboot-examples/process-postgresql-persistence-springboot/src/main/java/org/acme/travels/Address.java b/kogito-springboot-examples/process-postgresql-persistence-springboot/src/main/java/org/acme/travels/Address.java index ff19d83056..cad01a7f09 100644 --- a/kogito-springboot-examples/process-postgresql-persistence-springboot/src/main/java/org/acme/travels/Address.java +++ b/kogito-springboot-examples/process-postgresql-persistence-springboot/src/main/java/org/acme/travels/Address.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.acme.travels; diff --git a/kogito-springboot-examples/process-postgresql-persistence-springboot/src/main/java/org/acme/travels/KogitoApplication.java b/kogito-springboot-examples/process-postgresql-persistence-springboot/src/main/java/org/acme/travels/KogitoApplication.java index 6450a769a9..210f11ef5e 100644 --- a/kogito-springboot-examples/process-postgresql-persistence-springboot/src/main/java/org/acme/travels/KogitoApplication.java +++ b/kogito-springboot-examples/process-postgresql-persistence-springboot/src/main/java/org/acme/travels/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.acme.travels; diff --git a/kogito-springboot-examples/process-postgresql-persistence-springboot/src/main/java/org/acme/travels/Traveller.java b/kogito-springboot-examples/process-postgresql-persistence-springboot/src/main/java/org/acme/travels/Traveller.java index 274a7b15c7..6cacf7f882 100644 --- a/kogito-springboot-examples/process-postgresql-persistence-springboot/src/main/java/org/acme/travels/Traveller.java +++ b/kogito-springboot-examples/process-postgresql-persistence-springboot/src/main/java/org/acme/travels/Traveller.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.acme.travels; diff --git a/kogito-springboot-examples/process-postgresql-persistence-springboot/src/main/resources/application.properties b/kogito-springboot-examples/process-postgresql-persistence-springboot/src/main/resources/application.properties index 60103ceda0..a3ac58a919 100644 --- a/kogito-springboot-examples/process-postgresql-persistence-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/process-postgresql-persistence-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 #run create tables scripts during the application startup diff --git a/kogito-springboot-examples/process-postgresql-persistence-springboot/src/test/java/org/acme/deals/DealsRestIT.java b/kogito-springboot-examples/process-postgresql-persistence-springboot/src/test/java/org/acme/deals/DealsRestIT.java index 2cd9176a6d..7e8ab24dc4 100644 --- a/kogito-springboot-examples/process-postgresql-persistence-springboot/src/test/java/org/acme/deals/DealsRestIT.java +++ b/kogito-springboot-examples/process-postgresql-persistence-springboot/src/test/java/org/acme/deals/DealsRestIT.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.acme.deals; @@ -20,7 +23,7 @@ import org.junit.jupiter.api.Test; import org.kie.kogito.testcontainers.springboot.PostgreSqlSpringBootTestResource; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.context.ContextConfiguration; import io.restassured.RestAssured; @@ -55,7 +58,7 @@ public void testDealsRest() { // test getting the created deal given().accept(ContentType.JSON) .when().get("/deals") - .then().log().ifValidationFails().statusCode(200).body("$.size()", is(1), "[0].id", is(dealId)); + .then().log().ifValidationFails().statusCode(200).body("size()", is(1), "[0].id", is(dealId)); // test getting order by id given().accept(ContentType.JSON) @@ -65,12 +68,12 @@ public void testDealsRest() { // get deals for review String dealReviewId = given().accept(ContentType.JSON) .when().get("/dealreviews") - .then().log().ifValidationFails().statusCode(200).body("$.size()", is(1)).body("[0].id", notNullValue()).extract().path("[0].id"); + .then().log().ifValidationFails().statusCode(200).body("size()", is(1)).body("[0].id", notNullValue()).extract().path("[0].id"); // get task for john String taskId = given().accept(ContentType.JSON) .when().get("/dealreviews/{uuid}/tasks?user=john", dealReviewId) - .then().log().ifValidationFails().statusCode(200).body("$.size()", is(1)).extract().path("[0].id"); + .then().log().ifValidationFails().statusCode(200).body("size()", is(1)).extract().path("[0].id"); // complete review task given().contentType(ContentType.JSON).accept(ContentType.JSON).body("{\"review\" : \"very good work\"}") @@ -80,11 +83,11 @@ public void testDealsRest() { //verify no deals to review given().accept(ContentType.JSON) .when().get("/dealreviews") - .then().log().ifValidationFails().statusCode(200).body("$.size()", is(0)); + .then().log().ifValidationFails().statusCode(200).body("size()", is(0)); //verify no deals given().accept(ContentType.JSON) .when().get("/deals") - .then().log().ifValidationFails().statusCode(200).body("$.size()", is(0)); + .then().log().ifValidationFails().statusCode(200).body("size()", is(0)); } } diff --git a/kogito-springboot-examples/process-rest-service-call-springboot/README.md b/kogito-springboot-examples/process-rest-service-call-springboot/README.md index f5c24b34c4..2a7c02beff 100644 --- a/kogito-springboot-examples/process-rest-service-call-springboot/README.md +++ b/kogito-springboot-examples/process-rest-service-call-springboot/README.md @@ -118,7 +118,3 @@ After the above command nothing will show on Springboot log as the user is skipp * Curl Log

- -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-springboot-examples/process-rest-service-call-springboot/operator/process-service-rest-call-springboot.yaml b/kogito-springboot-examples/process-rest-service-call-springboot/operator/process-service-rest-call-springboot.yaml deleted file mode 100644 index e66d4641c2..0000000000 --- a/kogito-springboot-examples/process-rest-service-call-springboot/operator/process-service-rest-call-springboot.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-service-rest-call-springboot -spec: - type: RemoteSource - runtime: springboot - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/process-service-rest-call-springboot - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-service-rest-call-springboot -spec: - runtime: springboot \ No newline at end of file diff --git a/kogito-springboot-examples/process-rest-service-call-springboot/pom.xml b/kogito-springboot-examples/process-rest-service-call-springboot/pom.xml index 21ffc3289e..83d769ede8 100644 --- a/kogito-springboot-examples/process-rest-service-call-springboot/pom.xml +++ b/kogito-springboot-examples/process-rest-service-call-springboot/pom.xml @@ -1,4 +1,24 @@ + @@ -6,7 +26,7 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-rest-service-call-springboot @@ -14,8 +34,8 @@ Kogito service invocation with REST - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -36,10 +56,10 @@ spring-boot-starter-actuator
- + - org.kie.kogito - kogito-processes-spring-boot-starter + org.jbpm + jbpm-spring-boot-starter org.springframework.boot diff --git a/kogito-springboot-examples/process-rest-service-call-springboot/src/main/java/org/acme/travels/services/AuditService.java b/kogito-springboot-examples/process-rest-service-call-springboot/src/main/java/org/acme/travels/services/AuditService.java index 7b1b2f759e..34af03d9bd 100644 --- a/kogito-springboot-examples/process-rest-service-call-springboot/src/main/java/org/acme/travels/services/AuditService.java +++ b/kogito-springboot-examples/process-rest-service-call-springboot/src/main/java/org/acme/travels/services/AuditService.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.acme.travels.services; diff --git a/kogito-springboot-examples/process-rest-service-call-springboot/src/main/java/org/acme/travels/services/UserService.java b/kogito-springboot-examples/process-rest-service-call-springboot/src/main/java/org/acme/travels/services/UserService.java index 5bcd77d129..411bb7f519 100644 --- a/kogito-springboot-examples/process-rest-service-call-springboot/src/main/java/org/acme/travels/services/UserService.java +++ b/kogito-springboot-examples/process-rest-service-call-springboot/src/main/java/org/acme/travels/services/UserService.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.acme.travels.services; diff --git a/kogito-springboot-examples/process-rest-service-call-springboot/src/main/java/org/acme/travels/springboot/User.java b/kogito-springboot-examples/process-rest-service-call-springboot/src/main/java/org/acme/travels/springboot/User.java index e9fe9182c3..0f4b1d4a97 100644 --- a/kogito-springboot-examples/process-rest-service-call-springboot/src/main/java/org/acme/travels/springboot/User.java +++ b/kogito-springboot-examples/process-rest-service-call-springboot/src/main/java/org/acme/travels/springboot/User.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.acme.travels.springboot; diff --git a/kogito-springboot-examples/process-rest-service-call-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.java b/kogito-springboot-examples/process-rest-service-call-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.java index 5119aa965b..3905901b43 100644 --- a/kogito-springboot-examples/process-rest-service-call-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.java +++ b/kogito-springboot-examples/process-rest-service-call-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.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.tests; diff --git a/kogito-springboot-examples/process-rest-service-call-springboot/src/main/resources/application.properties b/kogito-springboot-examples/process-rest-service-call-springboot/src/main/resources/application.properties index 8fba226de4..75efae3c56 100644 --- a/kogito-springboot-examples/process-rest-service-call-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/process-rest-service-call-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 logging.level.org.acme.travels =INFO diff --git a/kogito-springboot-examples/process-rest-service-call-springboot/src/test/java/org/acme/travels/springboot/UsersProcessTest.java b/kogito-springboot-examples/process-rest-service-call-springboot/src/test/java/org/acme/travels/springboot/UsersProcessTest.java index ea1d5dd0f9..00f5b4364d 100644 --- a/kogito-springboot-examples/process-rest-service-call-springboot/src/test/java/org/acme/travels/springboot/UsersProcessTest.java +++ b/kogito-springboot-examples/process-rest-service-call-springboot/src/test/java/org/acme/travels/springboot/UsersProcessTest.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.acme.travels.springboot; diff --git a/kogito-springboot-examples/process-scripts-springboot/README.md b/kogito-springboot-examples/process-scripts-springboot/README.md index e28edd82e8..0c6ec26108 100644 --- a/kogito-springboot-examples/process-scripts-springboot/README.md +++ b/kogito-springboot-examples/process-scripts-springboot/README.md @@ -91,7 +91,3 @@ And also in SpringBoot log you should see a log entry: ``` Hello john ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-springboot-examples/process-scripts-springboot/operator/process-scripts-springboot.yaml b/kogito-springboot-examples/process-scripts-springboot/operator/process-scripts-springboot.yaml deleted file mode 100644 index 890eaba19e..0000000000 --- a/kogito-springboot-examples/process-scripts-springboot/operator/process-scripts-springboot.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-scripts-springboot -spec: - type: RemoteSource - runtime: springboot - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/process-scripts-springboot - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-scripts-springboot -spec: - runtime: springboot \ No newline at end of file diff --git a/kogito-springboot-examples/process-scripts-springboot/pom.xml b/kogito-springboot-examples/process-scripts-springboot/pom.xml index 1dfd2631dc..fbfeb1b245 100644 --- a/kogito-springboot-examples/process-scripts-springboot/pom.xml +++ b/kogito-springboot-examples/process-scripts-springboot/pom.xml @@ -1,4 +1,24 @@ + @@ -6,7 +26,7 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-scripts-springboot @@ -14,8 +34,8 @@ Kogito script invocation - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -36,10 +56,10 @@ spring-boot-starter-actuator - + - org.kie.kogito - kogito-processes-spring-boot-starter + org.jbpm + jbpm-spring-boot-starter org.springframework.boot diff --git a/kogito-springboot-examples/process-scripts-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.java b/kogito-springboot-examples/process-scripts-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.java index 7b2daaca72..fc27bd8647 100644 --- a/kogito-springboot-examples/process-scripts-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.java +++ b/kogito-springboot-examples/process-scripts-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.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.tests; diff --git a/kogito-springboot-examples/process-scripts-springboot/src/main/resources/application.properties b/kogito-springboot-examples/process-scripts-springboot/src/main/resources/application.properties index f900456f36..85fac9eb60 100644 --- a/kogito-springboot-examples/process-scripts-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/process-scripts-springboot/src/main/resources/application.properties @@ -1 +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. +# + server.address=0.0.0.0 diff --git a/kogito-springboot-examples/process-scripts-springboot/src/test/java/org/acme/travels/springboot/ScriptsProcessTest.java b/kogito-springboot-examples/process-scripts-springboot/src/test/java/org/acme/travels/springboot/ScriptsProcessTest.java index e756dce13f..b889f8446c 100644 --- a/kogito-springboot-examples/process-scripts-springboot/src/test/java/org/acme/travels/springboot/ScriptsProcessTest.java +++ b/kogito-springboot-examples/process-scripts-springboot/src/test/java/org/acme/travels/springboot/ScriptsProcessTest.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.acme.travels.springboot; diff --git a/kogito-springboot-examples/process-service-calls-springboot/README.md b/kogito-springboot-examples/process-service-calls-springboot/README.md index 378511107c..fe5eaadd8a 100644 --- a/kogito-springboot-examples/process-service-calls-springboot/README.md +++ b/kogito-springboot-examples/process-service-calls-springboot/README.md @@ -146,7 +146,3 @@ curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' -d After the above command you should see a log similar to the following

- -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-springboot-examples/process-service-calls-springboot/operator/process-service-calls-springboot.yaml b/kogito-springboot-examples/process-service-calls-springboot/operator/process-service-calls-springboot.yaml deleted file mode 100644 index a20bfc3bfb..0000000000 --- a/kogito-springboot-examples/process-service-calls-springboot/operator/process-service-calls-springboot.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-service-calls-springboot -spec: - type: RemoteSource - runtime: springboot - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/process-service-calls-springboot - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-service-calls-springboot -spec: - runtime: springboot \ No newline at end of file diff --git a/kogito-springboot-examples/process-service-calls-springboot/pom.xml b/kogito-springboot-examples/process-service-calls-springboot/pom.xml index b689418ad1..e2d2dc5be5 100644 --- a/kogito-springboot-examples/process-service-calls-springboot/pom.xml +++ b/kogito-springboot-examples/process-service-calls-springboot/pom.xml @@ -1,4 +1,24 @@ + @@ -6,7 +26,7 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-service-calls-springboot @@ -14,8 +34,8 @@ Kogito service invocation - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -36,10 +56,10 @@ spring-boot-starter-actuator
- + - org.kie.kogito - kogito-processes-spring-boot-starter + org.jbpm + jbpm-spring-boot-starter org.springframework.boot diff --git a/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/acme/travels/services/GreetingTravellerService.java b/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/acme/travels/services/GreetingTravellerService.java index a843b40c09..6521b54011 100644 --- a/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/acme/travels/services/GreetingTravellerService.java +++ b/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/acme/travels/services/GreetingTravellerService.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.acme.travels.services; diff --git a/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/acme/travels/services/HelloService.java b/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/acme/travels/services/HelloService.java index 1db8be02a0..01039773e4 100644 --- a/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/acme/travels/services/HelloService.java +++ b/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/acme/travels/services/HelloService.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.acme.travels.services; diff --git a/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/acme/travels/services/StoreTravellerService.java b/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/acme/travels/services/StoreTravellerService.java index 41f7d760ab..0e72c41a20 100644 --- a/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/acme/travels/services/StoreTravellerService.java +++ b/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/acme/travels/services/StoreTravellerService.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.acme.travels.services; diff --git a/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/acme/travels/services/TravellerAuditService.java b/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/acme/travels/services/TravellerAuditService.java index 4b092600a0..057c0f115a 100644 --- a/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/acme/travels/services/TravellerAuditService.java +++ b/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/acme/travels/services/TravellerAuditService.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.acme.travels.services; diff --git a/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/acme/travels/springboot/Address.java b/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/acme/travels/springboot/Address.java index ea0d7f3d71..22af7ffe91 100644 --- a/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/acme/travels/springboot/Address.java +++ b/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/acme/travels/springboot/Address.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.acme.travels.springboot; diff --git a/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/acme/travels/springboot/Traveller.java b/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/acme/travels/springboot/Traveller.java index d918f2f4d3..1ca339ba09 100644 --- a/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/acme/travels/springboot/Traveller.java +++ b/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/acme/travels/springboot/Traveller.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.acme.travels.springboot; diff --git a/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.java b/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.java index 7b2daaca72..fc27bd8647 100644 --- a/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.java +++ b/kogito-springboot-examples/process-service-calls-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.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.tests; diff --git a/kogito-springboot-examples/process-service-calls-springboot/src/main/resources/application.properties b/kogito-springboot-examples/process-service-calls-springboot/src/main/resources/application.properties index f6174efd22..bdb4982f9a 100644 --- a/kogito-springboot-examples/process-service-calls-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/process-service-calls-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 logging.level.org.acme.travels=INFO \ No newline at end of file diff --git a/kogito-springboot-examples/process-service-calls-springboot/src/test/java/org/acme/travels/springboot/MultiParamServiceProcessTest.java b/kogito-springboot-examples/process-service-calls-springboot/src/test/java/org/acme/travels/springboot/MultiParamServiceProcessTest.java index 378e76aa4b..1ec4051320 100644 --- a/kogito-springboot-examples/process-service-calls-springboot/src/test/java/org/acme/travels/springboot/MultiParamServiceProcessTest.java +++ b/kogito-springboot-examples/process-service-calls-springboot/src/test/java/org/acme/travels/springboot/MultiParamServiceProcessTest.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.acme.travels.springboot; diff --git a/kogito-springboot-examples/process-service-calls-springboot/src/test/java/org/acme/travels/springboot/TravellersProcessTest.java b/kogito-springboot-examples/process-service-calls-springboot/src/test/java/org/acme/travels/springboot/TravellersProcessTest.java index 158bbfdd6f..55869fa559 100644 --- a/kogito-springboot-examples/process-service-calls-springboot/src/test/java/org/acme/travels/springboot/TravellersProcessTest.java +++ b/kogito-springboot-examples/process-service-calls-springboot/src/test/java/org/acme/travels/springboot/TravellersProcessTest.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.acme.travels.springboot; diff --git a/kogito-springboot-examples/process-springboot-example/README.md b/kogito-springboot-examples/process-springboot-example/README.md index 1db4819ece..007daf6ad2 100644 --- a/kogito-springboot-examples/process-springboot-example/README.md +++ b/kogito-springboot-examples/process-springboot-example/README.md @@ -203,7 +203,3 @@ Example response: } } ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-springboot-examples/process-springboot-example/operator/process-springboot-example.yaml b/kogito-springboot-examples/process-springboot-example/operator/process-springboot-example.yaml deleted file mode 100644 index 6d4abaf37b..0000000000 --- a/kogito-springboot-examples/process-springboot-example/operator/process-springboot-example.yaml +++ /dev/null @@ -1,40 +0,0 @@ -# uncomment to enable persistence -##Infinispan operator should be pre-installed in namespace -#apiVersion: app.kiegroup.org/v1beta1 -#kind: KogitoInfra -#metadata: -# name: kogito-infinispan-infra -#spec: -# resource: -# apiVersion: infinispan.org/v1 -# kind: Infinispan ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-springboot-example -spec: - type: RemoteSource - runtime: springboot - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/process-springboot-example - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-springboot-example -spec: - runtime: springboot - # uncomment to enable persistence - #env: - # - name: MAVEN_ARGS_APPEND - # value: "-Ppersistence" -# infra: -# - kogito-infinispan-infra \ No newline at end of file diff --git a/kogito-springboot-examples/process-springboot-example/pom.xml b/kogito-springboot-examples/process-springboot-example/pom.xml index 4ba2e55543..8819269eb5 100644 --- a/kogito-springboot-examples/process-springboot-example/pom.xml +++ b/kogito-springboot-examples/process-springboot-example/pom.xml @@ -1,4 +1,24 @@ + @@ -6,7 +26,7 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-springboot-example @@ -14,8 +34,8 @@ Order management service - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -47,12 +67,12 @@ kogito-api - org.kie.kogito - kogito-processes-spring-boot-starter + org.jbpm + jbpm-spring-boot-starter - org.kie.kogito - kogito-addons-springboot-process-management + org.kie + kie-addons-springboot-process-management org.springframework.kafka @@ -115,12 +135,12 @@ - org.kie.kogito - kogito-addons-springboot-persistence-infinispan + org.kie + kie-addons-springboot-persistence-infinispan org.infinispan - infinispan-spring-boot-starter-remote + infinispan-spring-boot3-starter-remote @@ -136,8 +156,8 @@ - org.kie.kogito - kogito-addons-springboot-events-process-kafka + org.kie + kie-addons-springboot-events-process-kafka diff --git a/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/CalculationService.java b/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/CalculationService.java index ee2d725f59..8eef0cb589 100644 --- a/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/CalculationService.java +++ b/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/CalculationService.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.examples; diff --git a/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/CorsConfig.java b/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/CorsConfig.java index e195a6542b..001604dfc7 100644 --- a/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/CorsConfig.java +++ b/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/CorsConfig.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.examples; diff --git a/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/DemoApplication.java b/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/DemoApplication.java index 3c920b37ab..d0400d3c54 100644 --- a/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/DemoApplication.java +++ b/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/DemoApplication.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.examples; diff --git a/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/KafkaConfig.java b/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/KafkaConfig.java index eda9eb3dbf..ea7616deec 100644 --- a/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/KafkaConfig.java +++ b/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/KafkaConfig.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.examples; diff --git a/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/PersonValidationService.java b/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/PersonValidationService.java index 1601506f70..022478f873 100644 --- a/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/PersonValidationService.java +++ b/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/PersonValidationService.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.examples; diff --git a/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/demo/Order.java b/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/demo/Order.java index de8b4fb8f2..d3770e78cf 100755 --- a/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/demo/Order.java +++ b/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/demo/Order.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.examples.demo; diff --git a/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/demo/Person.java b/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/demo/Person.java index 4ce2cb03d7..92aa205134 100644 --- a/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/demo/Person.java +++ b/kogito-springboot-examples/process-springboot-example/src/main/java/org/kie/kogito/examples/demo/Person.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.examples.demo; diff --git a/kogito-springboot-examples/process-springboot-example/src/main/resources/META-INF/kmodule.xml b/kogito-springboot-examples/process-springboot-example/src/main/resources/META-INF/kmodule.xml index 2ba4076c16..41665a75bb 100755 --- a/kogito-springboot-examples/process-springboot-example/src/main/resources/META-INF/kmodule.xml +++ b/kogito-springboot-examples/process-springboot-example/src/main/resources/META-INF/kmodule.xml @@ -1 +1,21 @@ + \ No newline at end of file diff --git a/kogito-springboot-examples/process-springboot-example/src/main/resources/application.properties b/kogito-springboot-examples/process-springboot-example/src/main/resources/application.properties index 08921ea983..0374f16b12 100644 --- a/kogito-springboot-examples/process-springboot-example/src/main/resources/application.properties +++ b/kogito-springboot-examples/process-springboot-example/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. +# + # Packaging # quarkus.package.type=fast-jar diff --git a/kogito-springboot-examples/process-springboot-example/src/main/resources/org/kie/kogito/examples/PersonValidationService.drl b/kogito-springboot-examples/process-springboot-example/src/main/resources/org/kie/kogito/examples/PersonValidationService.drl index c78f0bc31b..9d0fdc6ce1 100644 --- a/kogito-springboot-examples/process-springboot-example/src/main/resources/org/kie/kogito/examples/PersonValidationService.drl +++ b/kogito-springboot-examples/process-springboot-example/src/main/resources/org/kie/kogito/examples/PersonValidationService.drl @@ -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.examples unit PersonValidationService diff --git a/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/OrdersProcessIT.java b/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/OrdersProcessIT.java index 571d13c8f1..f19c009b4f 100644 --- a/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/OrdersProcessIT.java +++ b/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/OrdersProcessIT.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.examples.demo; diff --git a/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/OrdersRestIT.java b/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/OrdersRestIT.java index 975926ef57..2558a3c749 100644 --- a/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/OrdersRestIT.java +++ b/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/OrdersRestIT.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.examples.demo; @@ -26,7 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; @@ -86,7 +89,7 @@ public void testOrdersRest() { // test getting the created order given().accept(ContentType.JSON).when().get("/orders").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId)); + .body("size()", is(1), "[0].id", is(firstCreatedId)); // test getting order by id given() @@ -124,7 +127,7 @@ public void testOrdersRest() { .get("/orders") .then() .statusCode(200) - .body("$.size()", is(1), "[0].id", is(secondCreatedId)); + .body("size()", is(1), "[0].id", is(secondCreatedId)); // delete second before finishing given() @@ -140,7 +143,7 @@ public void testOrdersRest() { .get("/orders") .then() .statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } @Test @@ -162,7 +165,7 @@ public void testOrdersWithErrorRest() { // test getting the created order given().accept(ContentType.JSON).when().get("/orders").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId)); + .body("size()", is(1), "[0].id", is(firstCreatedId)); // test retrieving error info using process management addon given().accept(ContentType.JSON).when().get("/management/processes/demo.orders/instances/" + firstCreatedId + "/error").then() @@ -183,7 +186,7 @@ public void testOrdersWithErrorRest() { given().accept(ContentType.JSON).when().delete("/orders/" + firstCreatedId).then().statusCode(200); // get all orders make sure there is zero given().accept(ContentType.JSON).when().get("/orders").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } @Test @@ -197,7 +200,7 @@ public void testOrdersWithOrderItemsRest() { // test getting the created order given().accept(ContentType.JSON).when().get("/orders").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId)); + .body("size()", is(1), "[0].id", is(firstCreatedId)); // test getting order by id given().accept(ContentType.JSON).when().get("/orders/" + firstCreatedId).then() @@ -205,7 +208,7 @@ public void testOrdersWithOrderItemsRest() { // test getting order items subprocess String orderItemsId = given().accept(ContentType.JSON).when().get("/orderItems").then().statusCode(200) - .body("$.size()", is(1)).extract().path("[0].id"); + .body("size()", is(1)).extract().path("[0].id"); // test getting order items by id given().accept(ContentType.JSON).when().get("/orderItems/" + orderItemsId).then() @@ -218,7 +221,7 @@ public void testOrdersWithOrderItemsRest() { .get("/orderItems/" + orderItemsId + "/tasks?user=john") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("Verify order")) .extract() .path("[0].id"); @@ -236,11 +239,11 @@ public void testOrdersWithOrderItemsRest() { // get all orders make sure there is zero given().accept(ContentType.JSON).when().get("/orders").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); // get all order items make sure there is zero given().accept(ContentType.JSON).when().get("/orderItems").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } @Test @@ -254,7 +257,7 @@ public void testOrdersWithOrderItemsAbortedRest() { // test getting the created order given().accept(ContentType.JSON).when().get("/orders").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId)); + .body("size()", is(1), "[0].id", is(firstCreatedId)); // test getting order by id given().accept(ContentType.JSON).when().get("/orders/" + firstCreatedId).then() @@ -262,7 +265,7 @@ public void testOrdersWithOrderItemsAbortedRest() { // test getting order items subprocess String orderItemsId = given().accept(ContentType.JSON).when().get("/orderItems").then().statusCode(200) - .body("$.size()", is(1)).extract().path("[0].id"); + .body("size()", is(1)).extract().path("[0].id"); // test getting order items by id given().accept(ContentType.JSON).when().get("/orderItems/" + orderItemsId).then() @@ -275,7 +278,7 @@ public void testOrdersWithOrderItemsAbortedRest() { .get("/orderItems/" + orderItemsId + "/tasks?user=john") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("Verify order")); // test deleting order items @@ -283,11 +286,11 @@ public void testOrdersWithOrderItemsAbortedRest() { // get all orders make sure there is zero given().accept(ContentType.JSON).when().get("/orders").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); // get all order items make sure there is zero given().accept(ContentType.JSON).when().get("/orderItems").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } @Test @@ -301,7 +304,7 @@ public void testCreateAndUpdateOrders() { assertNotNull(id); // get all orders make sure there is one given().accept(ContentType.JSON).when().get("/orders").then().statusCode(200) - .body("$.size()", is(1)); + .body("size()", is(1)); // get order by its custom ID and test given().accept(ContentType.JSON).body(orderPayload).when().get("/orders/{id}", id).then() @@ -318,13 +321,13 @@ public void testCreateAndUpdateOrders() { // get all orders make sure there is one given().accept(ContentType.JSON).when().get("/orders").then().statusCode(200) - .body("$.size()", is(1)); + .body("size()", is(1)); // test deleting order items by custom ID given().accept(ContentType.JSON).when().delete("/orders/{id}", id).then().statusCode(200); // get all orders make sure there is zero given().accept(ContentType.JSON).when().get("/orders").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } } diff --git a/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/PersonProcessIT.java b/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/PersonProcessIT.java index ba6d39c55e..ab15d2c3e8 100644 --- a/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/PersonProcessIT.java +++ b/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/PersonProcessIT.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.examples.demo; diff --git a/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/PersonsRestIT.java b/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/PersonsRestIT.java index ca00f4a9bd..8935e8648f 100644 --- a/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/PersonsRestIT.java +++ b/kogito-springboot-examples/process-springboot-example/src/test/java/org/kie/kogito/examples/demo/PersonsRestIT.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.examples.demo; @@ -27,7 +30,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; @@ -73,7 +76,7 @@ public void testAdultPersonsRest() { // get all persons make sure there is zero given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } @Test @@ -87,7 +90,7 @@ public void testChildPersonsRest() { // test getting the created order given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId)); + .body("size()", is(1), "[0].id", is(firstCreatedId)); // test getting task String taskInfo = given() @@ -96,7 +99,7 @@ public void testChildPersonsRest() { .get("/persons/" + firstCreatedId + "/tasks?user=admin") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("ChildrenHandling")) .extract() .path("[0].id"); @@ -114,7 +117,7 @@ public void testChildPersonsRest() { // get all persons make sure there is zero given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } @Test @@ -128,7 +131,7 @@ public void testChildPersonsRestWithSecurityPolicy() { // test getting the created order given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId)); + .body("size()", is(1), "[0].id", is(firstCreatedId)); // test getting task String taskInfo = given() @@ -137,7 +140,7 @@ public void testChildPersonsRestWithSecurityPolicy() { .get("/persons/" + firstCreatedId + "/tasks?user=admin") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("ChildrenHandling")) .extract() .path("[0].id"); @@ -154,7 +157,7 @@ public void testChildPersonsRestWithSecurityPolicy() { // get all persons make sure there is zero given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } @Test @@ -168,7 +171,7 @@ public void testChildPersonsRestWithSecurityPolicyNotAuthorized() { // test getting the created order given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId)); + .body("size()", is(1), "[0].id", is(firstCreatedId)); // test getting task with wrong user given() @@ -177,7 +180,7 @@ public void testChildPersonsRestWithSecurityPolicyNotAuthorized() { .get("/persons/" + firstCreatedId + "/tasks?user=john") .then() .statusCode(200) - .body("$.size", is(0)); + .body("size()", is(0)); String taskInfo = given() .accept(ContentType.JSON) @@ -185,7 +188,7 @@ public void testChildPersonsRestWithSecurityPolicyNotAuthorized() { .get("/persons/" + firstCreatedId + "/tasks?user=admin") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("ChildrenHandling")) .extract() .path("[0].id"); @@ -213,7 +216,7 @@ public void testChildPersonsRestWithSecurityPolicyNotAuthorized() { // get all persons make sure there is zero given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } @Test @@ -227,7 +230,7 @@ public void testChildPersonsRestWithSecurityPolicyAndLifeCycles() { // test getting the created order given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId)); + .body("size()", is(1), "[0].id", is(firstCreatedId)); // test getting task String taskId = given() @@ -236,7 +239,7 @@ public void testChildPersonsRestWithSecurityPolicyAndLifeCycles() { .get("/persons/" + firstCreatedId + "/tasks?user=admin") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("ChildrenHandling")) .extract() .path("[0].id"); @@ -257,7 +260,7 @@ public void testChildPersonsRestWithSecurityPolicyAndLifeCycles() { // get all persons make sure there is zero given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } // Disabled until KOGITO-1787 is fixed @@ -277,7 +280,7 @@ public void testPersonsRestStartFromUserTask() { // test getting the created order given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId), "[0].person.adult", is(false)); + .body("size()", is(1), "[0].id", is(firstCreatedId), "[0].person.adult", is(false)); // test getting task String taskInfo = given() @@ -286,7 +289,7 @@ public void testPersonsRestStartFromUserTask() { .get("/persons/" + firstCreatedId + "/tasks?user=admin") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("ChildrenHandling")) .extract() .path("[0].id"); @@ -304,7 +307,7 @@ public void testPersonsRestStartFromUserTask() { // get all persons make sure there is zero given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } @Test @@ -321,7 +324,7 @@ public void testChildPersonsRestAbortViaMgmtInterface() { // test getting the created order given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId), "[0].person.adult", is(false)); + .body("size()", is(1), "[0].id", is(firstCreatedId), "[0].person.adult", is(false)); // test getting task given() @@ -330,7 +333,7 @@ public void testChildPersonsRestAbortViaMgmtInterface() { .get("/persons/" + firstCreatedId + "/tasks?user=admin") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("ChildrenHandling")); // abort process instance via management interface @@ -339,7 +342,7 @@ public void testChildPersonsRestAbortViaMgmtInterface() { // get all persons make sure there is zero given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } @Test @@ -356,7 +359,7 @@ public void testChildPersonsRestRetriggerNodeViaMgmtInterface() { // test getting the created order given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId), "[0].person.adult", is(false)); + .body("size()", is(1), "[0].id", is(firstCreatedId), "[0].person.adult", is(false)); // test getting task String taskInfo = given() @@ -365,13 +368,13 @@ public void testChildPersonsRestRetriggerNodeViaMgmtInterface() { .get("/persons/" + firstCreatedId + "/tasks?user=admin") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("ChildrenHandling")) .extract() .path("[0].id"); String nodeInstanceId = given().contentType(ContentType.JSON).accept(ContentType.JSON).when().get("/management/processes/persons/instances/" + firstCreatedId + "/nodeInstances").then() - .statusCode(200).body("$.size()", is(1)).extract().path("[0].nodeInstanceId"); + .statusCode(200).body("size()", is(1)).extract().path("[0].nodeInstanceId"); // retrigger node instance via management interface given().contentType(ContentType.JSON).accept(ContentType.JSON).when().post("/management/processes/persons/instances/" + firstCreatedId + "/nodeInstances/" + nodeInstanceId).then() @@ -379,14 +382,14 @@ public void testChildPersonsRestRetriggerNodeViaMgmtInterface() { taskInfo = given().accept(ContentType.JSON).when().get("/persons/" + firstCreatedId + "/tasks?user=admin").then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("ChildrenHandling")) .extract() .path("[0].id"); String retriggeredNodeInstanceId = given().contentType(ContentType.JSON).accept(ContentType.JSON).when().get("/management/processes/persons/instances/" + firstCreatedId + "/nodeInstances").then() - .statusCode(200).body("$.size()", is(1)).extract().path("[0].nodeInstanceId"); + .statusCode(200).body("size()", is(1)).extract().path("[0].nodeInstanceId"); // since node instance was retriggered it must have different ids assertNotEquals(nodeInstanceId, retriggeredNodeInstanceId); @@ -403,7 +406,7 @@ public void testChildPersonsRestRetriggerNodeViaMgmtInterface() { // get all persons make sure there is zero given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } @Test @@ -420,7 +423,7 @@ public void testChildPersonsRestCancelAndTriggerNodeViaMgmtInterface() { // test getting the created order given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(1), "[0].id", is(firstCreatedId), "[0].person.adult", is(false)); + .body("size()", is(1), "[0].id", is(firstCreatedId), "[0].person.adult", is(false)); // test getting task String taskId = given() @@ -429,13 +432,13 @@ public void testChildPersonsRestCancelAndTriggerNodeViaMgmtInterface() { .get("/persons/" + firstCreatedId + "/tasks?user=admin") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("ChildrenHandling")) .extract() .path("[0].id"); String nodeInstanceId = given().contentType(ContentType.JSON).accept(ContentType.JSON).when().get("/management/processes/persons/instances/" + firstCreatedId + "/nodeInstances").then() - .statusCode(200).body("$.size()", is(1)).extract().path("[0].nodeInstanceId"); + .statusCode(200).body("size()", is(1)).extract().path("[0].nodeInstanceId"); // cancel node instance given().contentType(ContentType.JSON).accept(ContentType.JSON).when().delete("/management/processes/persons/instances/" + firstCreatedId + "/nodeInstances/" + nodeInstanceId).then() @@ -451,14 +454,14 @@ public void testChildPersonsRestCancelAndTriggerNodeViaMgmtInterface() { .get("/persons/" + firstCreatedId + "/tasks?user=admin") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("ChildrenHandling")) .extract() .path("[0].id"); String retriggeredNodeInstanceId = given().contentType(ContentType.JSON).accept(ContentType.JSON).when().get("/management/processes/persons/instances/" + firstCreatedId + "/nodeInstances").then() - .statusCode(200).body("$.size()", is(1)).extract().path("[0].nodeInstanceId"); + .statusCode(200).body("size()", is(1)).extract().path("[0].nodeInstanceId"); // since node instance was retriggered it must have different ids assertNotEquals(nodeInstanceId, retriggeredNodeInstanceId); @@ -475,6 +478,6 @@ public void testChildPersonsRestCancelAndTriggerNodeViaMgmtInterface() { // get all persons make sure there is zero given().accept(ContentType.JSON).when().get("/persons").then().statusCode(200) - .body("$.size()", is(0)); + .body("size()", is(0)); } } diff --git a/kogito-springboot-examples/process-springboot-example/src/test/resources/application.properties b/kogito-springboot-examples/process-springboot-example/src/test/resources/application.properties index 1ee9103dc9..84d10df324 100644 --- a/kogito-springboot-examples/process-springboot-example/src/test/resources/application.properties +++ b/kogito-springboot-examples/process-springboot-example/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 spring.kafka.bootstrap-servers=127.0.0.1:9092 spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer diff --git a/kogito-springboot-examples/process-timer-springboot/README.md b/kogito-springboot-examples/process-timer-springboot/README.md index a990a7b2b8..b812cd080b 100644 --- a/kogito-springboot-examples/process-timer-springboot/README.md +++ b/kogito-springboot-examples/process-timer-springboot/README.md @@ -290,12 +290,6 @@ In all cases replace `{version}` with actual Kogito version to be used (Job Serv After that you can redo the timer queries described above. -## Deploy on OpenShift - -This example can run on OpenShift 4 instance. Use [Kogito operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift) to deploy this example and instantiate also the Jobs service. Kogito operator will take care of configuring this example to successfully connect to the Jobs service. - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the Kogito Operator. - ### Test your application Generated application comes with sample test process that allows you to verify if the application is working as expected. Simply execute following command to try it out diff --git a/kogito-springboot-examples/process-timer-springboot/operator/jobs-service.yaml b/kogito-springboot-examples/process-timer-springboot/operator/jobs-service.yaml deleted file mode 100644 index a402e5cf7d..0000000000 --- a/kogito-springboot-examples/process-timer-springboot/operator/jobs-service.yaml +++ /dev/null @@ -1,25 +0,0 @@ -#uncomment to enable persistence -##Infinispan operator should be pre-installed in namespace -#apiVersion: app.kiegroup.org/v1beta1 -#kind: KogitoInfra -#metadata: -# name: kogito-infinispan-infra -#spec: -# resource: -# apiVersion: infinispan.org/v1 -# kind: Infinispan -#--- -# deploy this service if you wish to enable Jobs Service integration. -# Make sure to follow "Use Kogito Job Service as external timer service" in the README -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoSupportingService -metadata: - name: jobs-service -spec: - # Type of supporting service - serviceType: JobsService - replicas: 1 - #uncomment to enable persistence -# infra: -# - kogito-infinispan-infra - diff --git a/kogito-springboot-examples/process-timer-springboot/operator/process-timer-springboot.yaml b/kogito-springboot-examples/process-timer-springboot/operator/process-timer-springboot.yaml deleted file mode 100644 index fa5d27af25..0000000000 --- a/kogito-springboot-examples/process-timer-springboot/operator/process-timer-springboot.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-timer-springboot -spec: - type: RemoteSource - runtime: springboot - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/process-timer-springboot - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-timer-springboot -spec: - runtime: springboot \ No newline at end of file diff --git a/kogito-springboot-examples/process-timer-springboot/pom.xml b/kogito-springboot-examples/process-timer-springboot/pom.xml index 00b0b708b6..83e6be552d 100644 --- a/kogito-springboot-examples/process-timer-springboot/pom.xml +++ b/kogito-springboot-examples/process-timer-springboot/pom.xml @@ -1,10 +1,30 @@ + 4.0.0 org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-timer-springboot @@ -12,8 +32,8 @@ Kogito with timers - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -41,7 +61,7 @@ jobs-service - org.kie.kogito + org.kie kogito-addons-springboot-jobs-management @@ -54,31 +74,31 @@ spring-boot-starter-actuator - + - org.kie.kogito - kogito-processes-spring-boot-starter + org.jbpm + jbpm-spring-boot-starter - org.kie.kogito + org.kie kogito-addons-springboot-jobs-management - org.kie.kogito - kogito-addons-springboot-process-management + org.kie + kie-addons-springboot-process-management
diff --git a/kogito-springboot-examples/process-timer-springboot/src/main/java/org/kie/kogito/tests/KogitoApplication.java b/kogito-springboot-examples/process-timer-springboot/src/main/java/org/kie/kogito/tests/KogitoApplication.java index 87059ca4cc..b6d5dbe492 100644 --- a/kogito-springboot-examples/process-timer-springboot/src/main/java/org/kie/kogito/tests/KogitoApplication.java +++ b/kogito-springboot-examples/process-timer-springboot/src/main/java/org/kie/kogito/tests/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.tests; diff --git a/kogito-springboot-examples/process-timer-springboot/src/main/resources/application.properties b/kogito-springboot-examples/process-timer-springboot/src/main/resources/application.properties index 6e61592e8d..4f76179c36 100644 --- a/kogito-springboot-examples/process-timer-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/process-timer-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 kogito.jobs-service.url=http://localhost:8086 diff --git a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/README.md b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/README.md index 7039a5ebb3..8a94a44b37 100644 --- a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/README.md +++ b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/README.md @@ -240,7 +240,3 @@ You should see a similar message after performing the second line approval after ```json {"id":"f498de73-e02d-4829-905e-2f768479a4f1", "approver":"admin","firstLineApproval":true, "secondLineApproval":true,"traveller":{"firstName":"John","lastName":"Doe","email":"jon.doe@example.com","nationality":"American","address":{"street":"main street","city":"Boston","zipCode":"10005","country":"US"}}} ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/operator/process-usertasks-lifecycle-springboot.yaml b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/operator/process-usertasks-lifecycle-springboot.yaml deleted file mode 100644 index 8f072e366a..0000000000 --- a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/operator/process-usertasks-lifecycle-springboot.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-usertasks-lifecycle-springboot -spec: - type: RemoteSource - runtime: springboot - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/process-usertasks-custom-lifecycle-springboot - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-usertasks-lifecycle-springboot -spec: - runtime: springboot \ No newline at end of file diff --git a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/pom.xml b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/pom.xml index 8a3914d269..f09999dfed 100644 --- a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/pom.xml +++ b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/pom.xml @@ -1,4 +1,24 @@ + @@ -6,7 +26,7 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-usertasks-custom-lifecycle-springboot @@ -14,8 +34,8 @@ Kogito usertasks orchestration with custom life cycle - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -43,10 +63,10 @@ spring-boot-starter-actuator
- + - org.kie.kogito - kogito-processes-spring-boot-starter + org.jbpm + jbpm-spring-boot-starter org.kie.kogito @@ -54,8 +74,8 @@ - org.kie.kogito - kogito-addons-springboot-task-management + org.jbpm + jbpm-addons-springboot-task-management @@ -70,12 +90,12 @@ notification - org.kie.kogito - kogito-addons-springboot-mail + org.jbpm + jbpm-addons-springboot-mail - org.kie.kogito - kogito-addons-springboot-task-notification + org.jbpm + jbpm-addons-springboot-task-notification org.springframework.kafka @@ -87,15 +107,15 @@ persistence - org.kie.kogito - kogito-addons-springboot-persistence-infinispan + org.kie + kie-addons-springboot-persistence-infinispan org.infinispan - infinispan-spring-boot-starter-remote + infinispan-spring-boot3-starter-remote - org.kie.kogito + org.kie kogito-addons-springboot-jobs-management diff --git a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/Address.java b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/Address.java index d808334384..662dfa9b9f 100644 --- a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/Address.java +++ b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/Address.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.acme.travels; diff --git a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/Traveller.java b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/Traveller.java index cf790d4664..c24685803d 100644 --- a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/Traveller.java +++ b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/Traveller.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.acme.travels; diff --git a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/config/CustomWorkItemHandlerConfig.java b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/config/CustomWorkItemHandlerConfig.java index 665053be93..3021d7685b 100644 --- a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/config/CustomWorkItemHandlerConfig.java +++ b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/config/CustomWorkItemHandlerConfig.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.acme.travels.config; diff --git a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/usertasks/CompleteStartedOnly.java b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/usertasks/CompleteStartedOnly.java index fc3d21d823..7465bf0a4f 100644 --- a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/usertasks/CompleteStartedOnly.java +++ b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/usertasks/CompleteStartedOnly.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.acme.travels.usertasks; diff --git a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/usertasks/CustomHumanTaskLifeCycle.java b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/usertasks/CustomHumanTaskLifeCycle.java index 7098623d8d..d5c0715617 100644 --- a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/usertasks/CustomHumanTaskLifeCycle.java +++ b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/usertasks/CustomHumanTaskLifeCycle.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.acme.travels.usertasks; @@ -20,7 +23,7 @@ import java.util.Map; import org.jbpm.process.instance.impl.humantask.BaseHumanTaskLifeCycle; -import org.jbpm.process.instance.impl.humantask.HumanTaskWorkItemImpl; +import org.jbpm.process.instance.impl.humantask.InternalHumanTaskWorkItem; import org.jbpm.process.instance.impl.humantask.phases.Claim; import org.jbpm.process.instance.impl.humantask.phases.Release; import org.jbpm.process.instance.impl.humantask.phases.Skip; @@ -101,7 +104,7 @@ public Map transitionTo(KogitoWorkItem workItem, KogitoWorkItemM logger.debug("Transition method invoked for work item {} to transition to {}, currently in phase {} and status {}", workItem.getStringId(), transition.phase(), workItem.getPhaseId(), workItem.getPhaseStatus()); - HumanTaskWorkItemImpl humanTaskWorkItem = (HumanTaskWorkItemImpl) workItem; + InternalHumanTaskWorkItem humanTaskWorkItem = (InternalHumanTaskWorkItem) workItem; LifeCyclePhase targetPhase = phases.get(transition.phase()); if (targetPhase == null) { @@ -141,7 +144,6 @@ public Map transitionTo(KogitoWorkItem workItem, KogitoWorkItemM @Override public Map data(KogitoWorkItem workItem) { - - return ((HumanTaskWorkItemImpl) workItem).getResults(); + return ((InternalHumanTaskWorkItem) workItem).getResults(); } } diff --git a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/usertasks/Start.java b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/usertasks/Start.java index 798a3359d7..7a5199de1c 100644 --- a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/usertasks/Start.java +++ b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/acme/travels/usertasks/Start.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.acme.travels.usertasks; diff --git a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.java b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.java index 7b2daaca72..fc27bd8647 100644 --- a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.java +++ b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.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.tests; diff --git a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/resources/application.properties b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/resources/application.properties index badeb6ba9f..48fe09b748 100644 --- a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/process-usertasks-custom-lifecycle-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 infinispan.remote.server-list=127.0.0.1:11222 diff --git a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/test/java/org/acme/travels/custom/lifecycle/springboot/ApprovalsProcessTest.java b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/test/java/org/acme/travels/custom/lifecycle/springboot/ApprovalsProcessTest.java index b34a2db34d..4b5af8bfd8 100644 --- a/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/test/java/org/acme/travels/custom/lifecycle/springboot/ApprovalsProcessTest.java +++ b/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/src/test/java/org/acme/travels/custom/lifecycle/springboot/ApprovalsProcessTest.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.acme.travels.custom.lifecycle.springboot; diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/README.md b/kogito-springboot-examples/process-usertasks-springboot-with-console/README.md deleted file mode 100644 index 09a1d7dec7..0000000000 --- a/kogito-springboot-examples/process-usertasks-springboot-with-console/README.md +++ /dev/null @@ -1,233 +0,0 @@ -# Process user task orchestration - -## Description - -A quickstart project shows very typical user task orchestration. It comes with two tasks assigned -to human actors via groups assignments - `managers`. So essentially anyone who is a member of that -group can act on the tasks. Though this example applies four eye principle which essentially means -that user who approved first task cannot approve second one. So there must be always at least two -distinct manager involved. - -> **_NOTE:_** This example uses keycloak authentication to enable security only in the consoles and not in runtime. - -This example shows - -* working with user tasks -* four eye principle with user tasks - - -

- -* Diagram Properties (top) -

- -* Diagram Properties (bottom) -

- -* First Line Approval (top) -

- -* First Line Approval (bottom) -

- -* First Line Approval (Assignments) -

- -* Second Line Approval -

- -* Second Line Approval (Assignments) -

- -## Build and run - -### Prerequisites - -You will need: - - Java 11+ installed - - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed -### Starting the Kogito and Infrastructure Services - -This quickstart provides a docker compose template that starts all the required services. This setup ensures that all services are connected with a default configuration. - -

- -You should start all the services before you execute any of the **Approvals** example, to do that please execute: - -For Linux and MacOS: - -1. Open a Terminal -2. Go to the process-usertasks-springboot-with-console folder at kogito-examples - -```bash -cd /docker-compose -``` - -3. Run the ```startServices.sh``` script - -```bash -sh ./startServices.sh -``` - -Once all services bootstrap, the following ports will be assigned on your local machine: - -- Infinispan: 11222 -- Kafka: 9092 -- Data Index: 8180 -- Management Console: 8280 -- Task Console: 8380 -- Keycloak: 8480 -- process-usertasks-springboot-with-console: 8080 - -> **_NOTE:_** This step requires the project to be compiled, please consider running a ```mvn clean install -Pcontainer``` command on the project root before running the ```startServices.sh``` script for the first time or any time you modify the project. ```-Pcontainer``` will create a local docker image of the example and will be run by docker-compose with all required services. - -Once started you can simply stop all services by executing the ```docker-compose stop```. - -All created containers can be removed by executing the ```docker-compose rm```. - -### Using Keycloak as Authentication Server - -In this Quickstart we'll be using [Keycloak](https://www.keycloak.org/) as *Authentication Server*. It will be started as a part of the project *Infrastructure Services*, you can check the configuration on the project [docker-compose.yml](docker-compose/docker-compose.yml) in [docker-compose](docker-compose) folder. - -It will install the *Kogito Realm* that comes with a predefined set of users: -| Login | Password | Roles | -| ------------- | ---------- | ------------------- | -| admin | admin | *admin*, *managers* | -| alice | alice | *user* | -| jdoe | jdoe | *managers* | - -Once Keycloak is started, you should be able to access your *Keycloak Server* at [localhost:8480/auth](http://localhost:8480/auth) with *admin* user. - -> **_NOTE:_** If you don't want to run the example inside docker compose. You can stop the service container by running below commands. - - docker stop process-usertasks-springboot-with-console - -### Compile and Run in Local Dev Mode - -```sh -mvn clean compile spring-boot:run -``` - - -### Package and Run using uberjar - -```sh -mvn clean package -``` - -To run the generated native executable, generated in `target/`, execute - -```sh -java -jar target/process-usertasks-springboot-with-console.jar -``` - -### OpenAPI (Swagger) documentation -[Specification at swagger.io](https://swagger.io/docs/specification/about/) - -You can take a look at the [OpenAPI definition](http://localhost:8080/v3/api-docs) - automatically generated and included in this service - to determine all available operations exposed by this service. For easy readability you can visualize the OpenAPI definition file using a UI tool like for example available [Swagger UI](https://editor.swagger.io). - -In addition, various clients to interact with this service can be easily generated using this OpenAPI definition. - - -### Submit a request to start new approval - -To make use of this application it is as simple as putting a sending request to `http://localhost:8080/approvals` with following content - -```json -{ - "traveller" : { - "firstName" : "John", - "lastName" : "Doe", - "email" : "jon.doe@example.com", - "nationality" : "American", - "address" : { - "street" : "main street", - "city" : "Boston", - "zipCode" : "10005", - "country" : "US" } - } -} -``` - -Complete curl command can be found below: - -```sh -curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' -d '{"traveller" : { "firstName" : "John", "lastName" : "Doe", "email" : "jon.doe@example.com", "nationality" : "American","address" : { "street" : "main street", "city" : "Boston", "zipCode" : "10005", "country" : "US" }}}' http://localhost:8080/approvals -``` - -### Show active process instances at Kogito Management Console - -To access the Kogito Management Console just open your browser and navigate to ``http://localhost:8280``. You'll be redirected to the *Keycloak* log in page. - -

- -

- -Once there, log in using any of the users specified in the [Using Keycloak as Authentication Server](#using-keycloak-as-authentication-server) - -

- -

- -> **_NOTE:_** For more information about how to work with Kogito Management Console, please refer to the [Kogito Management Console Documentation](https://docs.jboss.org/kogito/release/latest/html_single/#con-management-console_kogito-developing-process-services) page. - -Check the process instance details to see where is the execution path - -

- -

- -### Execute 'First Line approval' task at Kogito Task Console - -To access the Kogito Task Console just open your browser and navigate to ``http://localhost:8380``. You'll be redirected to the *Keycloak* log in page. - -

- -

- -Ensure you are logged as a user with role manager to be able to see the First Line approval. - -

- -

- -> **_NOTE:_** For more information about how to work with Kogito Task Console, please refer to the [Kogito Task Console Documentation](https://docs.jboss.org/kogito/release/latest/html_single/#con-task-console_kogito-developing-process-services) page. - -Access to 'First Line approval' task and complete - -

- -

- -Check the process instance details at Kogito Management Console to see the execution path reflects the completed task - -

- -

- -### Execute 'Second Line approval' task at Kogito Task Console - -Access the Kogito Task Console and ensure you are logged as a user with role managers different from the one -executed the First Line approval to be able to see the Second Line approval -following the second eye principle. - -

- -

- -Access to 'Second Line approval' task and complete - -

- -

- -Check the process instance details at Kogito Management Console, and verify the execution path is reflected in the diagram. - -

- -

- -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docker-compose/.gitignore b/kogito-springboot-examples/process-usertasks-springboot-with-console/docker-compose/.gitignore deleted file mode 100644 index b6632dbda5..0000000000 --- a/kogito-springboot-examples/process-usertasks-springboot-with-console/docker-compose/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.env -svg/ -persistence/ \ No newline at end of file diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docker-compose/README.md b/kogito-springboot-examples/process-usertasks-springboot-with-console/docker-compose/README.md deleted file mode 100644 index 407b5072fb..0000000000 --- a/kogito-springboot-examples/process-usertasks-springboot-with-console/docker-compose/README.md +++ /dev/null @@ -1,58 +0,0 @@ -## Kogito and Infrastructure services - -To allow a quick setup of all services required to run this demo, we provide a docker compose template that starts the following services: -- Infinispan -- Kafka -- Kogito Data Index -- Kogito Management Console -- Kogito Task Console -- Keycloak -- process-usertasks-springboot-with-console - -In order to use it, please ensure you have Docker Compose installed on your machine, otherwise follow the instructions available - in [here](https://docs.docker.com/compose/install/). - -### Starting required services - - Before you execute the **Hiring** example, start all the services by following these steps: - - For Linux and MacOS: - - ./startServices.sh - - For Windows: - - Create a .env file with the content containing the version of the Kogito images you would like to run, example: - - KOGITO_VERSION=1.0.0 - - Then run - - docker-compose up - - Once all services bootstrap, the following ports will be assigned on your local machine: - - Infinispan: 11222 - - Kafka: 9092 - - Data Index: 8180 - - Management Console: 8280 - - Task Console: 8380 - - Keycloak: 8480 - - process-usertasks-springboot-with-console: 8080 - -> **_NOTE:_** If you don't want to run the example inside docker compose. You can stop the container by running below commands. - - docker stop process-usertasks-springboot-with-console - -### Stopping and removing volume data - - To stop all services, simply run: - - docker-compose stop - - It is also recommended to remove any of stopped containers by running: - - docker-compose rm - - For more details please check the Docker Compose documentation. - - docker-compose --help diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docker-compose/docker-compose.yml b/kogito-springboot-examples/process-usertasks-springboot-with-console/docker-compose/docker-compose.yml deleted file mode 100755 index 5385230ccd..0000000000 --- a/kogito-springboot-examples/process-usertasks-springboot-with-console/docker-compose/docker-compose.yml +++ /dev/null @@ -1,131 +0,0 @@ -version: '2.1' - -services: - - infinispan: - image: infinispan/server:14.0.4.Final - container_name: infinispan - ports: - - "11222:11222" - command: "-c infinispan-demo.xml" - volumes: - - ./infinispan/infinispan.xml:/opt/infinispan/server/conf/infinispan-demo.xml:z - healthcheck: - test: [ "CMD", "curl", "-f", "http://localhost:11222/rest/v2/cache-managers/default/health/status" ] - interval: 1s - timeout: 30s - retries: 50 - - zookeeper: - container_name: zookeeper - image: strimzi/kafka:0.20.1-kafka-2.6.0 - command: [ - "sh", "-c", - "bin/zookeeper-server-start.sh config/zookeeper.properties" - ] - ports: - - "2181:2181" - environment: - LOG_DIR: "/tmp/logs" - - kafka: - image: strimzi/kafka:0.20.1-kafka-2.6.0 - container_name: kafka - command: [ - "sh", "-c", - "bin/kafka-server-start.sh config/server.properties --override inter.broker.listener.name=$${KAFKA_INTER_BROKER_LISTENER_NAME} --override listener.security.protocol.map=$${KAFKA_LISTENER_SECURITY_PROTOCOL_MAP} --override listeners=$${KAFKA_LISTENERS} --override advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS} --override zookeeper.connect=$${KAFKA_ZOOKEEPER_CONNECT}" - ] - depends_on: - - zookeeper - ports: - - "9092:9092" - environment: - KAFKA_BROKER_ID: 0 - KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 - KAFKA_LISTENERS: INTERNAL://kafka:29092,EXTERNAL://kafka:9092 - KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:29092,EXTERNAL://localhost:9092 - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT - KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL - KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true" - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 - LOG_DIR: "/tmp/logs" - - keycloak: - container_name: keycloak - image: quay.io/keycloak/keycloak:legacy - ports: - - "8480:8080" - volumes: - - ./keycloak/kogito-realm.json:/tmp/kogito-realm.json - healthcheck: - test: [ "CMD", "curl", "-f", "http://localhost:8080/auth/realms/kogito" ] - interval: 1s - timeout: 1s - retries: 50 - environment: - KEYCLOAK_USER: admin - KEYCLOAK_PASSWORD: admin - KEYCLOAK_IMPORT: /tmp/kogito-realm.json - - data-index: - container_name: data-index - image: quay.io/kiegroup/kogito-data-index-infinispan:${KOGITO_VERSION} - ports: - - "8180:8080" - depends_on: - kafka: - condition: service_started - infinispan: - condition: service_healthy - volumes: - - ./persistence/:/home/kogito/data/protobufs/ - environment: - QUARKUS_HTTP_CORS_ORIGINS: "/.*/" - QUARKUS_INFINISPAN_CLIENT_HOSTS: infinispan:11222 - QUARKUS_INFINISPAN_CLIENT_USE_AUTH: "false" - KAFKA_BOOTSTRAP_SERVERS: kafka:29092 - KOGITO_DATA_INDEX_PROPS: -Dkogito.protobuf.folder=/home/kogito/data/protobufs/ - - management-console: - container_name: management-console - image: quay.io/kiegroup/kogito-management-console:${KOGITO_VERSION} - ports: - - 8280:8080 - depends_on: - data-index: - condition: service_started - keycloak: - condition: service_healthy - volumes: - - ./svg/:/home/kogito/data/svg/ - environment: - KOGITO_DATAINDEX_HTTP_URL: http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8180/graphql - KOGITO_MANAGEMENT_CONSOLE_PROPS: -Dkogito.consoles.keycloak.config.url=http://localhost:8480/auth -Dkogito.consoles.keycloak.config.health-check-url=http://localhost:8480/auth/realms/kogito/.well-known/openid-configuration -Dkogito.svg.folder.path=/home/kogito/data/svg - - task-console: - container_name: task-console - image: quay.io/kiegroup/kogito-task-console:${KOGITO_VERSION} - ports: - - 8380:8080 - depends_on: - data-index: - condition: service_started - keycloak: - condition: service_healthy - environment: - KOGITO_DATAINDEX_HTTP_URL: http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8180/graphql - KOGITO_TASK_CONSOLE_PROPS: -Dkogito.consoles.keycloak.config.url=http://localhost:8480/auth -Dkogito.consoles.keycloak.config.health-check-url=http://localhost:8480/auth/realms/kogito/.well-known/openid-configuration - - process-usertasks-springboot-with-console: - container_name: process-usertasks-springboot-with-console - image: org.kie.kogito.examples/process-usertasks-springboot-with-console:1.0 - ports: - - 8080:8080 - depends_on: - infinispan: - condition: service_healthy - data-index: - condition: service_started - environment: - INFINISPAN_REMOTE_SERVER_LIST: infinispan:11222 - SPRING_KAFKA_BOOTSTRAP_SERVERS: kafka:29092 \ No newline at end of file diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docker-compose/infinispan/infinispan.xml b/kogito-springboot-examples/process-usertasks-springboot-with-console/docker-compose/infinispan/infinispan.xml deleted file mode 100755 index 4d594bfc24..0000000000 --- a/kogito-springboot-examples/process-usertasks-springboot-with-console/docker-compose/infinispan/infinispan.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docker-compose/keycloak/kogito-realm.json b/kogito-springboot-examples/process-usertasks-springboot-with-console/docker-compose/keycloak/kogito-realm.json deleted file mode 100644 index fd3cdc0942..0000000000 --- a/kogito-springboot-examples/process-usertasks-springboot-with-console/docker-compose/keycloak/kogito-realm.json +++ /dev/null @@ -1,2242 +0,0 @@ -{ - "realm": "kogito", - "notBefore": 0, - "revokeRefreshToken": false, - "refreshTokenMaxReuse": 0, - "accessTokenLifespan": 300, - "accessTokenLifespanForImplicitFlow": 900, - "ssoSessionIdleTimeout": 1800, - "ssoSessionMaxLifespan": 36000, - "ssoSessionIdleTimeoutRememberMe": 0, - "ssoSessionMaxLifespanRememberMe": 0, - "offlineSessionIdleTimeout": 2592000, - "offlineSessionMaxLifespanEnabled": false, - "offlineSessionMaxLifespan": 5184000, - "accessCodeLifespan": 60, - "accessCodeLifespanUserAction": 300, - "accessCodeLifespanLogin": 1800, - "actionTokenGeneratedByAdminLifespan": 43200, - "actionTokenGeneratedByUserLifespan": 300, - "enabled": true, - "sslRequired": "external", - "registrationAllowed": false, - "registrationEmailAsUsername": false, - "rememberMe": false, - "verifyEmail": false, - "loginWithEmailAllowed": true, - "duplicateEmailsAllowed": false, - "resetPasswordAllowed": false, - "editUsernameAllowed": false, - "bruteForceProtected": false, - "permanentLockout": false, - "maxFailureWaitSeconds": 900, - "minimumQuickLoginWaitSeconds": 60, - "waitIncrementSeconds": 60, - "quickLoginCheckMilliSeconds": 1000, - "maxDeltaTimeSeconds": 43200, - "failureFactor": 30, - "roles": { - "realm": [ - { - "name": "managers", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - }, - { - "name": "uma_authorization", - "description": "${role_uma_authorization}", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - }, - { - "name": "admin", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - }, - { - "name": "user", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - }, - { - "name": "HR", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - }, - { - "name": "IT", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - }, - { - "name": "offline_access", - "description": "${role_offline-access}", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - } - ], - "client": { - "realm-management": [ - { - "name": "manage-identity-providers", - "description": "${role_manage-identity-providers}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "impersonation", - "description": "${role_impersonation}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "view-identity-providers", - "description": "${role_view-identity-providers}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "view-realm", - "description": "${role_view-realm}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "query-users", - "description": "${role_query-users}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "manage-clients", - "description": "${role_manage-clients}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "manage-events", - "description": "${role_manage-events}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "realm-admin", - "description": "${role_realm-admin}", - "composite": true, - "composites": { - "client": { - "realm-management": [ - "impersonation", - "manage-identity-providers", - "view-identity-providers", - "view-realm", - "query-users", - "manage-clients", - "manage-events", - "manage-realm", - "view-authorization", - "manage-authorization", - "view-users", - "create-client", - "query-clients", - "query-groups", - "manage-users", - "view-clients", - "view-events", - "query-realms" - ] - } - }, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "manage-realm", - "description": "${role_manage-realm}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "view-authorization", - "description": "${role_view-authorization}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "manage-authorization", - "description": "${role_manage-authorization}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "create-client", - "description": "${role_create-client}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "view-users", - "description": "${role_view-users}", - "composite": true, - "composites": { - "client": { - "realm-management": [ - "query-groups", - "query-users" - ] - } - }, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "query-clients", - "description": "${role_query-clients}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "query-groups", - "description": "${role_query-groups}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "manage-users", - "description": "${role_manage-users}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "view-clients", - "description": "${role_view-clients}", - "composite": true, - "composites": { - "client": { - "realm-management": [ - "query-clients" - ] - } - }, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "view-events", - "description": "${role_view-events}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "query-realms", - "description": "${role_query-realms}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - } - ], - "security-admin-console": [], - "admin-cli": [], - "kogito-service": [ - { - "name": "uma_protection", - "composite": false, - "clientRole": true, - "containerId": "0ac5df91-e044-4051-bd03-106a3a5fb9cc", - "attributes": {} - } - ], - "broker": [ - { - "name": "read-token", - "description": "${role_read-token}", - "composite": false, - "clientRole": true, - "containerId": "53d4fe53-a039-471e-886a-28eddc950e95", - "attributes": {} - } - ], - "account": [ - { - "name": "view-profile", - "description": "${role_view-profile}", - "composite": false, - "clientRole": true, - "containerId": "e55e1234-38fa-432d-8d90-39f5e024688d", - "attributes": {} - }, - { - "name": "manage-account", - "description": "${role_manage-account}", - "composite": true, - "composites": { - "client": { - "account": [ - "manage-account-links" - ] - } - }, - "clientRole": true, - "containerId": "e55e1234-38fa-432d-8d90-39f5e024688d", - "attributes": {} - }, - { - "name": "manage-account-links", - "description": "${role_manage-account-links}", - "composite": false, - "clientRole": true, - "containerId": "e55e1234-38fa-432d-8d90-39f5e024688d", - "attributes": {} - } - ] - } - }, - "groups": [], - "defaultRoles": [ - "uma_authorization", - "offline_access" - ], - "requiredCredentials": [ - "password" - ], - "otpPolicyType": "totp", - "otpPolicyAlgorithm": "HmacSHA1", - "otpPolicyInitialCounter": 0, - "otpPolicyDigits": 6, - "otpPolicyLookAheadWindow": 1, - "otpPolicyPeriod": 30, - "otpSupportedApplications": [ - "FreeOTP", - "Google Authenticator" - ], - "scopeMappings": [ - { - "clientScope": "offline_access", - "roles": [ - "offline_access" - ] - } - ], - "clients": [ - { - "clientId": "account", - "name": "${client_account}", - "baseUrl": "/auth/realms/kogito/account", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "0136c3ef-0dfd-4b13-a6d0-2c8b6358edec", - "defaultRoles": [ - "view-profile", - "manage-account" - ], - "redirectUris": [ - "/auth/realms/kogito/account/*" - ], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "clientId": "admin-cli", - "name": "${client_admin-cli}", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "a951803a-79c7-46a6-8197-e32835286971", - "redirectUris": [], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": false, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": true, - "serviceAccountsEnabled": false, - "publicClient": true, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "clientId": "broker", - "name": "${client_broker}", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "e1f7edd7-e15c-43b4-8736-ff8204d16836", - "redirectUris": [], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "clientId": "kogito-frontend", - "rootUrl": "http://localhost:8082", - "adminUrl": "http://localhost:8082", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "secret", - "redirectUris": [ - "http://localhost:8082/*" - ], - "webOrigins": [ - "http://localhost:8082" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": true, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": { - "saml.assertion.signature": "false", - "saml.force.post.binding": "false", - "saml.multivalued.roles": "false", - "saml.encrypt": "false", - "saml.server.signature": "false", - "saml.server.signature.keyinfo.ext": "false", - "exclude.session.state.from.auth.response": "false", - "saml_force_name_id_format": "false", - "saml.client.signature": "false", - "tls.client.certificate.bound.access.tokens": "false", - "saml.authnstatement": "false", - "display.on.consent.screen": "false", - "saml.onetimeuse.condition": "false" - }, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ], - "access": { - "view": true, - "configure": true, - "manage": true - } - }, - { - "clientId": "kogito-app", - "rootUrl": "http://localhost:8080", - "adminUrl": "http://localhost:8080", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "secret", - "redirectUris": [ - "http://localhost:8080/*" - ], - "webOrigins": [ - "*" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": true, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": { - "saml.assertion.signature": "false", - "saml.force.post.binding": "false", - "saml.multivalued.roles": "false", - "saml.encrypt": "false", - "saml.server.signature": "false", - "saml.server.signature.keyinfo.ext": "false", - "exclude.session.state.from.auth.response": "false", - "saml_force_name_id_format": "false", - "saml.client.signature": "false", - "tls.client.certificate.bound.access.tokens": "false", - "saml.authnstatement": "false", - "display.on.consent.screen": "false", - "saml.onetimeuse.condition": "false" - }, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ], - "access": { - "view": true, - "configure": true, - "manage": true - } - }, - { - "clientId": "kogito-service", - "rootUrl": "", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "secret", - "redirectUris": [ - "*" - ], - "webOrigins": [ - "*" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": true, - "serviceAccountsEnabled": true, - "authorizationServicesEnabled": true, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "protocolMappers": [ - { - "name": "Client ID", - "protocol": "openid-connect", - "protocolMapper": "oidc-usersessionmodel-note-mapper", - "consentRequired": false, - "config": { - "user.session.note": "clientId", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "clientId", - "jsonType.label": "String" - } - }, - { - "name": "Client IP Address", - "protocol": "openid-connect", - "protocolMapper": "oidc-usersessionmodel-note-mapper", - "consentRequired": false, - "config": { - "user.session.note": "clientAddress", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "clientAddress", - "jsonType.label": "String" - } - }, - { - "name": "Client Host", - "protocol": "openid-connect", - "protocolMapper": "oidc-usersessionmodel-note-mapper", - "consentRequired": false, - "config": { - "user.session.note": "clientHost", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "clientHost", - "jsonType.label": "String" - } - } - ], - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ], - "authorizationSettings": { - "allowRemoteResourceManagement": true, - "policyEnforcementMode": "ENFORCING", - "resources": [ - { - "name": "User Resource", - "ownerManagedAccess": false, - "attributes": {}, - "_id": "df1b74a9-3f10-499d-a581-368de48e512b", - "uris": [ - "/api/users/*" - ] - }, - { - "name": "Administration Resource", - "ownerManagedAccess": false, - "attributes": {}, - "_id": "7124e2f1-e6dc-44b4-87ab-24b010090b97", - "uris": [ - "/api/admin/*" - ] - } - ], - "policies": [ - { - "name": "Any User Policy", - "description": "Any user granted with the user role can access something", - "type": "role", - "logic": "POSITIVE", - "decisionStrategy": "UNANIMOUS", - "config": { - "roles": "[{\"id\":\"user\",\"required\":false}]" - } - }, - { - "name": "Only Administrators", - "description": "Only administrators can access", - "type": "role", - "logic": "POSITIVE", - "decisionStrategy": "UNANIMOUS", - "config": { - "roles": "[{\"id\":\"admin\",\"required\":false}]" - } - }, - { - "name": "User Resource Permission", - "type": "resource", - "logic": "POSITIVE", - "decisionStrategy": "UNANIMOUS", - "config": { - "resources": "[\"User Resource\"]", - "applyPolicies": "[\"Any User Policy\"]" - } - }, - { - "name": "Administration Resource Permission", - "type": "resource", - "logic": "POSITIVE", - "decisionStrategy": "UNANIMOUS", - "config": { - "resources": "[\"Administration Resource\"]", - "applyPolicies": "[\"Only Administrators\"]" - } - } - ], - "scopes": [], - "decisionStrategy": "UNANIMOUS" - } - }, - { - "clientId": "kogito-console-react", - "rootUrl": "http://localhost:9000", - "adminUrl": "http://localhost:9000/", - "baseUrl": "http://localhost:9000/", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "**********", - "redirectUris": [ - "http://localhost:9000/*" - ], - "webOrigins": [ - "*" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": true, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": { - "saml.assertion.signature": "false", - "saml.force.post.binding": "false", - "saml.multivalued.roles": "false", - "saml.encrypt": "false", - "saml.server.signature": "false", - "saml.server.signature.keyinfo.ext": "false", - "exclude.session.state.from.auth.response": "false", - "saml_force_name_id_format": "false", - "saml.client.signature": "false", - "tls.client.certificate.bound.access.tokens": "false", - "saml.authnstatement": "false", - "display.on.consent.screen": "false", - "saml.onetimeuse.condition": "false" - }, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "clientId": "kogito-console-quarkus", - "rootUrl": "http://localhost:8380", - "adminUrl": "http://localhost:8380/", - "baseUrl": "http://localhost:8380/", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "**********", - "redirectUris": [ - "http://localhost:8380/*", - "http://localhost:8280/*" - ], - "webOrigins": [ - "*" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": true, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": { - "saml.assertion.signature": "false", - "saml.force.post.binding": "false", - "saml.multivalued.roles": "false", - "saml.encrypt": "false", - "saml.server.signature": "false", - "saml.server.signature.keyinfo.ext": "false", - "exclude.session.state.from.auth.response": "false", - "saml_force_name_id_format": "false", - "saml.client.signature": "false", - "tls.client.certificate.bound.access.tokens": "false", - "saml.authnstatement": "false", - "display.on.consent.screen": "false", - "saml.onetimeuse.condition": "false" - }, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "protocolMappers": [ - { - "name": "groups", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-realm-role-mapper", - "consentRequired": false, - "config": { - "multivalued": "true", - "user.attribute": "foo", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "groups", - "jsonType.label": "String" - } - } - ], - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "clientId": "kogito-jobs-service", - "rootUrl": "http://localhost:8080", - "adminUrl": "http://localhost:8080", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "secret", - "redirectUris": [ - "http://localhost:8080/*" - ], - "webOrigins": [ - "http://localhost:8080" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": true, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": { - "saml.assertion.signature": "false", - "saml.force.post.binding": "false", - "saml.multivalued.roles": "false", - "saml.encrypt": "false", - "saml.server.signature": "false", - "saml.server.signature.keyinfo.ext": "false", - "exclude.session.state.from.auth.response": "false", - "saml_force_name_id_format": "false", - "saml.client.signature": "false", - "tls.client.certificate.bound.access.tokens": "false", - "saml.authnstatement": "false", - "display.on.consent.screen": "false", - "saml.onetimeuse.condition": "false" - }, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ], - "access": { - "view": true, - "configure": true, - "manage": true - } - }, - { - "clientId": "realm-management", - "name": "${client_realm-management}", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "c41b709a-a012-4c69-89d7-4f926dba0619", - "redirectUris": [], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": true, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "clientId": "security-admin-console", - "name": "${client_security-admin-console}", - "baseUrl": "/auth/admin/kogito/console/index.html", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "e571b211-2550-475d-b87f-116ff54091ee", - "redirectUris": [ - "/auth/admin/kogito/console/*" - ], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": true, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "protocolMappers": [ - { - "name": "locale", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "locale", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "locale", - "jsonType.label": "String" - } - } - ], - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - } - ], - "clientScopes": [ - { - "name": "address", - "description": "OpenID Connect built-in scope: address", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "true", - "consent.screen.text": "${addressScopeConsentText}" - }, - "protocolMappers": [ - { - "name": "address", - "protocol": "openid-connect", - "protocolMapper": "oidc-address-mapper", - "consentRequired": false, - "config": { - "user.attribute.formatted": "formatted", - "user.attribute.country": "country", - "user.attribute.postal_code": "postal_code", - "userinfo.token.claim": "true", - "user.attribute.street": "street", - "id.token.claim": "true", - "user.attribute.region": "region", - "access.token.claim": "true", - "user.attribute.locality": "locality" - } - } - ] - }, - { - "name": "email", - "description": "OpenID Connect built-in scope: email", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "true", - "consent.screen.text": "${emailScopeConsentText}" - }, - "protocolMappers": [ - { - "name": "email", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "email", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "email", - "jsonType.label": "String" - } - }, - { - "name": "email verified", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "emailVerified", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "email_verified", - "jsonType.label": "boolean" - } - } - ] - }, - { - "name": "microprofile-jwt", - "description": "Microprofile - JWT built-in scope", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "false" - }, - "protocolMappers": [ - { - "name": "upn", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "username", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "upn", - "jsonType.label": "String" - } - }, - { - "name": "groups", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-realm-role-mapper", - "consentRequired": false, - "config": { - "multivalued": "true", - "user.attribute": "foo", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "groups", - "jsonType.label": "String" - } - } - ] - }, - { - "name": "offline_access", - "description": "OpenID Connect built-in scope: offline_access", - "protocol": "openid-connect", - "attributes": { - "consent.screen.text": "${offlineAccessScopeConsentText}", - "display.on.consent.screen": "true" - } - }, - { - "name": "phone", - "description": "OpenID Connect built-in scope: phone", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "true", - "consent.screen.text": "${phoneScopeConsentText}" - }, - "protocolMappers": [ - { - "name": "phone number verified", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "phoneNumberVerified", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "phone_number_verified", - "jsonType.label": "boolean" - } - }, - { - "name": "phone number", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "phoneNumber", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "phone_number", - "jsonType.label": "String" - } - } - ] - }, - { - "name": "profile", - "description": "OpenID Connect built-in scope: profile", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "true", - "consent.screen.text": "${profileScopeConsentText}" - }, - "protocolMappers": [ - { - "name": "nickname", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "nickname", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "nickname", - "jsonType.label": "String" - } - }, - { - "name": "zoneinfo", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "zoneinfo", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "zoneinfo", - "jsonType.label": "String" - } - }, - { - "name": "updated at", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "updatedAt", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "updated_at", - "jsonType.label": "String" - } - }, - { - "name": "birthdate", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "birthdate", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "birthdate", - "jsonType.label": "String" - } - }, - { - "name": "given name", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "firstName", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "given_name", - "jsonType.label": "String" - } - }, - { - "name": "full name", - "protocol": "openid-connect", - "protocolMapper": "oidc-full-name-mapper", - "consentRequired": false, - "config": { - "id.token.claim": "true", - "access.token.claim": "true", - "userinfo.token.claim": "true" - } - }, - { - "name": "middle name", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "middleName", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "middle_name", - "jsonType.label": "String" - } - }, - { - "name": "username", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "username", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "preferred_username", - "jsonType.label": "String" - } - }, - { - "name": "family name", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "lastName", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "family_name", - "jsonType.label": "String" - } - }, - { - "name": "gender", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "gender", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "gender", - "jsonType.label": "String" - } - }, - { - "name": "picture", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "picture", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "picture", - "jsonType.label": "String" - } - }, - { - "name": "locale", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "locale", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "locale", - "jsonType.label": "String" - } - }, - { - "name": "profile", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "profile", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "profile", - "jsonType.label": "String" - } - }, - { - "name": "website", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "website", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "website", - "jsonType.label": "String" - } - } - ] - }, - { - "name": "role_list", - "description": "SAML role list", - "protocol": "saml", - "attributes": { - "consent.screen.text": "${samlRoleListScopeConsentText}", - "display.on.consent.screen": "true" - }, - "protocolMappers": [ - { - "name": "role list", - "protocol": "saml", - "protocolMapper": "saml-role-list-mapper", - "consentRequired": false, - "config": { - "single": "false", - "attribute.nameformat": "Basic", - "attribute.name": "Role" - } - } - ] - }, - { - "name": "roles", - "description": "OpenID Connect scope for add user roles to the access token", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "false", - "display.on.consent.screen": "true", - "consent.screen.text": "${rolesScopeConsentText}" - }, - "protocolMappers": [ - { - "name": "realm roles", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-realm-role-mapper", - "consentRequired": false, - "config": { - "user.attribute": "foo", - "access.token.claim": "true", - "claim.name": "realm_access.roles", - "jsonType.label": "String", - "multivalued": "true" - } - }, - { - "name": "audience resolve", - "protocol": "openid-connect", - "protocolMapper": "oidc-audience-resolve-mapper", - "consentRequired": false, - "config": {} - }, - { - "name": "client roles", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-client-role-mapper", - "consentRequired": false, - "config": { - "user.attribute": "foo", - "access.token.claim": "true", - "claim.name": "resource_access.${client_id}.roles", - "jsonType.label": "String", - "multivalued": "true" - } - } - ] - }, - { - "name": "web-origins", - "description": "OpenID Connect scope for add allowed web origins to the access token", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "false", - "display.on.consent.screen": "false", - "consent.screen.text": "" - }, - "protocolMappers": [ - { - "name": "allowed web origins", - "protocol": "openid-connect", - "protocolMapper": "oidc-allowed-origins-mapper", - "consentRequired": false, - "config": {} - } - ] - } - ], - "defaultDefaultClientScopes": [ - "role_list", - "profile", - "email", - "roles", - "web-origins" - ], - "defaultOptionalClientScopes": [ - "offline_access", - "address", - "phone", - "microprofile-jwt" - ], - "browserSecurityHeaders": { - "contentSecurityPolicyReportOnly": "", - "xContentTypeOptions": "nosniff", - "xRobotsTag": "none", - "xFrameOptions": "SAMEORIGIN", - "xXSSProtection": "1; mode=block", - "contentSecurityPolicy": "frame-src 'self'; frame-ancestors 'self'; object-src 'none';", - "strictTransportSecurity": "max-age=31536000; includeSubDomains" - }, - "smtpServer": {}, - "eventsEnabled": false, - "eventsListeners": [ - "jboss-logging" - ], - "enabledEventTypes": [], - "adminEventsEnabled": false, - "adminEventsDetailsEnabled": false, - "components": { - "org.keycloak.services.clientregistration.policy.ClientRegistrationPolicy": [ - { - "name": "Allowed Protocol Mapper Types", - "providerId": "allowed-protocol-mappers", - "subType": "anonymous", - "subComponents": {}, - "config": { - "allowed-protocol-mapper-types": [ - "oidc-full-name-mapper", - "saml-user-attribute-mapper", - "saml-user-property-mapper", - "oidc-address-mapper", - "saml-role-list-mapper", - "oidc-sha256-pairwise-sub-mapper", - "oidc-usermodel-attribute-mapper", - "oidc-usermodel-property-mapper" - ] - } - }, - { - "name": "Allowed Client Scopes", - "providerId": "allowed-client-templates", - "subType": "authenticated", - "subComponents": {}, - "config": { - "allow-default-scopes": [ - "true" - ] - } - }, - { - "name": "Allowed Client Scopes", - "providerId": "allowed-client-templates", - "subType": "anonymous", - "subComponents": {}, - "config": { - "allow-default-scopes": [ - "true" - ] - } - }, - { - "name": "Trusted Hosts", - "providerId": "trusted-hosts", - "subType": "anonymous", - "subComponents": {}, - "config": { - "host-sending-registration-request-must-match": [ - "true" - ], - "client-uris-must-match": [ - "true" - ] - } - }, - { - "name": "Full Scope Disabled", - "providerId": "scope", - "subType": "anonymous", - "subComponents": {}, - "config": {} - }, - { - "name": "Max Clients Limit", - "providerId": "max-clients", - "subType": "anonymous", - "subComponents": {}, - "config": { - "max-clients": [ - "200" - ] - } - }, - { - "name": "Consent Required", - "providerId": "consent-required", - "subType": "anonymous", - "subComponents": {}, - "config": {} - }, - { - "name": "Allowed Protocol Mapper Types", - "providerId": "allowed-protocol-mappers", - "subType": "authenticated", - "subComponents": {}, - "config": { - "allowed-protocol-mapper-types": [ - "saml-user-attribute-mapper", - "oidc-full-name-mapper", - "saml-role-list-mapper", - "saml-user-property-mapper", - "oidc-usermodel-attribute-mapper", - "oidc-address-mapper", - "oidc-usermodel-property-mapper", - "oidc-sha256-pairwise-sub-mapper" - ] - } - } - ], - "org.keycloak.keys.KeyProvider": [ - { - "name": "rsa-generated", - "providerId": "rsa-generated", - "subComponents": {}, - "config": { - "privateKey": [ - "MIIEowIBAAKCAQEAn5T13suF8mlS+pJXp0U1bto41nW55wpcs+Rps8ZVCRyJKWqzwSCYnI7lm0rB2wBpAAO4OPoj1zlmVoFmBPsDU9Xf7rjsJb5LIzIQDCZY44aSDZt6RR+gakPiQvlzHyW/RozYpngDJF7TsTD7rdRF1xQ4RprfBF8fwK/xsU7pxbeom5xDHZhz3fiw8s+7UdbmnazDHfAjU58aUrLGgVRfUsuoHjtsptYlOIXEifaeMetXZE+HhqLYRHQPDap5fbBJl773Trosn7N9nmzN4x1xxGj9So21WC5UboQs9sAIVgizc4omjZ5Y4RN9HLH7G4YwJctNntzmnJhDui9zAO+zSQIDAQABAoIBADi+F7rTtVoft0Cfnok8o6Y58/HVxHdxiMryUd95iy0FN4RBi48FTx6D9QKFz25Ws/8sU2n3D51srIXf1u24b1N0/f39RQKaqk7mcyxOylaEuBQcj5pah4ihgKd92UBfBKdKV5LBo6RgD3e2yhbiHr8+UlBQqzH7vOef6Bm6zIbfmi3N88swAJhP0YizRZFklsbmLsK6nkwyro00CHJvPVKSBbM+ad+/zIBsLw56MvNngB5TuFguUgoljd6M1T2z4utmZGlTUqrfE1onAVLJZoGnRohyIr7dJEg6YxWR70PxsgmkDKyeRvet9P1trO0n+OSprusfrC3cHJStabap1V0CgYEA1A/CtsqTnjdYYsB19eumZgdpzUgNc/YEAzZ/OWb8yTLoB2ncci+63A1rXHUXAqJFY7vtjn5mxv7SuASNbUrzq+6KfZvC1x9XEtnczqT/ypunNfxmIZuj8Nuu6vtURguZ8kPPwdkI8toTizRFeRE5ZDBvoQryiEVYugfHaHT5vzsCgYEAwKWODwquI0Lv9BuwdNVrBXQpkKh3ZfYOA7i9xvhxlM7xUu8OMCwwCPn3r7vrW5APjTqX4h330mJ44SLEs+7gbCUs4BbJBLA6g0ChlHa9PTkxp6tk2nDF/B34fxiZSRkE85L+d+at0Dc3hnlzLCJCzJawGpoPniPU9e4w0p4dN0sCgYAsGnMGjS8SUrRhJWHjGXVr9tK8TOXvXhULjgP7rj2Yoqu7Dvs4DFEyft/7RKbad2EzEtyfLA64CDtO5jN7rYDsGxpWcVSeZPg5BXJ0z8AbJTArfCjJiJMZ/rZsTIUEZFlKF2xYBolj6JLz+pUQTtK+0YwF1D8ItFN1rTR9twZSDQKBgQC6sPXNX+VH6LuPTjIf1x8CxwLs3EXxOpV0R9kp9GRl+HJnk6GlT30xhcThufQo5KAdllXQXIhoiuNoEoCbevhj9Vbax1oBQCNERSMRNEzKAx46xd9TzYwgeo7x5E3QR/3DaoVOfu+cY5ZcrF/PulgP2kxJS1mtQD5GIpGP2oinpwKBgGqiqTFPqRcelx76vBvTU+Jp1zM62T4AotbMrSQR/oUvqHe5Ytj/SbZx+wbbHAiyGgV700Mosyviik83YEAbR3kdOPjgYvAJJW2Y3jEMdQ7MwriXz8XLh5BGmYfVjkSOJXed9ua9WlYLKOJeXXv191BbDvrx5NXuJyVVU4vJx3YZ" - ], - "certificate": [ - "MIICnTCCAYUCBgFp4EYIrjANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQDDAdwcm90ZWFuMB4XDTE5MDQwMjIyNTYxOVoXDTI5MDQwMjIyNTc1OVowEjEQMA4GA1UEAwwHcHJvdGVhbjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ+U9d7LhfJpUvqSV6dFNW7aONZ1uecKXLPkabPGVQkciSlqs8EgmJyO5ZtKwdsAaQADuDj6I9c5ZlaBZgT7A1PV3+647CW+SyMyEAwmWOOGkg2bekUfoGpD4kL5cx8lv0aM2KZ4AyRe07Ew+63URdcUOEaa3wRfH8Cv8bFO6cW3qJucQx2Yc934sPLPu1HW5p2swx3wI1OfGlKyxoFUX1LLqB47bKbWJTiFxIn2njHrV2RPh4ai2ER0Dw2qeX2wSZe+9066LJ+zfZ5szeMdccRo/UqNtVguVG6ELPbACFYIs3OKJo2eWOETfRyx+xuGMCXLTZ7c5pyYQ7ovcwDvs0kCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAVtmRKDb4OK5iSA46tagMBkp6L7WuPpCWuHGWwobEP+BecYsShW7zP3s12oA8SNSwbhvu0CRqgzxhuypgf3hKQFVU153Erv4hzkj+8S0s5LR/ZE7tDNY2lzJ3yQKXy3Md7EkuzzvOZ50MTrcSKAanWq/ZW1OTnrtGymj5zGJnTg7mMnJzEIGePxkvPu/QdchiPBLqxfZYm1jsFGY25djOC3N/KmVcRVmPRGuu6D8tBFHlKoPfZYPdbMvsvs24aupHKRcZ+ofTCpK+2Qo8c0pSSqeEYHGmuGqC6lC6ozxtxSABPO9Q1R1tZBU7Kg5HvXUwwmoVS3EGub46YbHqbmWMLg==" - ], - "priority": [ - "100" - ] - } - }, - { - "name": "hmac-generated", - "providerId": "hmac-generated", - "subComponents": {}, - "config": { - "kid": [ - "96afd00e-85cf-4d35-b18e-061d3813d8b2" - ], - "secret": [ - "qBFGKdUGf6xDgKphnRfoFzIzaFHJW4bYnZ9MinPFzN38X5_ctq-2u1q5RdZzeJukXvk2biHB8_s3DxWmmLZFsA" - ], - "priority": [ - "100" - ], - "algorithm": [ - "HS256" - ] - } - }, - { - "name": "aes-generated", - "providerId": "aes-generated", - "subComponents": {}, - "config": { - "kid": [ - "b04473d3-8395-4016-b455-19a9e951106b" - ], - "secret": [ - "x68mMOVdz3qKWzltzReV0g" - ], - "priority": [ - "100" - ] - } - } - ] - }, - "internationalizationEnabled": false, - "supportedLocales": [], - "authenticationFlows": [ - { - "alias": "Handle Existing Account", - "description": "Handle what to do if there is existing account with same email/username like authenticated identity provider", - "providerId": "basic-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "idp-confirm-link", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "idp-email-verification", - "requirement": "ALTERNATIVE", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "requirement": "ALTERNATIVE", - "priority": 30, - "flowAlias": "Verify Existing Account by Re-authentication", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "alias": "Verify Existing Account by Re-authentication", - "description": "Reauthentication of existing account", - "providerId": "basic-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "idp-username-password-form", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "auth-otp-form", - "requirement": "OPTIONAL", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "browser", - "description": "browser based authentication", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "auth-cookie", - "requirement": "ALTERNATIVE", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "auth-spnego", - "requirement": "DISABLED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "identity-provider-redirector", - "requirement": "ALTERNATIVE", - "priority": 25, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "requirement": "ALTERNATIVE", - "priority": 30, - "flowAlias": "forms", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "alias": "clients", - "description": "Base authentication for clients", - "providerId": "client-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "client-secret", - "requirement": "ALTERNATIVE", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "client-jwt", - "requirement": "ALTERNATIVE", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "client-secret-jwt", - "requirement": "ALTERNATIVE", - "priority": 30, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "client-x509", - "requirement": "ALTERNATIVE", - "priority": 40, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "direct grant", - "description": "OpenID Connect Resource Owner Grant", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "direct-grant-validate-username", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "direct-grant-validate-password", - "requirement": "REQUIRED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "direct-grant-validate-otp", - "requirement": "OPTIONAL", - "priority": 30, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "docker auth", - "description": "Used by Docker clients to authenticate against the IDP", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "docker-http-basic-authenticator", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "first broker login", - "description": "Actions taken after first broker login with identity provider account, which is not yet linked to any Keycloak account", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticatorConfig": "review profile config", - "authenticator": "idp-review-profile", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticatorConfig": "create unique user config", - "authenticator": "idp-create-user-if-unique", - "requirement": "ALTERNATIVE", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "requirement": "ALTERNATIVE", - "priority": 30, - "flowAlias": "Handle Existing Account", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "alias": "forms", - "description": "Username, password, otp and other auth forms.", - "providerId": "basic-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "auth-username-password-form", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "auth-otp-form", - "requirement": "OPTIONAL", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "http challenge", - "description": "An authentication flow based on challenge-response HTTP Authentication Schemes", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "no-cookie-redirect", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "basic-auth", - "requirement": "REQUIRED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "basic-auth-otp", - "requirement": "DISABLED", - "priority": 30, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "auth-spnego", - "requirement": "DISABLED", - "priority": 40, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "registration", - "description": "registration flow", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "registration-page-form", - "requirement": "REQUIRED", - "priority": 10, - "flowAlias": "registration form", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "alias": "registration form", - "description": "registration form", - "providerId": "form-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "registration-user-creation", - "requirement": "REQUIRED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "registration-profile-action", - "requirement": "REQUIRED", - "priority": 40, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "registration-password-action", - "requirement": "REQUIRED", - "priority": 50, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "registration-recaptcha-action", - "requirement": "DISABLED", - "priority": 60, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "reset credentials", - "description": "Reset credentials for a user if they forgot their password or something", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "reset-credentials-choose-user", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "reset-credential-email", - "requirement": "REQUIRED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "reset-password", - "requirement": "REQUIRED", - "priority": 30, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "reset-otp", - "requirement": "OPTIONAL", - "priority": 40, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "saml ecp", - "description": "SAML ECP Profile Authentication Flow", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "http-basic-authenticator", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - } - ], - "authenticatorConfig": [ - { - "alias": "create unique user config", - "config": { - "require.password.update.after.registration": "false" - } - }, - { - "alias": "review profile config", - "config": { - "update.profile.on.first.login": "missing" - } - } - ], - "requiredActions": [ - { - "alias": "CONFIGURE_TOTP", - "name": "Configure OTP", - "providerId": "CONFIGURE_TOTP", - "enabled": true, - "defaultAction": false, - "priority": 10, - "config": {} - }, - { - "alias": "terms_and_conditions", - "name": "Terms and Conditions", - "providerId": "terms_and_conditions", - "enabled": false, - "defaultAction": false, - "priority": 20, - "config": {} - }, - { - "alias": "UPDATE_PASSWORD", - "name": "Update Password", - "providerId": "UPDATE_PASSWORD", - "enabled": true, - "defaultAction": false, - "priority": 30, - "config": {} - }, - { - "alias": "UPDATE_PROFILE", - "name": "Update Profile", - "providerId": "UPDATE_PROFILE", - "enabled": true, - "defaultAction": false, - "priority": 40, - "config": {} - }, - { - "alias": "VERIFY_EMAIL", - "name": "Verify Email", - "providerId": "VERIFY_EMAIL", - "enabled": true, - "defaultAction": false, - "priority": 50, - "config": {} - } - ], - "browserFlow": "browser", - "registrationFlow": "registration", - "directGrantFlow": "direct grant", - "resetCredentialsFlow": "reset credentials", - "clientAuthenticationFlow": "clients", - "dockerAuthenticationFlow": "docker auth", - "attributes": { - "_browser_header.xXSSProtection": "1; mode=block", - "_browser_header.xFrameOptions": "SAMEORIGIN", - "_browser_header.strictTransportSecurity": "max-age=31536000; includeSubDomains", - "permanentLockout": "false", - "quickLoginCheckMilliSeconds": "1000", - "_browser_header.xRobotsTag": "none", - "maxFailureWaitSeconds": "900", - "minimumQuickLoginWaitSeconds": "60", - "failureFactor": "30", - "actionTokenGeneratedByUserLifespan": "300", - "maxDeltaTimeSeconds": "43200", - "_browser_header.xContentTypeOptions": "nosniff", - "offlineSessionMaxLifespan": "5184000", - "actionTokenGeneratedByAdminLifespan": "43200", - "_browser_header.contentSecurityPolicyReportOnly": "", - "bruteForceProtected": "false", - "_browser_header.contentSecurityPolicy": "frame-src 'self'; frame-ancestors 'self'; object-src 'none';", - "waitIncrementSeconds": "60", - "offlineSessionMaxLifespanEnabled": "false" - }, - "users": [ - { - "username": "admin", - "enabled": true, - "totp": false, - "emailVerified": false, - "credentials": [ - { - "type": "password", - "hashedSaltedValue": "NICTtwsvSxJ5hL8hLAuleDUv9jwZcuXgxviMXvR++cciyPtiIEStEaJUyfA9DOir59awjPrHOumsclPVjNBplA==", - "salt": "T/2P5o5oxFJUEk68BRURRg==", - "hashIterations": 27500, - "counter": 0, - "algorithm": "pbkdf2-sha256", - "digits": 0, - "period": 0, - "createdDate": 1554245879354, - "config": {} - } - ], - "disableableCredentialTypes": [ - "password" - ], - "requiredActions": [], - "realmRoles": [ - "admin", - "managers", - "user", - "IT", - "HR" - ], - "notBefore": 0, - "groups": [] - }, - { - "username": "alice", - "enabled": true, - "totp": false, - "emailVerified": false, - "credentials": [ - { - "type": "password", - "hashedSaltedValue": "A3okqV2T/ybXTVEgKfosoSjP8Yc9IZbFP/SY4cEd6hag7TABQrQ6nUSuwagGt96l8cw1DTijO75PqX6uiTXMzw==", - "salt": "sl4mXx6T9FypPH/s9TngfQ==", - "hashIterations": 27500, - "counter": 0, - "algorithm": "pbkdf2-sha256", - "digits": 0, - "period": 0, - "createdDate": 1554245879116, - "config": {} - } - ], - "disableableCredentialTypes": [ - "password" - ], - "requiredActions": [], - "realmRoles": [ - "user", - "HR" - ], - "notBefore": 0, - "groups": [] - }, - { - "username": "jdoe", - "enabled": true, - "totp": false, - "emailVerified": false, - "credentials": [ - { - "type": "password", - "hashedSaltedValue": "JV3DUNLjqOadjbBOtC4rvacQI553CGaDGAzBS8MR5ReCr7SwF3E6CsW3T7/XO8ITZAsch8+A/6loeuCoVLLJrg==", - "salt": "uCbOH7HZtyDtMd0E9DG/nw==", - "hashIterations": 27500, - "counter": 0, - "algorithm": "pbkdf2-sha256", - "digits": 0, - "period": 0, - "createdDate": 1554245879227, - "config": {} - } - ], - "disableableCredentialTypes": [ - "password" - ], - "requiredActions": [], - "realmRoles": [ - "managers", - "user", - "IT" - ], - "notBefore": 0, - "groups": [] - } - ], - "keycloakVersion": "6.0.0", - "userManagedAccessAllowed": false -} diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docker-compose/startServices.sh b/kogito-springboot-examples/process-usertasks-springboot-with-console/docker-compose/startServices.sh deleted file mode 100755 index 8ae6e8e558..0000000000 --- a/kogito-springboot-examples/process-usertasks-springboot-with-console/docker-compose/startServices.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh - -echo "Script requires your Kogito Quickstart to be compiled" - -PROJECT_VERSION=$(cd ../ && mvn help:evaluate -Dexpression=project.version -q -DforceStdout) - -echo "Project version: ${PROJECT_VERSION}" - -if [[ $PROJECT_VERSION == *SNAPSHOT ]]; -then - KOGITO_VERSION="latest" -else - KOGITO_VERSION=${PROJECT_VERSION%.*} -fi - -echo "Kogito Image version: ${KOGITO_VERSION}" -echo "KOGITO_VERSION=${KOGITO_VERSION}" > ".env" - -if [ "$(uname)" == "Darwin" ]; then - echo "DOCKER_GATEWAY_HOST=kubernetes.docker.internal" >> ".env" -elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then - echo "DOCKER_GATEWAY_HOST=172.17.0.1" >> ".env" -fi - -PERSISTENCE_FOLDER=./persistence -KOGITO_EXAMPLE_PERSISTENCE=../target/classes/META-INF/resources/persistence/protobuf - -rm -rf $PERSISTENCE_FOLDER - -mkdir -p $PERSISTENCE_FOLDER - -if [ -d "$KOGITO_EXAMPLE_PERSISTENCE" ] -then - cp $KOGITO_EXAMPLE_PERSISTENCE/*.proto $PERSISTENCE_FOLDER/ -else - echo "$KOGITO_EXAMPLE_PERSISTENCE does not exist. Have you compiled process-usertask-springboot-with-console project?" -# exit 1 -fi - -SVG_FOLDER=./svg - -KOGITO_SVG_FOLDER=../target/classes/META-INF/processSVG - -mkdir -p $SVG_FOLDER - -if [ -d "$KOGITO_SVG_FOLDER" ] -then - cp $KOGITO_SVG_FOLDER/*.svg $SVG_FOLDER -else - echo "$KOGITO_SVG_FOLDER does not exist. Have you compiled process-usertask-springboot-with-console project?" -# exit 1 -fi - -docker-compose up \ No newline at end of file diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/AddTestUsers.png b/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/AddTestUsers.png deleted file mode 100644 index 172b44ce82..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/AddTestUsers.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/MC_details1.png b/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/MC_details1.png deleted file mode 100644 index 52941393e0..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/MC_details1.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/MC_details2.png b/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/MC_details2.png deleted file mode 100644 index dd36c976df..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/MC_details2.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/MC_details3.png b/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/MC_details3.png deleted file mode 100644 index e0aa992480..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/MC_details3.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/MC_list1.png b/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/MC_list1.png deleted file mode 100644 index 494ef9a2a1..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/MC_list1.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/TC_FirstLine.png b/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/TC_FirstLine.png deleted file mode 100644 index 4851653e4c..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/TC_FirstLine.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/TC_SecondLine.png b/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/TC_SecondLine.png deleted file mode 100644 index d1280ba7c3..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/TC_SecondLine.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/TC_list1.png b/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/TC_list1.png deleted file mode 100644 index d18d2f757b..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/TC_list1.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/TC_list2.png b/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/TC_list2.png deleted file mode 100644 index a2e3471521..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/TC_list2.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/diagramProperties.png b/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/diagramProperties.png deleted file mode 100644 index 585c58f583..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/diagramProperties.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/diagramProperties3.png b/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/diagramProperties3.png deleted file mode 100644 index df43a371af..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/diagramProperties3.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/firstLineApprovalUserTask.png b/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/firstLineApprovalUserTask.png deleted file mode 100644 index b705a63b36..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/firstLineApprovalUserTask.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/firstLineApprovalUserTask2.png b/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/firstLineApprovalUserTask2.png deleted file mode 100644 index 65c7dc0846..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/firstLineApprovalUserTask2.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/firstLineApprovalUserTaskAssignments.png b/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/firstLineApprovalUserTaskAssignments.png deleted file mode 100644 index 0bbadf0ac5..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/firstLineApprovalUserTaskAssignments.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/keycloak-login.png b/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/keycloak-login.png deleted file mode 100644 index 58d85f1f43..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/keycloak-login.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/process.png b/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/process.png deleted file mode 100644 index 974dfaebaf..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/process.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/secondLineApprovalUserTask.png b/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/secondLineApprovalUserTask.png deleted file mode 100644 index bd3ce5bcce..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/secondLineApprovalUserTask.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/secondLineApprovalUserTaskAssignments.png b/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/secondLineApprovalUserTaskAssignments.png deleted file mode 100644 index 9ac27a7af0..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/secondLineApprovalUserTaskAssignments.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/services.png b/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/services.png deleted file mode 100644 index c0cc1d4ab8..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-springboot-with-console/docs/images/services.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/pom.xml b/kogito-springboot-examples/process-usertasks-springboot-with-console/pom.xml deleted file mode 100644 index 7b1859a5ff..0000000000 --- a/kogito-springboot-examples/process-usertasks-springboot-with-console/pom.xml +++ /dev/null @@ -1,144 +0,0 @@ - - - 4.0.0 - - org.kie.kogito.examples - kogito-springboot-examples - 2.0.0-SNAPSHOT - - - process-usertasks-springboot-with-console - Kogito Example :: Process with Usertasks Spring Boot :: Console - Kogito usertasks orchestration - Spring Boot - With Console - - - true - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT - - - - - - org.kie.kogito - kogito-spring-boot-bom - ${kogito.bom.version} - pom - import - - - - - - - org.springframework.boot - spring-boot-starter-actuator - - - - - org.kie.kogito - kogito-processes-spring-boot-starter - - - - - org.springframework.boot - spring-boot-starter-test - test - - - io.rest-assured - rest-assured - test - - - org.kie.kogito - kogito-spring-boot-test-utils - ${version.org.kie.kogito} - test - - - - org.kie.kogito - kogito-addons-springboot-events-process-kafka - - - org.kie.kogito - kogito-addons-springboot-persistence-infinispan - - - org.infinispan - infinispan-spring-boot-starter-remote - - - org.kie.kogito - kogito-addons-springboot-process-svg - - - org.kie.kogito - kogito-addons-springboot-process-management - - - org.springframework.kafka - spring-kafka - - - - - ${project.artifactId} - - - org.springframework.boot - spring-boot-maven-plugin - ${version.org.springframework.boot} - - - - repackage - - - - - - org.kie.kogito - kogito-maven-plugin - ${version.org.kie.kogito} - true - - - - - - container - - - container - - - - - - com.google.cloud.tools - jib-maven-plugin - - - install - - dockerBuild - - - - - - ${project.groupId}/${project.artifactId}:1.0 - - - - - - - - diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/src/main/java/org/acme/travels/Address.java b/kogito-springboot-examples/process-usertasks-springboot-with-console/src/main/java/org/acme/travels/Address.java deleted file mode 100644 index d808334384..0000000000 --- a/kogito-springboot-examples/process-usertasks-springboot-with-console/src/main/java/org/acme/travels/Address.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR 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; - -public class Address { - - private String street; - private String city; - private String zipCode; - private String country; - - public Address() { - - } - - public Address(String street, String city, String zipCode, String country) { - super(); - this.street = street; - this.city = city; - this.zipCode = zipCode; - this.country = country; - } - - public String getStreet() { - return street; - } - - public void setStreet(String street) { - this.street = street; - } - - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - public String getZipCode() { - return zipCode; - } - - public void setZipCode(String zipCode) { - this.zipCode = zipCode; - } - - public String getCountry() { - return country; - } - - public void setCountry(String country) { - this.country = country; - } - - @Override - public String toString() { - return "Address [street=" + street + ", city=" + city + ", zipCode=" + zipCode + ", country=" + country + "]"; - } -} diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/src/main/java/org/acme/travels/Traveller.java b/kogito-springboot-examples/process-usertasks-springboot-with-console/src/main/java/org/acme/travels/Traveller.java deleted file mode 100644 index cf790d4664..0000000000 --- a/kogito-springboot-examples/process-usertasks-springboot-with-console/src/main/java/org/acme/travels/Traveller.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR 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; - -public class Traveller { - - private String firstName; - private String lastName; - private String email; - private String nationality; - private Address address; - - public Traveller() { - - } - - public Traveller(String firstName, String lastName, String email, String nationality, Address address) { - super(); - this.firstName = firstName; - this.lastName = lastName; - this.email = email; - this.nationality = nationality; - this.address = address; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public String getNationality() { - return nationality; - } - - public void setNationality(String nationality) { - this.nationality = nationality; - } - - public Address getAddress() { - return address; - } - - public void setAddress(Address address) { - this.address = address; - } - - @Override - public String toString() { - return "Traveller [firstName=" + firstName + ", lastName=" + lastName + ", email=" + email + ", nationality=" - + nationality + ", address=" + address + "]"; - } - -} diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/src/main/java/org/kie/kogito/tests/CorsConfig.java b/kogito-springboot-examples/process-usertasks-springboot-with-console/src/main/java/org/kie/kogito/tests/CorsConfig.java deleted file mode 100644 index 3de49bf1ff..0000000000 --- a/kogito-springboot-examples/process-usertasks-springboot-with-console/src/main/java/org/kie/kogito/tests/CorsConfig.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.kie.kogito.tests; - -import java.util.Arrays; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.cors.CorsConfiguration; -import org.springframework.web.cors.UrlBasedCorsConfigurationSource; -import org.springframework.web.filter.CorsFilter; - -@Configuration -public class CorsConfig { - - @Bean - public CorsFilter corsFilter() { - UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); - - CorsConfiguration config = new CorsConfiguration(); - config.setAllowCredentials(true); - config.setAllowedOriginPatterns(Arrays.asList("http://*:8080", "http://*:8280", "http://*:8380")); - config.addAllowedHeader("*"); - config.addAllowedMethod("OPTIONS"); - config.addAllowedMethod("GET"); - config.addAllowedMethod("POST"); - config.addAllowedMethod("PUT"); - config.addAllowedMethod("DELETE"); - source.registerCorsConfiguration("/**", - config); - - return new CorsFilter(source); - } -} \ No newline at end of file diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.java b/kogito-springboot-examples/process-usertasks-springboot-with-console/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.java deleted file mode 100644 index 7b2daaca72..0000000000 --- a/kogito-springboot-examples/process-usertasks-springboot-with-console/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.kie.kogito.tests; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication(scanBasePackages = { "org.kie.kogito.**", "org.acme.travels.**" }) -public class KogitoInfinispanSpringbootApplication { - - public static void main(String[] args) { - SpringApplication.run(KogitoInfinispanSpringbootApplication.class, args); - } - -} diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/src/main/resources/META-INF/processSVG/approvals.svg b/kogito-springboot-examples/process-usertasks-springboot-with-console/src/main/resources/META-INF/processSVG/approvals.svg deleted file mode 100644 index 1255507f87..0000000000 --- a/kogito-springboot-examples/process-usertasks-springboot-with-console/src/main/resources/META-INF/processSVG/approvals.svg +++ /dev/null @@ -1 +0,0 @@ -EndStartProcessSecond Line Approval First Line Approval \ No newline at end of file diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/src/main/resources/META-INF/resources/index.html b/kogito-springboot-examples/process-usertasks-springboot-with-console/src/main/resources/META-INF/resources/index.html deleted file mode 100644 index fb2677f87d..0000000000 --- a/kogito-springboot-examples/process-usertasks-springboot-with-console/src/main/resources/META-INF/resources/index.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - - - Kogito quickstart - - - - - - - - - - - - - - -
-
-
-
-

Welcome to Kogito

-

- Cloud-native business automation for building intelligent applications, backed by - battle-tested capabilities. -

- - Get Started - - - Latest updates - -
-
-
-
-
-
-
-

Quick Links

- -
-
-
- - - \ No newline at end of file diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/src/main/resources/application.properties b/kogito-springboot-examples/process-usertasks-springboot-with-console/src/main/resources/application.properties deleted file mode 100644 index a30026d05e..0000000000 --- a/kogito-springboot-examples/process-usertasks-springboot-with-console/src/main/resources/application.properties +++ /dev/null @@ -1,22 +0,0 @@ -server.address=0.0.0.0 - -infinispan.remote.server-list=localhost:11222 - -spring.kafka.bootstrap-servers=localhost:9092 - -kogito.service.url=http://localhost:8080 - -#mp.messaging.outgoing.kogito-processinstances-events.bootstrap.servers=localhost:9092 -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-usertaskinstances-events.bootstrap.servers=localhost:9092 -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.bootstrap.servers=localhost:9092 -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 \ No newline at end of file diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/src/main/resources/org/acme/travels/approval.bpmn b/kogito-springboot-examples/process-usertasks-springboot-with-console/src/main/resources/org/acme/travels/approval.bpmn deleted file mode 100644 index c29d4dbd7e..0000000000 --- a/kogito-springboot-examples/process-usertasks-springboot-with-console/src/main/resources/org/acme/travels/approval.bpmn +++ /dev/null @@ -1,307 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - _9EAFE6C1-69B4-4908-B764-EF3C4A55BEE3 - _C13522F1-230A-4C26-B5A9-533A5D9FEE9D - - - - - - - - - _8B62D3CA-5D03-4B2B-832B-126469288BB4_TaskNameInputX - _8B62D3CA-5D03-4B2B-832B-126469288BB4_travellerInputX - _8B62D3CA-5D03-4B2B-832B-126469288BB4_SkippableInputX - _8B62D3CA-5D03-4B2B-832B-126469288BB4_GroupIdInputX - - - _8B62D3CA-5D03-4B2B-832B-126469288BB4_ActorIdOutputX - _8B62D3CA-5D03-4B2B-832B-126469288BB4_approvedOutputX - - - - _8B62D3CA-5D03-4B2B-832B-126469288BB4_TaskNameInputX - - - - - - - traveller - _8B62D3CA-5D03-4B2B-832B-126469288BB4_travellerInputX - - - _8B62D3CA-5D03-4B2B-832B-126469288BB4_SkippableInputX - - - - - - - _8B62D3CA-5D03-4B2B-832B-126469288BB4_GroupIdInputX - - - - - - - _8B62D3CA-5D03-4B2B-832B-126469288BB4_ActorIdOutputX - approver - - - _8B62D3CA-5D03-4B2B-832B-126469288BB4_approvedOutputX - firstLineApproval - - - - jdoe - - - - - - - - - - _C13522F1-230A-4C26-B5A9-533A5D9FEE9D - _078F46FB-B7A1-4DBB-BE9A-75C7CB0CCD03 - - - - - - - - - _0DBFABE8-92B0-46E6-B52E-A9593AFA4371_TaskNameInputX - _0DBFABE8-92B0-46E6-B52E-A9593AFA4371_ExcludedOwnerIdInputX - _0DBFABE8-92B0-46E6-B52E-A9593AFA4371_travellerInputX - _0DBFABE8-92B0-46E6-B52E-A9593AFA4371_SkippableInputX - _0DBFABE8-92B0-46E6-B52E-A9593AFA4371_GroupIdInputX - - - _0DBFABE8-92B0-46E6-B52E-A9593AFA4371_approvedOutputX - - - - _0DBFABE8-92B0-46E6-B52E-A9593AFA4371_TaskNameInputX - - - - - - - approver - _0DBFABE8-92B0-46E6-B52E-A9593AFA4371_ExcludedOwnerIdInputX - - - traveller - _0DBFABE8-92B0-46E6-B52E-A9593AFA4371_travellerInputX - - - _0DBFABE8-92B0-46E6-B52E-A9593AFA4371_SkippableInputX - - - - - - - _0DBFABE8-92B0-46E6-B52E-A9593AFA4371_GroupIdInputX - - - - - - - _0DBFABE8-92B0-46E6-B52E-A9593AFA4371_approvedOutputX - secondLineApproval - - - - jdoe - - - - - - - - - - _9EAFE6C1-69B4-4908-B764-EF3C4A55BEE3 - - - - - - - - _078F46FB-B7A1-4DBB-BE9A-75C7CB0CCD03 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - _0bOh4MK_EDmzKdx9QxiR4Q - _0bOh4MK_EDmzKdx9QxiR4Q - - \ No newline at end of file diff --git a/kogito-springboot-examples/process-usertasks-springboot-with-console/src/test/java/org/acme/travels/ApprovalsTestIT.java b/kogito-springboot-examples/process-usertasks-springboot-with-console/src/test/java/org/acme/travels/ApprovalsTestIT.java deleted file mode 100644 index 8ffe2a5cd1..0000000000 --- a/kogito-springboot-examples/process-usertasks-springboot-with-console/src/test/java/org/acme/travels/ApprovalsTestIT.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR 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; - -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.jbpm.process.instance.impl.humantask.HumanTaskTransition; -import org.jbpm.process.instance.impl.humantask.phases.Claim; -import org.jbpm.process.instance.impl.workitem.Complete; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.kie.kogito.Model; -import org.kie.kogito.auth.IdentityProviders; -import org.kie.kogito.auth.SecurityPolicy; -import org.kie.kogito.process.Process; -import org.kie.kogito.process.ProcessInstance; -import org.kie.kogito.process.WorkItem; -import org.kie.kogito.testcontainers.springboot.InfinispanSpringBootTestResource; -import org.kie.kogito.tests.KogitoInfinispanSpringbootApplication; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.annotation.DirtiesContext.ClassMode; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit.jupiter.SpringExtension; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; - -@ExtendWith(SpringExtension.class) -@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = KogitoInfinispanSpringbootApplication.class) -@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD) // reset spring context after each test method -@ContextConfiguration(initializers = { InfinispanSpringBootTestResource.Conditional.class }) -public class ApprovalsTestIT { - - @Autowired - @Qualifier("approvals") - Process approvalsProcess; - - @Test - public void testApprovalProcess() { - - assertNotNull(approvalsProcess); - - Model m = approvalsProcess.createModel(); - Map parameters = new HashMap<>(); - parameters.put("traveller", new Traveller("John", "Doe", "john.doe@example.com", "American", new Address("main street", "Boston", "10005", "US"))); - m.fromMap(parameters); - - ProcessInstance processInstance = approvalsProcess.createInstance(m); - processInstance.start(); - assertEquals(org.kie.api.runtime.process.ProcessInstance.STATE_ACTIVE, processInstance.status()); - - SecurityPolicy policy = SecurityPolicy.of(IdentityProviders.of("admin", Collections.singletonList("managers"))); - - processInstance.workItems(policy); - - List workItems = processInstance.workItems(policy); - assertEquals(1, workItems.size()); - Map results = new HashMap<>(); - results.put("approved", true); - processInstance.completeWorkItem(workItems.get(0).getId(), results, policy); - - workItems = processInstance.workItems(policy); - assertEquals(0, workItems.size()); - - policy = SecurityPolicy.of(IdentityProviders.of("john", Collections.singletonList("managers"))); - - processInstance.workItems(policy); - - workItems = processInstance.workItems(policy); - assertEquals(1, workItems.size()); - - results.put("approved", false); - processInstance.completeWorkItem(workItems.get(0).getId(), results, policy); - assertEquals(org.kie.api.runtime.process.ProcessInstance.STATE_COMPLETED, processInstance.status()); - - Model result = (Model) processInstance.variables(); - assertEquals(4, result.toMap().size()); - assertEquals(result.toMap().get("approver"), "admin"); - assertEquals(result.toMap().get("firstLineApproval"), true); - assertEquals(result.toMap().get("secondLineApproval"), false); - } - - @Test - public void testApprovalProcessViaPhases() { - - assertNotNull(approvalsProcess); - - Model m = approvalsProcess.createModel(); - Map parameters = new HashMap<>(); - parameters.put("traveller", new Traveller("John", "Doe", "john.doe@example.com", "American", new Address("main street", "Boston", "10005", "US"))); - m.fromMap(parameters); - - ProcessInstance processInstance = approvalsProcess.createInstance(m); - processInstance.start(); - assertEquals(org.kie.api.runtime.process.ProcessInstance.STATE_ACTIVE, processInstance.status()); - - SecurityPolicy policy = SecurityPolicy.of(IdentityProviders.of("admin", Collections.singletonList("managers"))); - - processInstance.workItems(policy); - - List workItems = processInstance.workItems(policy); - assertEquals(1, workItems.size()); - - processInstance.transitionWorkItem(workItems.get(0).getId(), new HumanTaskTransition(Claim.ID, null, policy)); - processInstance.transitionWorkItem(workItems.get(0).getId(), new HumanTaskTransition(Complete.ID, Collections.singletonMap("approved", true), policy)); - - workItems = processInstance.workItems(policy); - assertEquals(0, workItems.size()); - - policy = SecurityPolicy.of(IdentityProviders.of("john", Collections.singletonList("managers"))); - - processInstance.workItems(policy); - - workItems = processInstance.workItems(policy); - assertEquals(1, workItems.size()); - - processInstance.transitionWorkItem(workItems.get(0).getId(), new HumanTaskTransition(Claim.ID, null, policy)); - processInstance.transitionWorkItem(workItems.get(0).getId(), new HumanTaskTransition(Complete.ID, Collections.singletonMap("approved", false), policy)); - - assertEquals(org.kie.api.runtime.process.ProcessInstance.STATE_COMPLETED, processInstance.status()); - - Model result = (Model) processInstance.variables(); - assertEquals(4, result.toMap().size()); - assertEquals(result.toMap().get("approver"), "admin"); - assertEquals(result.toMap().get("firstLineApproval"), true); - assertEquals(result.toMap().get("secondLineApproval"), false); - } -} diff --git a/kogito-springboot-examples/process-usertasks-springboot/README.md b/kogito-springboot-examples/process-usertasks-springboot/README.md index f1ade1de67..7a21181886 100644 --- a/kogito-springboot-examples/process-usertasks-springboot/README.md +++ b/kogito-springboot-examples/process-usertasks-springboot/README.md @@ -175,7 +175,3 @@ You should see a similar message after performing the second line approval after ```json {"id":"f498de73-e02d-4829-905e-2f768479a4f1", "approver":"admin","firstLineApproval":true, "secondLineApproval":true,"traveller":{"firstName":"John","lastName":"Doe","email":"jon.doe@example.com","nationality":"American","address":{"street":"main street","city":"Boston","zipCode":"10005","country":"US"}}} ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-springboot-examples/process-usertasks-springboot/operator/process-usertasks-springboot.yaml b/kogito-springboot-examples/process-usertasks-springboot/operator/process-usertasks-springboot.yaml deleted file mode 100644 index f0d024d899..0000000000 --- a/kogito-springboot-examples/process-usertasks-springboot/operator/process-usertasks-springboot.yaml +++ /dev/null @@ -1,24 +0,0 @@ - -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-usertasks-springboot -spec: - type: RemoteSource - runtime: springboot - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/process-usertasks-springboot - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-usertasks-springboot -spec: - runtime: springboot \ No newline at end of file diff --git a/kogito-springboot-examples/process-usertasks-springboot/pom.xml b/kogito-springboot-examples/process-usertasks-springboot/pom.xml index 0261a5c95a..4078512b46 100644 --- a/kogito-springboot-examples/process-usertasks-springboot/pom.xml +++ b/kogito-springboot-examples/process-usertasks-springboot/pom.xml @@ -1,4 +1,24 @@ + @@ -6,7 +26,7 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-usertasks-springboot @@ -14,8 +34,8 @@ Kogito usertasks orchestration - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -36,10 +56,10 @@ spring-boot-starter-actuator
- + - org.kie.kogito - kogito-processes-spring-boot-starter + org.jbpm + jbpm-spring-boot-starter org.springframework.boot diff --git a/kogito-springboot-examples/process-usertasks-springboot/src/main/java/org/acme/travels/Address.java b/kogito-springboot-examples/process-usertasks-springboot/src/main/java/org/acme/travels/Address.java index d808334384..662dfa9b9f 100644 --- a/kogito-springboot-examples/process-usertasks-springboot/src/main/java/org/acme/travels/Address.java +++ b/kogito-springboot-examples/process-usertasks-springboot/src/main/java/org/acme/travels/Address.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.acme.travels; diff --git a/kogito-springboot-examples/process-usertasks-springboot/src/main/java/org/acme/travels/Traveller.java b/kogito-springboot-examples/process-usertasks-springboot/src/main/java/org/acme/travels/Traveller.java index cf790d4664..c24685803d 100644 --- a/kogito-springboot-examples/process-usertasks-springboot/src/main/java/org/acme/travels/Traveller.java +++ b/kogito-springboot-examples/process-usertasks-springboot/src/main/java/org/acme/travels/Traveller.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.acme.travels; diff --git a/kogito-springboot-examples/process-usertasks-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.java b/kogito-springboot-examples/process-usertasks-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.java index 7b2daaca72..fc27bd8647 100644 --- a/kogito-springboot-examples/process-usertasks-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.java +++ b/kogito-springboot-examples/process-usertasks-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.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.tests; diff --git a/kogito-springboot-examples/process-usertasks-springboot/src/main/resources/application.properties b/kogito-springboot-examples/process-usertasks-springboot/src/main/resources/application.properties index 5f4fb60b55..4e8da841ca 100644 --- a/kogito-springboot-examples/process-usertasks-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/process-usertasks-springboot/src/main/resources/application.properties @@ -1 +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. +# + server.address=0.0.0.0 \ No newline at end of file diff --git a/kogito-springboot-examples/process-usertasks-springboot/src/test/java/org/acme/travels/springboot/ApprovalsProcessTest.java b/kogito-springboot-examples/process-usertasks-springboot/src/test/java/org/acme/travels/springboot/ApprovalsProcessTest.java index 5c89d73dfc..9ec367111b 100644 --- a/kogito-springboot-examples/process-usertasks-springboot/src/test/java/org/acme/travels/springboot/ApprovalsProcessTest.java +++ b/kogito-springboot-examples/process-usertasks-springboot/src/test/java/org/acme/travels/springboot/ApprovalsProcessTest.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.acme.travels.springboot; diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/README.md b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/README.md deleted file mode 100644 index eb0b992182..0000000000 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/README.md +++ /dev/null @@ -1,253 +0,0 @@ -# Process user task orchestration - -## Description - -A quickstart project shows very typical user task orchestration. It comes with two tasks assigned -to human actors via group assignments - `managers`. So essentially anyone who is a member of that -group can act on the tasks. Though this example applies four eye principles which essentially means -that the user who approved the first task cannot approve the second one. So there must always be at -least two distinct managers involved. - -This example shows - -* working with user tasks -* four eye principle with user tasks -* Task console to execute human task -* Management console tracking process execution - - -

- - -## Build and run - -### Prerequisites - -You will need: - - Java 11+ installed - - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed - - [jq](https://stedolan.github.io/jq) tool installed. You can download it from [here](https://stedolan.github.io/jq/download) - - Docker and Docker Compose to run the required example infrastructure. - -### Starting the Kogito and Infrastructure Services - -This quickstart provides a docker compose template that starts all the required services. This setup ensures that all services are connected with a default configuration. - -

- -You should start all the services before you execute any of the **Approvals** example, to do that please execute: - -For Linux and MacOS: - -1. Open a Terminal -2. Go to the process-usertasks-with-security-oidc-springboot-with-console folder at kogito-examples -3. Run the ```startServices.sh``` script - -```bash -sh ./startServices.sh -``` - -Once all services bootstrap, the following ports will be assigned on your local machine: - -- Infinispan: 11222 -- Kafka: 9092 -- Data Index: 8180 -- Management Console: 8280 -- Task Console: 8380 -- Keycloak server: 8480 -- process-usertasks-with-security-oidc-springboot-with-console: 8080 - -> **_NOTE:_** This step requires the project to be compiled, please consider running a ```mvn clean install -Pcontainer``` command on the project root before running the ```startServices.sh``` script for the first time or any time you modify the project. ```-Pcontainer``` will create a local docker image of the example and will be run by docker-compose with all required services. - -Once started you can simply stop all services by executing the ```docker-compose stop```. - -All the created containers can be removed by executing the ```docker-compose rm```. - -### Using Keycloak as Authentication Server - -In this Quickstart we'll be using [Keycloak](https://www.keycloak.org/) as *Authentication Server*. It will be started as a part of the project *Infrastructure Services*, you can check the configuration on the project [docker-compose.yml](docker-compose/docker-compose.yml) in [docker-compose](docker-compose) folder. - -It will install the *Kogito Realm* that comes with a predefined set of users: -| Login | Password | Roles | -| ------------- | ---------- | ------------------- | -| admin | admin | *admin*, *managers* | -| alice | alice | *user* | -| jdoe | jdoe | *managers* | - -Once Keycloak is started, you should be able to access your *Keycloak Server* at [localhost:8480/auth](http://localhost:8480/auth) with *admin* user. - -### Security using OpenID Connect - -This Quickstart is taking advantage of the Quarkus OIDC extension that allows an easy integration between the *Kogito* runtime, *Kogito* consoles and *Keycloak*. - -This example enables authentication *Kogito Management Console* & *Kogito Task Console* using OpenID Connect, -to do that you must start the consoles using the *keycloak* quarkus profile as a parameter (`-Dquarkus.profile=keycloak`). You can check the configuration on the project [docker-compose.yml](docker-compose/docker-compose.yml) in [docker-compose](docker-compose) folder. - -> **_NOTE:_** For more information about how to secure Kogito Management Console with OpenID Connect, please refer to [Kogito Documentation](https://docs.jboss.org/kogito/release/latest/html_single/#proc-management-console-security_kogito-developing-process-services). -> -> For more information about how to secure Kogito Task Console with OpenID Connect, please refer to [Kogito Documentation](https://docs.jboss.org/kogito/release/latest/html_single/#proc-task-console-security_kogito-developing-process-services) - -> **_NOTE:_** If you don't want to run the example inside docker compose. You can stop the service container by running below commands. - - docker stop process-usertasks-with-security-oidc-springboot-with-console - -### Compile and Run in Local Dev Mode - -```sh -mvn clean compile spring-boot:run -``` - -### Package and Run using uberjar - -```sh -mvn clean package -``` - -To run the generated native executable, generated in `target/`, execute - -```sh -java -jar target/process-usertasks-with-security-oidc-springboot-with-console.jar -``` - -We can navigate to [http://localhost:8080](http://localhost:8080) to verify the Kogito runtime is running - -### OpenAPI (Swagger) documentation -[Specification at swagger.io](https://swagger.io/docs/specification/about/) - -You can take a look at the [OpenAPI definition](http://localhost:8080/v3/api-docs) - automatically generated and included in this service - to determine all available operations exposed by this service. For easy readability you can visualize the OpenAPI definition file using a UI tool like for example available [Swagger UI](https://editor.swagger.io). - -In addition, various clients to interact with this service can be easily generated using this OpenAPI definition. -We can access to deployed [http://localhost:8080/swagger-ui](http://localhost:8080/swagger-ui.html) even the current example has the security enabled and some endpoint will require authenication. - -### Submit a request to start new approval -The application is using bearer token authorization and the first thing to do is obtain an access token from the Keycloak -Server in order to access the application resources. Obtain an access token for user john. - -```sh -export access_token=$(\ - curl -X POST http://localhost:8480/auth/realms/kogito/protocol/openid-connect/token \ - --user kogito-app:secret \ - -H 'content-type: application/x-www-form-urlencoded' \ - -d 'username=jdoe&password=jdoe&grant_type=password' | jq --raw-output '.access_token' \ - ) -``` - -To make use of this application it is as simple as putting a sending request to `http://localhost:8080/approvals` - -```json -{ -"traveller" : { - "firstName" : "John", - "lastName" : "Doe", - "email" : "jon.doe@example.com", - "nationality" : "American", - "address" : { - "street" : "main street", - "city" : "Boston", - "zipCode" : "10005", - "country" : "US" } - } -} - -``` - -Complete curl command can be found below, passing the token as Authorization header : - -```sh -curl -X POST -H "Authorization: Bearer "$access_token -H 'Content-Type:application/json' -H 'Accept:application/json' -d '{"traveller" : { "firstName" : "John", "lastName" : "Doe", "email" : "jon.doe@example.com", "nationality" : "American","address" : { "street" : "main street", "city" : "Boston", "zipCode" : "10005", "country" : "US" }}}' http://localhost:8080/approvals -``` - - -### Kogito Management Console - -To access the Kogito Management Console just open your browser and navigate to ``http://localhost:8280``. You'll be redirected to the *Keycloak* log in page. - -

- -

- -Once there, log in using any of the users specified in the [Using Keycloak as Authentication Server](#using-keycloak-as-authentication-server) - -

- -

- -> **_NOTE:_** For more information about how to work with Kogito Management Console, please refer to the [Kogito Documentation](https://docs.jboss.org/kogito/release/latest/html_single/#con-management-console_kogito-developing-process-services) page. - -### Kogito Task Console - -To access the Kogito Task Console just open your browser and navigate to ``http://localhost:8380``. You'll be redirected to the *Keycloak* log in page. - -

- -

- -Once there, log in with an *managers* user (for example *admin*) and you should be redirected to the user **Task Inbox**: - -

- -

- -There you'll see all the tasks assigned to the user or to any of the group he belongs to. - - -### Show active process instances at Kogito Management Console - -To access the Kogito Management Console just open your browser and navigate to ``http://localhost:8280``. - -

- -

- -> **_NOTE:_** For more information about how to work with Kogito Management Console, please refer to the [Kogito Documentation](https://docs.jboss.org/kogito/release/latest/html_single/#con-management-console_kogito-developing-process-services) page. - -Check the process instance details to see where is the execution path - -

- -

- -### Execute 'First Line approval' task at Kogito Task Console - -To access the Kogito Task Console just open your browser and navigate to ``http://localhost:8380`` and you should be redirected to the **Task Inbox**. -Ensure you are logged as a user with role manager to be able to see the First Line approval (i.e: jdoe / jdoe) - -

- -

- -> **_NOTE:_** For more information about how to work with Kogito Task Console, please refer to the [Kogito Documentation](https://docs.jboss.org/kogito/release/latest/html_single/#con-task-console_kogito-developing-process-services) page. - -Access to 'First Line approval' task and complete - -

- -

- -Check the process instance details at Kogito Management Console to see the execution path reflects the completed task - -

- -

- -### Execute 'Second Line approval' task at Kogito Task Console - -Access the Kogito Task Console and ensure you are logged as a user with role manager to be able to see the Second Line approval -following the second eye principle (i.e: admin / admin) - -

- -

- -Access to 'Second Line approval' task and complete - -

- -

- -Check the process instance details at Kogito Management Console, and verify the execution path is reflected in the diagram. - -

- -

diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docker-compose/.gitignore b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docker-compose/.gitignore deleted file mode 100644 index b6632dbda5..0000000000 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docker-compose/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.env -svg/ -persistence/ \ No newline at end of file diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docker-compose/README.md b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docker-compose/README.md deleted file mode 100644 index 4a3db21aa6..0000000000 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docker-compose/README.md +++ /dev/null @@ -1,59 +0,0 @@ -## Kogito and Infrastructure services - -To allow a quick setup of all services required to run this demo, we provide a docker compose template that starts the following services: -- Infinispan -- Kafka -- Keycloak -- Kogito Data Index -- Kogito Management Console -- Kogito Task Console - -This setup ensures that all services are connected using the default configuration as well as provisioning the Travel Agency dashboard to Grafana. - -In order to use it, please ensure you have Docker Compose installed on your machine, otherwise follow the instructions available - in [here](https://docs.docker.com/compose/install/). - -### Starting required services - - Before you execute the **Approvals** example, start all the services by following these steps: - - For Linux and MacOS: - - ./startServices.sh - - For Windows: - - Create a .env file with the content containing the version of the Kogito images you would like to run, example: - - KOGITO_VERSION=1.0.0 - - Then run - - docker-compose up - - Once all services bootstrap, the following ports will be assigned on your local machine: - - Infinispan: 11222 - - Kafka: 9092 - - Keycloak: 8480 - - Data Index: 8180 - - Management Console: 8280 - - Task Console: 8380 - - process-usertasks-with-security-oidc-springboot-with-console: 8080 - -> **_NOTE:_** If you don't want to run the example inside docker compose. You can stop the container by running below commands. - - docker stop process-usertasks-with-security-oidc-springboot-with-console - -### Stopping and removing volume data - - To stop all services, simply run: - - docker-compose stop - - It is also recommended to remove any of stopped containers by running: - - docker-compose rm - - For more details please check the Docker Compose documentation. - - docker-compose --help diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docker-compose/docker-compose.yml b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docker-compose/docker-compose.yml deleted file mode 100755 index a9167a60e4..0000000000 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docker-compose/docker-compose.yml +++ /dev/null @@ -1,133 +0,0 @@ -version: '2.1' - -services: - - infinispan: - image: infinispan/server:14.0.4.Final - container_name: infinispan - ports: - - "11222:11222" - command: "-c infinispan-demo.xml" - volumes: - - ./infinispan/infinispan.xml:/opt/infinispan/server/conf/infinispan-demo.xml:z - healthcheck: - test: [ "CMD", "curl", "-f", "http://localhost:11222/rest/v2/cache-managers/default/health/status" ] - interval: 1s - timeout: 30s - retries: 50 - - zookeeper: - container_name: zookeeper - image: strimzi/kafka:0.20.1-kafka-2.6.0 - command: [ - "sh", "-c", - "bin/zookeeper-server-start.sh config/zookeeper.properties" - ] - ports: - - "2181:2181" - environment: - LOG_DIR: "/tmp/logs" - - kafka: - image: strimzi/kafka:0.20.1-kafka-2.6.0 - container_name: kafka - command: [ - "sh", "-c", - "bin/kafka-server-start.sh config/server.properties --override inter.broker.listener.name=$${KAFKA_INTER_BROKER_LISTENER_NAME} --override listener.security.protocol.map=$${KAFKA_LISTENER_SECURITY_PROTOCOL_MAP} --override listeners=$${KAFKA_LISTENERS} --override advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS} --override zookeeper.connect=$${KAFKA_ZOOKEEPER_CONNECT}" - ] - depends_on: - - zookeeper - ports: - - "9092:9092" - environment: - KAFKA_BROKER_ID: 0 - KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 - KAFKA_LISTENERS: INTERNAL://kafka:29092,EXTERNAL://kafka:9092 - KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:29092,EXTERNAL://localhost:9092 - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT - KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL - KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true" - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 - LOG_DIR: "/tmp/logs" - - keycloak: - container_name: keycloak - image: quay.io/keycloak/keycloak:legacy - ports: - - "8480:8080" - volumes: - - ./keycloak/kogito-realm.json:/tmp/kogito-realm.json - healthcheck: - test: [ "CMD", "curl", "-f", "http://localhost:8080/auth/realms/kogito" ] - interval: 1s - timeout: 1s - retries: 50 - environment: - KEYCLOAK_USER: admin - KEYCLOAK_PASSWORD: admin - KEYCLOAK_IMPORT: /tmp/kogito-realm.json - - data-index: - container_name: data-index - image: quay.io/kiegroup/kogito-data-index-infinispan:${KOGITO_VERSION} - ports: - - "8180:8080" - depends_on: - kafka: - condition: service_started - infinispan: - condition: service_healthy - volumes: - - ./persistence/:/home/kogito/data/protobufs/ - environment: - QUARKUS_HTTP_CORS_ORIGINS: "/.*/" - QUARKUS_INFINISPAN_CLIENT_HOSTS: infinispan:11222 - QUARKUS_INFINISPAN_CLIENT_USE_AUTH: "false" - KAFKA_BOOTSTRAP_SERVERS: kafka:29092 - KOGITO_DATA_INDEX_PROPS: -Dkogito.protobuf.folder=/home/kogito/data/protobufs/ - - management-console: - container_name: management-console - image: quay.io/kiegroup/kogito-management-console:${KOGITO_VERSION} - ports: - - 8280:8080 - depends_on: - data-index: - condition: service_started - keycloak: - condition: service_healthy - volumes: - - ./svg/:/home/kogito/data/svg/ - environment: - KOGITO_DATAINDEX_HTTP_URL: http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8180/graphql - KOGITO_MANAGEMENT_CONSOLE_PROPS: -Dkogito.consoles.keycloak.config.url=http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8480/auth -Dkogito.consoles.keycloak.config.health-check-url=http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8480/auth/realms/kogito/.well-known/openid-configuration -Dkogito.svg.folder.path=/home/kogito/data/svg - - task-console: - container_name: task-console - image: quay.io/kiegroup/kogito-task-console:${KOGITO_VERSION} - ports: - - 8380:8080 - depends_on: - data-index: - condition: service_started - keycloak: - condition: service_healthy - environment: - KOGITO_DATAINDEX_HTTP_URL: http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8180/graphql - KOGITO_TASK_CONSOLE_PROPS: -Dkogito.consoles.keycloak.config.url=http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8480/auth -Dkogito.consoles.keycloak.config.health-check-url=http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8480/auth/realms/kogito/.well-known/openid-configuration - - process-usertasks-with-security-oidc-springboot-with-console: - container_name: process-usertasks-with-security-oidc-springboot-with-console - image: org.kie.kogito.examples/process-usertasks-with-security-oidc-springboot-with-console:1.0 - ports: - - 8080:8080 - depends_on: - infinispan: - condition: service_healthy - data-index: - condition: service_started - environment: - MANAGEMENT_ENDPOINTS_WEB_CORS_ALLOWED_ORIGINS: "/.*/" - INFINISPAN_REMOTE_SERVER_LIST: infinispan:11222 - SPRING_KAFKA_BOOTSTRAP_SERVERS: kafka:29092 - KEYCLOAK_AUTH_SERVER_URL: http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8480/auth \ No newline at end of file diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docker-compose/infinispan/infinispan.xml b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docker-compose/infinispan/infinispan.xml deleted file mode 100755 index 4d594bfc24..0000000000 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docker-compose/infinispan/infinispan.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docker-compose/keycloak/kogito-realm.json b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docker-compose/keycloak/kogito-realm.json deleted file mode 100644 index a8d3080456..0000000000 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docker-compose/keycloak/kogito-realm.json +++ /dev/null @@ -1,2288 +0,0 @@ -{ - "realm": "kogito", - "notBefore": 0, - "revokeRefreshToken": false, - "refreshTokenMaxReuse": 0, - "accessTokenLifespan": 300, - "accessTokenLifespanForImplicitFlow": 900, - "ssoSessionIdleTimeout": 1800, - "ssoSessionMaxLifespan": 36000, - "ssoSessionIdleTimeoutRememberMe": 0, - "ssoSessionMaxLifespanRememberMe": 0, - "offlineSessionIdleTimeout": 2592000, - "offlineSessionMaxLifespanEnabled": false, - "offlineSessionMaxLifespan": 5184000, - "accessCodeLifespan": 60, - "accessCodeLifespanUserAction": 300, - "accessCodeLifespanLogin": 1800, - "actionTokenGeneratedByAdminLifespan": 43200, - "actionTokenGeneratedByUserLifespan": 300, - "enabled": true, - "sslRequired": "external", - "registrationAllowed": false, - "registrationEmailAsUsername": false, - "rememberMe": false, - "verifyEmail": false, - "loginWithEmailAllowed": true, - "duplicateEmailsAllowed": false, - "resetPasswordAllowed": false, - "editUsernameAllowed": false, - "bruteForceProtected": false, - "permanentLockout": false, - "maxFailureWaitSeconds": 900, - "minimumQuickLoginWaitSeconds": 60, - "waitIncrementSeconds": 60, - "quickLoginCheckMilliSeconds": 1000, - "maxDeltaTimeSeconds": 43200, - "failureFactor": 30, - "roles": { - "realm": [ - { - "name": "managers", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - }, - { - "name": "uma_authorization", - "description": "${role_uma_authorization}", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - }, - { - "name": "admin", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - }, - { - "name": "user", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - }, - { - "name": "HR", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - }, - { - "name": "IT", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - }, - { - "name": "offline_access", - "description": "${role_offline-access}", - "composite": false, - "clientRole": false, - "containerId": "11d78bf6-6d10-4484-baba-a1388379d68b", - "attributes": {} - } - ], - "client": { - "realm-management": [ - { - "name": "manage-identity-providers", - "description": "${role_manage-identity-providers}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "impersonation", - "description": "${role_impersonation}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "view-identity-providers", - "description": "${role_view-identity-providers}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "view-realm", - "description": "${role_view-realm}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "query-users", - "description": "${role_query-users}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "manage-clients", - "description": "${role_manage-clients}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "manage-events", - "description": "${role_manage-events}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "realm-admin", - "description": "${role_realm-admin}", - "composite": true, - "composites": { - "client": { - "realm-management": [ - "impersonation", - "manage-identity-providers", - "view-identity-providers", - "view-realm", - "query-users", - "manage-clients", - "manage-events", - "manage-realm", - "view-authorization", - "manage-authorization", - "view-users", - "create-client", - "query-clients", - "query-groups", - "manage-users", - "view-clients", - "view-events", - "query-realms" - ] - } - }, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "manage-realm", - "description": "${role_manage-realm}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "view-authorization", - "description": "${role_view-authorization}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "manage-authorization", - "description": "${role_manage-authorization}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "create-client", - "description": "${role_create-client}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "view-users", - "description": "${role_view-users}", - "composite": true, - "composites": { - "client": { - "realm-management": [ - "query-groups", - "query-users" - ] - } - }, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "query-clients", - "description": "${role_query-clients}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "query-groups", - "description": "${role_query-groups}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "manage-users", - "description": "${role_manage-users}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "view-clients", - "description": "${role_view-clients}", - "composite": true, - "composites": { - "client": { - "realm-management": [ - "query-clients" - ] - } - }, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "view-events", - "description": "${role_view-events}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - }, - { - "name": "query-realms", - "description": "${role_query-realms}", - "composite": false, - "clientRole": true, - "containerId": "376bd940-e50a-4495-80fc-9c6c07312748", - "attributes": {} - } - ], - "security-admin-console": [], - "admin-cli": [], - "kogito-service": [ - { - "name": "uma_protection", - "composite": false, - "clientRole": true, - "containerId": "0ac5df91-e044-4051-bd03-106a3a5fb9cc", - "attributes": {} - } - ], - "broker": [ - { - "name": "read-token", - "description": "${role_read-token}", - "composite": false, - "clientRole": true, - "containerId": "53d4fe53-a039-471e-886a-28eddc950e95", - "attributes": {} - } - ], - "account": [ - { - "name": "view-profile", - "description": "${role_view-profile}", - "composite": false, - "clientRole": true, - "containerId": "e55e1234-38fa-432d-8d90-39f5e024688d", - "attributes": {} - }, - { - "name": "manage-account", - "description": "${role_manage-account}", - "composite": true, - "composites": { - "client": { - "account": [ - "manage-account-links" - ] - } - }, - "clientRole": true, - "containerId": "e55e1234-38fa-432d-8d90-39f5e024688d", - "attributes": {} - }, - { - "name": "manage-account-links", - "description": "${role_manage-account-links}", - "composite": false, - "clientRole": true, - "containerId": "e55e1234-38fa-432d-8d90-39f5e024688d", - "attributes": {} - } - ] - } - }, - "groups": [], - "defaultRoles": [ - "uma_authorization", - "offline_access" - ], - "requiredCredentials": [ - "password" - ], - "otpPolicyType": "totp", - "otpPolicyAlgorithm": "HmacSHA1", - "otpPolicyInitialCounter": 0, - "otpPolicyDigits": 6, - "otpPolicyLookAheadWindow": 1, - "otpPolicyPeriod": 30, - "otpSupportedApplications": [ - "FreeOTP", - "Google Authenticator" - ], - "scopeMappings": [ - { - "clientScope": "offline_access", - "roles": [ - "offline_access" - ] - } - ], - "clients": [ - { - "clientId": "account", - "name": "${client_account}", - "baseUrl": "/auth/realms/kogito/account", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "0136c3ef-0dfd-4b13-a6d0-2c8b6358edec", - "defaultRoles": [ - "view-profile", - "manage-account" - ], - "redirectUris": [ - "/auth/realms/kogito/account/*" - ], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "clientId": "admin-cli", - "name": "${client_admin-cli}", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "a951803a-79c7-46a6-8197-e32835286971", - "redirectUris": [], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": false, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": true, - "serviceAccountsEnabled": false, - "publicClient": true, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "clientId": "broker", - "name": "${client_broker}", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "e1f7edd7-e15c-43b4-8736-ff8204d16836", - "redirectUris": [], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "clientId": "kogito-frontend", - "rootUrl": "http://localhost:8082", - "adminUrl": "http://localhost:8082", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "secret", - "redirectUris": [ - "http://localhost:8082/*" - ], - "webOrigins": [ - "http://localhost:8082" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": true, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": { - "saml.assertion.signature": "false", - "saml.force.post.binding": "false", - "saml.multivalued.roles": "false", - "saml.encrypt": "false", - "saml.server.signature": "false", - "saml.server.signature.keyinfo.ext": "false", - "exclude.session.state.from.auth.response": "false", - "saml_force_name_id_format": "false", - "saml.client.signature": "false", - "tls.client.certificate.bound.access.tokens": "false", - "saml.authnstatement": "false", - "display.on.consent.screen": "false", - "saml.onetimeuse.condition": "false" - }, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ], - "access": { - "view": true, - "configure": true, - "manage": true - } - }, - { - "clientId": "kogito-app", - "rootUrl": "http://localhost:8080", - "adminUrl": "http://localhost:8080", - "surrogateAuthRequired": false, - "enabled": true, - "alwaysDisplayInConsole": false, - "clientAuthenticatorType": "client-secret", - "secret": "secret", - "redirectUris": [ - "http://localhost:8080/*" - ], - "webOrigins": [ - "*" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": true, - "serviceAccountsEnabled": true, - "authorizationServicesEnabled": true, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": { - "saml.assertion.signature": "false", - "saml.force.post.binding": "false", - "saml.multivalued.roles": "false", - "saml.encrypt": "false", - "backchannel.logout.revoke.offline.tokens": "false", - "saml.server.signature": "false", - "saml.server.signature.keyinfo.ext": "false", - "exclude.session.state.from.auth.response": "false", - "backchannel.logout.session.required": "false", - "client_credentials.use_refresh_token": "false", - "saml_force_name_id_format": "false", - "saml.client.signature": "false", - "tls.client.certificate.bound.access.tokens": "false", - "saml.authnstatement": "false", - "display.on.consent.screen": "false", - "saml.onetimeuse.condition": "false" - }, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "protocolMappers": [ - { - "name": "Client ID", - "protocol": "openid-connect", - "protocolMapper": "oidc-usersessionmodel-note-mapper", - "consentRequired": false, - "config": { - "user.session.note": "clientId", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "clientId", - "jsonType.label": "String" - } - }, - { - "name": "Client IP Address", - "protocol": "openid-connect", - "protocolMapper": "oidc-usersessionmodel-note-mapper", - "consentRequired": false, - "config": { - "user.session.note": "clientAddress", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "clientAddress", - "jsonType.label": "String" - } - }, - { - "name": "Client Host", - "protocol": "openid-connect", - "protocolMapper": "oidc-usersessionmodel-note-mapper", - "consentRequired": false, - "config": { - "user.session.note": "clientHost", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "clientHost", - "jsonType.label": "String" - } - } - ], - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ], - "access": { - "view": true, - "configure": true, - "manage": true - } - }, - { - "clientId": "kogito-service", - "rootUrl": "", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "secret", - "redirectUris": [ - "*" - ], - "webOrigins": [ - "*" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": true, - "serviceAccountsEnabled": true, - "authorizationServicesEnabled": true, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "protocolMappers": [ - { - "name": "Client ID", - "protocol": "openid-connect", - "protocolMapper": "oidc-usersessionmodel-note-mapper", - "consentRequired": false, - "config": { - "user.session.note": "clientId", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "clientId", - "jsonType.label": "String" - } - }, - { - "name": "Client IP Address", - "protocol": "openid-connect", - "protocolMapper": "oidc-usersessionmodel-note-mapper", - "consentRequired": false, - "config": { - "user.session.note": "clientAddress", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "clientAddress", - "jsonType.label": "String" - } - }, - { - "name": "Client Host", - "protocol": "openid-connect", - "protocolMapper": "oidc-usersessionmodel-note-mapper", - "consentRequired": false, - "config": { - "user.session.note": "clientHost", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "clientHost", - "jsonType.label": "String" - } - } - ], - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ], - "authorizationSettings": { - "allowRemoteResourceManagement": true, - "policyEnforcementMode": "ENFORCING", - "resources": [ - { - "name": "User Resource", - "ownerManagedAccess": false, - "attributes": {}, - "_id": "df1b74a9-3f10-499d-a581-368de48e512b", - "uris": [ - "/api/users/*" - ] - }, - { - "name": "Administration Resource", - "ownerManagedAccess": false, - "attributes": {}, - "_id": "7124e2f1-e6dc-44b4-87ab-24b010090b97", - "uris": [ - "/api/admin/*" - ] - } - ], - "policies": [ - { - "name": "Any User Policy", - "description": "Any user granted with the user role can access something", - "type": "role", - "logic": "POSITIVE", - "decisionStrategy": "UNANIMOUS", - "config": { - "roles": "[{\"id\":\"user\",\"required\":false}]" - } - }, - { - "name": "Only Administrators", - "description": "Only administrators can access", - "type": "role", - "logic": "POSITIVE", - "decisionStrategy": "UNANIMOUS", - "config": { - "roles": "[{\"id\":\"admin\",\"required\":false}]" - } - }, - { - "name": "User Resource Permission", - "type": "resource", - "logic": "POSITIVE", - "decisionStrategy": "UNANIMOUS", - "config": { - "resources": "[\"User Resource\"]", - "applyPolicies": "[\"Any User Policy\"]" - } - }, - { - "name": "Administration Resource Permission", - "type": "resource", - "logic": "POSITIVE", - "decisionStrategy": "UNANIMOUS", - "config": { - "resources": "[\"Administration Resource\"]", - "applyPolicies": "[\"Only Administrators\"]" - } - } - ], - "scopes": [], - "decisionStrategy": "UNANIMOUS" - } - }, - { - "clientId": "kogito-console-react", - "rootUrl": "http://localhost:9000", - "adminUrl": "http://localhost:9000/", - "baseUrl": "http://localhost:9000/", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "**********", - "redirectUris": [ - "http://localhost:9000/*" - ], - "webOrigins": [ - "*" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": true, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": { - "saml.assertion.signature": "false", - "saml.force.post.binding": "false", - "saml.multivalued.roles": "false", - "saml.encrypt": "false", - "saml.server.signature": "false", - "saml.server.signature.keyinfo.ext": "false", - "exclude.session.state.from.auth.response": "false", - "saml_force_name_id_format": "false", - "saml.client.signature": "false", - "tls.client.certificate.bound.access.tokens": "false", - "saml.authnstatement": "false", - "display.on.consent.screen": "false", - "saml.onetimeuse.condition": "false" - }, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "clientId": "kogito-console-quarkus", - "rootUrl": "http://localhost:8380", - "adminUrl": "http://localhost:8380/", - "baseUrl": "http://localhost:8380/", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "**********", - "redirectUris": [ - "http://localhost:8380/*", - "http://localhost:8280/*" - ], - "webOrigins": [ - "*" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": true, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": { - "saml.assertion.signature": "false", - "saml.force.post.binding": "false", - "saml.multivalued.roles": "false", - "saml.encrypt": "false", - "saml.server.signature": "false", - "saml.server.signature.keyinfo.ext": "false", - "exclude.session.state.from.auth.response": "false", - "saml_force_name_id_format": "false", - "saml.client.signature": "false", - "tls.client.certificate.bound.access.tokens": "false", - "saml.authnstatement": "false", - "display.on.consent.screen": "false", - "saml.onetimeuse.condition": "false" - }, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "protocolMappers": [ - { - "name": "groups", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-realm-role-mapper", - "consentRequired": false, - "config": { - "multivalued": "true", - "user.attribute": "foo", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "groups", - "jsonType.label": "String" - } - } - ], - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "clientId": "kogito-jobs-service", - "rootUrl": "http://localhost:8080", - "adminUrl": "http://localhost:8080", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "secret", - "redirectUris": [ - "http://localhost:8080/*" - ], - "webOrigins": [ - "http://localhost:8080" - ], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": true, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": { - "saml.assertion.signature": "false", - "saml.force.post.binding": "false", - "saml.multivalued.roles": "false", - "saml.encrypt": "false", - "saml.server.signature": "false", - "saml.server.signature.keyinfo.ext": "false", - "exclude.session.state.from.auth.response": "false", - "saml_force_name_id_format": "false", - "saml.client.signature": "false", - "tls.client.certificate.bound.access.tokens": "false", - "saml.authnstatement": "false", - "display.on.consent.screen": "false", - "saml.onetimeuse.condition": "false" - }, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": true, - "nodeReRegistrationTimeout": -1, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ], - "access": { - "view": true, - "configure": true, - "manage": true - } - }, - { - "clientId": "realm-management", - "name": "${client_realm-management}", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "c41b709a-a012-4c69-89d7-4f926dba0619", - "redirectUris": [], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": true, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": false, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - }, - { - "clientId": "security-admin-console", - "name": "${client_security-admin-console}", - "baseUrl": "/auth/admin/kogito/console/index.html", - "surrogateAuthRequired": false, - "enabled": true, - "clientAuthenticatorType": "client-secret", - "secret": "e571b211-2550-475d-b87f-116ff54091ee", - "redirectUris": [ - "/auth/admin/kogito/console/*" - ], - "webOrigins": [], - "notBefore": 0, - "bearerOnly": false, - "consentRequired": false, - "standardFlowEnabled": true, - "implicitFlowEnabled": false, - "directAccessGrantsEnabled": false, - "serviceAccountsEnabled": false, - "publicClient": true, - "frontchannelLogout": false, - "protocol": "openid-connect", - "attributes": {}, - "authenticationFlowBindingOverrides": {}, - "fullScopeAllowed": false, - "nodeReRegistrationTimeout": 0, - "protocolMappers": [ - { - "name": "locale", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "locale", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "locale", - "jsonType.label": "String" - } - } - ], - "defaultClientScopes": [ - "web-origins", - "role_list", - "profile", - "roles", - "email" - ], - "optionalClientScopes": [ - "address", - "phone", - "offline_access", - "microprofile-jwt" - ] - } - ], - "clientScopes": [ - { - "name": "address", - "description": "OpenID Connect built-in scope: address", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "true", - "consent.screen.text": "${addressScopeConsentText}" - }, - "protocolMappers": [ - { - "name": "address", - "protocol": "openid-connect", - "protocolMapper": "oidc-address-mapper", - "consentRequired": false, - "config": { - "user.attribute.formatted": "formatted", - "user.attribute.country": "country", - "user.attribute.postal_code": "postal_code", - "userinfo.token.claim": "true", - "user.attribute.street": "street", - "id.token.claim": "true", - "user.attribute.region": "region", - "access.token.claim": "true", - "user.attribute.locality": "locality" - } - } - ] - }, - { - "name": "email", - "description": "OpenID Connect built-in scope: email", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "true", - "consent.screen.text": "${emailScopeConsentText}" - }, - "protocolMappers": [ - { - "name": "email", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "email", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "email", - "jsonType.label": "String" - } - }, - { - "name": "email verified", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "emailVerified", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "email_verified", - "jsonType.label": "boolean" - } - } - ] - }, - { - "name": "microprofile-jwt", - "description": "Microprofile - JWT built-in scope", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "false" - }, - "protocolMappers": [ - { - "name": "upn", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "username", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "upn", - "jsonType.label": "String" - } - }, - { - "name": "groups", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-realm-role-mapper", - "consentRequired": false, - "config": { - "multivalued": "true", - "user.attribute": "foo", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "groups", - "jsonType.label": "String" - } - } - ] - }, - { - "name": "offline_access", - "description": "OpenID Connect built-in scope: offline_access", - "protocol": "openid-connect", - "attributes": { - "consent.screen.text": "${offlineAccessScopeConsentText}", - "display.on.consent.screen": "true" - } - }, - { - "name": "phone", - "description": "OpenID Connect built-in scope: phone", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "true", - "consent.screen.text": "${phoneScopeConsentText}" - }, - "protocolMappers": [ - { - "name": "phone number verified", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "phoneNumberVerified", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "phone_number_verified", - "jsonType.label": "boolean" - } - }, - { - "name": "phone number", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "phoneNumber", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "phone_number", - "jsonType.label": "String" - } - } - ] - }, - { - "name": "profile", - "description": "OpenID Connect built-in scope: profile", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "true", - "display.on.consent.screen": "true", - "consent.screen.text": "${profileScopeConsentText}" - }, - "protocolMappers": [ - { - "name": "nickname", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "nickname", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "nickname", - "jsonType.label": "String" - } - }, - { - "name": "zoneinfo", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "zoneinfo", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "zoneinfo", - "jsonType.label": "String" - } - }, - { - "name": "updated at", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "updatedAt", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "updated_at", - "jsonType.label": "String" - } - }, - { - "name": "birthdate", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "birthdate", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "birthdate", - "jsonType.label": "String" - } - }, - { - "name": "given name", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "firstName", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "given_name", - "jsonType.label": "String" - } - }, - { - "name": "full name", - "protocol": "openid-connect", - "protocolMapper": "oidc-full-name-mapper", - "consentRequired": false, - "config": { - "id.token.claim": "true", - "access.token.claim": "true", - "userinfo.token.claim": "true" - } - }, - { - "name": "middle name", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "middleName", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "middle_name", - "jsonType.label": "String" - } - }, - { - "name": "username", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "username", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "preferred_username", - "jsonType.label": "String" - } - }, - { - "name": "family name", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-property-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "lastName", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "family_name", - "jsonType.label": "String" - } - }, - { - "name": "gender", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "gender", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "gender", - "jsonType.label": "String" - } - }, - { - "name": "picture", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "picture", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "picture", - "jsonType.label": "String" - } - }, - { - "name": "locale", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "locale", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "locale", - "jsonType.label": "String" - } - }, - { - "name": "profile", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "profile", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "profile", - "jsonType.label": "String" - } - }, - { - "name": "website", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-attribute-mapper", - "consentRequired": false, - "config": { - "userinfo.token.claim": "true", - "user.attribute": "website", - "id.token.claim": "true", - "access.token.claim": "true", - "claim.name": "website", - "jsonType.label": "String" - } - } - ] - }, - { - "name": "role_list", - "description": "SAML role list", - "protocol": "saml", - "attributes": { - "consent.screen.text": "${samlRoleListScopeConsentText}", - "display.on.consent.screen": "true" - }, - "protocolMappers": [ - { - "name": "role list", - "protocol": "saml", - "protocolMapper": "saml-role-list-mapper", - "consentRequired": false, - "config": { - "single": "false", - "attribute.nameformat": "Basic", - "attribute.name": "Role" - } - } - ] - }, - { - "name": "roles", - "description": "OpenID Connect scope for add user roles to the access token", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "false", - "display.on.consent.screen": "true", - "consent.screen.text": "${rolesScopeConsentText}" - }, - "protocolMappers": [ - { - "name": "realm roles", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-realm-role-mapper", - "consentRequired": false, - "config": { - "user.attribute": "foo", - "access.token.claim": "true", - "claim.name": "realm_access.roles", - "jsonType.label": "String", - "multivalued": "true" - } - }, - { - "name": "audience resolve", - "protocol": "openid-connect", - "protocolMapper": "oidc-audience-resolve-mapper", - "consentRequired": false, - "config": {} - }, - { - "name": "client roles", - "protocol": "openid-connect", - "protocolMapper": "oidc-usermodel-client-role-mapper", - "consentRequired": false, - "config": { - "user.attribute": "foo", - "access.token.claim": "true", - "claim.name": "resource_access.${client_id}.roles", - "jsonType.label": "String", - "multivalued": "true" - } - } - ] - }, - { - "name": "web-origins", - "description": "OpenID Connect scope for add allowed web origins to the access token", - "protocol": "openid-connect", - "attributes": { - "include.in.token.scope": "false", - "display.on.consent.screen": "false", - "consent.screen.text": "" - }, - "protocolMappers": [ - { - "name": "allowed web origins", - "protocol": "openid-connect", - "protocolMapper": "oidc-allowed-origins-mapper", - "consentRequired": false, - "config": {} - } - ] - } - ], - "defaultDefaultClientScopes": [ - "role_list", - "profile", - "email", - "roles", - "web-origins" - ], - "defaultOptionalClientScopes": [ - "offline_access", - "address", - "phone", - "microprofile-jwt" - ], - "browserSecurityHeaders": { - "contentSecurityPolicyReportOnly": "", - "xContentTypeOptions": "nosniff", - "xRobotsTag": "none", - "xFrameOptions": "SAMEORIGIN", - "xXSSProtection": "1; mode=block", - "contentSecurityPolicy": "frame-src 'self'; frame-ancestors 'self'; object-src 'none';", - "strictTransportSecurity": "max-age=31536000; includeSubDomains" - }, - "smtpServer": {}, - "eventsEnabled": false, - "eventsListeners": [ - "jboss-logging" - ], - "enabledEventTypes": [], - "adminEventsEnabled": false, - "adminEventsDetailsEnabled": false, - "components": { - "org.keycloak.services.clientregistration.policy.ClientRegistrationPolicy": [ - { - "name": "Allowed Protocol Mapper Types", - "providerId": "allowed-protocol-mappers", - "subType": "anonymous", - "subComponents": {}, - "config": { - "allowed-protocol-mapper-types": [ - "oidc-full-name-mapper", - "saml-user-attribute-mapper", - "saml-user-property-mapper", - "oidc-address-mapper", - "saml-role-list-mapper", - "oidc-sha256-pairwise-sub-mapper", - "oidc-usermodel-attribute-mapper", - "oidc-usermodel-property-mapper" - ] - } - }, - { - "name": "Allowed Client Scopes", - "providerId": "allowed-client-templates", - "subType": "authenticated", - "subComponents": {}, - "config": { - "allow-default-scopes": [ - "true" - ] - } - }, - { - "name": "Allowed Client Scopes", - "providerId": "allowed-client-templates", - "subType": "anonymous", - "subComponents": {}, - "config": { - "allow-default-scopes": [ - "true" - ] - } - }, - { - "name": "Trusted Hosts", - "providerId": "trusted-hosts", - "subType": "anonymous", - "subComponents": {}, - "config": { - "host-sending-registration-request-must-match": [ - "true" - ], - "client-uris-must-match": [ - "true" - ] - } - }, - { - "name": "Full Scope Disabled", - "providerId": "scope", - "subType": "anonymous", - "subComponents": {}, - "config": {} - }, - { - "name": "Max Clients Limit", - "providerId": "max-clients", - "subType": "anonymous", - "subComponents": {}, - "config": { - "max-clients": [ - "200" - ] - } - }, - { - "name": "Consent Required", - "providerId": "consent-required", - "subType": "anonymous", - "subComponents": {}, - "config": {} - }, - { - "name": "Allowed Protocol Mapper Types", - "providerId": "allowed-protocol-mappers", - "subType": "authenticated", - "subComponents": {}, - "config": { - "allowed-protocol-mapper-types": [ - "saml-user-attribute-mapper", - "oidc-full-name-mapper", - "saml-role-list-mapper", - "saml-user-property-mapper", - "oidc-usermodel-attribute-mapper", - "oidc-address-mapper", - "oidc-usermodel-property-mapper", - "oidc-sha256-pairwise-sub-mapper" - ] - } - } - ], - "org.keycloak.keys.KeyProvider": [ - { - "name": "rsa-generated", - "providerId": "rsa-generated", - "subComponents": {}, - "config": { - "privateKey": [ - "MIIEowIBAAKCAQEAn5T13suF8mlS+pJXp0U1bto41nW55wpcs+Rps8ZVCRyJKWqzwSCYnI7lm0rB2wBpAAO4OPoj1zlmVoFmBPsDU9Xf7rjsJb5LIzIQDCZY44aSDZt6RR+gakPiQvlzHyW/RozYpngDJF7TsTD7rdRF1xQ4RprfBF8fwK/xsU7pxbeom5xDHZhz3fiw8s+7UdbmnazDHfAjU58aUrLGgVRfUsuoHjtsptYlOIXEifaeMetXZE+HhqLYRHQPDap5fbBJl773Trosn7N9nmzN4x1xxGj9So21WC5UboQs9sAIVgizc4omjZ5Y4RN9HLH7G4YwJctNntzmnJhDui9zAO+zSQIDAQABAoIBADi+F7rTtVoft0Cfnok8o6Y58/HVxHdxiMryUd95iy0FN4RBi48FTx6D9QKFz25Ws/8sU2n3D51srIXf1u24b1N0/f39RQKaqk7mcyxOylaEuBQcj5pah4ihgKd92UBfBKdKV5LBo6RgD3e2yhbiHr8+UlBQqzH7vOef6Bm6zIbfmi3N88swAJhP0YizRZFklsbmLsK6nkwyro00CHJvPVKSBbM+ad+/zIBsLw56MvNngB5TuFguUgoljd6M1T2z4utmZGlTUqrfE1onAVLJZoGnRohyIr7dJEg6YxWR70PxsgmkDKyeRvet9P1trO0n+OSprusfrC3cHJStabap1V0CgYEA1A/CtsqTnjdYYsB19eumZgdpzUgNc/YEAzZ/OWb8yTLoB2ncci+63A1rXHUXAqJFY7vtjn5mxv7SuASNbUrzq+6KfZvC1x9XEtnczqT/ypunNfxmIZuj8Nuu6vtURguZ8kPPwdkI8toTizRFeRE5ZDBvoQryiEVYugfHaHT5vzsCgYEAwKWODwquI0Lv9BuwdNVrBXQpkKh3ZfYOA7i9xvhxlM7xUu8OMCwwCPn3r7vrW5APjTqX4h330mJ44SLEs+7gbCUs4BbJBLA6g0ChlHa9PTkxp6tk2nDF/B34fxiZSRkE85L+d+at0Dc3hnlzLCJCzJawGpoPniPU9e4w0p4dN0sCgYAsGnMGjS8SUrRhJWHjGXVr9tK8TOXvXhULjgP7rj2Yoqu7Dvs4DFEyft/7RKbad2EzEtyfLA64CDtO5jN7rYDsGxpWcVSeZPg5BXJ0z8AbJTArfCjJiJMZ/rZsTIUEZFlKF2xYBolj6JLz+pUQTtK+0YwF1D8ItFN1rTR9twZSDQKBgQC6sPXNX+VH6LuPTjIf1x8CxwLs3EXxOpV0R9kp9GRl+HJnk6GlT30xhcThufQo5KAdllXQXIhoiuNoEoCbevhj9Vbax1oBQCNERSMRNEzKAx46xd9TzYwgeo7x5E3QR/3DaoVOfu+cY5ZcrF/PulgP2kxJS1mtQD5GIpGP2oinpwKBgGqiqTFPqRcelx76vBvTU+Jp1zM62T4AotbMrSQR/oUvqHe5Ytj/SbZx+wbbHAiyGgV700Mosyviik83YEAbR3kdOPjgYvAJJW2Y3jEMdQ7MwriXz8XLh5BGmYfVjkSOJXed9ua9WlYLKOJeXXv191BbDvrx5NXuJyVVU4vJx3YZ" - ], - "certificate": [ - "MIICnTCCAYUCBgFp4EYIrjANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQDDAdwcm90ZWFuMB4XDTE5MDQwMjIyNTYxOVoXDTI5MDQwMjIyNTc1OVowEjEQMA4GA1UEAwwHcHJvdGVhbjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ+U9d7LhfJpUvqSV6dFNW7aONZ1uecKXLPkabPGVQkciSlqs8EgmJyO5ZtKwdsAaQADuDj6I9c5ZlaBZgT7A1PV3+647CW+SyMyEAwmWOOGkg2bekUfoGpD4kL5cx8lv0aM2KZ4AyRe07Ew+63URdcUOEaa3wRfH8Cv8bFO6cW3qJucQx2Yc934sPLPu1HW5p2swx3wI1OfGlKyxoFUX1LLqB47bKbWJTiFxIn2njHrV2RPh4ai2ER0Dw2qeX2wSZe+9066LJ+zfZ5szeMdccRo/UqNtVguVG6ELPbACFYIs3OKJo2eWOETfRyx+xuGMCXLTZ7c5pyYQ7ovcwDvs0kCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAVtmRKDb4OK5iSA46tagMBkp6L7WuPpCWuHGWwobEP+BecYsShW7zP3s12oA8SNSwbhvu0CRqgzxhuypgf3hKQFVU153Erv4hzkj+8S0s5LR/ZE7tDNY2lzJ3yQKXy3Md7EkuzzvOZ50MTrcSKAanWq/ZW1OTnrtGymj5zGJnTg7mMnJzEIGePxkvPu/QdchiPBLqxfZYm1jsFGY25djOC3N/KmVcRVmPRGuu6D8tBFHlKoPfZYPdbMvsvs24aupHKRcZ+ofTCpK+2Qo8c0pSSqeEYHGmuGqC6lC6ozxtxSABPO9Q1R1tZBU7Kg5HvXUwwmoVS3EGub46YbHqbmWMLg==" - ], - "priority": [ - "100" - ] - } - }, - { - "name": "hmac-generated", - "providerId": "hmac-generated", - "subComponents": {}, - "config": { - "kid": [ - "96afd00e-85cf-4d35-b18e-061d3813d8b2" - ], - "secret": [ - "qBFGKdUGf6xDgKphnRfoFzIzaFHJW4bYnZ9MinPFzN38X5_ctq-2u1q5RdZzeJukXvk2biHB8_s3DxWmmLZFsA" - ], - "priority": [ - "100" - ], - "algorithm": [ - "HS256" - ] - } - }, - { - "name": "aes-generated", - "providerId": "aes-generated", - "subComponents": {}, - "config": { - "kid": [ - "b04473d3-8395-4016-b455-19a9e951106b" - ], - "secret": [ - "x68mMOVdz3qKWzltzReV0g" - ], - "priority": [ - "100" - ] - } - } - ] - }, - "internationalizationEnabled": false, - "supportedLocales": [], - "authenticationFlows": [ - { - "alias": "Handle Existing Account", - "description": "Handle what to do if there is existing account with same email/username like authenticated identity provider", - "providerId": "basic-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "idp-confirm-link", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "idp-email-verification", - "requirement": "ALTERNATIVE", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "requirement": "ALTERNATIVE", - "priority": 30, - "flowAlias": "Verify Existing Account by Re-authentication", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "alias": "Verify Existing Account by Re-authentication", - "description": "Reauthentication of existing account", - "providerId": "basic-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "idp-username-password-form", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "auth-otp-form", - "requirement": "OPTIONAL", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "browser", - "description": "browser based authentication", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "auth-cookie", - "requirement": "ALTERNATIVE", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "auth-spnego", - "requirement": "DISABLED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "identity-provider-redirector", - "requirement": "ALTERNATIVE", - "priority": 25, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "requirement": "ALTERNATIVE", - "priority": 30, - "flowAlias": "forms", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "alias": "clients", - "description": "Base authentication for clients", - "providerId": "client-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "client-secret", - "requirement": "ALTERNATIVE", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "client-jwt", - "requirement": "ALTERNATIVE", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "client-secret-jwt", - "requirement": "ALTERNATIVE", - "priority": 30, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "client-x509", - "requirement": "ALTERNATIVE", - "priority": 40, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "direct grant", - "description": "OpenID Connect Resource Owner Grant", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "direct-grant-validate-username", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "direct-grant-validate-password", - "requirement": "REQUIRED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "direct-grant-validate-otp", - "requirement": "OPTIONAL", - "priority": 30, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "docker auth", - "description": "Used by Docker clients to authenticate against the IDP", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "docker-http-basic-authenticator", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "first broker login", - "description": "Actions taken after first broker login with identity provider account, which is not yet linked to any Keycloak account", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticatorConfig": "review profile config", - "authenticator": "idp-review-profile", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticatorConfig": "create unique user config", - "authenticator": "idp-create-user-if-unique", - "requirement": "ALTERNATIVE", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "requirement": "ALTERNATIVE", - "priority": 30, - "flowAlias": "Handle Existing Account", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "alias": "forms", - "description": "Username, password, otp and other auth forms.", - "providerId": "basic-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "auth-username-password-form", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "auth-otp-form", - "requirement": "OPTIONAL", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "http challenge", - "description": "An authentication flow based on challenge-response HTTP Authentication Schemes", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "no-cookie-redirect", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "basic-auth", - "requirement": "REQUIRED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "basic-auth-otp", - "requirement": "DISABLED", - "priority": 30, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "auth-spnego", - "requirement": "DISABLED", - "priority": 40, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "registration", - "description": "registration flow", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "registration-page-form", - "requirement": "REQUIRED", - "priority": 10, - "flowAlias": "registration form", - "userSetupAllowed": false, - "autheticatorFlow": true - } - ] - }, - { - "alias": "registration form", - "description": "registration form", - "providerId": "form-flow", - "topLevel": false, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "registration-user-creation", - "requirement": "REQUIRED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "registration-profile-action", - "requirement": "REQUIRED", - "priority": 40, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "registration-password-action", - "requirement": "REQUIRED", - "priority": 50, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "registration-recaptcha-action", - "requirement": "DISABLED", - "priority": 60, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "reset credentials", - "description": "Reset credentials for a user if they forgot their password or something", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "reset-credentials-choose-user", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "reset-credential-email", - "requirement": "REQUIRED", - "priority": 20, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "reset-password", - "requirement": "REQUIRED", - "priority": 30, - "userSetupAllowed": false, - "autheticatorFlow": false - }, - { - "authenticator": "reset-otp", - "requirement": "OPTIONAL", - "priority": 40, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - }, - { - "alias": "saml ecp", - "description": "SAML ECP Profile Authentication Flow", - "providerId": "basic-flow", - "topLevel": true, - "builtIn": true, - "authenticationExecutions": [ - { - "authenticator": "http-basic-authenticator", - "requirement": "REQUIRED", - "priority": 10, - "userSetupAllowed": false, - "autheticatorFlow": false - } - ] - } - ], - "authenticatorConfig": [ - { - "alias": "create unique user config", - "config": { - "require.password.update.after.registration": "false" - } - }, - { - "alias": "review profile config", - "config": { - "update.profile.on.first.login": "missing" - } - } - ], - "requiredActions": [ - { - "alias": "CONFIGURE_TOTP", - "name": "Configure OTP", - "providerId": "CONFIGURE_TOTP", - "enabled": true, - "defaultAction": false, - "priority": 10, - "config": {} - }, - { - "alias": "terms_and_conditions", - "name": "Terms and Conditions", - "providerId": "terms_and_conditions", - "enabled": false, - "defaultAction": false, - "priority": 20, - "config": {} - }, - { - "alias": "UPDATE_PASSWORD", - "name": "Update Password", - "providerId": "UPDATE_PASSWORD", - "enabled": true, - "defaultAction": false, - "priority": 30, - "config": {} - }, - { - "alias": "UPDATE_PROFILE", - "name": "Update Profile", - "providerId": "UPDATE_PROFILE", - "enabled": true, - "defaultAction": false, - "priority": 40, - "config": {} - }, - { - "alias": "VERIFY_EMAIL", - "name": "Verify Email", - "providerId": "VERIFY_EMAIL", - "enabled": true, - "defaultAction": false, - "priority": 50, - "config": {} - } - ], - "browserFlow": "browser", - "registrationFlow": "registration", - "directGrantFlow": "direct grant", - "resetCredentialsFlow": "reset credentials", - "clientAuthenticationFlow": "clients", - "dockerAuthenticationFlow": "docker auth", - "attributes": { - "_browser_header.xXSSProtection": "1; mode=block", - "_browser_header.xFrameOptions": "SAMEORIGIN", - "_browser_header.strictTransportSecurity": "max-age=31536000; includeSubDomains", - "permanentLockout": "false", - "quickLoginCheckMilliSeconds": "1000", - "_browser_header.xRobotsTag": "none", - "maxFailureWaitSeconds": "900", - "minimumQuickLoginWaitSeconds": "60", - "failureFactor": "30", - "actionTokenGeneratedByUserLifespan": "300", - "maxDeltaTimeSeconds": "43200", - "_browser_header.xContentTypeOptions": "nosniff", - "offlineSessionMaxLifespan": "5184000", - "actionTokenGeneratedByAdminLifespan": "43200", - "_browser_header.contentSecurityPolicyReportOnly": "", - "bruteForceProtected": "false", - "_browser_header.contentSecurityPolicy": "frame-src 'self'; frame-ancestors 'self'; object-src 'none';", - "waitIncrementSeconds": "60", - "offlineSessionMaxLifespanEnabled": "false" - }, - "users": [ - { - "username": "admin", - "enabled": true, - "totp": false, - "emailVerified": false, - "credentials": [ - { - "type": "password", - "hashedSaltedValue": "NICTtwsvSxJ5hL8hLAuleDUv9jwZcuXgxviMXvR++cciyPtiIEStEaJUyfA9DOir59awjPrHOumsclPVjNBplA==", - "salt": "T/2P5o5oxFJUEk68BRURRg==", - "hashIterations": 27500, - "counter": 0, - "algorithm": "pbkdf2-sha256", - "digits": 0, - "period": 0, - "createdDate": 1554245879354, - "config": {} - } - ], - "disableableCredentialTypes": [ - "password" - ], - "requiredActions": [], - "realmRoles": [ - "admin", - "managers", - "user", - "IT", - "HR" - ], - "notBefore": 0, - "groups": [] - }, - { - "username": "alice", - "enabled": true, - "totp": false, - "emailVerified": false, - "credentials": [ - { - "type": "password", - "hashedSaltedValue": "A3okqV2T/ybXTVEgKfosoSjP8Yc9IZbFP/SY4cEd6hag7TABQrQ6nUSuwagGt96l8cw1DTijO75PqX6uiTXMzw==", - "salt": "sl4mXx6T9FypPH/s9TngfQ==", - "hashIterations": 27500, - "counter": 0, - "algorithm": "pbkdf2-sha256", - "digits": 0, - "period": 0, - "createdDate": 1554245879116, - "config": {} - } - ], - "disableableCredentialTypes": [ - "password" - ], - "requiredActions": [], - "realmRoles": [ - "user", - "HR" - ], - "notBefore": 0, - "groups": [] - }, - { - "username": "jdoe", - "enabled": true, - "totp": false, - "emailVerified": false, - "credentials": [ - { - "type": "password", - "hashedSaltedValue": "JV3DUNLjqOadjbBOtC4rvacQI553CGaDGAzBS8MR5ReCr7SwF3E6CsW3T7/XO8ITZAsch8+A/6loeuCoVLLJrg==", - "salt": "uCbOH7HZtyDtMd0E9DG/nw==", - "hashIterations": 27500, - "counter": 0, - "algorithm": "pbkdf2-sha256", - "digits": 0, - "period": 0, - "createdDate": 1554245879227, - "config": {} - } - ], - "disableableCredentialTypes": [ - "password" - ], - "requiredActions": [], - "realmRoles": [ - "managers", - "user", - "IT" - ], - "notBefore": 0, - "groups": [] - } - ], - "keycloakVersion": "6.0.0", - "userManagedAccessAllowed": false -} diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docker-compose/startServices.sh b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docker-compose/startServices.sh deleted file mode 100755 index 9ea130a50a..0000000000 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docker-compose/startServices.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh - -echo "Script requires your Kogito Quickstart to be compiled" - -PROJECT_VERSION=$(cd ../ && mvn help:evaluate -Dexpression=project.version -q -DforceStdout) - -echo "Project version: ${PROJECT_VERSION}" - -if [[ $PROJECT_VERSION == *SNAPSHOT ]]; -then - KOGITO_VERSION="latest" -else - KOGITO_VERSION=${PROJECT_VERSION%.*} -fi - -echo "Kogito Image version: ${KOGITO_VERSION}" -echo "KOGITO_VERSION=${KOGITO_VERSION}" > ".env" - -if [ "$(uname)" == "Darwin" ]; then - echo "DOCKER_GATEWAY_HOST=kubernetes.docker.internal" >> ".env" -elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then - echo "DOCKER_GATEWAY_HOST=172.17.0.1" >> ".env" -fi - -PERSISTENCE_FOLDER=./persistence -KOGITO_EXAMPLE_PERSISTENCE=../target/classes/META-INF/resources/persistence/protobuf - -rm -rf $PERSISTENCE_FOLDER - -mkdir -p $PERSISTENCE_FOLDER - -if [ -d "$KOGITO_EXAMPLE_PERSISTENCE" ] -then - cp $KOGITO_EXAMPLE_PERSISTENCE/*.proto $PERSISTENCE_FOLDER/ -else - echo "$KOGITO_EXAMPLE_PERSISTENCE does not exist. Have you compiled the project?" - exit 1 -fi - -SVG_FOLDER=./svg - -KOGITO_EXAMPLE_SVG_FOLDER=../target/classes/META-INF/processSVG - -mkdir -p $SVG_FOLDER - -if [ -d "$KOGITO_EXAMPLE_SVG_FOLDER" ] -then - cp $KOGITO_EXAMPLE_SVG_FOLDER/*.svg $SVG_FOLDER -else - echo "$KOGITO_EXAMPLE_SVG_FOLDER does not exist. Have you compiled the project?" - exit 1 -fi - -docker-compose up \ No newline at end of file diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/MC_details1.png b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/MC_details1.png deleted file mode 100644 index 5f0a95379c..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/MC_details1.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/MC_details2.png b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/MC_details2.png deleted file mode 100644 index 7ddf2fb204..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/MC_details2.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/MC_details3.png b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/MC_details3.png deleted file mode 100644 index fcc6ba57fb..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/MC_details3.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/MC_list1.png b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/MC_list1.png deleted file mode 100644 index 1caeae2ef2..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/MC_list1.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/MC_list2.png b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/MC_list2.png deleted file mode 100644 index a4c3acce85..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/MC_list2.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/TC_FirstLine.png b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/TC_FirstLine.png deleted file mode 100644 index e0f0f74e56..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/TC_FirstLine.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/TC_SecondLine.png b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/TC_SecondLine.png deleted file mode 100644 index 64edc107ac..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/TC_SecondLine.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/TC_list1.png b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/TC_list1.png deleted file mode 100644 index 0cc967bd1d..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/TC_list1.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/TC_list2.png b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/TC_list2.png deleted file mode 100644 index deabbc048e..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/TC_list2.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/keycloak-login.png b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/keycloak-login.png deleted file mode 100644 index 58d85f1f43..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/keycloak-login.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/management-console.png b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/management-console.png deleted file mode 100644 index 9a6053e529..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/management-console.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/process.png b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/process.png deleted file mode 100644 index 974dfaebaf..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/process.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/services.png b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/services.png deleted file mode 100644 index 2f456fa7c7..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/services.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/task-console.png b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/task-console.png deleted file mode 100644 index 08688fe01e..0000000000 Binary files a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/docs/images/task-console.png and /dev/null differ diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/pom.xml b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/pom.xml deleted file mode 100644 index 5eb4ea4ffc..0000000000 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/pom.xml +++ /dev/null @@ -1,170 +0,0 @@ - - - 4.0.0 - - org.kie.kogito.examples - kogito-springboot-examples - 2.0.0-SNAPSHOT - - - process-usertasks-with-security-oidc-springboot-with-console - Kogito Example :: Process Usertasks With Security OIDC Spring Boot :: Console - Kogito usertasks orchestration with security enabled on REST api - Spring Boot - With Console - - - true - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT - - - - - - org.kie.kogito - kogito-spring-boot-bom - ${kogito.bom.version} - pom - import - - - org.keycloak.bom - keycloak-adapter-bom - ${version.org.keycloak} - pom - import - - - org.infinispan - infinispan-bom - ${version.org.infinispan} - pom - import - - - - - - - org.springframework.boot - spring-boot-starter-actuator - - - - - org.kie.kogito - kogito-processes-spring-boot-starter - - - org.kie.kogito - kogito-api - - - org.springframework.boot - spring-boot-starter-security - - - org.keycloak - keycloak-spring-boot-starter - - - - org.kie.kogito - kogito-addons-springboot-events-process-kafka - - - org.kie.kogito - kogito-addons-springboot-persistence-infinispan - - - org.infinispan - infinispan-spring-boot-starter-remote - - - org.kie.kogito - kogito-addons-springboot-process-svg - - - org.kie.kogito - kogito-addons-springboot-process-management - - - org.springframework.kafka - spring-kafka - - - - - org.springframework.boot - spring-boot-starter-test - test - - - io.rest-assured - rest-assured - test - - - org.kie.kogito - kogito-spring-boot-test-utils - ${version.org.kie.kogito} - test - - - - - ${project.artifactId} - - - org.springframework.boot - spring-boot-maven-plugin - ${version.org.springframework.boot} - - - - repackage - - - - - - org.kie.kogito - kogito-maven-plugin - ${version.org.kie.kogito} - true - - - - - - container - - - container - - - - - - com.google.cloud.tools - jib-maven-plugin - - - install - - dockerBuild - - - - - - ${project.groupId}/${project.artifactId}:1.0 - - - - - - - - diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/acme/travels/Address.java b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/acme/travels/Address.java deleted file mode 100644 index d808334384..0000000000 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/acme/travels/Address.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR 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; - -public class Address { - - private String street; - private String city; - private String zipCode; - private String country; - - public Address() { - - } - - public Address(String street, String city, String zipCode, String country) { - super(); - this.street = street; - this.city = city; - this.zipCode = zipCode; - this.country = country; - } - - public String getStreet() { - return street; - } - - public void setStreet(String street) { - this.street = street; - } - - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - public String getZipCode() { - return zipCode; - } - - public void setZipCode(String zipCode) { - this.zipCode = zipCode; - } - - public String getCountry() { - return country; - } - - public void setCountry(String country) { - this.country = country; - } - - @Override - public String toString() { - return "Address [street=" + street + ", city=" + city + ", zipCode=" + zipCode + ", country=" + country + "]"; - } -} diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/acme/travels/Traveller.java b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/acme/travels/Traveller.java deleted file mode 100644 index cf790d4664..0000000000 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/acme/travels/Traveller.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR 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; - -public class Traveller { - - private String firstName; - private String lastName; - private String email; - private String nationality; - private Address address; - - public Traveller() { - - } - - public Traveller(String firstName, String lastName, String email, String nationality, Address address) { - super(); - this.firstName = firstName; - this.lastName = lastName; - this.email = email; - this.nationality = nationality; - this.address = address; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public String getNationality() { - return nationality; - } - - public void setNationality(String nationality) { - this.nationality = nationality; - } - - public Address getAddress() { - return address; - } - - public void setAddress(Address address) { - this.address = address; - } - - @Override - public String toString() { - return "Traveller [firstName=" + firstName + ", lastName=" + lastName + ", email=" + email + ", nationality=" - + nationality + ", address=" + address + "]"; - } - -} diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/kie/kogito/springboot/CorsConfig.java b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/kie/kogito/springboot/CorsConfig.java deleted file mode 100644 index 9c7aba87e6..0000000000 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/kie/kogito/springboot/CorsConfig.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.kie.kogito.springboot; - -import java.util.Arrays; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.cors.CorsConfiguration; -import org.springframework.web.cors.UrlBasedCorsConfigurationSource; -import org.springframework.web.filter.CorsFilter; - -@Configuration -public class CorsConfig { - - @Bean - public CorsFilter corsFilter() { - UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); - - CorsConfiguration config = new CorsConfiguration(); - config.setAllowCredentials(true); - config.setAllowedOriginPatterns(Arrays.asList("http://*:8080", "http://*:8280", "http://*:8380", "http://*:8480")); - config.addAllowedHeader("*"); - config.addAllowedMethod("OPTIONS"); - config.addAllowedMethod("GET"); - config.addAllowedMethod("POST"); - config.addAllowedMethod("PUT"); - config.addAllowedMethod("DELETE"); - source.registerCorsConfiguration("/**", - config); - - return new CorsFilter(source); - } -} \ No newline at end of file diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/kie/kogito/springboot/DefaultWebSecurityConfig.java b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/kie/kogito/springboot/DefaultWebSecurityConfig.java deleted file mode 100644 index d72bb6a176..0000000000 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/kie/kogito/springboot/DefaultWebSecurityConfig.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.kie.kogito.springboot; - -import org.keycloak.adapters.springsecurity.KeycloakConfiguration; -import org.keycloak.adapters.springsecurity.KeycloakSecurityComponents; -import org.keycloak.adapters.springsecurity.authentication.KeycloakAuthenticationProvider; -import org.keycloak.adapters.springsecurity.config.KeycloakWebSecurityConfigurerAdapter; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; -import org.springframework.security.config.annotation.web.builders.HttpSecurity; -import org.springframework.security.core.authority.mapping.SimpleAuthorityMapper; -import org.springframework.security.core.session.SessionRegistryImpl; -import org.springframework.security.web.authentication.session.RegisterSessionAuthenticationStrategy; -import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy; - -@KeycloakConfiguration -@ComponentScan(basePackageClasses = KeycloakSecurityComponents.class) -class DefaultWebSecurityConfig extends KeycloakWebSecurityConfigurerAdapter { - - @Autowired - public void configureGlobal(AuthenticationManagerBuilder auth) { - SimpleAuthorityMapper grantedAuthorityMapper = new SimpleAuthorityMapper(); - grantedAuthorityMapper.setPrefix("ROLE_"); - - KeycloakAuthenticationProvider keycloakAuthenticationProvider = keycloakAuthenticationProvider(); - keycloakAuthenticationProvider.setGrantedAuthoritiesMapper(grantedAuthorityMapper); - - auth.authenticationProvider(keycloakAuthenticationProvider); - } - - @Bean - @Override - protected SessionAuthenticationStrategy sessionAuthenticationStrategy() { - return new RegisterSessionAuthenticationStrategy( - new SessionRegistryImpl()); - } - - @Override - protected void configure(HttpSecurity http) throws Exception { - super.configure(http); - http.authorizeRequests() - .anyRequest() - .permitAll(); - http.cors() - .and() - .csrf().disable(); - } -} diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/kie/kogito/springboot/KeycloakResolverConfig.java b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/kie/kogito/springboot/KeycloakResolverConfig.java deleted file mode 100644 index add510733f..0000000000 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/kie/kogito/springboot/KeycloakResolverConfig.java +++ /dev/null @@ -1,30 +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.springboot; - -import org.keycloak.adapters.springboot.KeycloakSpringBootConfigResolver; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -@Configuration -public class KeycloakResolverConfig { - - @Bean - public KeycloakSpringBootConfigResolver KeycloakConfigResolver() { - return new KeycloakSpringBootConfigResolver(); - } -} diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/kie/kogito/springboot/KogitoSpringbootApplication.java b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/kie/kogito/springboot/KogitoSpringbootApplication.java deleted file mode 100644 index c832c38757..0000000000 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/java/org/kie/kogito/springboot/KogitoSpringbootApplication.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.kie.kogito.springboot; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication(scanBasePackages = { "org.kie.kogito.**", "org.acme.travels.**" }) -public class KogitoSpringbootApplication { - - public static void main(String[] args) { - SpringApplication.run(KogitoSpringbootApplication.class, args); - } - -} diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/resources/META-INF/processSVG/approvals.svg b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/resources/META-INF/processSVG/approvals.svg deleted file mode 100644 index 12d6a28af0..0000000000 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/resources/META-INF/processSVG/approvals.svg +++ /dev/null @@ -1 +0,0 @@ -Second Line approval EndStartProcessFirst Line approval \ No newline at end of file diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/resources/META-INF/resources/index.html b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/resources/META-INF/resources/index.html deleted file mode 100644 index fb2677f87d..0000000000 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/resources/META-INF/resources/index.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - - - Kogito quickstart - - - - - - - - - - - - - - -
-
-
-
-

Welcome to Kogito

-

- Cloud-native business automation for building intelligent applications, backed by - battle-tested capabilities. -

- - Get Started - - - Latest updates - -
-
-
-
-
-
-
-

Quick Links

- -
-
-
- - - \ No newline at end of file diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/resources/application.properties b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/resources/application.properties deleted file mode 100644 index 171e1bc030..0000000000 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/resources/application.properties +++ /dev/null @@ -1,34 +0,0 @@ -server.address=0.0.0.0 -infinispan.remote.server-list=127.0.0.1:11222 - -keycloak.auth-server-url=http://localhost:8480/auth - -keycloak.realm=kogito -keycloak.resource=kogito-app -keycloak.credentials.secret=secret -keycloak.cors=true -keycloak.ssl-required=external -keycloak.bearer-only=true -keycloak.use-resource-role-mappings=true - -kogito.dataindex.http.url=http://localhost:8180 -kogito.service.url=http://localhost:8080 -kogito.persistence.type=infinispan - -spring.kafka.bootstrap-servers=localhost:9092 - - -#mp.messaging.outgoing.kogito-processinstances-events.bootstrap.servers=localhost:9092 -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-usertaskinstances-events.bootstrap.servers=localhost:9092 -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.bootstrap.servers=localhost:9092 -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 \ No newline at end of file diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/resources/org/acme/travels/approval.bpmn2 b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/resources/org/acme/travels/approval.bpmn2 deleted file mode 100644 index d0a28ede66..0000000000 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/main/resources/org/acme/travels/approval.bpmn2 +++ /dev/null @@ -1,304 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SequenceFlow_4 - - - - - - - - SequenceFlow_6 - - - - - - - - SequenceFlow_4 - SequenceFlow_5 - - - - - - - - - - UserTask_1_TaskNameInputX - UserTask_1_travellerInputX - UserTask_1_SkippableInputX - UserTask_1_GroupIdInputX - UserTask_1_PriorityInputX - - - UserTask_1_ActorIdOutputX - UserTask_1_approvedOutputX - - - - UserTask_1_TaskNameInputX - - - - - - - traveller - UserTask_1_travellerInputX - - - UserTask_1_SkippableInputX - - - - - - - UserTask_1_GroupIdInputX - - - - - - - UserTask_1_PriorityInputX - - - - - - - UserTask_1_ActorIdOutputX - approver - - - UserTask_1_approvedOutputX - firstLineApproval - - - - jdoe - - - - - - - - - - SequenceFlow_5 - SequenceFlow_6 - - - - - - - - - - UserTask_2_TaskNameInputX - UserTask_2_ExcludedOwnerIdInputX - UserTask_2_travellerInputX - UserTask_2_SkippableInputX - UserTask_2_GroupIdInputX - UserTask_2_PriorityInputX - - - UserTask_2_approvedOutputX - - - - UserTask_2_TaskNameInputX - - - - - - - approver - UserTask_2_ExcludedOwnerIdInputX - - - traveller - UserTask_2_travellerInputX - - - UserTask_2_SkippableInputX - - - - - - - UserTask_2_GroupIdInputX - - - - - - - UserTask_2_PriorityInputX - - - - - - - UserTask_2_approvedOutputX - secondLineApproval - - - - jdoe - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - _q-f20MLBEDmYuc9yln6QJA - _q-f20MLBEDmYuc9yln6QJA - - \ No newline at end of file diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/test/java/org/acme/travels/ApprovalsProcessTestIT.java b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/test/java/org/acme/travels/ApprovalsProcessTestIT.java deleted file mode 100644 index 19da7eefb3..0000000000 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/test/java/org/acme/travels/ApprovalsProcessTestIT.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR 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; - -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.jbpm.process.instance.impl.humantask.HumanTaskTransition; -import org.jbpm.process.instance.impl.humantask.phases.Claim; -import org.jbpm.process.instance.impl.workitem.Complete; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.kie.kogito.Model; -import org.kie.kogito.auth.IdentityProviders; -import org.kie.kogito.auth.SecurityPolicy; -import org.kie.kogito.process.Process; -import org.kie.kogito.process.ProcessInstance; -import org.kie.kogito.process.WorkItem; -import org.kie.kogito.springboot.KogitoSpringbootApplication; -import org.kie.kogito.testcontainers.springboot.InfinispanSpringBootTestResource; -import org.kie.kogito.testcontainers.springboot.KeycloakSpringBootTestResource; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.annotation.DirtiesContext.ClassMode; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit.jupiter.SpringExtension; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; - -@ExtendWith(SpringExtension.class) -@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = KogitoSpringbootApplication.class) -@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD) // reset spring context after each test method -@ContextConfiguration(initializers = { KeycloakSpringBootTestResource.class, InfinispanSpringBootTestResource.Conditional.class }) -public class ApprovalsProcessTestIT { - @Autowired - @Qualifier("approvals") - Process approvalsProcess; - - @Test - public void testApprovalProcess() { - - assertNotNull(approvalsProcess); - - Model m = approvalsProcess.createModel(); - Map parameters = new HashMap<>(); - parameters.put("traveller", new Traveller("John", "Doe", "john.doe@example.com", "American", new Address("main street", "Boston", "10005", "US"))); - m.fromMap(parameters); - - ProcessInstance processInstance = approvalsProcess.createInstance(m); - processInstance.start(); - assertEquals(org.kie.api.runtime.process.ProcessInstance.STATE_ACTIVE, processInstance.status()); - - SecurityPolicy policy = SecurityPolicy.of(IdentityProviders.of("admin", Arrays.asList("managers"))); - - processInstance.workItems(policy); - - List workItems = processInstance.workItems(policy); - assertEquals(1, workItems.size()); - Map results = new HashMap<>(); - results.put("approved", true); - processInstance.completeWorkItem(workItems.get(0).getId(), results, policy); - - workItems = processInstance.workItems(policy); - assertEquals(0, workItems.size()); - - policy = SecurityPolicy.of(IdentityProviders.of("john", Arrays.asList("managers"))); - processInstance.workItems(policy); - - workItems = processInstance.workItems(policy); - assertEquals(1, workItems.size()); - - results.put("approved", false); - processInstance.completeWorkItem(workItems.get(0).getId(), results, policy); - assertEquals(org.kie.api.runtime.process.ProcessInstance.STATE_COMPLETED, processInstance.status()); - - Model result = (Model) processInstance.variables(); - assertEquals(4, result.toMap().size()); - assertEquals(result.toMap().get("approver"), "admin"); - assertEquals(result.toMap().get("firstLineApproval"), true); - assertEquals(result.toMap().get("secondLineApproval"), false); - } - - @Test - public void testApprovalProcessViaPhases() { - - assertNotNull(approvalsProcess); - - Model m = approvalsProcess.createModel(); - Map parameters = new HashMap<>(); - parameters.put("traveller", new Traveller("John", "Doe", "john.doe@example.com", "American", new Address("main street", "Boston", "10005", "US"))); - m.fromMap(parameters); - - ProcessInstance processInstance = approvalsProcess.createInstance(m); - processInstance.start(); - assertEquals(org.kie.api.runtime.process.ProcessInstance.STATE_ACTIVE, processInstance.status()); - - SecurityPolicy policy = SecurityPolicy.of(IdentityProviders.of("admin", Arrays.asList("managers"))); - - processInstance.workItems(policy); - - List workItems = processInstance.workItems(policy); - assertEquals(1, workItems.size()); - - processInstance.transitionWorkItem(workItems.get(0).getId(), new HumanTaskTransition(Claim.ID, null, policy)); - processInstance.transitionWorkItem(workItems.get(0).getId(), new HumanTaskTransition(Complete.ID, Collections.singletonMap("approved", true), policy)); - - workItems = processInstance.workItems(policy); - assertEquals(0, workItems.size()); - - policy = SecurityPolicy.of(IdentityProviders.of("john", Arrays.asList("managers"))); - - processInstance.workItems(policy); - - workItems = processInstance.workItems(policy); - assertEquals(1, workItems.size()); - - processInstance.transitionWorkItem(workItems.get(0).getId(), new HumanTaskTransition(Claim.ID, null, policy)); - processInstance.transitionWorkItem(workItems.get(0).getId(), new HumanTaskTransition(Complete.ID, Collections.singletonMap("approved", false), policy)); - - assertEquals(org.kie.api.runtime.process.ProcessInstance.STATE_COMPLETED, processInstance.status()); - - Model result = (Model) processInstance.variables(); - assertEquals(4, result.toMap().size()); - assertEquals(result.toMap().get("approver"), "admin"); - assertEquals(result.toMap().get("firstLineApproval"), true); - assertEquals(result.toMap().get("secondLineApproval"), false); - } -} diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/test/java/org/acme/travels/ApprovalsRestIT.java b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/test/java/org/acme/travels/ApprovalsRestIT.java deleted file mode 100644 index e45fefd324..0000000000 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/test/java/org/acme/travels/ApprovalsRestIT.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR 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; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.keycloak.representations.AccessTokenResponse; -import org.kie.kogito.springboot.KogitoSpringbootApplication; -import org.kie.kogito.testcontainers.springboot.InfinispanSpringBootTestResource; -import org.kie.kogito.testcontainers.springboot.KafkaSpringBootTestResource; -import org.kie.kogito.testcontainers.springboot.KeycloakSpringBootTestResource; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit.jupiter.SpringExtension; - -import io.restassured.RestAssured; -import io.restassured.http.ContentType; - -import static io.restassured.RestAssured.given; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.CoreMatchers.notNullValue; - -@ExtendWith(SpringExtension.class) -@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = KogitoSpringbootApplication.class) -@ContextConfiguration(initializers = { KeycloakSpringBootTestResource.class, InfinispanSpringBootTestResource.Conditional.class, KafkaSpringBootTestResource.class }) -public class ApprovalsRestIT { - - @LocalServerPort - int randomServerPort; - - @Value("${keycloak.auth-server-url}") - private String keycloakUrl; - - @BeforeEach - public void before() { - RestAssured.port = randomServerPort; - } - - @Test - public void testStartApprovalUnauthenticated() { - given() - .body("{\"traveller\" : {\"firstName\" : \"John\",\"lastName\" : \"Doe\",\"email\" : \"john.doe@example.com\",\"nationality\" : \"American\",\"address\" : {\"street\" : \"main street\",\"city\" : \"Boston\",\"zipCode\" : \"10005\",\"country\" : \"US\"}}") - .contentType(ContentType.JSON) - .when() - .post("/approvals") - .then() - .statusCode(400); - - } - - @Test - public void testStartApprovalAuthorized() { - // start new approval - String id = given() - .auth().oauth2(getAccessToken("mary")) - .body("{\"traveller\" : {\"firstName\" : \"John\",\"lastName\" : \"Doe\",\"email\" : \"john.doe@example.com\",\"nationality\" : \"American\",\"address\" : {\"street\" : \"main street\",\"city\" : \"Boston\",\"zipCode\" : \"10005\",\"country\" : \"US\"}}}") - .contentType(ContentType.JSON) - .when() - .post("/approvals") - .then() - .statusCode(201) - .body("id", notNullValue()).extract().path("id"); - - // get just started approval - given() - .auth().oauth2(getAccessToken("mary")) - .accept(ContentType.JSON) - .when() - .get("/approvals/" + id) - .then() - .statusCode(200) - .body("id", is(id)); - - // tasks assigned in just started approval - String taskInfo = given() - .auth() - .oauth2(getAccessToken("mary")) - .accept(ContentType.JSON) - .when() - .get("/approvals/" + id + "/tasks?user=admin&group=managers") - .then() - .statusCode(200) - .body("$.size", is(1)) - .body("[0].name", is("firstLineApproval")) - .extract() - .path("[0].id"); - - // complete first task without authorization header as it authorization is managed on task level - // thus user and group(s) must be provided - String payload = "{}"; - given() - .auth().oauth2(getAccessToken("mary")) - .contentType(ContentType.JSON) - .accept(ContentType.JSON) - .body(payload) - .when() - .post("/approvals/" + id + "/firstLineApproval/" + taskInfo + "?user=mary&group=managers") - .then() - .statusCode(200) - .body("id", is(id)); - - // lastly abort the approval - given() - .auth().oauth2(getAccessToken("mary")) - .accept(ContentType.JSON) - .when() - .delete("/approvals/" + id) - .then() - .statusCode(200) - .body("id", is(id)); - } - - private String getAccessToken(String userName) { - return given() - .param("grant_type", "password") - .param("username", userName) - .param("password", userName) - .param("client_id", "kogito-app") - .param("client_secret", "secret") - .when() - .post(keycloakUrl + "/realms/kogito/protocol/openid-connect/token") - .as(AccessTokenResponse.class).getToken(); - - } - -} diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/test/resources/application.properties b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/test/resources/application.properties deleted file mode 100644 index 7740348dd8..0000000000 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot-with-console/src/test/resources/application.properties +++ /dev/null @@ -1,14 +0,0 @@ - -keycloak.realm=kogito -keycloak.resource=kogito-app -keycloak.credentials.secret=secret -keycloak.bearer-only=true - -spring.main.allow-bean-definition-overriding=true - -server.address=0.0.0.0 - -# Kafka -spring.kafka.bootstrap-servers=localhost:9092 -spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer -spring.kafka.producer.value-serializer=org.apache.kafka.common.serialization.StringSerializer \ No newline at end of file diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/pom.xml b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/pom.xml index e242442ecc..675a521a99 100644 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/pom.xml +++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/pom.xml @@ -1,4 +1,24 @@ + @@ -6,7 +26,7 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-usertasks-with-security-oidc-springboot @@ -14,8 +34,8 @@ Kogito usertasks orchestration with security enabled on REST api - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -27,13 +47,6 @@ pom import
- - org.keycloak.bom - keycloak-adapter-bom - ${version.org.keycloak} - pom - import -
@@ -47,14 +60,14 @@ spring-boot-starter-security
- org.keycloak - keycloak-spring-boot-starter + org.springframework.boot + spring-boot-starter-oauth2-resource-server - + - org.kie.kogito - kogito-processes-spring-boot-starter + org.jbpm + jbpm-spring-boot-starter org.springframework.boot diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/acme/travels/Address.java b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/acme/travels/Address.java index d808334384..662dfa9b9f 100644 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/acme/travels/Address.java +++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/acme/travels/Address.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.acme.travels; diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/acme/travels/Traveller.java b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/acme/travels/Traveller.java index cf790d4664..c24685803d 100644 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/acme/travels/Traveller.java +++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/acme/travels/Traveller.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.acme.travels; diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/kie/kogito/springboot/DefaultWebSecurityConfig.java b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/kie/kogito/springboot/DefaultWebSecurityConfig.java index e1e9fc439b..52dbc7dd02 100644 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/kie/kogito/springboot/DefaultWebSecurityConfig.java +++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/kie/kogito/springboot/DefaultWebSecurityConfig.java @@ -1,64 +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.springboot; -import org.keycloak.adapters.springsecurity.KeycloakConfiguration; -import org.keycloak.adapters.springsecurity.KeycloakSecurityComponents; -import org.keycloak.adapters.springsecurity.authentication.KeycloakAuthenticationProvider; -import org.keycloak.adapters.springsecurity.config.KeycloakWebSecurityConfigurerAdapter; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; -import org.springframework.security.core.authority.mapping.SimpleAuthorityMapper; -import org.springframework.security.core.session.SessionRegistryImpl; -import org.springframework.security.web.authentication.session.RegisterSessionAuthenticationStrategy; -import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy; - -@KeycloakConfiguration -@ComponentScan(basePackageClasses = KeycloakSecurityComponents.class) -class DefaultWebSecurityConfig extends KeycloakWebSecurityConfigurerAdapter { +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.web.SecurityFilterChain; - @Autowired - public void configureGlobal(AuthenticationManagerBuilder auth) { - SimpleAuthorityMapper grantedAuthorityMapper = new SimpleAuthorityMapper(); - grantedAuthorityMapper.setPrefix("ROLE_"); - - KeycloakAuthenticationProvider keycloakAuthenticationProvider = keycloakAuthenticationProvider(); - keycloakAuthenticationProvider.setGrantedAuthoritiesMapper(grantedAuthorityMapper); - - auth.authenticationProvider(keycloakAuthenticationProvider); - } +@Configuration +@EnableWebSecurity +class DefaultWebSecurityConfig { @Bean - @Override - protected SessionAuthenticationStrategy sessionAuthenticationStrategy() { - return new RegisterSessionAuthenticationStrategy( - new SessionRegistryImpl()); - } - - @Override - protected void configure(HttpSecurity http) throws Exception { - super.configure(http); - http.csrf().disable() - .authorizeRequests() - .antMatchers("/approvals/**") + public SecurityFilterChain configure(HttpSecurity http) throws Exception { + http.authorizeHttpRequests() + .anyRequest() .authenticated() - .antMatchers("/docs/**").permitAll() - .anyRequest().permitAll(); + .and() + .oauth2ResourceServer().jwt(); + http.cors() + .and() + .csrf().disable(); + return http.build(); } } diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/kie/kogito/springboot/KeycloakResolverConfig.java b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/kie/kogito/springboot/KeycloakResolverConfig.java deleted file mode 100644 index add510733f..0000000000 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/kie/kogito/springboot/KeycloakResolverConfig.java +++ /dev/null @@ -1,30 +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.springboot; - -import org.keycloak.adapters.springboot.KeycloakSpringBootConfigResolver; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -@Configuration -public class KeycloakResolverConfig { - - @Bean - public KeycloakSpringBootConfigResolver KeycloakConfigResolver() { - return new KeycloakSpringBootConfigResolver(); - } -} diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/kie/kogito/springboot/KogitoSpringbootApplication.java b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/kie/kogito/springboot/KogitoSpringbootApplication.java index c832c38757..dfb4db675e 100644 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/kie/kogito/springboot/KogitoSpringbootApplication.java +++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/java/org/kie/kogito/springboot/KogitoSpringbootApplication.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.springboot; diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/resources/application.properties b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/resources/application.properties index 05c02cbc06..c95b73622e 100644 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/main/resources/application.properties @@ -1,11 +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. +# + server.address=0.0.0.0 spring.main.allow-bean-definition-overriding=true -keycloak.auth-server-url=http://localhost:8281/auth -keycloak.realm=kogito -keycloak.resource=kogito-app -keycloak.credentials.secret=secret -keycloak.bearer-only=true +spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:8281/auth/realms/kogito diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/java/org/acme/travels/ApprovalsRestIT.java b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/java/org/acme/travels/ApprovalsRestIT.java index 32f63e398b..8dcc16f496 100644 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/java/org/acme/travels/ApprovalsRestIT.java +++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/java/org/acme/travels/ApprovalsRestIT.java @@ -1,29 +1,31 @@ /* - * 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.acme.travels; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.keycloak.representations.AccessTokenResponse; import org.kie.kogito.springboot.KogitoSpringbootApplication; import org.kie.kogito.testcontainers.springboot.KeycloakSpringBootTestResource; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; @@ -59,7 +61,6 @@ public void testStartApprovalUnauthorized() { .post("/approvals") .then() .statusCode(401); - } @Test @@ -83,7 +84,7 @@ public void testStartApprovalAuthorized() { .get("/approvals") .then() .statusCode(200) - .body("$.size()", is(1), "[0].id", is(id)); + .body("size()", is(1), "[0].id", is(id)); // get just started approval given() @@ -105,7 +106,7 @@ public void testStartApprovalAuthorized() { .get("/approvals/" + id + "/tasks?user=admin&group=managers") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("firstLineApproval")) .extract() .path("[0].id"); @@ -144,8 +145,8 @@ private String getAccessToken(String userName) { .param("client_secret", "secret") .when() .post(keycloakUrl + "/realms/kogito/protocol/openid-connect/token") - .as(AccessTokenResponse.class).getToken(); - + .then() + .extract() + .path("access_token"); } - } diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/java/org/acme/travels/security/oidc/springboot/ApprovalsProcessTest.java b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/java/org/acme/travels/security/oidc/springboot/ApprovalsProcessTest.java index e3b05e077a..fa25b9e3d3 100644 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/java/org/acme/travels/security/oidc/springboot/ApprovalsProcessTest.java +++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/java/org/acme/travels/security/oidc/springboot/ApprovalsProcessTest.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.acme.travels.security.oidc.springboot; diff --git a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/resources/application.properties b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/resources/application.properties index a2dac0b066..327ff75071 100644 --- a/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/resources/application.properties +++ b/kogito-springboot-examples/process-usertasks-with-security-oidc-springboot/src/test/resources/application.properties @@ -1,7 +1,22 @@ -keycloak.auth-server-url=http://localhost:8281/auth -keycloak.realm=kogito -keycloak.resource=kogito-app -keycloak.credentials.secret=secret -keycloak.bearer-only=true +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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. +# + +spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:8281/auth/realms/kogito spring.main.allow-bean-definition-overriding=true \ No newline at end of file diff --git a/kogito-springboot-examples/process-usertasks-with-security-springboot/README.md b/kogito-springboot-examples/process-usertasks-with-security-springboot/README.md index c0ea4efc12..a1c67b174e 100644 --- a/kogito-springboot-examples/process-usertasks-with-security-springboot/README.md +++ b/kogito-springboot-examples/process-usertasks-with-security-springboot/README.md @@ -150,7 +150,3 @@ plus the approver who made the first one. } } ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-springboot-examples/process-usertasks-with-security-springboot/operator/process-tasks-security-springboot.yaml b/kogito-springboot-examples/process-usertasks-with-security-springboot/operator/process-tasks-security-springboot.yaml deleted file mode 100644 index 29eb4147a0..0000000000 --- a/kogito-springboot-examples/process-usertasks-with-security-springboot/operator/process-tasks-security-springboot.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: process-tasks-security-springboot -spec: - type: RemoteSource - runtime: springboot - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/process-usertasks-with-security-springboot - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: process-tasks-security-springboot -spec: - runtime: springboot \ No newline at end of file diff --git a/kogito-springboot-examples/process-usertasks-with-security-springboot/pom.xml b/kogito-springboot-examples/process-usertasks-with-security-springboot/pom.xml index 7da2721b9b..ef31889a0e 100644 --- a/kogito-springboot-examples/process-usertasks-with-security-springboot/pom.xml +++ b/kogito-springboot-examples/process-usertasks-with-security-springboot/pom.xml @@ -1,4 +1,24 @@ + @@ -6,7 +26,7 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT process-usertasks-with-security-springboot @@ -14,8 +34,8 @@ Kogito usertasks orchestration with security enabled on REST api - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -40,11 +60,17 @@ spring-boot-starter-security - + - org.kie.kogito - kogito-processes-spring-boot-starter + org.jbpm + jbpm-spring-boot-starter + + + com.fasterxml.jackson.datatype + jackson-datatype-jakarta-jsonp + + org.springframework.boot spring-boot-starter-test diff --git a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/acme/travels/Address.java b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/acme/travels/Address.java index d808334384..662dfa9b9f 100644 --- a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/acme/travels/Address.java +++ b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/acme/travels/Address.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.acme.travels; diff --git a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/acme/travels/Traveller.java b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/acme/travels/Traveller.java index cf790d4664..c24685803d 100644 --- a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/acme/travels/Traveller.java +++ b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/acme/travels/Traveller.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.acme.travels; diff --git a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/kie/kogito/tests/DefaultWebSecurityConfig.java b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/kie/kogito/tests/DefaultWebSecurityConfig.java index 714b155cb0..61b13bab96 100644 --- a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/kie/kogito/tests/DefaultWebSecurityConfig.java +++ b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/kie/kogito/tests/DefaultWebSecurityConfig.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.tests; @@ -19,24 +22,28 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; -import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.crypto.password.NoOpPasswordEncoder; import org.springframework.security.crypto.password.PasswordEncoder; +import org.springframework.security.web.SecurityFilterChain; -@Configuration("kieServerSecurity") +@Configuration @EnableWebSecurity -public class DefaultWebSecurityConfig extends WebSecurityConfigurerAdapter { +@EnableMethodSecurity(jsr250Enabled = true) +public class DefaultWebSecurityConfig { - @Override - protected void configure(HttpSecurity http) throws Exception { + @Bean + public SecurityFilterChain configure(HttpSecurity http) throws Exception { http .csrf().disable() - .authorizeRequests() - .antMatchers("/**").authenticated() + .authorizeHttpRequests() + .requestMatchers("/**").authenticated() .and() .httpBasic(); + + return http.build(); } @Autowired diff --git a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.java b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.java index 7b2daaca72..fc27bd8647 100644 --- a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.java +++ b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/kie/kogito/tests/KogitoInfinispanSpringbootApplication.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.tests; diff --git a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/kie/kogito/tests/LogEventPublisher.java b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/kie/kogito/tests/LogEventPublisher.java index 882c0ef2ee..7b86aa1c91 100644 --- a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/kie/kogito/tests/LogEventPublisher.java +++ b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/java/org/kie/kogito/tests/LogEventPublisher.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.tests; @@ -19,6 +22,7 @@ import org.kie.kogito.event.DataEvent; import org.kie.kogito.event.EventPublisher; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.fasterxml.jackson.core.JsonProcessingException; @@ -27,7 +31,12 @@ @Component public class LogEventPublisher implements EventPublisher { - ObjectMapper json = new ObjectMapper(); + private ObjectMapper json; + + @Autowired + public void setMapper(ObjectMapper json) { + this.json = json; + } @Override public void publish(DataEvent event) { diff --git a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/resources/application.properties b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/resources/application.properties index 5f4fb60b55..4e8da841ca 100644 --- a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/main/resources/application.properties @@ -1 +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. +# + server.address=0.0.0.0 \ No newline at end of file diff --git a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/test/java/org/acme/travels/security/springboot/ApprovalsProcessTest.java b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/test/java/org/acme/travels/security/springboot/ApprovalsProcessTest.java index 7c466176d4..2a1467f4d8 100644 --- a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/test/java/org/acme/travels/security/springboot/ApprovalsProcessTest.java +++ b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/test/java/org/acme/travels/security/springboot/ApprovalsProcessTest.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.acme.travels.security.springboot; diff --git a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/test/java/org/acme/travels/security/springboot/ApprovalsRestTest.java b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/test/java/org/acme/travels/security/springboot/ApprovalsRestTest.java index 18d52fdca0..9245d513cc 100644 --- a/kogito-springboot-examples/process-usertasks-with-security-springboot/src/test/java/org/acme/travels/security/springboot/ApprovalsRestTest.java +++ b/kogito-springboot-examples/process-usertasks-with-security-springboot/src/test/java/org/acme/travels/security/springboot/ApprovalsRestTest.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.acme.travels.security.springboot; @@ -20,7 +23,7 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.kie.kogito.tests.KogitoInfinispanSpringbootApplication; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.annotation.DirtiesContext.ClassMode; import org.springframework.test.context.junit.jupiter.SpringExtension; @@ -78,7 +81,7 @@ public void testStartApprovalAuthorized() { .get("/approvals") .then() .statusCode(200) - .body("$.size()", is(1), "[0].id", is(id)); + .body("size()", is(1), "[0].id", is(id)); // get just started approval given() @@ -99,7 +102,7 @@ public void testStartApprovalAuthorized() { .get("/approvals/" + id + "/tasks?user=admin&group=managers") .then() .statusCode(200) - .body("$.size", is(1)) + .body("size()", is(1)) .body("[0].name", is("firstLineApproval")) .extract() .path("[0].id"); diff --git a/kogito-springboot-examples/rules-legacy-scesim-springboot-example/README.md b/kogito-springboot-examples/rules-legacy-scesim-springboot-example/README.md new file mode 100644 index 0000000000..1d3b145fa5 --- /dev/null +++ b/kogito-springboot-examples/rules-legacy-scesim-springboot-example/README.md @@ -0,0 +1,107 @@ + +# RuleUnit + Spring Boot + Test Scenario example + +## Description + +A simple rule service to validate `Hello` fact and testing it using Scenario Simulation. + +An injectable KieRuntimeBuilder is generated, so you can create Drools v7 KieBase and KieSession out of it. + +## Installing and Running + +### Prerequisites + +You will need: + - Java 11+ installed + - Environment variable JAVA_HOME set accordingly + - Maven 3.8.6+ installed + +### Compile and Run + +```sh +mvn clean compile spring-boot:run +``` + +### Package and Run + +```sh +mvn clean package +java -jar target/ruleunit-springboot-example.jar +``` + +## OpenAPI (Swagger) documentation +[Specification at swagger.io](https://swagger.io/docs/specification/about/) + +You can take a look at the [OpenAPI definition](http://localhost:8080/v3/api-docs) - automatically generated and included in this service - to determine all available operations exposed by this service. For easy readability you can visualize the OpenAPI definition file using a UI tool like for example available [Swagger UI](https://editor.swagger.io). + +In addition, various clients to interact with this service can be easily generated using this OpenAPI definition. + +## Example Usage + +Once the service is up and running, you can use the following examples to interact with the service. + +### POST /find-approved + +Returns approved Hello from the given fact: + +```sh +curl -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{"approved":false, "greeting":"foo"}' http://localhost:8080/find-approved +``` +or on windows + +```sh +curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" -d "{\"approved\":false, \"greeting\":\"foo\"}" http://localhost:8080/find-approved +``` + +As response the modified Hello is returned. + +Example response: + +```json +{"greeting":"foo","approved":true} +``` + +Returns denied Hello from the given fact: + +```sh +curl -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{"approved":false, "greeting":"bar"}' http://localhost:8080/find-approved +``` +or on windows + +```sh +curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" -d "{\"approved\":false, \"greeting\":\"bar\"}" http://localhost:8080/find-approved +``` + +As response the modified Hello is returned. + +Example response: + +```json +{"greeting":"bar","approved":false} +``` +# Test Scenario usage + +Test Scenario + rules project created inside Business central should work, with the following requirements: +1. use the pom as defined in the current project +2. set the `kogito.sources.keep` variable to `true` + +## Caveat +Requires `org.drools:drools-xml-support` dependency +For the moment being, "globals" are unsupported \ No newline at end of file diff --git a/kogito-springboot-examples/rules-legacy-scesim-springboot-example/pom.xml b/kogito-springboot-examples/rules-legacy-scesim-springboot-example/pom.xml new file mode 100644 index 0000000000..3141269de3 --- /dev/null +++ b/kogito-springboot-examples/rules-legacy-scesim-springboot-example/pom.xml @@ -0,0 +1,116 @@ + + + + 4.0.0 + + + org.kie.kogito.examples + kogito-springboot-examples + 999-SNAPSHOT + + rules-legacy-scesim-springboot-example + Kogito Example :: Rules Legacy API HELLO - Spring Boot :: Test Scenario + + + 999-SNAPSHOT + 999-SNAPSHOT + true + + + + + + org.kie.kogito + kogito-spring-boot-bom + ${kogito.bom.version} + pom + import + + + org.drools + drools-xml-support + ${version.org.kie.kogito} + test + + + + + + + org.springframework.boot + spring-boot-starter-actuator + + + org.drools + drools-rules-spring-boot-starter + + + + + org.springframework.boot + spring-boot-starter-test + test + + + io.rest-assured + rest-assured + test + + + + org.kie.kogito + kogito-scenario-simulation + test + + + org.drools + drools-xml-support + test + + + + + ${project.artifactId} + + + org.kie.kogito + kogito-maven-plugin + ${version.org.kie.kogito} + true + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + + diff --git a/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/main/java/org/kie/kogito/legacy/Hello.java b/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/main/java/org/kie/kogito/legacy/Hello.java new file mode 100644 index 0000000000..96fa6be094 --- /dev/null +++ b/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/main/java/org/kie/kogito/legacy/Hello.java @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.legacy; + +public class Hello implements java.io.Serializable { + + static final long serialVersionUID = 1L; + + @org.kie.api.definition.type.Label("Greeting") + private java.lang.String greeting; + + @org.kie.api.definition.type.Label(value = "Approved") + private java.lang.Boolean approved; + + public Hello() { + } + + public java.lang.String getGreeting() { + return this.greeting; + } + + public void setGreeting(java.lang.String greeting) { + this.greeting = greeting; + } + + public java.lang.Boolean getApproved() { + return this.approved; + } + + public void setApproved(java.lang.Boolean approved) { + this.approved = approved; + } + + public Hello(java.lang.String greeting, java.lang.Boolean approved) { + this.greeting = greeting; + this.approved = approved; + } + +} \ No newline at end of file diff --git a/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/main/java/org/kie/kogito/legacy/HelloEndpoint.java b/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/main/java/org/kie/kogito/legacy/HelloEndpoint.java new file mode 100644 index 0000000000..d46dadb289 --- /dev/null +++ b/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/main/java/org/kie/kogito/legacy/HelloEndpoint.java @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.legacy; + +import org.kie.api.runtime.KieRuntimeBuilder; +import org.kie.api.runtime.KieSession; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/find-approved") +public class HelloEndpoint { + + private final KieRuntimeBuilder kieRuntimeBuilder; + + public HelloEndpoint(KieRuntimeBuilder kieRuntimeBuilder) { + this.kieRuntimeBuilder = kieRuntimeBuilder; + } + + @PostMapping(produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) + public Hello executeQuery(@RequestBody(required = true) Hello hello) { + KieSession session = kieRuntimeBuilder.newKieSession(); + + session.insert(hello); + session.fireAllRules(); + + return hello; + } +} diff --git a/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/main/java/org/kie/kogito/legacy/KogitoSpringbootApplication.java b/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/main/java/org/kie/kogito/legacy/KogitoSpringbootApplication.java new file mode 100644 index 0000000000..d8e30b0e1f --- /dev/null +++ b/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/main/java/org/kie/kogito/legacy/KogitoSpringbootApplication.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.legacy; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication(scanBasePackages = { "org.kie.kogito.**", "org.drools.**" }) +public class KogitoSpringbootApplication { + + public static void main(String[] args) { + SpringApplication.run(KogitoSpringbootApplication.class, args); + } +} diff --git a/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/main/resources/META-INF/kmodule.xml b/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/main/resources/META-INF/kmodule.xml new file mode 100644 index 0000000000..9fe3cd73e0 --- /dev/null +++ b/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/main/resources/META-INF/kmodule.xml @@ -0,0 +1,19 @@ + + \ No newline at end of file diff --git a/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/main/resources/application.properties b/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/main/resources/application.properties new file mode 100644 index 0000000000..4e8da841ca --- /dev/null +++ b/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/main/resources/application.properties @@ -0,0 +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. +# + +server.address=0.0.0.0 \ No newline at end of file diff --git a/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/main/resources/org/kie/kogito/legacy/HelloRule.drl b/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/main/resources/org/kie/kogito/legacy/HelloRule.drl new file mode 100644 index 0000000000..af997ef75b --- /dev/null +++ b/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/main/resources/org/kie/kogito/legacy/HelloRule.drl @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.legacy; + +import org.kie.kogito.legacy.Hello; + +rule HelloApprove when + $l: Hello( greeting.equals("foo") ) +then + System.out.println("HelloApprove"); + modify($l) { setApproved(true) }; +end + +rule HelloDeny when + $l: Hello( greeting != "foo" ) +then + System.out.println("HelloDeny"); + modify($l) { setApproved(false) }; +end \ No newline at end of file diff --git a/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/test/java/org/kie/kogito/legacy/RestQueryTest.java b/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/test/java/org/kie/kogito/legacy/RestQueryTest.java new file mode 100644 index 0000000000..fd590db5ea --- /dev/null +++ b/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/test/java/org/kie/kogito/legacy/RestQueryTest.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.legacy; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.web.server.LocalServerPort; +import org.springframework.test.annotation.DirtiesContext; + +import io.restassured.RestAssured; +import io.restassured.http.ContentType; + +import static io.restassured.RestAssured.given; +import static org.hamcrest.core.Is.is; + +@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = KogitoSpringbootApplication.class) +@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) +public class RestQueryTest { + + @LocalServerPort + private int port; + + @BeforeEach + public void setUp() { + RestAssured.port = port; + } + + private static final String JSON_APPROVED_PAYLOAD = + "{\n" + + " \"approved\":false,\n" + + " \"greeting\":\"foo\"\n" + + "}"; + private static final String JSON_DENIED_PAYLOAD = + "{\n" + + " \"approved\":false,\n" + + " \"greeting\":\"bar\"\n" + + "}"; + + @Test + public void testApproved() { + given() + .body(JSON_APPROVED_PAYLOAD) + .contentType(ContentType.JSON) + .when() + .post("/find-approved") + .then() + .statusCode(200) + .body("approved", is(true)); + } + + @Test + public void testDenied() { + given() + .body(JSON_DENIED_PAYLOAD) + .contentType(ContentType.JSON) + .when() + .post("/find-approved") + .then() + .statusCode(200) + .body("approved", is(false)); + } +} diff --git a/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/test/java/testscenario/ScenarioJunitActivatorTest.java b/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/test/java/testscenario/ScenarioJunitActivatorTest.java new file mode 100644 index 0000000000..13bd96d819 --- /dev/null +++ b/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/test/java/testscenario/ScenarioJunitActivatorTest.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 testscenario; + +/** + * Do not remove this file + */ +@org.junit.runner.RunWith(org.drools.scenariosimulation.backend.runner.ScenarioJunitActivator.class) +public class ScenarioJunitActivatorTest { +} \ No newline at end of file diff --git a/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/test/resources/HelloScesim.scesim b/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/test/resources/HelloScesim.scesim new file mode 100644 index 0000000000..ba452b174f --- /dev/null +++ b/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/test/resources/HelloScesim.scesim @@ -0,0 +1,292 @@ + + + + + + + + + + Index + OTHER + + + # + java.lang.Integer + + java.lang.Integer + # + NOT_EXPRESSION + 70.0 + + + + + Description + OTHER + + + Scenario description + java.lang.String + + java.lang.String + Scenario description + NOT_EXPRESSION + 300.0 + + + + + Hello + + + greeting + + + + 1|1 + GIVEN + + + 1|1 + org.kie.kogito.legacy.Hello + + java.lang.String + Hello + greeting + NOT_EXPRESSION + 337.66666666666663 + + + + + Hello + + + greeting + + + + 1|2 + EXPECT + + + 1|1 + org.kie.kogito.legacy.Hello + + java.lang.String + Hello + greeting + NOT_EXPRESSION + 337.66666666666663 + + + + + Hello + + + approved + + + + 1715763614877 + EXPECT + + + 1|1 + org.kie.kogito.legacy.Hello + + java.lang.Boolean + Hello + approved + NOT_EXPRESSION + 337.66666666666663 + + + + + + + + + Scenario description + java.lang.String + + + Description + OTHER + + Approved + + + + # + java.lang.Integer + + + Index + OTHER + + 1 + + + + 1|1 + org.kie.kogito.legacy.Hello + + + 1|1 + GIVEN + + foo + + + + 1|1 + org.kie.kogito.legacy.Hello + + + 1|2 + EXPECT + + foo + + + + 1|1 + org.kie.kogito.legacy.Hello + + + 1715763614877 + EXPECT + + true + + + + + + + + Scenario description + java.lang.String + + + Description + OTHER + + Denied + + + + # + java.lang.Integer + + + Index + OTHER + + 2 + + + + 1|1 + org.kie.kogito.legacy.Hello + + + 1|1 + GIVEN + + bar + + + + 1|1 + org.kie.kogito.legacy.Hello + + + 1|2 + EXPECT + + bar + + + + 1|1 + org.kie.kogito.legacy.Hello + + + 1715763614877 + EXPECT + + false + + + + + + + + + + + + 1|1 + GIVEN + + + Empty + java.lang.Void + + java.lang.Void + INSTANCE 1 + PROPERTY 1 + NOT_EXPRESSION + 114.0 + + + + + + + + + Empty + java.lang.Void + + + 1|1 + GIVEN + + + + + + + + RULE + false + false + + + + + \ No newline at end of file diff --git a/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/test/resources/logback-test.xml b/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/test/resources/logback-test.xml new file mode 100644 index 0000000000..4ca6ba0f5e --- /dev/null +++ b/kogito-springboot-examples/rules-legacy-scesim-springboot-example/src/test/resources/logback-test.xml @@ -0,0 +1,37 @@ + + + + + + + %date{HH:mm:ss.SSS} [%thread] %-5level %class{36}.%method:%line - %msg%n + + + + + + + + + + + \ No newline at end of file diff --git a/kogito-springboot-examples/rules-legacy-springboot-example/README.md b/kogito-springboot-examples/rules-legacy-springboot-example/README.md index 6a5caa4340..c272139876 100644 --- a/kogito-springboot-examples/rules-legacy-springboot-example/README.md +++ b/kogito-springboot-examples/rules-legacy-springboot-example/README.md @@ -95,7 +95,3 @@ Example response: } ] ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-springboot-examples/rules-legacy-springboot-example/operator/ruleunit-springboot-example.yaml b/kogito-springboot-examples/rules-legacy-springboot-example/operator/ruleunit-springboot-example.yaml deleted file mode 100644 index 50a768d6c0..0000000000 --- a/kogito-springboot-examples/rules-legacy-springboot-example/operator/ruleunit-springboot-example.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: ruleunit-springboot-example -spec: - type: RemoteSource - runtime: springboot - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/ruleunit-springboot-example - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: ruleunit-springboot-example -spec: - runtime: springboot \ No newline at end of file diff --git a/kogito-springboot-examples/rules-legacy-springboot-example/pom.xml b/kogito-springboot-examples/rules-legacy-springboot-example/pom.xml index 6f98382b49..23b33d2916 100644 --- a/kogito-springboot-examples/rules-legacy-springboot-example/pom.xml +++ b/kogito-springboot-examples/rules-legacy-springboot-example/pom.xml @@ -1,4 +1,24 @@ + @@ -7,14 +27,14 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT rules-legacy-springboot-example Kogito Example :: Rules Legacy API - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -35,8 +55,8 @@ spring-boot-starter-actuator - org.kie.kogito - kogito-rules-spring-boot-starter + org.drools + drools-rules-spring-boot-starter diff --git a/kogito-springboot-examples/rules-legacy-springboot-example/src/main/java/org/kie/kogito/legacy/Applicant.java b/kogito-springboot-examples/rules-legacy-springboot-example/src/main/java/org/kie/kogito/legacy/Applicant.java index 771c31fe80..5b1b7aaeff 100644 --- a/kogito-springboot-examples/rules-legacy-springboot-example/src/main/java/org/kie/kogito/legacy/Applicant.java +++ b/kogito-springboot-examples/rules-legacy-springboot-example/src/main/java/org/kie/kogito/legacy/Applicant.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.legacy; diff --git a/kogito-springboot-examples/rules-legacy-springboot-example/src/main/java/org/kie/kogito/legacy/FindApprovedLoansEndpoint.java b/kogito-springboot-examples/rules-legacy-springboot-example/src/main/java/org/kie/kogito/legacy/FindApprovedLoansEndpoint.java index 4e8feb55fd..b1cf4596b9 100644 --- a/kogito-springboot-examples/rules-legacy-springboot-example/src/main/java/org/kie/kogito/legacy/FindApprovedLoansEndpoint.java +++ b/kogito-springboot-examples/rules-legacy-springboot-example/src/main/java/org/kie/kogito/legacy/FindApprovedLoansEndpoint.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.legacy; diff --git a/kogito-springboot-examples/rules-legacy-springboot-example/src/main/java/org/kie/kogito/legacy/KogitoSpringbootApplication.java b/kogito-springboot-examples/rules-legacy-springboot-example/src/main/java/org/kie/kogito/legacy/KogitoSpringbootApplication.java index 1d841598f7..d8e30b0e1f 100644 --- a/kogito-springboot-examples/rules-legacy-springboot-example/src/main/java/org/kie/kogito/legacy/KogitoSpringbootApplication.java +++ b/kogito-springboot-examples/rules-legacy-springboot-example/src/main/java/org/kie/kogito/legacy/KogitoSpringbootApplication.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.legacy; diff --git a/kogito-springboot-examples/rules-legacy-springboot-example/src/main/java/org/kie/kogito/legacy/LoanApplication.java b/kogito-springboot-examples/rules-legacy-springboot-example/src/main/java/org/kie/kogito/legacy/LoanApplication.java index 053c5e25b9..5f9e102fd8 100644 --- a/kogito-springboot-examples/rules-legacy-springboot-example/src/main/java/org/kie/kogito/legacy/LoanApplication.java +++ b/kogito-springboot-examples/rules-legacy-springboot-example/src/main/java/org/kie/kogito/legacy/LoanApplication.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.legacy; diff --git a/kogito-springboot-examples/rules-legacy-springboot-example/src/main/java/org/kie/kogito/legacy/LoanDto.java b/kogito-springboot-examples/rules-legacy-springboot-example/src/main/java/org/kie/kogito/legacy/LoanDto.java index 1db9def3c2..f498e3fc30 100644 --- a/kogito-springboot-examples/rules-legacy-springboot-example/src/main/java/org/kie/kogito/legacy/LoanDto.java +++ b/kogito-springboot-examples/rules-legacy-springboot-example/src/main/java/org/kie/kogito/legacy/LoanDto.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.legacy; diff --git a/kogito-springboot-examples/rules-legacy-springboot-example/src/main/resources/application.properties b/kogito-springboot-examples/rules-legacy-springboot-example/src/main/resources/application.properties index 5f4fb60b55..4e8da841ca 100644 --- a/kogito-springboot-examples/rules-legacy-springboot-example/src/main/resources/application.properties +++ b/kogito-springboot-examples/rules-legacy-springboot-example/src/main/resources/application.properties @@ -1 +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. +# + server.address=0.0.0.0 \ No newline at end of file diff --git a/kogito-springboot-examples/rules-legacy-springboot-example/src/main/resources/org/kie/kogito/legacy/LoanRules.drl b/kogito-springboot-examples/rules-legacy-springboot-example/src/main/resources/org/kie/kogito/legacy/LoanRules.drl index e9a24b46c9..913fb100a6 100644 --- a/kogito-springboot-examples/rules-legacy-springboot-example/src/main/resources/org/kie/kogito/legacy/LoanRules.drl +++ b/kogito-springboot-examples/rules-legacy-springboot-example/src/main/resources/org/kie/kogito/legacy/LoanRules.drl @@ -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.legacy; diff --git a/kogito-springboot-examples/rules-legacy-springboot-example/src/test/java/org/kie/kogito/RestQueryTest.java b/kogito-springboot-examples/rules-legacy-springboot-example/src/test/java/org/kie/kogito/RestQueryTest.java index cd61a4ad93..8ee3d00f5f 100644 --- a/kogito-springboot-examples/rules-legacy-springboot-example/src/test/java/org/kie/kogito/RestQueryTest.java +++ b/kogito-springboot-examples/rules-legacy-springboot-example/src/test/java/org/kie/kogito/RestQueryTest.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; @@ -19,7 +22,7 @@ import org.junit.jupiter.api.Test; import org.kie.kogito.legacy.KogitoSpringbootApplication; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.annotation.DirtiesContext; import io.restassured.RestAssured; diff --git a/kogito-springboot-examples/rules-legacy-springboot-example/src/test/resources/logback-test.xml b/kogito-springboot-examples/rules-legacy-springboot-example/src/test/resources/logback-test.xml index 9d5906898a..e8a614e525 100644 --- a/kogito-springboot-examples/rules-legacy-springboot-example/src/test/resources/logback-test.xml +++ b/kogito-springboot-examples/rules-legacy-springboot-example/src/test/resources/logback-test.xml @@ -1,4 +1,24 @@ + diff --git a/kogito-springboot-examples/ruleunit-event-driven-springboot/README.md b/kogito-springboot-examples/ruleunit-event-driven-springboot/README.md index bd5febc87e..a22962f99e 100644 --- a/kogito-springboot-examples/ruleunit-event-driven-springboot/README.md +++ b/kogito-springboot-examples/ruleunit-event-driven-springboot/README.md @@ -25,8 +25,8 @@ Like the other Kogito AddOns, the only required step to enable it is to include ```xml - org.kie.kogito - kogito-addons-springboot-event-rules + org.drools + drools-addons-springboot-event-rules ``` diff --git a/kogito-springboot-examples/ruleunit-event-driven-springboot/docker-compose.yml b/kogito-springboot-examples/ruleunit-event-driven-springboot/docker-compose.yml index f07d3cc400..802976737c 100644 --- a/kogito-springboot-examples/ruleunit-event-driven-springboot/docker-compose.yml +++ b/kogito-springboot-examples/ruleunit-event-driven-springboot/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' services: diff --git a/kogito-springboot-examples/ruleunit-event-driven-springboot/pom.xml b/kogito-springboot-examples/ruleunit-event-driven-springboot/pom.xml index 77decd35e6..7127d84d34 100644 --- a/kogito-springboot-examples/ruleunit-event-driven-springboot/pom.xml +++ b/kogito-springboot-examples/ruleunit-event-driven-springboot/pom.xml @@ -1,4 +1,24 @@ + @@ -7,14 +27,14 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT ruleunit-event-driven-springboot Kogito Example :: RuleUnit Event Driven :: Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -35,12 +55,12 @@ spring-boot-starter-actuator
- org.kie.kogito - kogito-rules-spring-boot-starter + org.drools + drools-rules-spring-boot-starter - org.kie.kogito - kogito-addons-springboot-events-rules + org.drools + drools-addons-springboot-events-rules diff --git a/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/java/org/kie/kogito/queries/AllAmounts.java b/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/java/org/kie/kogito/queries/AllAmounts.java index e0c67ef987..0bbb602617 100644 --- a/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/java/org/kie/kogito/queries/AllAmounts.java +++ b/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/java/org/kie/kogito/queries/AllAmounts.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.queries; diff --git a/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/java/org/kie/kogito/queries/Applicant.java b/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/java/org/kie/kogito/queries/Applicant.java index 175d3a98d5..25d1c54e64 100644 --- a/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/java/org/kie/kogito/queries/Applicant.java +++ b/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/java/org/kie/kogito/queries/Applicant.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.queries; diff --git a/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/java/org/kie/kogito/queries/KogitoSpringbootApplication.java b/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/java/org/kie/kogito/queries/KogitoSpringbootApplication.java index d6f7c7a33f..c909e15e0c 100644 --- a/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/java/org/kie/kogito/queries/KogitoSpringbootApplication.java +++ b/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/java/org/kie/kogito/queries/KogitoSpringbootApplication.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.queries; diff --git a/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/java/org/kie/kogito/queries/LoanApplication.java b/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/java/org/kie/kogito/queries/LoanApplication.java index 70eec1c4e3..8697730bd3 100644 --- a/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/java/org/kie/kogito/queries/LoanApplication.java +++ b/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/java/org/kie/kogito/queries/LoanApplication.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.queries; diff --git a/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/java/org/kie/kogito/queries/LoanUnit.java b/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/java/org/kie/kogito/queries/LoanUnit.java index 3f68f880e8..4b4ba73582 100644 --- a/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/java/org/kie/kogito/queries/LoanUnit.java +++ b/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/java/org/kie/kogito/queries/LoanUnit.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.queries; diff --git a/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/resources/application.properties b/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/resources/application.properties index 4c9b99f60d..3f2d1cdc19 100644 --- a/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/resources/application.properties +++ b/kogito-springboot-examples/ruleunit-event-driven-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.addon.cloudevents.kafka.kogito_incoming_stream=ruleunit-event-driven-requests kogito.addon.cloudevents.kafka.kogito_outgoing_stream=ruleunit-event-driven-responses kogito.addon.tracing.decision.kafka.bootstrapAddress=localhost:9092 diff --git a/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/resources/org/kie/kogito/queries/RuleUnitQuery.drl b/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/resources/org/kie/kogito/queries/RuleUnitQuery.drl index 2f14454ead..483c686584 100644 --- a/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/resources/org/kie/kogito/queries/RuleUnitQuery.drl +++ b/kogito-springboot-examples/ruleunit-event-driven-springboot/src/main/resources/org/kie/kogito/queries/RuleUnitQuery.drl @@ -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.queries; unit LoanUnit; diff --git a/kogito-springboot-examples/ruleunit-event-driven-springboot/src/test/java/org/kie/kogito/examples/RuleUnitEventDrivenIT.java b/kogito-springboot-examples/ruleunit-event-driven-springboot/src/test/java/org/kie/kogito/examples/RuleUnitEventDrivenIT.java index 019e8360ff..9bb36180d0 100644 --- a/kogito-springboot-examples/ruleunit-event-driven-springboot/src/test/java/org/kie/kogito/examples/RuleUnitEventDrivenIT.java +++ b/kogito-springboot-examples/ruleunit-event-driven-springboot/src/test/java/org/kie/kogito/examples/RuleUnitEventDrivenIT.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.examples; diff --git a/kogito-springboot-examples/ruleunit-event-driven-springboot/src/test/resources/logback-test.xml b/kogito-springboot-examples/ruleunit-event-driven-springboot/src/test/resources/logback-test.xml index e8c716f5ef..bb6af4db85 100644 --- a/kogito-springboot-examples/ruleunit-event-driven-springboot/src/test/resources/logback-test.xml +++ b/kogito-springboot-examples/ruleunit-event-driven-springboot/src/test/resources/logback-test.xml @@ -1,3 +1,23 @@ + diff --git a/kogito-springboot-examples/ruleunit-springboot-example/README.md b/kogito-springboot-examples/ruleunit-springboot-example/README.md index 954be29be5..8b6bb20633 100644 --- a/kogito-springboot-examples/ruleunit-springboot-example/README.md +++ b/kogito-springboot-examples/ruleunit-springboot-example/README.md @@ -95,7 +95,3 @@ Example response: } ] ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/kogito-springboot-examples/ruleunit-springboot-example/operator/ruleunit-springboot-example.yaml b/kogito-springboot-examples/ruleunit-springboot-example/operator/ruleunit-springboot-example.yaml deleted file mode 100644 index 50a768d6c0..0000000000 --- a/kogito-springboot-examples/ruleunit-springboot-example/operator/ruleunit-springboot-example.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: ruleunit-springboot-example -spec: - type: RemoteSource - runtime: springboot - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/ruleunit-springboot-example - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: ruleunit-springboot-example -spec: - runtime: springboot \ No newline at end of file diff --git a/kogito-springboot-examples/ruleunit-springboot-example/pom.xml b/kogito-springboot-examples/ruleunit-springboot-example/pom.xml index e14f65ecb0..600214fdd2 100644 --- a/kogito-springboot-examples/ruleunit-springboot-example/pom.xml +++ b/kogito-springboot-examples/ruleunit-springboot-example/pom.xml @@ -1,4 +1,24 @@ + @@ -7,14 +27,14 @@ org.kie.kogito.examples kogito-springboot-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT ruleunit-springboot-example Kogito Example :: RuleUnit - Spring Boot - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 999-SNAPSHOT @@ -35,8 +55,8 @@ spring-boot-starter-actuator - org.kie.kogito - kogito-rules-spring-boot-starter + org.drools + drools-rules-spring-boot-starter diff --git a/kogito-springboot-examples/ruleunit-springboot-example/src/main/java/org/kie/kogito/queries/Applicant.java b/kogito-springboot-examples/ruleunit-springboot-example/src/main/java/org/kie/kogito/queries/Applicant.java index 175d3a98d5..25d1c54e64 100644 --- a/kogito-springboot-examples/ruleunit-springboot-example/src/main/java/org/kie/kogito/queries/Applicant.java +++ b/kogito-springboot-examples/ruleunit-springboot-example/src/main/java/org/kie/kogito/queries/Applicant.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.queries; diff --git a/kogito-springboot-examples/ruleunit-springboot-example/src/main/java/org/kie/kogito/queries/KogitoSpringbootApplication.java b/kogito-springboot-examples/ruleunit-springboot-example/src/main/java/org/kie/kogito/queries/KogitoSpringbootApplication.java index d6f7c7a33f..c909e15e0c 100644 --- a/kogito-springboot-examples/ruleunit-springboot-example/src/main/java/org/kie/kogito/queries/KogitoSpringbootApplication.java +++ b/kogito-springboot-examples/ruleunit-springboot-example/src/main/java/org/kie/kogito/queries/KogitoSpringbootApplication.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.queries; diff --git a/kogito-springboot-examples/ruleunit-springboot-example/src/main/java/org/kie/kogito/queries/LoanApplication.java b/kogito-springboot-examples/ruleunit-springboot-example/src/main/java/org/kie/kogito/queries/LoanApplication.java index 70eec1c4e3..8697730bd3 100644 --- a/kogito-springboot-examples/ruleunit-springboot-example/src/main/java/org/kie/kogito/queries/LoanApplication.java +++ b/kogito-springboot-examples/ruleunit-springboot-example/src/main/java/org/kie/kogito/queries/LoanApplication.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.queries; diff --git a/kogito-springboot-examples/ruleunit-springboot-example/src/main/java/org/kie/kogito/queries/LoanUnit.java b/kogito-springboot-examples/ruleunit-springboot-example/src/main/java/org/kie/kogito/queries/LoanUnit.java index 3d35a77609..0aa2234202 100644 --- a/kogito-springboot-examples/ruleunit-springboot-example/src/main/java/org/kie/kogito/queries/LoanUnit.java +++ b/kogito-springboot-examples/ruleunit-springboot-example/src/main/java/org/kie/kogito/queries/LoanUnit.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.queries; diff --git a/kogito-springboot-examples/ruleunit-springboot-example/src/main/resources/application.properties b/kogito-springboot-examples/ruleunit-springboot-example/src/main/resources/application.properties index 5f4fb60b55..4e8da841ca 100644 --- a/kogito-springboot-examples/ruleunit-springboot-example/src/main/resources/application.properties +++ b/kogito-springboot-examples/ruleunit-springboot-example/src/main/resources/application.properties @@ -1 +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. +# + server.address=0.0.0.0 \ No newline at end of file diff --git a/kogito-springboot-examples/ruleunit-springboot-example/src/main/resources/org/kie/kogito/queries/RuleUnitQuery.drl b/kogito-springboot-examples/ruleunit-springboot-example/src/main/resources/org/kie/kogito/queries/RuleUnitQuery.drl index a75b91c804..d9708ac39d 100644 --- a/kogito-springboot-examples/ruleunit-springboot-example/src/main/resources/org/kie/kogito/queries/RuleUnitQuery.drl +++ b/kogito-springboot-examples/ruleunit-springboot-example/src/main/resources/org/kie/kogito/queries/RuleUnitQuery.drl @@ -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.queries; unit LoanUnit; diff --git a/kogito-springboot-examples/ruleunit-springboot-example/src/test/java/org/kie/kogito/decisiontable/springboot/ruleunit/RestQueryTest.java b/kogito-springboot-examples/ruleunit-springboot-example/src/test/java/org/kie/kogito/decisiontable/springboot/ruleunit/RestQueryTest.java index 8f54299cf6..80db0a91a9 100644 --- a/kogito-springboot-examples/ruleunit-springboot-example/src/test/java/org/kie/kogito/decisiontable/springboot/ruleunit/RestQueryTest.java +++ b/kogito-springboot-examples/ruleunit-springboot-example/src/test/java/org/kie/kogito/decisiontable/springboot/ruleunit/RestQueryTest.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.decisiontable.springboot.ruleunit; @@ -19,7 +22,7 @@ import org.junit.jupiter.api.Test; import org.kie.kogito.queries.KogitoSpringbootApplication; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.boot.web.server.LocalServerPort; +import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.test.annotation.DirtiesContext; import io.restassured.RestAssured; diff --git a/kogito-springboot-examples/ruleunit-springboot-example/src/test/resources/logback-test.xml b/kogito-springboot-examples/ruleunit-springboot-example/src/test/resources/logback-test.xml index 9d5906898a..e8a614e525 100644 --- a/kogito-springboot-examples/ruleunit-springboot-example/src/test/resources/logback-test.xml +++ b/kogito-springboot-examples/ruleunit-springboot-example/src/test/resources/logback-test.xml @@ -1,4 +1,24 @@ + diff --git a/licensesheader.txt b/licensesheader.txt index 818f2e0539..90705e02e0 100644 --- a/licensesheader.txt +++ b/licensesheader.txt @@ -1,13 +1,16 @@ - Copyright ${license.git.copyrightCreationYear} Red Hat, Inc. and/or its affiliates. +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. \ No newline at end of file diff --git a/pom.xml b/pom.xml index e51bbf6983..4f796475d7 100755 --- a/pom.xml +++ b/pom.xml @@ -1,13 +1,34 @@ + + 4.0.0 org.kie.kogito kogito-build-no-bom-parent - 2.0.0-SNAPSHOT + 999-SNAPSHOT org.kie.kogito.examples @@ -20,9 +41,10 @@ http://kogito.kie.org 2019 - JBoss by Red Hat - http://www.jboss.org/ + The Apache Software Foundation + https://apache.org/ + Apache Software License, Version 2.0 @@ -31,10 +53,50 @@ + + scm:git:https://github.com/apache/incubator-kie-kogito-examples.git + scm:git:https://github.com/apache/incubator-kie-kogito-examples.git + https://github.com/apache/incubator-kie-kogito-examples + + + + + The Apache KIE Team + dev@kie.apache.org + https://kie.apache.org + Apache Software Foundation + http://apache.org/ + + + + + + Development List + dev-subscribe@kie.apache.org + dev-unsubscribe@kie.apache.org + dev@kie.apache.org + https://lists.apache.org/list.html?dev@kie.apache.org + + + User List + users-subscribe@kie.apache.org + users-unsubscribe@kie.apache.org + users@kie.apache.org + https://lists.apache.org/list.html?users@kie.apache.org + + + Commits List + commits-subscribe@kie.apache.org + commits-unsubscribe@kie.apache.org + commits@kie.apache.org + https://lists.apache.org/list.html?commits@kie.apache.org + + + UTF-8 - 2.0.0-SNAPSHOT + 999-SNAPSHOT 1 **/*IT.java @@ -51,71 +113,23 @@ 4.5.3 3.3.1 + + 2024-01-16T00:00:00Z + 3.4.1 - - - - jboss-releases-repository - JBoss Releases Repository - https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/ - - - jboss-snapshots-repository - JBoss Snapshot Repository - https://repository.jboss.org/nexus/content/repositories/snapshots/ - - - - + - jboss-public-repository-group - JBoss Public Repository Group - https://repository.jboss.org/nexus/content/groups/public/ - default - true - never + false - - true - daily - + apache.snapshots + Apache Snapshot Repository + https://repository.apache.org/snapshots - - - jboss-public-repository-group - JBoss Public Repository Group - https://repository.jboss.org/nexus/content/groups/public/ - default - - true - never - - - true - daily - - - - - - scm:git:https://github.com/kiegroup/kogito-examples.git - scm:git:git@github.com:kiegroup/kogito-examples.git - https://github.com/kiegroup/kogito-examples - - - - - All developers are listed in the KIE GitHub organization - https://github.com/orgs/kiegroup/people - - - default @@ -128,17 +142,6 @@ serverless-workflow-examples - - productized - - - productized - - - - serverless-workflow-examples - - @@ -247,13 +250,6 @@ - - maven-deploy-plugin - ${version.deploy.plugin} - - 10 - - maven-compiler-plugin ${version.compiler.plugin} @@ -380,6 +376,14 @@ openshift-maven-plugin ${version.org.eclipse.jkube} + + org.apache.maven.plugins + maven-artifact-plugin + ${version.maven.artifact.plugin} + + ${project.build.outputTimestamp} + + diff --git a/serverless-operator-examples/serverless-workflow-dataindex-use-cases/README.md b/serverless-operator-examples/serverless-workflow-dataindex-use-cases/README.md new file mode 100644 index 0000000000..d275cea648 --- /dev/null +++ b/serverless-operator-examples/serverless-workflow-dataindex-use-cases/README.md @@ -0,0 +1,419 @@ +# SonataFlow Data Index Use Cases + +Collection of artifacts to test SonataFlow Use Cases TP2. + +## Prereqs for all the use cases + +1. Minikube installed + +We recommend that you start Minikube with the following parameters, note that the `registry` addon must be enabled. +Additionally, the ingress addon is also enabled facilitate data-index querying by using an Ingress. Note that the Ingress provided is just en example to expose the data-index graphiql. +This is not mandatory, and in production environments you must provide your own setup if needed, or even use an OpenShift route, etc. + +```shell +minikube start --cpus 4 --memory 10240 --addons registry --addons metrics-server --addons ingress --insecure-registry "10.0.0.0/24" --insecure-registry "localhost:5000" +``` + +To verify that the registry addon was property added you can execute this command: + +```shell +minikube addons list | grep registry +``` + +``` +| registry | minikube | enabled ✅ | Google | +| registry-aliases | minikube | disabled | 3rd party (unknown) | +| registry-creds | minikube | disabled | 3rd party (UPMC Enterprises) | +``` + +To verify that the ingress addon was property added you can execute this command: + +```shell +minikube addons list | grep ingress +``` + +``` +| ingress | minikube | enabled ✅ | Kubernetes | +``` + +2. kubectl installed + +3. SonataFlow operator installed if workflows are deployed + +To install the operator you can see [SonataFlow Installation](https://sonataflow.org/serverlessworkflow/latest/cloud/operator/install-serverless-operator.html). + +## Use cases + +This is the list of available use cases: + +| Use case | Description | +|---------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [Deploy Data Index Locally](#deploy-data-index-locally) | This use case deploys:
* PostgreSQL Service
* Data Index Service + postgresdb
| +| [Use case 1](#use-case-1) | This use case deploys:
* PostgreSQL Service
* Data Index Service + postgresdb
* The `greeting` workflow (no persistence) configured to register the process events on the Data Index Service. | +| [Use case 2](#use-case-2) | This use case deploys:
* PostgreSQL Service
* Data Index Service + postgresdb
* The `greeting` workflow (no persistence)
* The `helloworkflow` (no persistence)
* Workflows are configured to register the process events on the Data Index Service. | + +> **NOTE:** To facilitate the switch between use cases, it's strongly recommended to install each use case in a dedicated namespace. + +## Deploy Data Index locally + +Example of how to deploy Data Index on Kubernetes that uses a Postgresql DB. + +> **NOTE:** The workflow related use cases that needs a data index service already includes this step. + +### Procedure + +Open a terminal and run the following commands: + +1. Create the namespace: + +```shell +kubectl create namespace data-index-usecase +``` + +2. Deploy the Data Index Service: + +```shell +kubectl kustomize platforms/data_index_as_platform_service | kubectl apply -f - -n data-index-usecase +``` + +``` +persistentvolumeclaim/postgres-pvc created +deployment.apps/postgres created +service/postgres created +sonataflowplatform.sonataflow.org/sonataflow-platform created +ingress.networking.k8s.io/data-index-service-ingress created +secret/postgres-secrets created +``` + +This will deploy a Data Index for you in the `data-index-usecase` namespace. (If you don't use a namespace the `default` is used instead) +Data Index will be backed by a Postgres Data Base deployment. **This setup is not intended for production environments** since this simple Postgres Deployment does not scale well. Please see the [Postgres Operator](https://github.com/zalando/postgres-operator) for more information. + + +To check that the data index is running you can execute this command. + +```shell +kubectl get pod -n data-index-usecase +``` + +``` +data-index-service-postgresql-5d76dc4468-69hm6 1/1 Running 0 2m11s +postgres-7f78499688-j6282 1/1 Running 0 2m11s +``` + +To access the Data Index, using Minikube you can run: + +```shell +minikube ip +``` + +Example output: +``` +192.168.49.2 +``` + +Use the returned ip to access the data-index-service GraphiQL by using the Ingress with a url like this http://192.168.49.2/graphiql/ (that ip might be different in your installation.) + +For more information about Data Index and this deployment see [Data Index standalone service](https://sonataflow.org/serverlessworkflow/latest/data-index/data-index-service.html) in SonataFlow guides. + +To execute queries see: [Querying Index Queries](#querying-data-index) + +3. Clean the use case: + +```shell +kubectl delete namespace data-index-usecase +``` + +## Use case 1 + +This use case is intended to represent an installation with: + +* A singleton Data Index Service with PostgreSQL persistence +* The `greeting` workflow (no persistence), that is configured to register events to the Data Index Service. + +### Procedure + +Open a terminal and run the following commands: + +1. Create the namespace: + +```shell +kubectl create namespace usecase1 +``` + +2. Deploy the Data Index Service: + +```shell +kubectl kustomize platforms/data_index_as_platform_service | kubectl apply -f - -n usecase1 +``` + +``` +persistentvolumeclaim/postgres-pvc created +deployment.apps/postgres created +service/postgres created +sonataflowplatform.sonataflow.org/sonataflow-platform created +ingress.networking.k8s.io/data-index-service-ingress created +secret/postgres-secrets created +``` + +Give some time for the data index to start, you can check that it's running by executing. + +```shell +kubectl get pod -n usecase1 +``` + +``` +NAME READY STATUS RESTARTS AGE +data-index-service-postgresql-5d76dc4468-lb259 1/1 Running 0 2m11s +postgres-7f78499688-lc8n6 1/1 Running 0 2m11s +``` + +3. Deploy the workflow: + +```shell + kubectl kustomize usecases/usecase1 | kubectl apply -f - -n usecase1 + ``` + +``` +sonataflow.sonataflow.org/greeting created +``` + +Give some time for the sonataflow operator to build and deploy the workflow. +To check that the workflow is ready you can use this command. + +```shell +kubectl get workflow -n usecase1 +``` + +``` +NAME PROFILE VERSION URL READY REASON +greeting 0.0.1 True +``` + +4. Expose the workflow and get the url: + +```shell +kubectl patch svc greeting -p '{"spec": {"type": "NodePort"}}' -n usecase1 +``` + +```shell + minikube service greeting --url -n usecase1 + ``` + +5. Create a workflow instance: + +You must use the URLs calculated in step 4. + +```shell +curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' -d '{"name": "John", "language": "English"}' http://192.168.49.2:32407/greeting +``` + +**To execute queries and see the workflows information see:** [Querying Index Queries](#querying-data-index) + + +6. Clean the use case: + +```shell +kubectl delete namespace usecase1 +``` + +## Use case 2 + +This use case is intended to represent an installation with: + +* A singleton Data Index Service with PostgreSQL persistence +* The `greeting` workflow (no persistence) +* The `helloworkflow` workflow (no persistence) +* The workflows are configured to register the process events on the Data Index Service. + +### Procedure + +Open a terminal and run the following commands: + +1. Create the namespace: + +```shell +kubectl create namespace usecase2 +``` + +2. Deploy the Data Index Service: +3. +```shell +kubectl kustomize platforms/data_index_as_platform_service | kubectl apply -f - -n usecase2 +``` + +``` +persistentvolumeclaim/postgres-pvc created +deployment.apps/postgres created +service/postgres created +sonataflowplatform.sonataflow.org/sonataflow-platform created +ingress.networking.k8s.io/data-index-service-ingress created +secret/postgres-secrets created +``` + +Give some time for the data index to start, you can check that it's running by executing. + +```shell +kubectl get pod -n usecase2 +``` + +``` +NAME READY STATUS RESTARTS AGE +data-index-service-postgresql-5d76dc4468-lb259 1/1 Running 0 2m11s +postgres-7f78499688-lc8n6 1/1 Running 0 2m11s +``` + +3. Deploy the workflows: + +```shell + kubectl kustomize usecases/usecase2 | kubectl apply -f - -n usecase2 + ``` + +``` +sonataflow.sonataflow.org/greeting created +sonataflow.sonataflow.org/helloworld created +``` + +Give some time for the sonataflow operator to build and deploy the workflows. +To check that the workflows are ready you can use this command. + +```shell +kubectl get workflow -n usecase2 +``` + +``` +NAME PROFILE VERSION URL READY REASON +greeting 0.0.1 True +helloworld 0.0.1 True +``` + +4. Expose the workflows and get the urls: + +```shell +kubectl patch svc greeting helloworld -p '{"spec": {"type": "NodePort"}}' -n usecase2 +``` + +```shell + minikube service greeting --url -n usecase2 + ``` + +```shell + minikube service helloworld --url -n usecase2 + ``` + +5. Create a workflow instances: + +You must use the URLs calculated in step 4. + +```shell +curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' -d '{"name": "John", "language": "English"}' http://192.168.49.2:32407/greeting +``` + +```shell +curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' -d '{}' http://192.168.49.2:32327/helloworld +``` + +**To execute queries and see the workflows information see:** [Querying Index Queries](#querying-data-index) + +6. Clean the use case: + +```shell +kubectl delete namespace usecase2 +``` + +## Querying Data Index + +You can use the public Data Index endpoint to play around with the GraphiQL interface. + +### Procedure + +This procedure apply to all use cases with that deploys the Data Index Service. + +1. Get the Data Index Url: + +```shell +minikube ip +``` + +2. Open the GrahiqlUI + +Using the ip returned in 1, open a browser window in the following url http://192.168.49.2/graphiql/, note that IP will be different in your installation, and don't forget to add the last slash "/" to the url, otherwise the GraphiqlUI won't be opened. + + +To see the process instances information you can execute this query: + +```graphql +{ + ProcessInstances { + id, + processId, + processName, + variables, + state, + endpoint, + serviceUrl, + start, + end + } +} +``` + +The results should be something like: + + +```json +{ + "data": { + "ProcessInstances": [ + { + "id": "3ed8bf63-85c9-425d-9099-49bfb63608cb", + "processId": "greeting", + "processName": "workflow", + "variables": "{\"workflowdata\":{\"name\":\"John\",\"greeting\":\"Hello from JSON Workflow, \",\"language\":\"English\"}}", + "state": "COMPLETED", + "endpoint": "/greeting", + "serviceUrl": "http://greeting", + "start": "2023-09-13T06:59:24.319Z", + "end": "2023-09-13T06:59:24.400Z" + } + ] + } +} +``` + +To see the jobs instances information, if any, you can execute this query: + +```graphql +{ + Jobs { + id, + processId, + processInstanceId, + status, + expirationTime, + retries, + endpoint, + callbackEndpoint + } +} +``` + +The results should be something like: + +```json +{ + "data": { + "Jobs": [ + { + "id": "55c7aadb-3dff-4b97-af8e-cc45014b1c0d", + "processId": "callbackstatetimeouts", + "processInstanceId": "299886b7-2b78-4965-a701-16783c4162d8", + "status": "EXECUTED", + "expirationTime": null, + "retries": 0, + "endpoint": "http://jobs-service-postgresql/jobs", + "callbackEndpoint": "http://callbackstatetimeouts:80/management/jobs/callbackstatetimeouts/instances/299886b7-2b78-4965-a701-16783c4162d8/timers/-1" + } + ] + } +} +``` diff --git a/serverless-operator-examples/serverless-workflow-dataindex-use-cases/platforms/data_index_as_platform_service/01-postgres.yaml b/serverless-operator-examples/serverless-workflow-dataindex-use-cases/platforms/data_index_as_platform_service/01-postgres.yaml new file mode 100644 index 0000000000..2221b70b3d --- /dev/null +++ b/serverless-operator-examples/serverless-workflow-dataindex-use-cases/platforms/data_index_as_platform_service/01-postgres.yaml @@ -0,0 +1,72 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + labels: + app.kubernetes.io/name: postgres + name: postgres-pvc +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/name: postgres + name: postgres +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: postgres + template: + metadata: + labels: + app.kubernetes.io/name: postgres + spec: + containers: + - name: postgres + image: postgres:13.2-alpine + imagePullPolicy: 'IfNotPresent' + ports: + - containerPort: 5432 + volumeMounts: + - name: storage + mountPath: /var/lib/postgresql/data + envFrom: + - secretRef: + name: postgres-secrets + readinessProbe: + exec: + command: ["pg_isready"] + initialDelaySeconds: 15 + timeoutSeconds: 2 + livenessProbe: + exec: + command: ["pg_isready"] + initialDelaySeconds: 15 + timeoutSeconds: 2 + resources: + limits: + memory: "256Mi" + cpu: "500m" + volumes: + - name: storage + persistentVolumeClaim: + claimName: postgres-pvc +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/name: postgres + name: postgres +spec: + selector: + app.kubernetes.io/name: postgres + ports: + - port: 5432 diff --git a/serverless-operator-examples/serverless-workflow-dataindex-use-cases/platforms/data_index_as_platform_service/02-sonataflow_platform.yaml b/serverless-operator-examples/serverless-workflow-dataindex-use-cases/platforms/data_index_as_platform_service/02-sonataflow_platform.yaml new file mode 100644 index 0000000000..4c9132ac89 --- /dev/null +++ b/serverless-operator-examples/serverless-workflow-dataindex-use-cases/platforms/data_index_as_platform_service/02-sonataflow_platform.yaml @@ -0,0 +1,26 @@ +apiVersion: sonataflow.org/v1alpha08 +kind: SonataFlowPlatform +metadata: + name: sonataflow-platform +spec: + build: + config: + strategyOptions: + KanikoBuildCacheEnabled: "false" + services: + dataIndex: + enabled: true + persistence: + postgresql: + jdbcUrl: jdbc:postgresql://postgres:5432/sonataflow?currentSchema=data-index-service + secretRef: + name: postgres-secrets + userKey: POSTGRES_USER + passwordKey: POSTGRES_PASSWORD + podTemplate: + initContainers: + - name: init-postgres + image: registry.access.redhat.com/ubi9/ubi-minimal:latest + imagePullPolicy: IfNotPresent + command: [ 'sh', '-c', 'until (echo 1 > /dev/tcp/postgres.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local/5432) >/dev/null 2>&1; do echo "Waiting for postgres server"; sleep 3; done;' ] + diff --git a/serverless-operator-examples/serverless-workflow-dataindex-use-cases/platforms/data_index_as_platform_service/03-data-index-service-ingress.yaml b/serverless-operator-examples/serverless-workflow-dataindex-use-cases/platforms/data_index_as_platform_service/03-data-index-service-ingress.yaml new file mode 100644 index 0000000000..3083bbb096 --- /dev/null +++ b/serverless-operator-examples/serverless-workflow-dataindex-use-cases/platforms/data_index_as_platform_service/03-data-index-service-ingress.yaml @@ -0,0 +1,17 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: data-index-service-ingress + annotations: + nginx.ingress.kubernetes.io/app-root: / +spec: + rules: + - http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: sonataflow-platform-data-index-service + port: + number: 80 \ No newline at end of file diff --git a/serverless-operator-examples/serverless-workflow-dataindex-use-cases/platforms/data_index_as_platform_service/kustomization.yaml b/serverless-operator-examples/serverless-workflow-dataindex-use-cases/platforms/data_index_as_platform_service/kustomization.yaml new file mode 100644 index 0000000000..80f11e54d1 --- /dev/null +++ b/serverless-operator-examples/serverless-workflow-dataindex-use-cases/platforms/data_index_as_platform_service/kustomization.yaml @@ -0,0 +1,18 @@ +resources: +- 01-postgres.yaml +- 02-sonataflow_platform.yaml +- 03-data-index-service-ingress.yaml + +generatorOptions: + disableNameSuffixHash: true + +secretGenerator: + - name: postgres-secrets + literals: + - POSTGRES_USER=sonataflow + - POSTGRES_PASSWORD=sonataflow + - POSTGRES_DB=sonataflow + - PGDATA=/var/lib/postgresql/data/mydata + +sortOptions: + order: fifo diff --git a/serverless-operator-examples/serverless-workflow-dataindex-use-cases/usecases/usecase1/kustomization.yaml b/serverless-operator-examples/serverless-workflow-dataindex-use-cases/usecases/usecase1/kustomization.yaml new file mode 100644 index 0000000000..cc0ad92026 --- /dev/null +++ b/serverless-operator-examples/serverless-workflow-dataindex-use-cases/usecases/usecase1/kustomization.yaml @@ -0,0 +1,2 @@ +resources: +- ../../workflows/sonataflow-greeting \ No newline at end of file diff --git a/serverless-operator-examples/serverless-workflow-dataindex-use-cases/usecases/usecase2/kustomization.yaml b/serverless-operator-examples/serverless-workflow-dataindex-use-cases/usecases/usecase2/kustomization.yaml new file mode 100644 index 0000000000..0da35e0117 --- /dev/null +++ b/serverless-operator-examples/serverless-workflow-dataindex-use-cases/usecases/usecase2/kustomization.yaml @@ -0,0 +1,3 @@ +resources: +- ../../workflows/sonataflow-greeting +- ../../workflows/sonataflow-helloworld diff --git a/serverless-operator-examples/serverless-workflow-dataindex-use-cases/workflows/sonataflow-greeting/01-sonataflow_greeting.yaml b/serverless-operator-examples/serverless-workflow-dataindex-use-cases/workflows/sonataflow-greeting/01-sonataflow_greeting.yaml new file mode 100644 index 0000000000..f0236a7435 --- /dev/null +++ b/serverless-operator-examples/serverless-workflow-dataindex-use-cases/workflows/sonataflow-greeting/01-sonataflow_greeting.yaml @@ -0,0 +1,42 @@ +apiVersion: sonataflow.org/v1alpha08 +kind: SonataFlow +metadata: + name: greeting + annotations: + sonataflow.org/description: Greeting example on k8s! + sonataflow.org/version: 0.0.1 +spec: + flow: + start: ChooseOnLanguage + functions: + - name: greetFunction + type: custom + operation: sysout + states: + - name: ChooseOnLanguage + type: switch + dataConditions: + - condition: "${ .language == \"English\" }" + transition: GreetInEnglish + - condition: "${ .language == \"Spanish\" }" + transition: GreetInSpanish + defaultCondition: GreetInEnglish + - name: GreetInEnglish + type: inject + data: + greeting: "Hello from JSON Workflow, " + transition: GreetPerson + - name: GreetInSpanish + type: inject + data: + greeting: "Saludos desde JSON Workflow, " + transition: GreetPerson + - name: GreetPerson + type: operation + actions: + - name: greetAction + functionRef: + refName: greetFunction + arguments: + message: ".greeting+.name" + end: true \ No newline at end of file diff --git a/serverless-operator-examples/serverless-workflow-dataindex-use-cases/workflows/sonataflow-greeting/kustomization.yaml b/serverless-operator-examples/serverless-workflow-dataindex-use-cases/workflows/sonataflow-greeting/kustomization.yaml new file mode 100644 index 0000000000..7825d2888c --- /dev/null +++ b/serverless-operator-examples/serverless-workflow-dataindex-use-cases/workflows/sonataflow-greeting/kustomization.yaml @@ -0,0 +1,2 @@ +resources: +- 01-sonataflow_greeting.yaml diff --git a/serverless-operator-examples/serverless-workflow-dataindex-use-cases/workflows/sonataflow-helloworld/01-sonataflow_helloworld.yaml b/serverless-operator-examples/serverless-workflow-dataindex-use-cases/workflows/sonataflow-helloworld/01-sonataflow_helloworld.yaml new file mode 100644 index 0000000000..ed8dd5438f --- /dev/null +++ b/serverless-operator-examples/serverless-workflow-dataindex-use-cases/workflows/sonataflow-helloworld/01-sonataflow_helloworld.yaml @@ -0,0 +1,21 @@ +apiVersion: sonataflow.org/v1alpha08 +kind: SonataFlow +metadata: + name: helloworld + annotations: + sonataflow.org/description: Hello World Workflow + sonataflow.org/version: 0.0.1 +spec: + flow: + start: Inject Hello World + states: + - name: Inject Hello World + type: inject + data: + greeting: Hello World + transition: Inject Mantra + - name: Inject Mantra + type: inject + data: + mantra: Serverless Workflow is awesome! + end: true \ No newline at end of file diff --git a/serverless-operator-examples/serverless-workflow-dataindex-use-cases/workflows/sonataflow-helloworld/kustomization.yaml b/serverless-operator-examples/serverless-workflow-dataindex-use-cases/workflows/sonataflow-helloworld/kustomization.yaml new file mode 100644 index 0000000000..a8e7e5c66e --- /dev/null +++ b/serverless-operator-examples/serverless-workflow-dataindex-use-cases/workflows/sonataflow-helloworld/kustomization.yaml @@ -0,0 +1,2 @@ +resources: +- 01-sonataflow_helloworld.yaml diff --git a/serverless-operator-examples/serverless-workflow-inventory/README.md b/serverless-operator-examples/serverless-workflow-inventory/README.md index b847a6c948..a7f6194521 100644 --- a/serverless-operator-examples/serverless-workflow-inventory/README.md +++ b/serverless-operator-examples/serverless-workflow-inventory/README.md @@ -2,7 +2,7 @@ ## Description -This example is meant to let you understand how to deploy on Kubernetes the [Inventory Logic Tutorial](https://redhat-scholars.github.io/serverless-workflow/osl/index.html) using the [Operator](https://github.com/kiegroup/kogito-serverless-operator). +This example is meant to let you understand how to deploy on Kubernetes the [Inventory Logic Tutorial](https://redhat-scholars.github.io/serverless-workflow/osl/index.html) using the [Operator](https://github.com/apache/incubator-kie-kogito-serverless-operator). We'll report here for this reason only a short summary of the workflow use case, and we'd suggest you [read the complete documentation](https://redhat-scholars.github.io/serverless-workflow/osl/index.html) about this tutorial if you need more details about it. ### Use Case diff --git a/serverless-operator-examples/serverless-workflow-inventory/resources/01-configmap_01-order-resources.yaml b/serverless-operator-examples/serverless-workflow-inventory/resources/01-configmap_01-order-resources.yaml index c34e6f018c..210ca76bb2 100644 --- a/serverless-operator-examples/serverless-workflow-inventory/resources/01-configmap_01-order-resources.yaml +++ b/serverless-operator-examples/serverless-workflow-inventory/resources/01-configmap_01-order-resources.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. +# + apiVersion: v1 data: supplier.yaml: | diff --git a/serverless-operator-examples/serverless-workflow-inventory/resources/01-sonataflow_order.yaml b/serverless-operator-examples/serverless-workflow-inventory/resources/01-sonataflow_order.yaml index f994ff07d8..0bf50e8813 100644 --- a/serverless-operator-examples/serverless-workflow-inventory/resources/01-sonataflow_order.yaml +++ b/serverless-operator-examples/serverless-workflow-inventory/resources/01-sonataflow_order.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. +# + apiVersion: sonataflow.org/v1alpha08 kind: SonataFlow metadata: diff --git a/serverless-operator-examples/serverless-workflow-inventory/resources/02-configmap_order-props.yaml b/serverless-operator-examples/serverless-workflow-inventory/resources/02-configmap_order-props.yaml index 87a490e40b..306d340646 100644 --- a/serverless-operator-examples/serverless-workflow-inventory/resources/02-configmap_order-props.yaml +++ b/serverless-operator-examples/serverless-workflow-inventory/resources/02-configmap_order-props.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. +# + apiVersion: v1 data: application.properties: | diff --git a/serverless-operator-examples/sonataflow-apisix-oidc/README.md b/serverless-operator-examples/sonataflow-apisix-oidc/README.md new file mode 100644 index 0000000000..57a121bdd1 --- /dev/null +++ b/serverless-operator-examples/sonataflow-apisix-oidc/README.md @@ -0,0 +1,3 @@ +# SonataFlow Authentication and Authorization with Keycloak and APISIX + +This is an example directory to support the guide outlined here: [https://sonataflow.org/serverlessworkflow/latest/cloud/custom-ingress-authz.html](https://sonataflow.org/serverlessworkflow/latest/cloud/custom-ingress-authz.html). Please read it in order to fully understand how to use this example. diff --git a/serverless-operator-examples/sonataflow-apisix-oidc/manifests/bases/01-postgres.yaml b/serverless-operator-examples/sonataflow-apisix-oidc/manifests/bases/01-postgres.yaml new file mode 100644 index 0000000000..0de874326a --- /dev/null +++ b/serverless-operator-examples/sonataflow-apisix-oidc/manifests/bases/01-postgres.yaml @@ -0,0 +1,86 @@ +# Copyright 2024 Apache Software Foundation (ASF) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this 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. + +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + labels: + app.kubernetes.io/name: postgres + name: postgres-pvc +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/name: postgres + name: postgres +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: postgres + template: + metadata: + labels: + app.kubernetes.io/name: postgres + spec: + containers: + - name: postgres + image: postgres + imagePullPolicy: "IfNotPresent" + ports: + - containerPort: 5432 + volumeMounts: + - name: storage + mountPath: /var/lib/pgsql/data + envFrom: + - secretRef: + name: postgres-secrets + readinessProbe: + exec: + command: ["pg_isready"] + initialDelaySeconds: 15 + timeoutSeconds: 2 + livenessProbe: + exec: + command: ["pg_isready"] + initialDelaySeconds: 15 + timeoutSeconds: 2 + resources: + limits: + memory: "256Mi" + cpu: "500m" + volumes: + - name: storage + persistentVolumeClaim: + claimName: postgres-pvc +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app.kubernetes.io/name: postgres + name: postgres +spec: + selector: + app.kubernetes.io/name: postgres + ports: + - port: 5432 diff --git a/serverless-operator-examples/sonataflow-apisix-oidc/manifests/bases/02-keycloak.yaml b/serverless-operator-examples/sonataflow-apisix-oidc/manifests/bases/02-keycloak.yaml new file mode 100644 index 0000000000..515cb7f7e2 --- /dev/null +++ b/serverless-operator-examples/sonataflow-apisix-oidc/manifests/bases/02-keycloak.yaml @@ -0,0 +1,92 @@ +# Copyright 2024 Apache Software Foundation (ASF) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this 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. + +apiVersion: v1 +kind: Service +metadata: + name: keycloak + labels: + app: keycloak +spec: + ports: + - name: http + port: 8080 + targetPort: 8080 + selector: + app: keycloak + type: NodePort +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: keycloak + labels: + app: keycloak +spec: + replicas: 1 + selector: + matchLabels: + app: keycloak + template: + metadata: + labels: + app: keycloak + spec: + initContainers: + - name: init-postgres + image: registry.access.redhat.com/ubi9/ubi-minimal:latest + imagePullPolicy: IfNotPresent + command: + [ + "sh", + "-c", + 'until (echo 1 > /dev/tcp/postgres.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local/5432) >/dev/null 2>&1; do echo "Waiting for postgres server"; sleep 3; done;', + ] + containers: + - name: keycloak + image: keycloak + imagePullPolicy: "IfNotPresent" + args: ["start-dev"] + env: + - name: KEYCLOAK_ADMIN + value: "admin" + - name: KEYCLOAK_ADMIN_PASSWORD + value: "admin" + - name: KC_PROXY + value: "edge" + - name: KC_DB + value: postgres + - name: KC_DB_USERNAME + valueFrom: + secretKeyRef: + key: POSTGRES_USER + name: postgres-secrets + - name: KC_DB_PASSWORD + valueFrom: + secretKeyRef: + key: POSTGRES_PASSWORD + name: postgres-secrets + - name: KC_DB_URL_HOST + value: postgres + ports: + - name: http + containerPort: 8080 + readinessProbe: + httpGet: + path: /realms/master + port: 8080 + resources: + limits: + memory: "2Gi" + cpu: "1" diff --git a/serverless-operator-examples/sonataflow-apisix-oidc/manifests/bases/kustomization.yaml b/serverless-operator-examples/sonataflow-apisix-oidc/manifests/bases/kustomization.yaml new file mode 100644 index 0000000000..d0065a1f46 --- /dev/null +++ b/serverless-operator-examples/sonataflow-apisix-oidc/manifests/bases/kustomization.yaml @@ -0,0 +1,37 @@ +# Copyright 2024 Apache Software Foundation (ASF) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this 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. + +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - 01-postgres.yaml + - 02-keycloak.yaml + +images: + - name: postgres + newName: docker.io/library/postgres + newTag: alpine3.19 + - name: keycloak + newName: quay.io/keycloak/keycloak + newTag: 24.0.2 + +secretGenerator: + - name: postgres-secrets + options: + disableNameSuffixHash: true + literals: + - POSTGRES_USER=keycloak + - POSTGRES_PASSWORD=keycloak + - POSTGRES_DATABASE=keycloak + - PGDATA=/var/lib/pgsql/data diff --git a/serverless-operator-examples/sonataflow-apisix-oidc/workflow-app/01-sonataflow-greeting.yaml b/serverless-operator-examples/sonataflow-apisix-oidc/workflow-app/01-sonataflow-greeting.yaml new file mode 100644 index 0000000000..a201c91fe1 --- /dev/null +++ b/serverless-operator-examples/sonataflow-apisix-oidc/workflow-app/01-sonataflow-greeting.yaml @@ -0,0 +1,58 @@ +# Copyright 2024 Apache Software Foundation (ASF) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this 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. + +apiVersion: sonataflow.org/v1alpha08 +kind: SonataFlow +metadata: + name: greeting + annotations: + sonataflow.org/description: Greeting example on k8s! + sonataflow.org/version: 0.0.1 +spec: + flow: + start: ChooseOnLanguage + functions: + - name: greetFunction + type: custom + operation: sysout + states: + - name: ChooseOnLanguage + type: switch + dataConditions: + - condition: '${ .language == "English" }' + transition: GreetInEnglish + - condition: '${ .language == "Spanish" }' + transition: GreetInSpanish + defaultCondition: GreetInEnglish + - name: GreetInEnglish + type: inject + data: + greeting: "Hello from YAML Workflow, " + transition: GreetPerson + - name: GreetInSpanish + type: inject + data: + greeting: "Saludos desde YAML Workflow, " + transition: GreetPerson + - name: GreetPerson + type: operation + stateDataFilter: + output: '${ {"message": (.greeting + $WORKFLOW.identity)} }' + actions: + - name: greetAction + functionRef: + refName: greetFunction + arguments: + message: ".greeting+.name" + end: true diff --git a/serverless-operator-examples/sonataflow-apisix-oidc/workflow-app/02-sonataflow-route.yaml b/serverless-operator-examples/sonataflow-apisix-oidc/workflow-app/02-sonataflow-route.yaml new file mode 100644 index 0000000000..c2ca1afc0e --- /dev/null +++ b/serverless-operator-examples/sonataflow-apisix-oidc/workflow-app/02-sonataflow-route.yaml @@ -0,0 +1,40 @@ +# Copyright 2024 Apache Software Foundation (ASF) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this 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. + +apiVersion: apisix.apache.org/v2 +kind: ApisixRoute +metadata: + name: sonataflow +spec: + http: + - name: greeting + match: + hosts: + - local.greeting.sonataflow.org + paths: + - "/*" + backends: + - serviceName: greeting + servicePort: 80 + plugins: + - name: openid-connect + enable: true + config: + client_id: apisix-ingress + client_secret: + discovery: http://keycloak.keycloak.svc.cluster.local:8080/realms/sonataflow/.well-known/openid-configuration + scope: profile email + bearer_only: true + realm: sonataflow + introspection_endpoint_auth_method: client_secret_post diff --git a/serverless-operator-examples/sonataflow-apisix-oidc/workflow-app/greeting.svg b/serverless-operator-examples/sonataflow-apisix-oidc/workflow-app/greeting.svg new file mode 100644 index 0000000000..ad7dcc8bb7 --- /dev/null +++ b/serverless-operator-examples/sonataflow-apisix-oidc/workflow-app/greeting.svg @@ -0,0 +1 @@ +StartChooseOnLanguag e GreetInEnglishGreetInSpanishGreetPersonEnd${ .langua... ${ .langua... ${ .langua... ${ .langua... \ No newline at end of file diff --git a/serverless-operator-examples/sonataflow-apisix-oidc/workflow-app/greeting.sw.yaml b/serverless-operator-examples/sonataflow-apisix-oidc/workflow-app/greeting.sw.yaml new file mode 100644 index 0000000000..4753a74719 --- /dev/null +++ b/serverless-operator-examples/sonataflow-apisix-oidc/workflow-app/greeting.sw.yaml @@ -0,0 +1,55 @@ +# Copyright 2024 Apache Software Foundation (ASF) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this 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. + +id: "workflow_unique_identifier" +version: "0.1" +specVersion: "0.8" +name: "Workflow name" +description: "Workflow description" +functions: + - name: greetFunction + type: custom + operation: sysout +start: ChooseOnLanguage +states: + - name: ChooseOnLanguage + type: switch + dataConditions: + - condition: '${ .language == "English" }' + transition: GreetInEnglish + - condition: '${ .language == "Spanish" }' + transition: GreetInSpanish + defaultCondition: + transition: GreetInEnglish + - name: GreetInEnglish + type: inject + data: + greeting: "Hello from YAML Workflow, " + transition: GreetPerson + - name: GreetInSpanish + type: inject + data: + greeting: "Saludos desde YAML Workflow, " + transition: GreetPerson + - name: GreetPerson + type: operation + stateDataFilter: + output: '${ { "message": (.greeting + .name) } }' + actions: + - name: greetAction + functionRef: + refName: greetFunction + arguments: + message: ".greeting+.name" + end: true diff --git a/serverless-workflow-examples/pom.xml b/serverless-workflow-examples/pom.xml index 1955a85d45..962cbd298a 100644 --- a/serverless-workflow-examples/pom.xml +++ b/serverless-workflow-examples/pom.xml @@ -1,4 +1,24 @@ + @@ -7,7 +27,7 @@ org.kie.kogito.examples kogito-examples - 2.0.0-SNAPSHOT + 999-SNAPSHOT serverless-workflow-examples @@ -21,6 +41,7 @@ true + serverless-workflow-examples-parent serverless-workflow-annotations-description serverless-workflow-callback-events-over-http-quarkus serverless-workflow-callback-quarkus @@ -30,7 +51,9 @@ serverless-workflow-correlation-quarkus serverless-workflow-custom-function-knative serverless-workflow-custom-type + serverless-workflow-data-index-persistence-addon-quarkus serverless-workflow-data-index-quarkus + serverless-workflow-dmn-quarkus serverless-workflow-error-quarkus serverless-workflow-events-quarkus serverless-workflow-expression-quarkus @@ -55,8 +78,8 @@ serverless-workflow-timeouts-showcase-embedded serverless-workflow-timeouts-showcase-extended serverless-workflow-timeouts-showcase-operator-devprofile - serverless-workflow-openvino-quarkus serverless-workflow-python-quarkus + sonataflow-fluent @@ -100,45 +123,15 @@ - productized + openvino - productized + openvino - serverless-workflow-annotations-description - serverless-workflow-callback-events-over-http-quarkus - serverless-workflow-callback-quarkus - serverless-workflow-compensation-quarkus - serverless-workflow-consuming-events-over-http-quarkus - serverless-workflow-correlation-quarkus - serverless-workflow-custom-function-knative - serverless-workflow-custom-type - serverless-workflow-data-index-quarkus - serverless-workflow-error-quarkus - serverless-workflow-expression-quarkus - serverless-workflow-foreach-quarkus - serverless-workflow-functions-quarkus - serverless-workflow-funqy - serverless-workflow-greeting-quarkus - serverless-workflow-greeting-rpc-quarkus - serverless-workflow-hello-world - serverless-workflow-loanbroker-showcase - serverless-workflow-newsletter-subscription - serverless-workflow-order-processing - serverless-workflow-parallel-execution - serverless-workflow-qas-service-showcase - serverless-workflow-saga-quarkus - serverless-workflow-service-calls-quarkus - serverless-workflow-stock-profit - serverless-workflow-temperature-conversion - serverless-workflow-testing-with-rest-assured - serverless-workflow-timeouts-showcase-embedded - serverless-workflow-timeouts-showcase-extended - serverless-workflow-timeouts-showcase-operator-devprofile + serverless-workflow-openvino-quarkus - diff --git a/serverless-workflow-examples/serverless-workflow-annotations-description/README.md b/serverless-workflow-examples/serverless-workflow-annotations-description/README.md index 419c103172..041f50ddac 100644 --- a/serverless-workflow-examples/serverless-workflow-annotations-description/README.md +++ b/serverless-workflow-examples/serverless-workflow-annotations-description/README.md @@ -44,9 +44,9 @@ paths: ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVm](https://www.graalvm.org/downloads/) 19.3.1+ installed diff --git a/serverless-workflow-examples/serverless-workflow-annotations-description/pom.xml b/serverless-workflow-examples/serverless-workflow-annotations-description/pom.xml index 13129a50ae..8bbed9c0a4 100644 --- a/serverless-workflow-examples/serverless-workflow-annotations-description/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-annotations-description/pom.xml @@ -1,9 +1,36 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-annotations-description 1.0-SNAPSHOT @@ -11,16 +38,16 @@ Kogito Example :: Serverless Workflow Annotations and Description:: Quarkus Kogito Serverless Workflow Example - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 3.22.0 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.8.1 - 11 + 17 3.0.0-M7 @@ -43,8 +70,8 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus io.quarkus @@ -55,12 +82,8 @@ quarkus-resteasy-jackson - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-annotations-description/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-annotations-description/src/main/resources/application.properties index 4c6da73b47..483bbb8b02 100644 --- a/serverless-workflow-examples/serverless-workflow-annotations-description/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-annotations-description/src/main/resources/application.properties @@ -1,9 +1,25 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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. +# + # profile to pack this example into a container, to use it execute activate the maven container profile, -Dcontainer %container.quarkus.container-image.build=true %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local %container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/README.md b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/README.md index 6ecec35db3..ca1d64c237 100644 --- a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/README.md +++ b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/README.md @@ -20,9 +20,9 @@ The service is described using JSON format as defined in the ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVm](https://www.graalvm.org/downloads/) 19.3.1+ installed - Environment variable GRAALVM_HOME set accordingly diff --git a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/pom.xml b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/pom.xml index 4e46021483..73870c7c8c 100644 --- a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/pom.xml @@ -1,4 +1,24 @@ + @@ -12,15 +32,15 @@ callback-event-service Kogito Example :: Serverless Workflow CallBack Over HTTP Quarkus :: Callback Event Service - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.8.1 - 11 + 17 3.0.0-M7 diff --git a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/src/main/java/org/kie/kogito/examples/CallbackResource.java b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/src/main/java/org/kie/kogito/examples/CallbackResource.java index 91ad34b972..30abcfa768 100644 --- a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/src/main/java/org/kie/kogito/examples/CallbackResource.java +++ b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/src/main/java/org/kie/kogito/examples/CallbackResource.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.examples; @@ -20,14 +23,14 @@ import java.util.Collections; import java.util.UUID; -import javax.annotation.PostConstruct; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.core.MediaType; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.core.MediaType; +import jakarta.annotation.PostConstruct; import org.kie.kogito.event.cloudevents.CloudEventExtensionConstants; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/src/main/java/org/kie/kogito/examples/EventInput.java b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/src/main/java/org/kie/kogito/examples/EventInput.java index ec0af553e9..409aafcf6e 100644 --- a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/src/main/java/org/kie/kogito/examples/EventInput.java +++ b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/src/main/java/org/kie/kogito/examples/EventInput.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/src/main/java/org/kie/kogito/examples/RegisterObjectMapper.java b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/src/main/java/org/kie/kogito/examples/RegisterObjectMapper.java index e0477fba44..75e227dc9f 100644 --- a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/src/main/java/org/kie/kogito/examples/RegisterObjectMapper.java +++ b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/src/main/java/org/kie/kogito/examples/RegisterObjectMapper.java @@ -1,21 +1,24 @@ /* - * 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.examples; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/src/main/resources/application.properties index efb173ef94..659be82bcc 100644 --- a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-service/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-event-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. +# + # Packaging # quarkus.package.type=fast-jar quarkus.native.native-image-xmx=8g @@ -10,6 +29,3 @@ quarkus.http.port=8181 %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local %container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin diff --git a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-workflow/pom.xml b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-workflow/pom.xml index 76a5fd0180..8e69d9e6bd 100644 --- a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-workflow/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-workflow/pom.xml @@ -1,4 +1,24 @@ + @@ -13,15 +33,15 @@ Kogito Example :: Serverless Workflow CallBack Over HTTP Quarkus :: Service Kogito Serverless Workflow Callback Example Over HTTP - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.8.1 - 11 + 17 3.0.0-M7 2.33.2 2.35.0 @@ -47,8 +67,8 @@
- org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus io.quarkus @@ -59,12 +79,8 @@ quarkus-resteasy-jackson - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-workflow/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-workflow/src/main/resources/application.properties index f5e1464b30..b01f42ee59 100644 --- a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-workflow/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-workflow/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. +# + # Defines the connector for the "wait" channel mp.messaging.incoming.wait.connector=quarkus-http diff --git a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-workflow/src/main/resources/specs/callback.yaml b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-workflow/src/main/resources/specs/callback.yaml index 4181f1ce27..44a849e9a9 100644 --- a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-workflow/src/main/resources/specs/callback.yaml +++ b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-workflow/src/main/resources/specs/callback.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. +# + openapi: 3.0.0 info: title: Callback Example diff --git a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-workflow/src/test/java/org/kie/kogito/examples/CallbackRestIT.java b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-workflow/src/test/java/org/kie/kogito/examples/CallbackRestIT.java index 92b381661e..a70456ebfb 100644 --- a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-workflow/src/test/java/org/kie/kogito/examples/CallbackRestIT.java +++ b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/callback-workflow/src/test/java/org/kie/kogito/examples/CallbackRestIT.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/pom.xml index a5e05ea8c3..61e9075d90 100644 --- a/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-callback-events-over-http-quarkus/pom.xml @@ -1,9 +1,37 @@ + 4.0.0 + + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-callback-events-over-http-quarkus 1.0-SNAPSHOT diff --git a/serverless-workflow-examples/serverless-workflow-callback-quarkus/README.md b/serverless-workflow-examples/serverless-workflow-callback-quarkus/README.md index 5712e4bd3e..4f1fa2e1b1 100644 --- a/serverless-workflow-examples/serverless-workflow-callback-quarkus/README.md +++ b/serverless-workflow-examples/serverless-workflow-callback-quarkus/README.md @@ -50,9 +50,9 @@ In this way a container for PostgreSQL will be started on port 5432. ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed - Docker and Docker Compose to run the required example infrastructure. When using native image compilation, you will also need: diff --git a/serverless-workflow-examples/serverless-workflow-callback-quarkus/docker-compose/docker-compose.yml b/serverless-workflow-examples/serverless-workflow-callback-quarkus/docker-compose/docker-compose.yml index d7f07c911f..14e0bdd7e9 100644 --- a/serverless-workflow-examples/serverless-workflow-callback-quarkus/docker-compose/docker-compose.yml +++ b/serverless-workflow-examples/serverless-workflow-callback-quarkus/docker-compose/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: @@ -64,7 +83,7 @@ services: data-index: container_name: data-index - image: quay.io/kiegroup/kogito-data-index-postgresql:${KOGITO_VERSION} + image: quay.io/kiegroup/kogito-data-index-postgresql-nightly:latest ports: - "8180:8080" depends_on: @@ -78,6 +97,10 @@ services: QUARKUS_DATASOURCE_JDBC_URL: "jdbc:postgresql://postgres:5432/kogito" QUARKUS_DATASOURCE_USERNAME: kogito-user QUARKUS_DATASOURCE_PASSWORD: kogito-pass + QUARKUS_PROFILE: kafka-events-support + KOGITO_DATA_INDEX_QUARKUS_PROFILE: kafka-events-support + QUARKUS_FLYWAY_MIGRATE_AT_START: "true" + QUARKUS_FLYWAY_TABLE: data-index-flyway KAFKA_BOOTSTRAP_SERVERS: kafka:29092 QUARKUS_HTTP_CORS_ORIGINS: "/.*/" KOGITO_DATA_INDEX_PROPS: -Dquarkus.hibernate-orm.database.generation=update diff --git a/serverless-workflow-examples/serverless-workflow-callback-quarkus/docker-compose/startServices.sh b/serverless-workflow-examples/serverless-workflow-callback-quarkus/docker-compose/startServices.sh index 4f986947fa..5b93df2e6d 100755 --- a/serverless-workflow-examples/serverless-workflow-callback-quarkus/docker-compose/startServices.sh +++ b/serverless-workflow-examples/serverless-workflow-callback-quarkus/docker-compose/startServices.sh @@ -1,18 +1,22 @@ #!/bin/sh # -# 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. echo "Script requires your project to be compiled" diff --git a/serverless-workflow-examples/serverless-workflow-callback-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-callback-quarkus/pom.xml index 2f1c84d571..25da8dc0fe 100644 --- a/serverless-workflow-examples/serverless-workflow-callback-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-callback-quarkus/pom.xml @@ -1,8 +1,35 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-callback-quarkus 1.0-SNAPSHOT @@ -10,15 +37,15 @@ Kogito Example :: Serverless Workflow Callback :: Quarkus Kogito Serverless Workflow Callback Example - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.8.1 - 11 + 17 3.0.0-M7 @@ -42,28 +69,24 @@
- org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus - org.kie.kogito - kogito-addons-quarkus-messaging + org.kie + kie-addons-quarkus-messaging io.quarkus quarkus-smallrye-reactive-messaging-kafka - org.kie.kogito - kogito-addons-quarkus-events-process - - - org.kie.kogito - kogito-addons-quarkus-process-management + org.kie + kie-addons-quarkus-events-process - org.kie.kogito - kogito-quarkus-serverless-workflow-devui + org.kie + kie-addons-quarkus-process-management @@ -80,8 +103,8 @@ quarkus-resteasy-jackson - org.kie.kogito - kogito-addons-quarkus-persistence-jdbc + org.kie + kie-addons-quarkus-persistence-jdbc io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/main/java/org/kie/kogito/examples/PrintService.java b/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/main/java/org/kie/kogito/examples/PrintService.java index a1ee770e73..d9981b0118 100644 --- a/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/main/java/org/kie/kogito/examples/PrintService.java +++ b/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/main/java/org/kie/kogito/examples/PrintService.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.examples; @@ -22,8 +25,8 @@ import java.util.Optional; import java.util.UUID; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; import org.eclipse.microprofile.reactive.messaging.Acknowledgment; import org.eclipse.microprofile.reactive.messaging.Acknowledgment.Strategy; diff --git a/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/main/resources/application.properties index 3e120992c2..05736d7b90 100644 --- a/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-callback-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. +# + mp.messaging.incoming.wait.connector=smallrye-kafka mp.messaging.incoming.wait.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer mp.messaging.incoming.wait.group.id=kogito-sw-callback @@ -34,6 +53,11 @@ 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=jdbc quarkus.datasource.db-kind=postgresql kogito.persistence.proto.marshaller=false @@ -48,6 +72,6 @@ quarkus.native.native-image-xmx=8g %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local %container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin + + + diff --git a/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/test/java/org/kie/kogito/examples/CallbackRestIT.java b/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/test/java/org/kie/kogito/examples/CallbackRestIT.java index 7730d4b92d..4e1c803c0a 100644 --- a/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/test/java/org/kie/kogito/examples/CallbackRestIT.java +++ b/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/test/java/org/kie/kogito/examples/CallbackRestIT.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/test/resources/application.properties b/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/test/resources/application.properties index 9596c93920..abb20a3c7f 100644 --- a/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/test/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-callback-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.kogito.devservices.enabled=false quarkus.flyway.migrate-at-start=true diff --git a/serverless-workflow-examples/serverless-workflow-camel-routes/pom.xml b/serverless-workflow-examples/serverless-workflow-camel-routes/pom.xml index 5192348973..1cf42d9363 100644 --- a/serverless-workflow-examples/serverless-workflow-camel-routes/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-camel-routes/pom.xml @@ -1,9 +1,36 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.acme serverless-workflow-camel-routes 1.0-SNAPSHOT @@ -12,20 +39,20 @@ Kogito Serverless Workflow Camel Routes Example - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 11 + 999-SNAPSHOT + 17 3.8.1 3.0.0-M7 3.5.4 - 2.16.0 + 3.9.0 @@ -49,12 +76,12 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus - org.kie.kogito - kogito-addons-quarkus-camel + org.apache.kie.sonataflow + sonataflow-addons-quarkus-camel org.apache.camel.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-camel-routes/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-camel-routes/src/main/resources/application.properties index c402b3d370..7599f54a41 100644 --- a/serverless-workflow-examples/serverless-workflow-camel-routes/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-camel-routes/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. +# + # External property read by the Camel Route com.dataaccess.webservicesserver.url=https://www.dataaccess.com/webservicesserver/numberconversion.wso @@ -13,6 +32,3 @@ quarkus.cxf.path=/ws %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local %container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:1.32 -%container.quarkus.jib.working-directory=/home/kogito/bin diff --git a/serverless-workflow-examples/serverless-workflow-camel-routes/src/main/resources/beans.xml b/serverless-workflow-examples/serverless-workflow-camel-routes/src/main/resources/beans.xml index e69de29bb2..60125d0cfc 100644 --- a/serverless-workflow-examples/serverless-workflow-camel-routes/src/main/resources/beans.xml +++ b/serverless-workflow-examples/serverless-workflow-camel-routes/src/main/resources/beans.xml @@ -0,0 +1,20 @@ + \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-camel-routes/src/main/resources/routes/sendSoapMessage.yaml b/serverless-workflow-examples/serverless-workflow-camel-routes/src/main/resources/routes/sendSoapMessage.yaml index 3829866b40..874a7b1993 100644 --- a/serverless-workflow-examples/serverless-workflow-camel-routes/src/main/resources/routes/sendSoapMessage.yaml +++ b/serverless-workflow-examples/serverless-workflow-camel-routes/src/main/resources/routes/sendSoapMessage.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. +# + - from: uri: direct:numberToWords steps: diff --git a/serverless-workflow-examples/serverless-workflow-compensation-quarkus/README.md b/serverless-workflow-examples/serverless-workflow-compensation-quarkus/README.md index 0688f1e701..03186f82b9 100644 --- a/serverless-workflow-examples/serverless-workflow-compensation-quarkus/README.md +++ b/serverless-workflow-examples/serverless-workflow-compensation-quarkus/README.md @@ -13,9 +13,9 @@ The process result is a boolean field `compensated` which value should match `sh ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVm](https://www.graalvm.org/downloads/) 19.3.1+ installed diff --git a/serverless-workflow-examples/serverless-workflow-compensation-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-compensation-quarkus/pom.xml index 4802066871..48c0f89f81 100644 --- a/serverless-workflow-examples/serverless-workflow-compensation-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-compensation-quarkus/pom.xml @@ -1,8 +1,35 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-compensation-quarkus 1.0-SNAPSHOT @@ -10,17 +37,17 @@ Kogito Example :: Serverless Workflow Compensation :: Quarkus Kogito Serverless Workflow Error Compensation - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.8.1 3.0.0-M7 - 11 - 0.0.9 + 17 + 0.2.2 @@ -43,8 +70,8 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus io.quarkus @@ -60,12 +87,8 @@ quarkus-resteasy-jackson - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files io.rest-assured @@ -156,8 +179,8 @@ - org.kie.kogito - kogito-addons-quarkus-persistence-jdbc + org.kie + kie-addons-quarkus-persistence-jdbc io.quarkiverse.embedded.postgresql @@ -171,4 +194,4 @@ - \ No newline at end of file + diff --git a/serverless-workflow-examples/serverless-workflow-compensation-quarkus/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-compensation-quarkus/src/main/resources/application.properties index 23c2638d60..34043ef3dd 100644 --- a/serverless-workflow-examples/serverless-workflow-compensation-quarkus/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-compensation-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. +# + # Packaging # quarkus.package.type=fast-jar quarkus.native.native-image-xmx=8g @@ -11,7 +30,4 @@ quarkus.native.native-image-xmx=8g %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-compensation-quarkus/src/test/java/org/kie/kogito/examples/CompensationRestIT.java b/serverless-workflow-examples/serverless-workflow-compensation-quarkus/src/test/java/org/kie/kogito/examples/CompensationRestIT.java index fe63e1ada3..095aa5841f 100644 --- a/serverless-workflow-examples/serverless-workflow-compensation-quarkus/src/test/java/org/kie/kogito/examples/CompensationRestIT.java +++ b/serverless-workflow-examples/serverless-workflow-compensation-quarkus/src/test/java/org/kie/kogito/examples/CompensationRestIT.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/README.md b/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/README.md index 0b073d10fe..96df5193e4 100644 --- a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/README.md +++ b/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/README.md @@ -19,9 +19,9 @@ This is the infrastructure required to integrate with [Knative Eventing](https:/ ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed - [Docker Engine](https://docs.docker.com/engine/) and [Docker Compose](https://docs.docker.com/compose/) installed When using native image compilation, you will also need: @@ -126,86 +126,6 @@ The workflow will consume the event and print the message you sent to the consol [ "Hello", "This has been injected by the event" ] ``` -### Running the example from Quarkus Dev UI - -This example can also be tested by using the `Kogito Serverless Workflows Tools` UI in the Quarkus Dev UI, to do so, just -start the example in Dev Mode: - -```sh -mvn clean package quarkus:dev -``` - -In the browser type to `http://localhost:8080/q/dev` show the Quarkus Dev UI, and then open the `Kogito Serverless Workflows Tools` -by clicking in `Workflow Instances`. - -![Quarkus Dev UI](docs/0_dev-ui.png) - -Once the `Workflow Instances` is opened, click on the `Workflow Definitions` tab. There you'll see the list of -workflows available in your project (in this example the table should display only the `start` workflow). -This screen allows you to start an instance of any of the workflows in the table. - -![Workflow Definitions Page](docs/1_workflow_definitions.png) - -To trigger the event that will initiate the workflow, just click the `Trigger Cloud Event` and you'll be forwarded to the -`Trigger Cloud Event` Page where a form will appear to fill in the event data. For this example use the following data: - -- Event Endpoint: - - method: "POST" - - path: "/startevent" -- Event type: "start" -- Event Source: <`any`> -- Business Key: "cloud-event-test" -- Custom Headers: <`empty - not required for this example`> -- Event Data: -```json -{ - "message": "Hello!" -} -``` - -And click on the `Trigger` button to trigger the event and start the workflow instance. - -![Cloud Event Form - New Workflow Instance](docs/2_start-cloud.event.png) - -If everything went well, a success notification message will appear that will let you go back to the -`Workflow Instances` Page. Once there you should be able to see that a new workflow instance in `Active` state waiting -for the `move` event to move forward. - -In order to trigger the event that will move the workflow, you can just click in the `Send Cloud Event` available in actions Kebab. - -![Active Workflow in Workflow Instances Page](docs/3_kebab-send-event.png) - -This again will open the `Trigger Cloud Event` Page, but in this case it's configured to notify the selected workflow instance. -Notice that there's no `Business Key` and it has the `Instance Id` field already filled with the right Id. -To trigger the `move` event, please fill the form with the following data: - -- Event Endpoint: - - method: "POST" - - path: "/" -- Event type: "move" -- Event Source: <`any`> -- Instance Id: <`leave current value`> -- Custom Headers: -- Event Data: -```json -{ - "move":"This has been injected by the event" -} -``` - -And click on the `Trigger` button to trigger the `move` event so the workflow can advance. - -> **Note:** -> This screen can also be accessed by clicking the `Trigger Cloud Event` button on the `Workflow Instances` page, but -> it'll require manually typing the `Instance Id`. - -![Cloud Event Form - Move Workflow Instance](docs/4_move-cloud-event.png) - -After the success message appears, if you go back to the `Workflow Instances` page you should see that the workflow -instance now appears in `Complete` state. - -![Completed Workflow in Workflow Instances Page](docs/5_workflow-completed.png) - ### Building and Deploying Workflow using CLI + Kogito Serverless Workflow Operator For this prepare your environment by following the instructions from [here](). diff --git a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/docs/0_dev-ui.png b/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/docs/0_dev-ui.png deleted file mode 100644 index 5bd01d181e..0000000000 Binary files a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/docs/0_dev-ui.png and /dev/null differ diff --git a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/docs/1_workflow_definitions.png b/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/docs/1_workflow_definitions.png deleted file mode 100644 index 1487506689..0000000000 Binary files a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/docs/1_workflow_definitions.png and /dev/null differ diff --git a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/docs/2_start-cloud.event.png b/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/docs/2_start-cloud.event.png deleted file mode 100644 index d8fb62def4..0000000000 Binary files a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/docs/2_start-cloud.event.png and /dev/null differ diff --git a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/docs/3_kebab-send-event.png b/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/docs/3_kebab-send-event.png deleted file mode 100644 index db1db3a1b4..0000000000 Binary files a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/docs/3_kebab-send-event.png and /dev/null differ diff --git a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/docs/4_move-cloud-event.png b/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/docs/4_move-cloud-event.png deleted file mode 100644 index 95ccf6cddc..0000000000 Binary files a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/docs/4_move-cloud-event.png and /dev/null differ diff --git a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/docs/5_workflow-completed.png b/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/docs/5_workflow-completed.png deleted file mode 100644 index f9df988326..0000000000 Binary files a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/docs/5_workflow-completed.png and /dev/null differ diff --git a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/operator/01-sonataflow_start.yaml b/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/operator/01-sonataflow_start.yaml index 32f99f9990..536633c5f3 100755 --- a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/operator/01-sonataflow_start.yaml +++ b/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/operator/01-sonataflow_start.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. +# + apiVersion: sonataflow.org/v1alpha08 kind: SonataFlow metadata: diff --git a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/operator/startevent-sw.yaml b/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/operator/startevent-sw.yaml index 6d0743f2df..fb3df1f118 100644 --- a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/operator/startevent-sw.yaml +++ b/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/operator/startevent-sw.yaml @@ -1,12 +1,31 @@ -apiVersion: sw.kogito.kie.org/v1alpha08 -kind: KogitoServerlessWorkflow +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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. +# + +apiVersion: sonataflow.org/v1alpha08 +kind: SonataFlow metadata: name: startevent annotations: - sw.kogito.kie.org/description: Serverless Workflow for each example on k8s! - sw.kogito.kie.org/version: 0.0.1 - sw.kogito.kie.org/profile: dev - sw.kogito.kie.org/resource-openapi: openapi-configmap + sonataflow.org/description: Serverless Workflow for each example on k8s! + sonataflow.org/version: 0.0.1 + sonataflow.org/profile: dev + sonataflow.org/resource-openapi: openapi-configmap spec: flow: start: printWaitMessage diff --git a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/pom.xml index 4cc5b957be..2b2eb6625d 100644 --- a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/pom.xml @@ -1,10 +1,37 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-consuming-events-over-http-quarkus @@ -12,15 +39,15 @@ Kogito Example :: Serverless Workflow Consuming Events Over HTTP :: Quarkus Kogito Serverless Workflow Consuming Events Over HTTP - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.8.1 - 11 + 17 3.0.0-M7 @@ -44,8 +71,8 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus io.quarkus @@ -56,16 +83,12 @@ quarkus-resteasy-jackson - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files - org.kie.kogito - kogito-addons-quarkus-process-management + org.kie + kie-addons-quarkus-process-management io.quarkus @@ -144,4 +167,4 @@ - \ No newline at end of file +
diff --git a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/src/main/resources/application.properties index 67aed24f5d..03172d7eb3 100644 --- a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-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. +# + # Defines the connector for the "move" channel mp.messaging.incoming.move.connector=quarkus-http mp.messaging.incoming.start.connector=quarkus-http @@ -12,6 +31,3 @@ mp.messaging.incoming.start.path=/startevent %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local %container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin diff --git a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/src/test/java/org/kie/kogito/examples/ConsumingEventsOverHttpIT.java b/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/src/test/java/org/kie/kogito/examples/ConsumingEventsOverHttpIT.java index 255feff2f7..8a981fe2ac 100644 --- a/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/src/test/java/org/kie/kogito/examples/ConsumingEventsOverHttpIT.java +++ b/serverless-workflow-examples/serverless-workflow-consuming-events-over-http-quarkus/src/test/java/org/kie/kogito/examples/ConsumingEventsOverHttpIT.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/README.md b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/README.md index 527c61b5f2..83535e600b 100644 --- a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/README.md +++ b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/README.md @@ -90,9 +90,9 @@ to ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVm](https://www.graalvm.org/downloads/) 19.3.1+ installed diff --git a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/docker-compose/docker-compose.yml b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/docker-compose/docker-compose.yml index 23f877d8f8..4f93231e6c 100644 --- a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/docker-compose/docker-compose.yml +++ b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/docker-compose/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/serverless-workflow-examples/serverless-workflow-correlation-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/pom.xml index 4cb87747c5..b89b70d9b9 100644 --- a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/pom.xml @@ -1,8 +1,35 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-correlation-quarkus 1.0-SNAPSHOT @@ -10,15 +37,15 @@ Kogito Example :: Serverless Workflow Correlation :: Quarkus Kogito Serverless Workflow Correlation Example - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.8.1 - 11 + 17 3.0.0-M7 @@ -42,12 +69,12 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus - org.kie.kogito - kogito-addons-quarkus-messaging + org.kie + kie-addons-quarkus-messaging io.quarkus @@ -66,12 +93,8 @@ quarkus-smallrye-health - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files @@ -163,8 +186,8 @@ - org.kie.kogito - kogito-addons-quarkus-persistence-jdbc + org.kie + kie-addons-quarkus-persistence-jdbc io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/java/org/kie/kogito/examples/Account.java b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/java/org/kie/kogito/examples/Account.java index e0b09d9899..5da1f57541 100644 --- a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/java/org/kie/kogito/examples/Account.java +++ b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/java/org/kie/kogito/examples/Account.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/java/org/kie/kogito/examples/EventsService.java b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/java/org/kie/kogito/examples/EventsService.java index ff08208ed8..004e81d958 100644 --- a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/java/org/kie/kogito/examples/EventsService.java +++ b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/java/org/kie/kogito/examples/EventsService.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.examples; @@ -22,8 +25,8 @@ import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; import org.eclipse.microprofile.reactive.messaging.Acknowledgment; import org.eclipse.microprofile.reactive.messaging.Acknowledgment.Strategy; diff --git a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/java/org/kie/kogito/examples/WorkflowResource.java b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/java/org/kie/kogito/examples/WorkflowResource.java index bb3edca5f7..de6af279ab 100644 --- a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/java/org/kie/kogito/examples/WorkflowResource.java +++ b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/java/org/kie/kogito/examples/WorkflowResource.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.examples; @@ -21,12 +24,12 @@ import java.util.Map; import java.util.UUID; -import javax.inject.Inject; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.core.Response; +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.core.Response; import org.eclipse.microprofile.reactive.messaging.Channel; import org.eclipse.microprofile.reactive.messaging.Emitter; diff --git a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/resources/application.properties index e2d7afaafc..307953b261 100644 --- a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-correlation-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. +# + %prod.kafka.bootstrap.servers=localhost:9092 #start the workflow events @@ -85,6 +104,3 @@ quarkus.grpc.dev-mode.force-server-start=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local %container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin diff --git a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/test/java/org/kie/kogito/examples/CorrelationIT.java b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/test/java/org/kie/kogito/examples/CorrelationIT.java index a5181364a4..9f8a24fcba 100644 --- a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/test/java/org/kie/kogito/examples/CorrelationIT.java +++ b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/test/java/org/kie/kogito/examples/CorrelationIT.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/test/resources/application.properties b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/test/resources/application.properties index 13fa29b31e..50bf6c1154 100644 --- a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/test/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-correlation-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.http.test-port=0 diff --git a/serverless-workflow-examples/serverless-workflow-custom-function-knative/README.md b/serverless-workflow-examples/serverless-workflow-custom-function-knative/README.md index b3d6d32e2b..31c03fd5b9 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-function-knative/README.md +++ b/serverless-workflow-examples/serverless-workflow-custom-function-knative/README.md @@ -14,7 +14,7 @@ The service is described using JSON format as defined in the ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - Maven 3.8.6++ installed When using native image compilation, you will also need: @@ -23,27 +23,51 @@ You will need: - Note that GraalVM native image compilation typically requires other packages (glibc-devel, zlib-devel and gcc) to be installed too. You also need 'native-image' installed in GraalVM (using 'gu install native-image'). Please refer to [GraalVM installation documentation](https://www.graalvm.org/docs/reference-manual/aot-compilation/#prerequisites) for more details. - minikube (https://minikube.sigs.k8s.io/docs/start/) - Knative [quickstarts](https://knative.dev/docs/getting-started/quickstart-install/) - - Run `eval $(minikube -p minikube docker-env --profile knative)` to build the images in your internal Minikube registry. - + +### Minikube settings + +Execute this command to build the images in your Minikube internal registry. +```shell +eval $(minikube -p minikube docker-env --profile knative) +``` + +To expose the service URLs in your local environment you must start the minikube tunnel. + +```shell +# you will be asked for your admin password +minikube tunnel --profile knative +``` + +### Creating the namespace + +```shell +# The namespace name is very important to ensure all the services that compose the example can interact. +kubectl create ns custom-functions +``` + ### Deploy the `custom-function-knative-service` project to Knative From the `custom-function-knative-service` directory run: ```sh -mvn clean package -Dquarkus.kubernetes.deploy=true -Dquarkus.container-image.group=dev.local/ +mvn clean package -Dcontainer +``` + +```sh +kubectl apply -f target/kubernetes/knative.yml ``` Check if the service was successfully deployed: ```sh -kn service list +kn service list -n custom-functions ``` You should see something similar to (URL should change): ```sh -NAME URL LATEST AGE CONDITIONS READY REASON -custom-function-knative-service http://custom-function-knative-service.default.10.109.169.193.sslip.io custom-function-knative-service-00001 13s 3 OK / 3 True +NAME URL LATEST AGE CONDITIONS READY REASON +custom-function-knative-service http://custom-function-knative-service.custom-functions.10.107.55.54.sslip.io custom-function-knative-service-00001 53s 3 OK / 3 True ``` ### Deploy the `workflow` project to Knative @@ -51,21 +75,25 @@ custom-function-knative-service http://custom-function-knative-service.default From the `workflow` directory run: ```sh -mvn clean package -Dquarkus.kubernetes.deploy=true -Dquarkus.container-image.group=dev.local/ +mvn clean package -Dcontainer +``` + +```sh +kubectl apply -f target/kubernetes/knative.yml ``` Check if the service was successfully deployed: ```sh -kn service list +kn service list -n custom-functions ``` You should see both services deployed similar to (URLs should change): ```sh -NAME URL LATEST AGE CONDITIONS READY REASON -custom-function-knative-service http://custom-function-knative-service.default.10.109.169.193.sslip.io custom-function-knative-service-00001 3m53s 3 OK / 3 True -workflow http://workflow.default.10.109.169.193.sslip.io workflow-00001 12s 3 OK / 3 True +NAME URL LATEST AGE CONDITIONS READY REASON +custom-function-knative-service http://custom-function-knative-service.custom-functions.10.107.55.54.sslip.io custom-function-knative-service-00001 9m45s 3 OK / 3 True +workflow http://workflow.custom-functions.10.107.55.54.sslip.io workflow-00001 8s 3 OK / 3 True ``` ### Submit a request with a plain JSON object @@ -103,7 +131,10 @@ The service based on the JSON workflow definition can be accessed by sending a r "cloudevent": { "specversion": "1.0", "source": "org.acme.source", - "type": "test" + "type": "test", + "data": { + "value": "test data" + } } } ``` @@ -120,11 +151,20 @@ curl -X 'POST' \ '/cloudEventKnativeFunction' \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ - -d '{ "cloudevent": { "specversion": "1.0", "source": "org.acme.source", "type": "test" }}' + -d '{ "cloudevent": { "specversion": "1.0", "source": "org.acme.source", "type": "test", "data": { "value": "test data"} }}' ``` Should return something like this ("id" will change): ```json {"id":"8dc00353-c1c6-45e9-845d-e9188d103f50","workflowdata":{"id":"response-of-org.acme.source_8dc00353-c1c6-45e9-845d-e9188d103f50","specversion":"1.0","source":"cloudEventFunction","type":"annotated"}} -``` \ No newline at end of file +``` + +### Cleaning the example + +To remove the installed services from your minikube installation you can use the following command: + +```shell +# Note: this command might take some seconds. +kubectl delete namespace custom-functions +``` diff --git a/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/pom.xml b/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/pom.xml index bb232125fa..0fa46a7456 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/pom.xml @@ -1,4 +1,24 @@ + @@ -12,16 +32,18 @@ custom-function-knative-service Kogito Example :: Serverless Workflow Custom Function Knative :: Service - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 3.8.1 - 11 + 999-SNAPSHOT + 3.11.0 + 17 3.0.0-M7 + UTF-8 + UTF-8 @@ -59,10 +81,6 @@ io.quarkus quarkus-kubernetes - - io.quarkus - quarkus-container-image-jib - io.quarkus quarkus-funqy-knative-events diff --git a/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/src/main/java/org/kie/kogito/examples/CloudEventFunction.java b/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/src/main/java/org/kie/kogito/examples/CloudEventFunction.java index a9f09c4da4..ea0014fbda 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/src/main/java/org/kie/kogito/examples/CloudEventFunction.java +++ b/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/src/main/java/org/kie/kogito/examples/CloudEventFunction.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/src/main/java/org/kie/kogito/examples/Input.java b/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/src/main/java/org/kie/kogito/examples/Input.java index 1302701ef3..9f03a6643e 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/src/main/java/org/kie/kogito/examples/Input.java +++ b/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/src/main/java/org/kie/kogito/examples/Input.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/src/main/java/org/kie/kogito/examples/Output.java b/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/src/main/java/org/kie/kogito/examples/Output.java index c478e6ac22..26f0029a30 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/src/main/java/org/kie/kogito/examples/Output.java +++ b/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/src/main/java/org/kie/kogito/examples/Output.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/src/main/java/org/kie/kogito/examples/PlainJsonFunction.java b/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/src/main/java/org/kie/kogito/examples/PlainJsonFunction.java index de843004f8..dd8aef41c6 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/src/main/java/org/kie/kogito/examples/PlainJsonFunction.java +++ b/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/src/main/java/org/kie/kogito/examples/PlainJsonFunction.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/src/main/resources/application.properties index 202756ba83..cba1b3fe93 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-custom-function-knative/custom-function-knative-service/src/main/resources/application.properties @@ -1,6 +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. +# + quarkus.native.native-image-xmx=8g quarkus.kubernetes.deployment-target=knative +quarkus.knative.namespace=custom-functions +quarkus.knative.image-pull-policy=if-not-present quarkus.funqy.knative-events.mapping.cloudEventFunction.trigger=test quarkus.funqy.knative-events.mapping.cloudEventFunction.response-type=annotated -quarkus.funqy.knative-events.mapping.cloudEventFunction.response-source=cloudEventFunction \ No newline at end of file +quarkus.funqy.knative-events.mapping.cloudEventFunction.response-source=cloudEventFunction + +%container.quarkus.container-image.build=true +%container.quarkus.container-image.registry=dev.local +%container.quarkus.container-image.group=${USER} diff --git a/serverless-workflow-examples/serverless-workflow-custom-function-knative/pom.xml b/serverless-workflow-examples/serverless-workflow-custom-function-knative/pom.xml index 58add14932..e740789938 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-function-knative/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-custom-function-knative/pom.xml @@ -1,10 +1,37 @@ + 4.0.0 - org.kie.kogito.examples + + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + serverless-workflow-custom-function-knative 1.0-SNAPSHOT Kogito Example :: Serverless Workflow Custom Function :: Quarkus diff --git a/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/pom.xml b/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/pom.xml index a92ad9e896..3029d2d915 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/pom.xml @@ -1,4 +1,24 @@ + @@ -13,18 +33,20 @@ Kogito Example :: Serverless Workflow Custom Function Knative :: Workflow Kogito Serverless Workflow Custom Function Knative - Workflow - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 3.8.1 - 11 + 999-SNAPSHOT + 3.11.0 + 17 3.0.0-M7 2.33.2 2.35.0 + UTF-8 + UTF-8 @@ -46,10 +68,6 @@ - - org.kie.kogito - kogito-quarkus-serverless-workflow - io.quarkus quarkus-resteasy @@ -59,32 +77,32 @@ quarkus-resteasy-jackson - org.kie.kogito - kogito-quarkus-serverless-workflow-devui + io.quarkus + quarkus-smallrye-openapi - org.kie.kogito - kogito-addons-quarkus-source-files + io.quarkus + quarkus-kubernetes - org.kie.kogito - kogito-addons-quarkus-knative-serving + org.apache.kie.sonataflow + sonataflow-quarkus - org.kie.kogito - kogito-addons-quarkus-kubernetes + org.kie + kie-addons-quarkus-source-files - org.kie.kogito - kogito-addons-quarkus-fabric8-kubernetes-service-catalog + org.kie + kogito-addons-quarkus-knative-serving - io.quarkus - quarkus-kubernetes + org.kie + kie-addons-quarkus-kubernetes - io.quarkus - quarkus-container-image-jib + org.kie + kogito-addons-quarkus-fabric8-kubernetes-service-catalog io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/src/main/kubernetes/common.yml b/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/src/main/kubernetes/common.yml new file mode 100644 index 0000000000..93ca6f22bb --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/src/main/kubernetes/common.yml @@ -0,0 +1,49 @@ +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: service-discovery-role +rules: + - apiGroups: + - "" + resources: + - pods + - services + verbs: + - get + - list + - apiGroups: + - apps + resources: + - deployments + - statefulsets + verbs: + - get + - list + - apiGroups: + - networking.k8s.io + resources: + - ingresses + verbs: + - get + - list + # Knative + - apiGroups: + - serving.knative.dev + resources: + - services + verbs: + - get + - list +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: service-discovery-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: service-discovery-role +subjects: + - kind: ServiceAccount + name: default \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/src/main/resources/application.properties index bedf40d81b..f37ee1ea88 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/src/main/resources/application.properties @@ -1,2 +1,35 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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.swagger-ui.always-include=true +kogito.devservices.enabled=false + quarkus.native.native-image-xmx=8g -quarkus.kubernetes.deployment-target=knative \ No newline at end of file +quarkus.kubernetes.deployment-target=knative +# The name of the application. This value will be used for naming Kubernetes resources like: Deployment, Service, etc. +quarkus.knative.name=workflow +quarkus.knative.namespace=custom-functions +quarkus.knative.image-pull-policy=if-not-present + +%container.quarkus.container-image.build=true +# Since the Quarkus project has no java files, Quarkus 3.2.10.Final is picking the default image +# base: registry.access.redhat.com/ubi8/openjdk-11-runtime:1.16'. Not good, since the workflows requires java 17. +# Quarkus 3.8.1 picks openjdk-17 even when no java files, so this configuration can be removed in the future. +%container.quarkus.jib.base-jvm-image=registry.access.redhat.com/ubi8/openjdk-17-runtime:1.16 +%container.quarkus.container-image.registry=dev.local +%container.quarkus.container-image.group=${USER} \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/src/main/resources/cloudeventKnativeFunction.sw.json b/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/src/main/resources/cloudeventKnativeFunction.sw.json index 2b1b420267..2e7d35fc1b 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/src/main/resources/cloudeventKnativeFunction.sw.json +++ b/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/src/main/resources/cloudeventKnativeFunction.sw.json @@ -8,7 +8,7 @@ { "name": "greet", "type": "custom", - "operation": "knative:services.v1.serving.knative.dev/default/custom-function-knative-service?path=/cloudEventFunction&asCloudEvent=true" + "operation": "knative:services.v1.serving.knative.dev/custom-functions/custom-function-knative-service?path=/cloudEventFunction&asCloudEvent=true" } ], "states": [ @@ -19,7 +19,12 @@ { "functionRef": { "refName": "greet", - "arguments": ".cloudevent" + "arguments": { + "specversion" : ".cloudevent.specversion", + "type": ".cloudevent.type", + "source": ".cloudevent.source", + "data": ".cloudevent.data" + } } } ], diff --git a/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/src/main/resources/fullGvkPlainJsonKnativeFunction.sw.json b/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/src/main/resources/fullGvkPlainJsonKnativeFunction.sw.json index 8d76b4f1a5..5eadcd9928 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/src/main/resources/fullGvkPlainJsonKnativeFunction.sw.json +++ b/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/src/main/resources/fullGvkPlainJsonKnativeFunction.sw.json @@ -8,7 +8,7 @@ { "name": "greet", "type": "custom", - "operation": "knative:services.v1.serving.knative.dev/custom-function-knative-service?path=/plainJsonFunction" + "operation": "knative:services.v1.serving.knative.dev/custom-functions/custom-function-knative-service?path=/plainJsonFunction" } ], "states": [ diff --git a/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/src/main/resources/plainJsonKnativeFunction.sw.json b/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/src/main/resources/plainJsonKnativeFunction.sw.json index 7c69121513..d29a2b2481 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/src/main/resources/plainJsonKnativeFunction.sw.json +++ b/serverless-workflow-examples/serverless-workflow-custom-function-knative/workflow/src/main/resources/plainJsonKnativeFunction.sw.json @@ -8,7 +8,7 @@ { "name": "greet", "type": "custom", - "operation": "knative:services.v1.serving.knative.dev/default/custom-function-knative-service?path=/plainJsonFunction" + "operation": "knative:services.v1.serving.knative.dev/custom-functions/custom-function-knative-service?path=/plainJsonFunction" } ], "states": [ diff --git a/serverless-workflow-examples/serverless-workflow-custom-type/pom.xml b/serverless-workflow-examples/serverless-workflow-custom-type/pom.xml index 519f3d2369..e8405534f4 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-type/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-custom-type/pom.xml @@ -1,8 +1,35 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-custom-type 1.0-SNAPSHOT @@ -11,16 +38,15 @@ 3.8.1 - 3.1.0 - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.0.0-M7 - 11 + 17 1.7.30 diff --git a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-deployment/pom.xml b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-deployment/pom.xml index 4dba82d554..e76fac5082 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-deployment/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-deployment/pom.xml @@ -1,4 +1,24 @@ + @@ -21,8 +41,8 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow-deployment + org.apache.kie.sonataflow + sonataflow-quarkus-deployment diff --git a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-deployment/src/main/java/org/kie/kogito/examples/sw/services/RPCCustomFunctionNamespace.java b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-deployment/src/main/java/org/kie/kogito/examples/sw/services/RPCCustomFunctionNamespace.java index 5cbc1755d1..6ed7e9657e 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-deployment/src/main/java/org/kie/kogito/examples/sw/services/RPCCustomFunctionNamespace.java +++ b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-deployment/src/main/java/org/kie/kogito/examples/sw/services/RPCCustomFunctionNamespace.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.examples.sw.services; diff --git a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-deployment/src/main/java/org/kie/kogito/examples/sw/services/RPCCustomTypeHandler.java b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-deployment/src/main/java/org/kie/kogito/examples/sw/services/RPCCustomTypeHandler.java index c70b72126a..fc276aa71e 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-deployment/src/main/java/org/kie/kogito/examples/sw/services/RPCCustomTypeHandler.java +++ b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-deployment/src/main/java/org/kie/kogito/examples/sw/services/RPCCustomTypeHandler.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.examples.sw.services; diff --git a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-deployment/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-deployment/src/main/resources/application.properties index e69de29bb2..d8a500d9d8 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-deployment/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-deployment/src/main/resources/application.properties @@ -0,0 +1,19 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-server/pom.xml b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-server/pom.xml index 3d329dba7d..8b447bb40a 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-server/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-server/pom.xml @@ -1,4 +1,24 @@ + 4.0.0 diff --git a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-server/src/main/java/org/kie/kogito/examples/sw/custom/CalculatorClient.java b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-server/src/main/java/org/kie/kogito/examples/sw/custom/CalculatorClient.java index 059af976cb..2cf357d67d 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-server/src/main/java/org/kie/kogito/examples/sw/custom/CalculatorClient.java +++ b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-server/src/main/java/org/kie/kogito/examples/sw/custom/CalculatorClient.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.examples.sw.custom; diff --git a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-server/src/main/java/org/kie/kogito/examples/sw/custom/CalculatorServer.java b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-server/src/main/java/org/kie/kogito/examples/sw/custom/CalculatorServer.java index 0226ede044..75759febaf 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-server/src/main/java/org/kie/kogito/examples/sw/custom/CalculatorServer.java +++ b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-server/src/main/java/org/kie/kogito/examples/sw/custom/CalculatorServer.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.examples.sw.custom; diff --git a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-server/src/test/java/org/kie/kogito/examples/sw/custom/CalculatorClientTest.java b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-server/src/test/java/org/kie/kogito/examples/sw/custom/CalculatorClientTest.java index 606540204d..18caa33b66 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-server/src/test/java/org/kie/kogito/examples/sw/custom/CalculatorClientTest.java +++ b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc-server/src/test/java/org/kie/kogito/examples/sw/custom/CalculatorClientTest.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.examples.sw.custom; diff --git a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/pom.xml b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/pom.xml index 41b3e9ba68..4b46ec33bf 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/pom.xml @@ -1,4 +1,24 @@ + @@ -15,8 +35,8 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus org.kie.kogito.examples diff --git a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/src/main/java/org/kie/kogito/examples/sw/custom/RPCCustomWorkItemHandler.java b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/src/main/java/org/kie/kogito/examples/sw/custom/RPCCustomWorkItemHandler.java index 309c561ef5..64beded70a 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/src/main/java/org/kie/kogito/examples/sw/custom/RPCCustomWorkItemHandler.java +++ b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/src/main/java/org/kie/kogito/examples/sw/custom/RPCCustomWorkItemHandler.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.examples.sw.custom; @@ -20,7 +23,7 @@ import java.util.Iterator; import java.util.Map; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.kie.kogito.examples.sw.custom.CalculatorClient.OperationId; import org.kie.kogito.internal.process.runtime.KogitoWorkItem; diff --git a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/src/main/java/org/kie/kogito/examples/sw/custom/RPCCustomWorkItemHandlerConfig.java b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/src/main/java/org/kie/kogito/examples/sw/custom/RPCCustomWorkItemHandlerConfig.java index e1bbe63aa2..d33a90b6ca 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/src/main/java/org/kie/kogito/examples/sw/custom/RPCCustomWorkItemHandlerConfig.java +++ b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/src/main/java/org/kie/kogito/examples/sw/custom/RPCCustomWorkItemHandlerConfig.java @@ -1,23 +1,27 @@ /* - * 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.examples.sw.custom; -import javax.annotation.PostConstruct; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.annotation.PostConstruct; + +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; import org.kie.kogito.process.impl.CachedWorkItemHandlerConfig; diff --git a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/src/main/resources/META-INF/beans.xml b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/src/main/resources/META-INF/beans.xml index e69de29bb2..60125d0cfc 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/src/main/resources/META-INF/beans.xml +++ b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/src/main/resources/META-INF/beans.xml @@ -0,0 +1,20 @@ + \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/src/main/resources/application.properties index e69de29bb2..d8a500d9d8 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-rpc/src/main/resources/application.properties @@ -0,0 +1,19 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-type-example/pom.xml b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-type-example/pom.xml index 4ab12ace73..78ac2ca09f 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-type-example/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-type-example/pom.xml @@ -1,4 +1,24 @@ + 4.0.0 @@ -16,8 +36,8 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-type-example/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-type-example/src/main/resources/application.properties index ddc28dd0f5..1e67c7e96d 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-type-example/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-type-example/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. +# + # Packaging # quarkus.package.type=fast-jar quarkus.devservices.enabled=false @@ -7,7 +26,4 @@ quarkus.devservices.enabled=false %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-type-example/src/test/java/org/kie/kogito/examples/CustomRestIT.java b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-type-example/src/test/java/org/kie/kogito/examples/CustomRestIT.java index 40d947f5dc..1f5daa5827 100644 --- a/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-type-example/src/test/java/org/kie/kogito/examples/CustomRestIT.java +++ b/serverless-workflow-examples/serverless-workflow-custom-type/serverless-workflow-custom-type-example/src/test/java/org/kie/kogito/examples/CustomRestIT.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/README.md b/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/README.md new file mode 100644 index 0000000000..366dd2c979 --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/README.md @@ -0,0 +1,196 @@ +# Kogito Serverless Workflow - Data Index persistence addon Example + +## Description + +This example contains a simple workflow service that demonstrates how to use Data Index persistence addon as part of the Kogito runtime. +The service is described using JSON format as defined in the +[CNCF Serverless Workflow specification](https://github.com/serverlessworkflow/specification). + +## Infrastructure requirements + +### PostgreSQL + +This example also requires persistence with a PostgreSQL server. + +Optionally and for convenience, a docker-compose [configuration file](docker-compose/docker-compose.yml) is +provided in the path [docker-compose/](docker-compose/), where you can just run the command from there: + +```sh +./startServices.sh +``` + +The configuration for setting up the connection can be found in [applications.properties](src/main/resources/application.properties) file, which +follows the Quarkus JDBC settings, for more information please check [JDBC Configuration Reference](https://quarkus.io/guides/datasource#jdbc-configuration). + +In this way a container for PostgreSQL will be started on port 5432. + +## Installing and Running + +### Prerequisites + +You will need: + - Java 17+ installed + - Environment variable JAVA_HOME set accordingly + - Maven 3.9.6+ installed + - Docker and Docker Compose to run the required example infrastructure. + +When using native image compilation, you will also need: + - GraalVM 22.2+ installed + - Environment variable GRAALVM_HOME set accordingly + - GraalVM native image needs as well native-image extension: https://www.graalvm.org/reference-manual/native-image/ + - Note that GraalVM native image compilation typically requires other packages (glibc-devel, zlib-devel and gcc) to be installed too, please refer to GraalVM installation documentation for more details. + +NOTE: Quarkus provides a way of creating a native Linux executable without GraalVM installed, leveraging a container runtime such as Docker or Podman. More details in https://quarkus.io/guides/building-native-image#container-runtime + +### Compile and Run in Local Dev Mode + +```sh +mvn clean package quarkus:dev +``` + +NOTE: Data Index graphql UI will be available in http://localhost:8180/graphiql/ + + +### Start infrastructure services + +You should start all the services before you execute any of the **Data Index** example. To do that please execute: + +```sh +mvn clean package -P container +``` + +For Linux and MacOS: + +1. Open a Terminal +2. Go to docker-compose folder +3. Run ```docker-compose up``` + +```bash +cd docker-compose && ./startServices.sh +``` + +TIP: If you get a `permission denied` error while creating the postgresql container, consider using SELinux context. +Update the following line: +```yaml + - ./sql:/docker-entrypoint-initdb.d +``` +to +```yaml + - ./sql:/docker-entrypoint-initdb.d:Z +``` + +Once all services bootstrap, the following ports will be assigned on your local machine: + +- PostgreSQL: 5432 +- PgAdmin: 8055 +- Data Index service: 8180 +- serverless-workflow-service: 8080 + +> **_NOTE:_** This step requires the project to be compiled, please consider running a ```mvn clean package -Dcontainer``` command on the project root before running the ```docker-compose up``` for the first time or any time you modify the project. + +Once started you can simply stop all services by executing the ```docker-compose stop```. + +All created containers can be removed by executing the ```docker-compose rm```. + +### Submit a request + +The service based on the JSON workflow definition can be access by sending a request to http://localhost:8080/greet' +with following content + +```json +{ + "name": "John", + "language": "English" +} +``` + +Complete curl command can be found below: + +```sh +curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' -d '{"name": "John", "language": "English"}' http://localhost:8080/greet +``` + +Log after curl executed: + +```json +{"id":"541a5363-1667-4f6d-a8b4-1299eba81eac","workflowdata":{"name":"John","language":"English","greeting":"Hello from JSON Workflow, "}} +``` + +In Quarkus you should see the log message printed: + +```text +Hello from JSON Workflow, John +``` + +If you would like to greet the person in Spanish, we need to pass the following data on workflow start: + +```json +{ + "name": "John", + "language": "Spanish" +} +``` + +Complete curl command can be found below: + +```sh +curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' -d '{"name": "John", "language": "Spanish"}' http://localhost:8080/greet +``` + +In Quarkus you should now see the log message printed: + +```text +Saludos desde JSON Workflow, John +``` + +Then we can verify that the data has been properly indexed accessing to http://localhost:8180/graphiql/ and executing the query: + +```text +{ProcessInstances { + id + variables +}} +``` + +getting as a result: + +```text +{ + "data": { + "ProcessInstances": [ + { + "id": "0b95e8a1-b52f-48cf-b7d0-38fa3087d467", + "variables": { + "workflowdata": { + "name": "John", + "greeting": "Hello from JSON Workflow, ", + "language": "English" + } + } + }, + { + "id": "141f7350-7802-4abc-985c-333caf1068f9", + "variables": { + "workflowdata": { + "name": "John", + "greeting": "Saludos desde JSON Workflow, ", + "language": "Spanish" + } + } + } + ] + } +} +``` + +Or by command line, executing the complete curl command can be found below: + +```sh +curl -H "Content-Type: application/json" -H "Accept: application/json" -X POST --data '{"query" : "{ProcessInstances {id variables}}" }' http://localhost:8180/graphql +``` + +getting + +```text +{"data":{"ProcessInstances":[{"id":"0b95e8a1-b52f-48cf-b7d0-38fa3087d467","variables":{"workflowdata":{"name":"John","greeting":"Hello from JSON Workflow, ","language":"English"}}},{"id":"141f7350-7802-4abc-985c-333caf1068f9","variables":{"workflowdata":{"name":"John","greeting":"Saludos desde JSON Workflow, ","language":"Spanish"}}}]}} +``` \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docker-compose/README.md b/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/docker-compose/README.md similarity index 53% rename from kogito-quarkus-examples/process-usertasks-quarkus-with-console/docker-compose/README.md rename to serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/docker-compose/README.md index 8fa3cba9d1..1f17b41546 100644 --- a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docker-compose/README.md +++ b/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/docker-compose/README.md @@ -1,14 +1,9 @@ ## Kogito and Infrastructure services To allow a quick setup of all services required to run this demo, we provide a docker compose template that starts the following services: -- Postgresql / Infinispan -- (PgAdmin, only for postgres deployment) -- Kafka -- Kogito Data Index -- Kogito Jobs -- Kogito Management Console -- Kogito Task Console -- Keycloak +- Postgresql +- PgAdmin +- Data Index In order to use it, please ensure you have Docker Compose installed on your machine, otherwise follow the instructions available in [here](https://docs.docker.com/compose/install/). @@ -16,48 +11,25 @@ in [here](https://docs.docker.com/compose/install/). ### Starting required services Once all services bootstrap, the following ports will be assigned on your local machine: -- PostgresQL: 5432 or Infinispan: 11222 -- PgAdmin: 8055 (only for postgres deployment) -- Kafka: 9092 +- PostgresQL: 5432 +- PgAdmin: 8055 - Data Index: 8180 -- Jobs: 8580 -- Management Console: 8280 -- Task Console: 8380 -- Keycloak: 8480 ### Postgresql deployment: ####Start services -./startServices.sh postgresql or just ./startServices.sh - - -#### Stopping and removing volume data - -To stop all services, simply run: - -docker-compose -f docker-compose-postgresql.yml stop - -It is also recomended to remove any of stopped containers by running: - -docker-compose -f docker-compose-postgresql.yml rm - -### Infinispan deployment: - -####Start services - - ./startServices.sh infinispan +./startServices.sh #### Stopping and removing volume data To stop all services, simply run: -docker-compose -f docker-compose-infinispan.yml stop +docker-compose stop It is also recomended to remove any of stopped containers by running: -docker-compose -f docker-compose-infinispan.yml rm - +docker-compose rm NOTE: All the running containers can be stopped running `docker stop $(docker ps -a -q)` diff --git a/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/docker-compose/docker-compose.yml b/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/docker-compose/docker-compose.yml new file mode 100644 index 0000000000..f6e0697dfd --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/docker-compose/docker-compose.yml @@ -0,0 +1,67 @@ +version: '2.1' + +services: + postgres: + container_name: postgres + image: postgres:13.4-alpine3.14 + ports: + - "5432:5432" + volumes: + - ./sql:/docker-entrypoint-initdb.d:Z + healthcheck: + test: [ "CMD", "pg_isready", "-q", "-d", "kogito", "-U", "kogito-user" ] + timeout: 45s + interval: 10s + retries: 50 + environment: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + + pgadmin-compose: + image: dpage/pgadmin4:5.0 + environment: + PGADMIN_DEFAULT_EMAIL: user@user.org + PGADMIN_DEFAULT_PASSWORD: pass + ports: + - 8055:80 + depends_on: + - postgres + container_name: pgadmin-container + + data-index: + container_name: data-index + image: quay.io/kiegroup/kogito-data-index-postgresql-nightly:latest + ports: + - "8180:8080" + depends_on: + postgres: + condition: service_healthy + volumes: + - ./../target/classes/META-INF/resources/persistence/protobuf:/home/kogito/data/protobufs/ + environment: + QUARKUS_DATASOURCE_JDBC_URL: "jdbc:postgresql://postgres:5432/kogito" + QUARKUS_DATASOURCE_USERNAME: kogito-user + QUARKUS_DATASOURCE_PASSWORD: kogito-pass + QUARKUS_HTTP_CORS_ORIGINS: "/.*/" + QUARKUS_FLYWAY_MIGRATE_AT_START: "true" + QUARKUS_FLYWAY_BASELINE_ON_MIGRATE: "true" + QUARKUS_FLYWAY_TABLE: FLYWAY_DATAINDEX_SERVICE + QUARKUS_HIBERNATE_ORM_DATABASE_GENERATION: update + KOGITO_DATA_INDEX_QUARKUS_PROFILE: "http-events-support" + + serverless-workflow-service: + container_name: serverless-workflow-service + image: dev.local/${USER}/serverless-workflow-service:1.0-SNAPSHOT + ports: + - "8080:8080" + depends_on: + postgres: + condition: service_healthy + environment: + QUARKUS_DATASOURCE_JDBC_URL: "jdbc:postgresql://postgres:5432/kogito" + QUARKUS_DATASOURCE_USERNAME: kogito-user + QUARKUS_DATASOURCE_PASSWORD: kogito-pass + QUARKUS_DATASOURCE_DB_KIND: postgresql + KOGITO_SERVICE_URL: http://serverless-workflow-service:8080 + + diff --git a/kogito-quarkus-examples/process-usertasks-quarkus-with-console/docker-compose/sql/init.sql b/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/docker-compose/sql/init.sql old mode 100644 new mode 100755 similarity index 100% rename from kogito-quarkus-examples/process-usertasks-quarkus-with-console/docker-compose/sql/init.sql rename to serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/docker-compose/sql/init.sql diff --git a/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/docker-compose/startServices.sh b/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/docker-compose/startServices.sh new file mode 100755 index 0000000000..14f0b33ac8 --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/docker-compose/startServices.sh @@ -0,0 +1,36 @@ +#!/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. + +echo "Script requires your project to be compiled with the right profile: ../mvn clean install -DskipTests -Pcontainer" + +PROJECT_VERSION=$(cd ../ && mvn help:evaluate -Dexpression=project.version -q -DforceStdout) + +echo "Project version: ${PROJECT_VERSION}" + +if [[ $PROJECT_VERSION == *SNAPSHOT ]]; +then + KOGITO_VERSION="latest" +else + KOGITO_VERSION=${PROJECT_VERSION%.*} +fi + +echo "Kogito Image version: ${KOGITO_VERSION}" +echo "KOGITO_VERSION=${KOGITO_VERSION}" > ".env" + +docker-compose -f docker-compose.yml up \ No newline at end of file diff --git a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/pom.xml b/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/pom.xml similarity index 59% rename from kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/pom.xml rename to serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/pom.xml index 85006df8d8..4312d812d5 100644 --- a/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus-with-console/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/pom.xml @@ -1,25 +1,34 @@ - + 4.0.0 + org.kie.kogito.examples - kogito-quarkus-examples - 2.0.0-SNAPSHOT + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml - process-usertasks-with-security-oidc-quarkus-with-console - Kogito Example :: Process Usertasks Security OIDC Keycloak Quarkus :: Console - Kogito user tasks orchestration with security enabled on REST api - open id connect adapter(keycloak) + + org.kie.kogito.examples + serverless-workflow-data-index-persistence-addon-quarkus + 1.0-SNAPSHOT + + Kogito Example :: Serverless Workflow Data Index persistence addon :: Quarkus + Kogito Serverless Workflow Data Index persistence addon Example - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT + 999-SNAPSHOT + 3.8.1 + 17 + 3.0.0-M7 + @@ -40,8 +49,8 @@ - org.kie.kogito - kogito-quarkus + org.apache.kie.sonataflow + sonataflow-quarkus io.quarkus @@ -52,76 +61,56 @@ quarkus-resteasy-jackson - io.quarkus - quarkus-arc + org.kie + kie-addons-quarkus-persistence-jdbc io.quarkus - quarkus-oidc + quarkus-agroal - - - - org.kie.kogito - kogito-addons-quarkus-persistence-infinispan - - io.quarkus - quarkus-smallrye-reactive-messaging-kafka + quarkus-jdbc-postgresql - io.quarkus - quarkus-smallrye-openapi + org.kie + kie-addons-quarkus-process-management - - org.kie.kogito - kogito-addons-quarkus-events-process + org.kie + kie-addons-quarkus-source-files - - org.kie.kogito - kogito-addons-quarkus-process-management - - - - org.kie.kogito - kogito-addons-quarkus-process-svg - - io.quarkus quarkus-junit5 test - io.rest-assured - rest-assured - test + org.kie + kogito-addons-quarkus-data-index-persistence-postgresql + - org.keycloak - keycloak-core + io.rest-assured + rest-assured test - org.kie.kogito - kogito-quarkus-test-utils - ${version.org.kie.kogito} + org.awaitility + awaitility test - - io.quarkus - quarkus-smallrye-health - - - org.kie.kogito - kogito-addons-quarkus-source-files - ${project.artifactId} + + maven-compiler-plugin + ${version.compiler.plugin} + + ${maven.compiler.release} + + ${quarkus.platform.group-id} quarkus-maven-plugin @@ -154,5 +143,16 @@ + + native + + + native + + + + native + + diff --git a/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/src/main/resources/application.properties new file mode 100644 index 0000000000..0542e7832c --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/src/main/resources/application.properties @@ -0,0 +1,32 @@ +quarkus.kogito.data-index.graphql.ui.always-include=true +quarkus.swagger-ui.always-include=true +quarkus.http.test-port=0 + +kogito.persistence.type=jdbc +kogito.persistence.proto.marshaller=false +quarkus.datasource.db-kind=postgresql +#run create tables scripts +%container.quarkus.datasource.username=postgres +%container.quarkus.datasource.password=postgres +%container.quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/kogito + +quarkus.flyway.migrate-at-start=true +quarkus.flyway.baseline-on-migrate=true +quarkus.hibernate-orm.database.generation=update + +kogito.service.url=http://localhost:8080 + +#quarkus.kubernetes-client.devservices.enabled=false +quarkus.native.native-image-xmx=8g + +# profile to pack this example into a container, to use it execute activate the maven container profile, -Dcontainer +%container.quarkus.container-image.build=true +%container.quarkus.container-image.push=false +%container.quarkus.container-image.group=${USER} +%container.quarkus.container-image.registry=dev.local +%container.quarkus.container-image.tag=1.0-SNAPSHOT +%container.quarkus.container-image.name=serverless-workflow-service + +# Security +quarkus.oidc.enabled=false + diff --git a/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/src/main/resources/greet.sw.json b/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/src/main/resources/greet.sw.json new file mode 100644 index 0000000000..967561a2e8 --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/src/main/resources/greet.sw.json @@ -0,0 +1,65 @@ +{ + "id": "greet", + "version": "1.0", + "name": "Greeting workflow", + "description": "JSON based greeting workflow", + "start": "ChooseOnLanguage", + "functions": [ + { + "name": "greetFunction", + "type": "custom", + "operation": "sysout" + } + ], + "states": [ + { + "name": "ChooseOnLanguage", + "type": "switch", + "dataConditions": [ + { + "condition": "${ .language == \"English\" }", + "transition": "GreetInEnglish" + }, + { + "condition": "${ .language == \"Spanish\" }", + "transition": "GreetInSpanish" + } + ], + "defaultCondition": { + "transition": "GreetInEnglish" + } + }, + { + "name": "GreetInEnglish", + "type": "inject", + "data": { + "greeting": "Hello from JSON Workflow, " + }, + "transition": "GreetPerson" + }, + { + "name": "GreetInSpanish", + "type": "inject", + "data": { + "greeting": "Saludos desde JSON Workflow, " + }, + "transition": "GreetPerson" + }, + { + "name": "GreetPerson", + "type": "operation", + "actions": [ + { + "name": "greetAction", + "functionRef": { + "refName": "greetFunction", + "arguments": { + "message": ".greeting+.name" + } + } + } + ], + "end": true + } + ] +} diff --git a/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/src/test/java/org/kie/kogito/examples/DataIndexRestIT.java b/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/src/test/java/org/kie/kogito/examples/DataIndexRestIT.java new file mode 100644 index 0000000000..784f4f8cfa --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/src/test/java/org/kie/kogito/examples/DataIndexRestIT.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.examples; + +import org.junit.jupiter.api.Test; + +import io.quarkus.test.junit.QuarkusIntegrationTest; +import io.restassured.RestAssured; +import io.restassured.http.ContentType; + +import static io.restassured.RestAssured.given; +import static java.util.concurrent.TimeUnit.SECONDS; +import static org.awaitility.Awaitility.await; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.Matchers.greaterThanOrEqualTo; + +@QuarkusIntegrationTest +class DataIndexRestIT { + + static { + RestAssured.enableLoggingOfRequestAndResponseIfValidationFails(); + } + + @Test + void testDataIndexRest() { + given().contentType(ContentType.JSON).body("{ \"query\" : \"{ProcessInstances{ id } }\" }") + .when().post("/graphql") + .then().statusCode(200) + .body("data.ProcessInstances.size()", is(greaterThanOrEqualTo(0))); + + String processInstanceId = given() + .contentType(ContentType.JSON) + .accept(ContentType.JSON) + .post("/callback") + .then() + .statusCode(201) + .extract() + .path("id"); + + await() + .atLeast(1, SECONDS) + .atMost(30, SECONDS) + .with().pollInterval(1, SECONDS) + .untilAsserted(() -> given() + .contentType(ContentType.JSON) + .accept(ContentType.JSON) + .get("/callback/{id}", processInstanceId) + .then() + .statusCode(404)); + + await() + .atLeast(1, SECONDS) + .atMost(30, SECONDS) + .with().pollInterval(1, SECONDS) + .untilAsserted(() -> given().contentType(ContentType.JSON).body("{ \"query\" : \"{ ProcessInstances(where: { id: {equal: \\\"" + processInstanceId + "\\\"}}) { id, state } }\" }") + .when().post("/graphql") + .then().statusCode(200) + .body("data.ProcessInstances.size()", is(1)) + .body("data.ProcessInstances[0].id", is(processInstanceId)) + .body("data.ProcessInstances[0].state", is("COMPLETED"))); + } +} diff --git a/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/src/test/resources/application.properties b/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/src/test/resources/application.properties new file mode 100644 index 0000000000..1ed004b3ef --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-data-index-persistence-addon-quarkus/src/test/resources/application.properties @@ -0,0 +1 @@ +quarkus.kogito.devservices.enabled=false \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/README.md b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/README.md index 67f56851bf..374599bc03 100644 --- a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/README.md +++ b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/README.md @@ -50,9 +50,9 @@ In this way a container for PostgreSQL will be started on port 5432. ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed - Docker and Docker Compose to run the required example infrastructure. When using native image compilation, you will also need: @@ -118,12 +118,14 @@ Once all services bootstrap, the following ports will be assigned on your local - PgAdmin: 8055 - serverless-workflow-service: 8080 -> **_NOTE:_** This step requires the project to be compiled, please consider running a ```mvn clean package -Dcontainer``` command on the project root before running the ```docker-compose up``` for the first time or any time you modify the project. +> **_NOTE:_** This step requires the project to be compiled, please consider running a ```mvn clean package -P container,data-index-addon``` command on the project root before running the ```docker-compose up``` for the first time or any time you modify the project. Once started you can simply stop all services by executing the ```docker-compose -f docker-compose.yml stop```. All created containers can be removed by executing the ```docker-compose -f docker-compose.yml rm```. +Data Index GraphQL UI is available at http://localhost:8080/q/graphql-ui/ + This example provides also the configuration needed to see the dataindex deployed as a standalone service following the steps: - Execute @@ -205,4 +207,4 @@ After a while (note that to you need give time for event to be consumed) you sh ### Query process details in Data Index -Data Index GraphQL UI is available at http://localhost:8080/q/graphql-ui/ \ No newline at end of file +Data Index GraphQL UI is available at http://localhost:8180/graphiql/ \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/docker-compose/docker-compose-with-data-index.yml b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/docker-compose/docker-compose-with-data-index.yml index 93a394232e..accb9a8cbb 100644 --- a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/docker-compose/docker-compose-with-data-index.yml +++ b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/docker-compose/docker-compose-with-data-index.yml @@ -1,40 +1,25 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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: - zookeeper: - container_name: zookeeper - image: strimzi/kafka:0.20.1-kafka-2.6.0 - command: [ - "sh", "-c", - "bin/zookeeper-server-start.sh config/zookeeper.properties" - ] - ports: - - "2181:2181" - environment: - LOG_DIR: "/tmp/logs" - - kafka: - image: strimzi/kafka:0.20.1-kafka-2.6.0 - container_name: kafka - command: [ - "sh", "-c", - "bin/kafka-server-start.sh config/server.properties --override inter.broker.listener.name=$${KAFKA_INTER_BROKER_LISTENER_NAME} --override listener.security.protocol.map=$${KAFKA_LISTENER_SECURITY_PROTOCOL_MAP} --override listeners=$${KAFKA_LISTENERS} --override advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS} --override zookeeper.connect=$${KAFKA_ZOOKEEPER_CONNECT}" - ] - depends_on: - - zookeeper - ports: - - "9092:9092" - environment: - KAFKA_BROKER_ID: 0 - KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 - KAFKA_LISTENERS: INTERNAL://kafka:29092,EXTERNAL://kafka:9092 - KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:29092,EXTERNAL://localhost:9092 - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT - KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL - KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true" - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 - LOG_DIR: "/tmp/logs" - postgres: container_name: postgres image: postgres:13.4-alpine3.14 @@ -64,7 +49,7 @@ services: data-index: container_name: data-index - image: quay.io/kiegroup/kogito-data-index-postgresql:${KOGITO_VERSION} + image: quay.io/kiegroup/kogito-data-index-postgresql-nightly:latest ports: - "8180:8080" depends_on: @@ -81,9 +66,7 @@ services: KOGITO_DATA_INDEX_QUARKUS_PROFILE: http-events-support QUARKUS_FLYWAY_MIGRATE_AT_START: "true" QUARKUS_FLYWAY_TABLE: data-index-flyway - QUARKUS_HIBERNATE_ORM_DATABASE_GENERATION: update - KOGITO_DATA_INDEX_PROPS: -Dquarkus.hibernate-orm.database.generation=update -Dquarkus.log.category."org.kie.kogito.index".min-level=DEBUG -Dquarkus.log.category."org.kie.kogito.index".level=DEBUG - + KOGITO_DATA_INDEX_PROPS: -Dquarkus.hibernate-orm.database.generation=update serverless-workflow-service: container_name: serverless-workflow-service @@ -91,8 +74,6 @@ services: ports: - "8080:8080" depends_on: - kafka: - condition: service_started postgres: condition: service_healthy data-index: diff --git a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/docker-compose/docker-compose.yml b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/docker-compose/docker-compose.yml index 144692db63..713a86c650 100644 --- a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/docker-compose/docker-compose.yml +++ b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/docker-compose/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/serverless-workflow-examples/serverless-workflow-data-index-quarkus/docker-compose/startServices.sh b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/docker-compose/startServices.sh index 79b260af7a..387ccafc3e 100755 --- a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/docker-compose/startServices.sh +++ b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/docker-compose/startServices.sh @@ -1,18 +1,22 @@ #!/bin/bash # -# 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. echo "Script requires your project to be compiled" diff --git a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/pom.xml index b7b0a4ada4..98c170fb69 100644 --- a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/pom.xml @@ -1,8 +1,35 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-data-index-quarkus 1.0-SNAPSHOT @@ -10,15 +37,15 @@ Kogito Example :: Serverless Workflow Data Index :: Quarkus Kogito Serverless Workflow Data Index Example - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.8.1 - 11 + 17 3.0.0-M7 @@ -42,21 +69,17 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus - org.kie.kogito - kogito-addons-quarkus-messaging + org.kie + kie-addons-quarkus-messaging io.quarkus quarkus-smallrye-reactive-messaging-kafka - - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - io.quarkus quarkus-junit5 @@ -71,8 +94,8 @@ quarkus-resteasy-jackson - org.kie.kogito - kogito-addons-quarkus-persistence-jdbc + org.kie + kie-addons-quarkus-persistence-jdbc io.quarkus @@ -121,7 +144,6 @@ data-index-addon - true data-index-addon @@ -133,7 +155,7 @@ - org.kie.kogito + org.kie kogito-addons-quarkus-data-index-postgresql @@ -191,16 +213,16 @@ quarkus-container-image-jib - org.kie.kogito - kogito-addons-quarkus-events-process + org.kie + kie-addons-quarkus-events-process - org.kie.kogito - kogito-addons-quarkus-process-management + org.kie + kie-addons-quarkus-process-management - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files diff --git a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/src/main/java/org/kie/kogito/examples/PrintService.java b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/src/main/java/org/kie/kogito/examples/PrintService.java index 80259f870f..d9981b0118 100644 --- a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/src/main/java/org/kie/kogito/examples/PrintService.java +++ b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/src/main/java/org/kie/kogito/examples/PrintService.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.examples; @@ -22,8 +25,8 @@ import java.util.Optional; import java.util.UUID; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; import org.eclipse.microprofile.reactive.messaging.Acknowledgment; import org.eclipse.microprofile.reactive.messaging.Acknowledgment.Strategy; diff --git a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/src/main/resources/application.properties index 879d5d31bc..5a65acb07b 100644 --- a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-data-index-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. +# + mp.messaging.incoming.wait.connector=smallrye-kafka mp.messaging.incoming.wait.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer mp.messaging.incoming.wait.group.id=kogito-sw-callback @@ -32,6 +51,8 @@ quarkus.flyway.migrate-at-start=true quarkus.kubernetes-client.devservices.enabled=false quarkus.native.native-image-xmx=8g +# Security +quarkus.oidc.enabled=false # profile to pack this example into a container, to use it execute activate the maven container profile, -Dcontainer %container.quarkus.container-image.build=true @@ -39,9 +60,6 @@ quarkus.native.native-image-xmx=8g %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local %container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin %data-index-addon.quarkus.kogito.devservices.enabled=false %data-index-addon.quarkus.datasource.devservices.enabled=true @@ -71,3 +89,7 @@ quarkus.native.native-image-xmx=8g %http-events.mp.messaging.outgoing.kogito-variables-events.url=http://data-index:8180/variables %http-events.mp.messaging.outgoing.kogito-variables-events.method=POST +%http-events.mp.messaging.outgoing.kogito-processdefinitions-events.connector=quarkus-http +%http-events.mp.messaging.outgoing.kogito-processdefinitions-events.topic=kogito-processdefinitions-events +%http-events.mp.messaging.outgoing.kogito-processdefinitions-events.url=http://data-index:8180/definitions +%http-events.mp.messaging.outgoing.kogito-processdefinitions-events.method=POST \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/src/test/java/org/kie/kogito/examples/DataIndexRestIT.java b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/src/test/java/org/kie/kogito/examples/DataIndexRestIT.java index b09be166f9..382d102f96 100644 --- a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/src/test/java/org/kie/kogito/examples/DataIndexRestIT.java +++ b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/src/test/java/org/kie/kogito/examples/DataIndexRestIT.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/src/test/resources/application.properties b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/src/test/resources/application.properties index 1ed004b3ef..e0723a1fac 100644 --- a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/src/test/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/src/test/resources/application.properties @@ -1 +1,21 @@ -quarkus.kogito.devservices.enabled=false \ 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.devservices.enabled=true +quarkus.flyway.table=test_flyway \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-dmn-quarkus/README.md b/serverless-workflow-examples/serverless-workflow-dmn-quarkus/README.md new file mode 100644 index 0000000000..73a37c0470 --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-dmn-quarkus/README.md @@ -0,0 +1,115 @@ +# Kogito Serverless Workflow - DMN Example + +## Description + +This example contains a simple workflow service that use DMN. +The services are described using JSON format as defined in the +[CNCF Serverless Workflow specification](https://github.com/serverlessworkflow/specification). + +The workflow expects as JSON input containing driver details and a traffic violation +(see details in the [Submit a request](#Submit-a-request) section). + +The workflow uses that input to execute a decision file which evaluates if the driver should be suspended or not. + +## Installing and Running + +### Prerequisites + +You will need: + - Java 17+ installed + - Environment variable JAVA_HOME set accordingly + - Maven 3.9.6+ installed + +When using native image compilation, you will also need: + - [GraalVm](https://www.graalvm.org/downloads/) 19.3.1+ installed + - Environment variable GRAALVM_HOME set accordingly + - Note that GraalVM native image compilation typically requires other packages (glibc-devel, zlib-devel and gcc) to be installed too. You also need 'native-image' installed in GraalVM (using 'gu install native-image'). Please refer to [GraalVM installation documentation](https://www.graalvm.org/docs/reference-manual/aot-compilation/#prerequisites) for more details. + +### Compile and Run in Local Dev Mode + +```sh +mvn clean package quarkus:dev +``` + +### Compile and Run in JVM mode + +```sh +mvn clean package +java -jar target/quarkus-app/quarkus-run.jar +``` + +or on windows + +```sh +mvn clean package +java -jar target\quarkus-app\quarkus-run.jar +``` + +### Compile and Run using Local Native Image +Note that this requires GRAALVM_HOME to point to a valid GraalVM installation + +```sh +mvn clean package -Pnative +``` + +To run the generated native executable, generated in `target/`, execute + +```sh +./target/serverless-workflow-dmn-quarkus-{version}-runner +``` + +## Example Usage + +Once the service is up and running, you can use the following example to interact with the service. + +### POST /Traffic Violation + +Returns penalty information from the given inputs -- driver and violation: + +Given inputs: + +```json +{ + "Driver":{"Points":2}, + "Violation":{ + "Type":"speed", + "Actual Speed":120, + "Speed Limit":100 + } +} +``` + +Curl command (using the JSON object above): + +```sh +curl -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{"Driver":{"Points":2},"Violation":{"Type":"speed","Actual Speed":120,"Speed Limit":100}}' http://localhost:8080/traffic-violation +``` +or on Windows: + +```sh +curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" -d "{\"Driver\":{\"Points\":2},\"Violation\":{\"Type\":\"speed\",\"Actual Speed\":120,\"Speed Limit\":100}}" http://localhost:8080/traffic-violation +``` + +As response, penalty information is returned. + +Example response: + +```json +{"workflowdata": + { + "Violation":{ + "Type":"speed", + "Speed Limit":100, + "Actual Speed":120 + }, + "Driver":{ + "Points":2 + }, + "Fine":{ + "Points":3, + "Amount":500 + }, + "Should the driver be suspended?":"No" + } +} +``` \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-dmn-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-dmn-quarkus/pom.xml new file mode 100644 index 0000000000..626db11bf3 --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-dmn-quarkus/pom.xml @@ -0,0 +1,182 @@ + + + + 4.0.0 + + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + + org.kie.kogito.examples + serverless-workflow-dmn-quarkus + 1.0-SNAPSHOT + + Kogito Example :: Serverless Workflow :: DMN:: Quarkus + Kogito Serverless Workflow DMN Example - Quarkus + + 3.2.10.Final + quarkus-bom + io.quarkus + 3.2.10.Final + org.kie.kogito + kogito-bom + 999-SNAPSHOT + 17 + 3.8.1 + 3.0.0-M7 + + + + + + ${quarkus.platform.group-id} + ${quarkus.platform.artifact-id} + ${quarkus.platform.version} + pom + import + + + ${kogito.bom.group-id} + ${kogito.bom.artifact-id} + ${kogito.bom.version} + pom + import + + + + + + org.apache.kie.sonataflow + sonataflow-quarkus + + + io.quarkus + quarkus-resteasy + + + org.drools + drools-quarkus-decisions + + + org.kie.kogito + kogito-serverless-workflow-dmn-parser + + + io.quarkus + quarkus-resteasy-jackson + + + org.kie + kie-addons-quarkus-source-files + + + io.quarkus + quarkus-junit5 + test + + + io.rest-assured + rest-assured + test + + + io.quarkus + quarkus-smallrye-health + + + + ${project.artifactId} + + + maven-compiler-plugin + ${version.compiler.plugin} + + ${maven.compiler.release} + + + + ${quarkus.platform.group-id} + quarkus-maven-plugin + ${quarkus-plugin.version} + + + + build + + + + + + maven-failsafe-plugin + ${version.failsafe.plugin} + + + org.jboss.logmanager.LogManager + ${maven.home} + + + + + + integration-test + verify + + + + + + + + + container + + + container + + + + container + + + + io.quarkus + quarkus-container-image-jib + + + + + native + + + native + + + + native + + + + diff --git a/serverless-workflow-examples/serverless-workflow-dmn-quarkus/src/main/resources/Traffic Violation.dmn b/serverless-workflow-examples/serverless-workflow-dmn-quarkus/src/main/resources/Traffic Violation.dmn new file mode 100644 index 0000000000..109d4689e1 --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-dmn-quarkus/src/main/resources/Traffic Violation.dmn @@ -0,0 +1,230 @@ + + + + + + string + + + number + + + string + + + string + + + number + + + + + string + + + date + + + string + + "speed", "parking", "driving under the influence" + + + + number + + + number + + + + + number + + + number + + + + + + + + + + + + + + Violation.Type + + + + + Violation.Actual Speed - Violation.Speed Limit + + + + + + + "speed" + + + [10..30) + + + 500 + + + 3 + + + + + "speed" + + + >= 30 + + + 1000 + + + 7 + + + + + "parking" + + + - + + + 100 + + + 1 + + + + + "driving under the influence" + + + - + + + 1000 + + + 5 + + + + + + + + + Should the driver be suspended due to points on his license? + "Yes", "No" + + + + + + + + + + + + Driver.Points + Fine.Points + + + + + if Total Points >= 20 then "Yes" else "No" + + + + + + + + + + 50.0 + 254.0 + 329.0 + 119.0 + 100.0 + 186.0 + + + 50.0 + 100.0 + 398.0 + + + 398.0 + + + 398.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-dmn-quarkus/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-dmn-quarkus/src/main/resources/application.properties new file mode 100644 index 0000000000..a67a411033 --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-dmn-quarkus/src/main/resources/application.properties @@ -0,0 +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. +# + +quarkus.native.native-image-xmx=8g + +quarkus.devservices.enabled=false + +# profile to pack this example into a container, to use it execute activate the maven container profile, -Dcontainer +%container.quarkus.container-image.build=true +%container.quarkus.container-image.push=false +%container.quarkus.container-image.group=${USER} +%container.quarkus.container-image.registry=dev.local +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-dmn-quarkus/src/main/resources/traffic violation.sw.json b/serverless-workflow-examples/serverless-workflow-dmn-quarkus/src/main/resources/traffic violation.sw.json new file mode 100644 index 0000000000..b1f615e480 --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-dmn-quarkus/src/main/resources/traffic violation.sw.json @@ -0,0 +1,24 @@ +{ + "id" : "traffic-violation", + "name" : "traffic-violation", + "version" : "1_0", + "start" : "traffic-violation", + "functions" : [ { + "name" : "DMNTest", + "operation" : "dmn", + "type" : "custom", + "metadata" : { + "file" : "Traffic Violation.dmn", + "namespace" : "https://github.com/kiegroup/drools/kie-dmn/_A4BCA8B8-CF08-433F-93B2-A2598F19ECFF", + "model" : "Traffic Violation" + } + } ], + "states" : [ { + "actions" : [ { + "functionRef" : "DMNTest" + } ], + "name" : "traffic-violation", + "type" : "operation", + "end" : true + } ] +} \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-dmn-quarkus/src/test/java/org/kie/kogito/examples/DMNGreetRestIT.java b/serverless-workflow-examples/serverless-workflow-dmn-quarkus/src/test/java/org/kie/kogito/examples/DMNGreetRestIT.java new file mode 100644 index 0000000000..0d13fc98cc --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-dmn-quarkus/src/test/java/org/kie/kogito/examples/DMNGreetRestIT.java @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.examples; + +import org.junit.jupiter.api.Test; + +import io.quarkus.test.junit.QuarkusIntegrationTest; +import io.restassured.http.ContentType; + +import static io.restassured.RestAssured.given; +import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.Matchers.is; + +@QuarkusIntegrationTest +class DMNGreetRestIT { + @Test + public void testEvaluateTrafficViolation() { + given() + .body("{\n" + + " \"Driver\": {\n" + + " \"Points\": 2\n" + + " },\n" + + " \"Violation\": {\n" + + " \"Type\": \"speed\",\n" + + " \"Actual Speed\": 120,\n" + + " \"Speed Limit\": 100\n" + + " }\n" + + "}") + .contentType(ContentType.JSON) + .when() + .post("/Traffic Violation") + .then() + .statusCode(200) + .body("'Should the driver be suspended?'", is("No")); + } + +} diff --git a/serverless-workflow-examples/serverless-workflow-error-quarkus/README.md b/serverless-workflow-examples/serverless-workflow-error-quarkus/README.md index 75ab1ffe51..47b7aa2cac 100644 --- a/serverless-workflow-examples/serverless-workflow-error-quarkus/README.md +++ b/serverless-workflow-examples/serverless-workflow-error-quarkus/README.md @@ -6,10 +6,13 @@ This example contains a simple workflow service that illustrate error handling. The service is described using JSON format as defined in the [CNCF Serverless Workflow specification](https://github.com/serverlessworkflow/specification). -The workflow check if the number is odd or even and print a message indicating that. -The main feature of this demo is that if the number is odd, an exception is thrown, and it is the exception error handling the one that sets the odd message. +The workflow consists of a Java service that determines if a provided number is odd or even, followed by a call to a REST service to publish any even number. The main feature of this demo is to show different ways of exception handling within a workflow. In the Java service, if the number is odd, an exception is thrown, and it is the exception error handling the one that sets the odd message. If the REST service call returns a 400 response, the exception error handling mechanism causes the workflow to follow an error path instead of propagating this exception to the caller. -Hence, this workflow expects JSON input containing a natural number. This number is passed using a service operation to `EvenService` java class. If the number is even, the workflow moves to the next defined state, injecting "even" `numberType`. But if the number is odd, the class throws an `IllegalArgumentException`. This exception is handled and redirected to odd inject node by using [inline workflow error handling](https://github.com/serverlessworkflow/specification/blob/main/specification.md#Workflow-Error-Handling). This basically consists on adding `onErrors` field, where the expected exception is specified in `code` and the target state (a node injecting "odd" `numberType`) in `transition`. Finally, both execution paths finish on the same node, which prints the calculated `eventType`. +Hence, this workflow expects JSON input containing a natural number. This number is passed using a service operation to `EvenService` java class. If the number is even, the workflow moves to the next defined state, injecting "even" `numberType`. But if the number is odd, the class throws an `IllegalArgumentException`. This exception is handled and redirected to odd inject node by using [inline workflow error handling](https://github.com/serverlessworkflow/specification/blob/main/specification.md#Workflow-Error-Handling). This basically consists on adding `onErrors` field, where the expected exception is specified in `code` and the target state (a node injecting "odd" `numberType`) in `transition`. Both execution paths then finish on the same node, which prints the calculated `numberType`. + +In the next step, the workflow calls the `PublishRestService` via REST. This service evaluates the `numberType` from the previous step and either returns with a successful response if the number is `even`, or with a failure response (HTTP status code 400) if the number is `odd`. The failure event is handled as the action node contains an `onError` definition. The referenced error is defined as `"code": "HTTP:400"`. If this exception is encountered, the workflow execution continues on an error path that prints out the failure. + +As per 0.8 version of the specification, there is no standard way to set a process in error. To do that, users can use a custom metadata key called `errorMessage` which will contain either the error message to be associated to the process instance or an expression that returns the error message to associated to the process instance. In addition to the workflow described before, this example includes a file called `errorWithMEtadata.sw.json` that illustrate the usage of such metadata. ## Installing and Running @@ -17,9 +20,9 @@ Hence, this workflow expects JSON input containing a natural number. This number ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVm](https://www.graalvm.org/downloads/) 19.3.1+ installed @@ -101,4 +104,5 @@ In Quarkus you should see the log message printed: ```text odd +Fail to publish result ``` diff --git a/serverless-workflow-examples/serverless-workflow-error-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-error-quarkus/pom.xml index f4f65c528b..de9ca530e5 100644 --- a/serverless-workflow-examples/serverless-workflow-error-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-error-quarkus/pom.xml @@ -1,8 +1,35 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-error-quarkus 1.0-SNAPSHOT @@ -10,14 +37,14 @@ Kogito Example :: Serverless Workflow Error :: Quarkus Kogito Serverless Workflow Error Example - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 11 + 999-SNAPSHOT + 17 3.8.1 3.0.0-M7 @@ -42,8 +69,8 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus io.quarkus @@ -54,12 +81,8 @@ quarkus-resteasy-jackson - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-error-quarkus/src/main/java/org/kie/kogito/examples/EvenService.java b/serverless-workflow-examples/serverless-workflow-error-quarkus/src/main/java/org/kie/kogito/examples/EvenService.java index 59c077d862..45abeb607f 100644 --- a/serverless-workflow-examples/serverless-workflow-error-quarkus/src/main/java/org/kie/kogito/examples/EvenService.java +++ b/serverless-workflow-examples/serverless-workflow-error-quarkus/src/main/java/org/kie/kogito/examples/EvenService.java @@ -1,21 +1,24 @@ /* - * 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.examples; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; @ApplicationScoped public class EvenService { @@ -25,11 +28,4 @@ public void isEven(int number) { throw new IllegalArgumentException("Odd situation"); } } - - public void isSquare(int number) { - double sqrt = Math.sqrt(number); - if (sqrt == Math.round(sqrt)) { - throw new RuntimeException("Number has a perfect square"); - } - } } diff --git a/serverless-workflow-examples/serverless-workflow-error-quarkus/src/main/java/org/kie/kogito/examples/PublishRestService.java b/serverless-workflow-examples/serverless-workflow-error-quarkus/src/main/java/org/kie/kogito/examples/PublishRestService.java new file mode 100644 index 0000000000..ec96c03802 --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-error-quarkus/src/main/java/org/kie/kogito/examples/PublishRestService.java @@ -0,0 +1,60 @@ +/* + * 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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.kie.kogito.examples; + +import jakarta.annotation.PostConstruct; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.fasterxml.jackson.databind.ObjectMapper; + +@Path("/publish") +@Produces(MediaType.APPLICATION_JSON) +public class PublishRestService { + + private ObjectMapper objectMapper; + private static final Logger logger = LoggerFactory.getLogger(PublishRestService.class); + + @PostConstruct + void init() { + objectMapper = new ObjectMapper(); + } + + @Path("/{type}/{number}") + @POST + public Response publishEvenNumber(@PathParam("type") String type, @PathParam("number") int number) { + logger.info("Publish type " + type + " number " + number); + // check if the input number is even + if (!"even".equals(type)) { + return Response.status(Status.BAD_REQUEST).entity(objectMapper.createObjectNode().put("error", "Perfect square assessment not supported for odd numbers by this service")).build(); + } + return Response.ok().entity(objectMapper.createObjectNode().put("perfect", isPerfectSquare(number))).build(); + } + + private boolean isPerfectSquare(int number) { + double sqrt = Math.sqrt(number); + return (sqrt == Math.round(sqrt)); + } + +} diff --git a/serverless-workflow-examples/serverless-workflow-error-quarkus/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-error-quarkus/src/main/resources/application.properties index 5db9a0b5e1..b66b53d5e6 100644 --- a/serverless-workflow-examples/serverless-workflow-error-quarkus/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-error-quarkus/src/main/resources/application.properties @@ -1,5 +1,27 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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. +# + # Packaging # quarkus.package.type=fast-jar + +kogito.sw.functions.publishPerfectSquare.host=localhost +kogito.sw.functions.publishPerfectSquare.port=8081 quarkus.native.native-image-xmx=8g # profile to pack this example into a container, to use it execute activate the maven container profile, -Dcontainer @@ -8,6 +30,3 @@ quarkus.native.native-image-xmx=8g %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local %container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-error-quarkus/src/main/resources/error.sw.json b/serverless-workflow-examples/serverless-workflow-error-quarkus/src/main/resources/error.sw.json index 08d18c80b4..7ce064f4c3 100644 --- a/serverless-workflow-examples/serverless-workflow-error-quarkus/src/main/resources/error.sw.json +++ b/serverless-workflow-examples/serverless-workflow-error-quarkus/src/main/resources/error.sw.json @@ -8,7 +8,11 @@ "errors": [ { "name": "odd number", - "code": "java.lang.RuntimeException" + "code": "Odd situation" + }, + { + "name": "bad request", + "code": "HTTP:400" } ], "functions": [ @@ -18,9 +22,9 @@ "operation": "service:java:org.kie.kogito.examples.EvenService::isEven" }, { - "name": "isSqr", + "name": "publishPerfectSquare", "type": "custom", - "operation": "service:java:org.kie.kogito.examples.EvenService::isSquare" + "operation": "rest:post:/publish/{type}/{number}" }, { "name": "printMessage", @@ -41,15 +45,6 @@ "number": "$.number" } } - }, - { - "name": "checkSqrAction", - "functionRef": { - "refName": "isSqr", - "arguments": { - "number": "$.number" - } - } } ], "transition": "even", @@ -66,7 +61,7 @@ "data": { "numberType": "even" }, - "transition": "finish" + "transition": "print" }, { "name": "odd", @@ -74,10 +69,10 @@ "data": { "numberType": "odd" }, - "transition": "finish" + "transition": "print" }, { - "name": "finish", + "name": "print", "type": "operation", "actions": [ { @@ -90,6 +85,53 @@ } } ], + "transition": "publish" + }, + { + "name": "publish", + "type": "operation", + "actions": [ + { + "name": "publishAction", + "functionRef" : { + "refName": "publishPerfectSquare", + "arguments": { + "type": "$.numberType", + "number": "$.number" + } + } + } + ], + "end": true, + "onErrors": [ + { + "errorRef": "bad request", + "transition": "setError" + } + ] + }, + { + "name": "setError", + "type": "inject", + "data": { + "errormessage": "Fail to publish result" + }, + "transition": "reportError" + }, + { + "name": "reportError", + "type": "operation", + "actions": [ + { + "name": "printAction", + "functionRef": { + "refName": "printMessage", + "arguments": { + "message": "errormessage" + } + } + } + ], "end": true } ] diff --git a/serverless-workflow-examples/serverless-workflow-error-quarkus/src/main/resources/errorWithMetadata.sw.json b/serverless-workflow-examples/serverless-workflow-error-quarkus/src/main/resources/errorWithMetadata.sw.json new file mode 100644 index 0000000000..7a7a9551e9 --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-error-quarkus/src/main/resources/errorWithMetadata.sw.json @@ -0,0 +1,18 @@ +{ + "id": "errorWithMetadata", + "version": "1.0", + "name": "Workflow Error example with metadata", + "description": "An example of how to abort a workflow with error given a condition", + "start": "checkEven", + "states": [ + { + "name": "checkEven", + "type": "operation", + "actions": [], + "end" : true, + "metadata": { + "errorMessage": "if .number % 2 != 0 then \"Is Odd number!!!!\" else null end" + } + } + ] +} diff --git a/serverless-workflow-examples/serverless-workflow-error-quarkus/src/test/java/org/kie/kogito/examples/ErrorRestIT.java b/serverless-workflow-examples/serverless-workflow-error-quarkus/src/test/java/org/kie/kogito/examples/ErrorRestIT.java index fc68c82b39..6fec4c0dc6 100644 --- a/serverless-workflow-examples/serverless-workflow-error-quarkus/src/test/java/org/kie/kogito/examples/ErrorRestIT.java +++ b/serverless-workflow-examples/serverless-workflow-error-quarkus/src/test/java/org/kie/kogito/examples/ErrorRestIT.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.examples; @@ -43,7 +46,7 @@ public void testErrorRest() { .post("/error") .then() .statusCode(201) - .body("workflowdata.numberType", is("odd")); + .body("workflowdata.numberType", is("even")); given() .contentType(ContentType.JSON) .accept(ContentType.JSON) @@ -53,4 +56,25 @@ public void testErrorRest() { .statusCode(201) .body("workflowdata.numberType", is("even")); } + + @Test + public void testErrorWithMetadata() { + given() + .contentType(ContentType.JSON) + .accept(ContentType.JSON) + .body("{\"number\" : 12342}") + .when() + .post("/errorWithMetadata") + .then() + .statusCode(201); + + given() + .contentType(ContentType.JSON) + .accept(ContentType.JSON) + .body("{\"number\" : 12341}") + .when() + .post("/errorWithMetadata") + .then() + .statusCode(400); + } } diff --git a/serverless-workflow-examples/serverless-workflow-events-quarkus/README.md b/serverless-workflow-examples/serverless-workflow-events-quarkus/README.md index 39193b78ee..9593da9378 100644 --- a/serverless-workflow-examples/serverless-workflow-events-quarkus/README.md +++ b/serverless-workflow-examples/serverless-workflow-events-quarkus/README.md @@ -19,9 +19,9 @@ Here is the overall architecture of this example: ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed - Apache Kafka installed When using native image compilation, you will also need: diff --git a/serverless-workflow-examples/serverless-workflow-events-quarkus/docker-compose/docker-compose.yml b/serverless-workflow-examples/serverless-workflow-events-quarkus/docker-compose/docker-compose.yml index 93988a4e2e..a1db9c4183 100644 --- a/serverless-workflow-examples/serverless-workflow-events-quarkus/docker-compose/docker-compose.yml +++ b/serverless-workflow-examples/serverless-workflow-events-quarkus/docker-compose/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/serverless-workflow-examples/serverless-workflow-events-quarkus/operator/serverless-workflow-events-quarkus.yaml b/serverless-workflow-examples/serverless-workflow-events-quarkus/operator/serverless-workflow-events-quarkus.yaml deleted file mode 100644 index 8f20e4c052..0000000000 --- a/serverless-workflow-examples/serverless-workflow-events-quarkus/operator/serverless-workflow-events-quarkus.yaml +++ /dev/null @@ -1,33 +0,0 @@ -#Strimzi operator should be pre-installed in namespace -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoInfra -metadata: - name: kogito-kafka-infra -spec: - resource: - apiVersion: kafka.strimzi.io/v1beta2 - kind: Kafka ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: serverless-workflow-events-quarkus -spec: - type: RemoteSource - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/serverless-workflow-events-quarkus - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: serverless-workflow-events-quarkus -spec: - infra: - - kogito-kafka-infra \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-events-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-events-quarkus/pom.xml index 874e192c9d..a101a2e0f9 100644 --- a/serverless-workflow-examples/serverless-workflow-events-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-events-quarkus/pom.xml @@ -1,8 +1,35 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-events-quarkus 1.0-SNAPSHOT @@ -10,17 +37,17 @@ Kogito Example :: Serverless Workflow Events :: Quarkus Kogito Serverless Workflow Example - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.8.1 - 11 + 17 3.0.0-M7 - 2.0.0-SNAPSHOT + 999-SNAPSHOT @@ -43,8 +70,8 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus io.quarkus @@ -67,16 +94,12 @@ jackson-databind - org.kie.kogito - kogito-quarkus-serverless-workflow-devui + org.kie + kie-addons-quarkus-marshallers-avro - org.kie.kogito - kogito-addons-quarkus-marshallers-avro - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/ApplicantResource.java b/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/ApplicantResource.java index 50492d1e2f..243e1597f6 100644 --- a/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/ApplicantResource.java +++ b/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/ApplicantResource.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.kogito.serverless.examples; @@ -19,15 +22,15 @@ import java.net.URI; import java.util.UUID; -import javax.annotation.PostConstruct; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.InternalServerErrorException; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.InternalServerErrorException; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.annotation.PostConstruct; import org.eclipse.microprofile.reactive.messaging.Channel; import org.eclipse.microprofile.reactive.messaging.Emitter; import org.kie.kogito.event.CloudEventMarshaller; diff --git a/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/AvroMarshallerProducer.java b/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/AvroMarshallerProducer.java index 287b775c63..5d17e81903 100644 --- a/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/AvroMarshallerProducer.java +++ b/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/AvroMarshallerProducer.java @@ -1,27 +1,30 @@ /* - * 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.kogito.serverless.examples; import java.io.IOException; -import javax.annotation.PostConstruct; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.inject.Produces; -import javax.inject.Named; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.inject.Produces; +import jakarta.inject.Named; +import jakarta.annotation.PostConstruct; import org.kie.kogito.addon.quarkus.messaging.common.ChannelFormat; import org.kie.kogito.event.CloudEventUnmarshallerFactory; import org.kie.kogito.event.avro.AvroCloudEventUnmarshallerFactory; diff --git a/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/DecisionResource.java b/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/DecisionResource.java index a9615feff0..b8c565d311 100644 --- a/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/DecisionResource.java +++ b/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/java/org/kogito/serverless/examples/DecisionResource.java @@ -1,25 +1,28 @@ /* - * 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.kogito.serverless.examples; -import javax.inject.Inject; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import org.eclipse.microprofile.reactive.messaging.Channel; import org.jboss.resteasy.annotations.SseElementType; diff --git a/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/resources/META-INF/resources/index.html b/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/resources/META-INF/resources/index.html index 9c80439fe3..41b0703cc0 100644 --- a/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/resources/META-INF/resources/index.html +++ b/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/resources/META-INF/resources/index.html @@ -1,3 +1,23 @@ + diff --git a/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/resources/application.properties index 4c6eb16c0c..39e1b63ac0 100644 --- a/serverless-workflow-examples/serverless-workflow-events-quarkus/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-events-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. +# + mp.messaging.incoming.applicants.connector=smallrye-kafka mp.messaging.incoming.applicants.value.deserializer=org.apache.kafka.common.serialization.ByteArrayDeserializer mp.messaging.incoming.applicants.group.id=kogito-sw-applicants-in @@ -30,6 +49,3 @@ quarkus.native.native-image-xmx=8g %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local %container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin diff --git a/serverless-workflow-examples/serverless-workflow-events-quarkus/src/test/java/org/kogito/serverless/examples/ApplicantWorkflowIT.java b/serverless-workflow-examples/serverless-workflow-events-quarkus/src/test/java/org/kogito/serverless/examples/ApplicantWorkflowIT.java index 22a64e6dbe..75a8da44ee 100644 --- a/serverless-workflow-examples/serverless-workflow-events-quarkus/src/test/java/org/kogito/serverless/examples/ApplicantWorkflowIT.java +++ b/serverless-workflow-examples/serverless-workflow-events-quarkus/src/test/java/org/kogito/serverless/examples/ApplicantWorkflowIT.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.kogito.serverless.examples; @@ -27,11 +30,11 @@ import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.TimeUnit; -import javax.ws.rs.client.Client; -import javax.ws.rs.client.ClientBuilder; -import javax.ws.rs.client.WebTarget; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.sse.SseEventSource; +import jakarta.ws.rs.client.Client; +import jakarta.ws.rs.client.ClientBuilder; +import jakarta.ws.rs.client.WebTarget; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.sse.SseEventSource; import org.apache.kafka.common.serialization.ByteArrayDeserializer; import org.apache.kafka.common.serialization.ByteArraySerializer; diff --git a/serverless-workflow-examples/serverless-workflow-events-quarkus/src/test/resources/application.properties b/serverless-workflow-examples/serverless-workflow-events-quarkus/src/test/resources/application.properties index 3c17236931..a047ea13ba 100644 --- a/serverless-workflow-examples/serverless-workflow-events-quarkus/src/test/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-events-quarkus/src/test/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. +# + # Quarkus quarkus.http.test-port=0 \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-examples-parent/pom.xml b/serverless-workflow-examples/serverless-workflow-examples-parent/pom.xml new file mode 100644 index 0000000000..b3135db6c7 --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-examples-parent/pom.xml @@ -0,0 +1,57 @@ + + + + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + pom + Kogito Example :: Serverless Workflow Examples :: Parent + + + org.kie.kogito.examples.serverless.workflow + + 2024-01-16T00:00:00Z + 3.4.1 + + + + + + + + + org.apache.maven.plugins + maven-artifact-plugin + ${version.maven.artifact.plugin} + + ${project.build.outputTimestamp} + + + + + + + \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-expression-quarkus/README.md b/serverless-workflow-examples/serverless-workflow-expression-quarkus/README.md index ee9d93b4a0..9c795c53fa 100644 --- a/serverless-workflow-examples/serverless-workflow-expression-quarkus/README.md +++ b/serverless-workflow-examples/serverless-workflow-expression-quarkus/README.md @@ -13,9 +13,9 @@ The service accepts an array of complex numbers (x being the real coordinate and ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVm](https://www.graalvm.org/downloads/) 19.3.1+ installed diff --git a/serverless-workflow-examples/serverless-workflow-expression-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-expression-quarkus/pom.xml index d866929bf2..f87daba134 100644 --- a/serverless-workflow-examples/serverless-workflow-expression-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-expression-quarkus/pom.xml @@ -1,8 +1,35 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-expression-quarkus 1.0-SNAPSHOT @@ -10,14 +37,14 @@ Kogito Example :: Serverless Workflow Expression :: Quarkus Kogito Serverless Workflow Expression Example - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 11 + 999-SNAPSHOT + 17 3.8.1 3.0.0-M7 @@ -42,8 +69,8 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus io.quarkus @@ -54,12 +81,8 @@ quarkus-resteasy-jackson - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-expression-quarkus/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-expression-quarkus/src/main/resources/application.properties index 044e703641..6e0c07135b 100644 --- a/serverless-workflow-examples/serverless-workflow-expression-quarkus/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-expression-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. +# + # Packaging # quarkus.package.type=fast-jar quarkus.swagger-ui.always-include=true @@ -9,7 +28,4 @@ quarkus.devservices.enabled=false %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-expression-quarkus/src/test/java/org/kie/kogito/examples/ExpressionRestIT.java b/serverless-workflow-examples/serverless-workflow-expression-quarkus/src/test/java/org/kie/kogito/examples/ExpressionRestIT.java index d3b228f94e..9e17620fed 100644 --- a/serverless-workflow-examples/serverless-workflow-expression-quarkus/src/test/java/org/kie/kogito/examples/ExpressionRestIT.java +++ b/serverless-workflow-examples/serverless-workflow-expression-quarkus/src/test/java/org/kie/kogito/examples/ExpressionRestIT.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-foreach-quarkus/README.md b/serverless-workflow-examples/serverless-workflow-foreach-quarkus/README.md index d6a0ac8e1e..4ef85e8329 100644 --- a/serverless-workflow-examples/serverless-workflow-foreach-quarkus/README.md +++ b/serverless-workflow-examples/serverless-workflow-foreach-quarkus/README.md @@ -14,9 +14,9 @@ The service is described using JSON format as defined in the ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVm](https://www.graalvm.org/downloads/) 19.3.1+ installed diff --git a/serverless-workflow-examples/serverless-workflow-foreach-quarkus/operator/01-sonataflow_foreach.yaml b/serverless-workflow-examples/serverless-workflow-foreach-quarkus/operator/01-sonataflow_foreach.yaml index 92b23d70c8..5c62db47ef 100755 --- a/serverless-workflow-examples/serverless-workflow-foreach-quarkus/operator/01-sonataflow_foreach.yaml +++ b/serverless-workflow-examples/serverless-workflow-foreach-quarkus/operator/01-sonataflow_foreach.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. +# + apiVersion: sonataflow.org/v1alpha08 kind: SonataFlow metadata: diff --git a/serverless-workflow-examples/serverless-workflow-foreach-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-foreach-quarkus/pom.xml index 781162a984..5c6c8d33e6 100644 --- a/serverless-workflow-examples/serverless-workflow-foreach-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-foreach-quarkus/pom.xml @@ -1,8 +1,35 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-foreach-quarkus 1.0-SNAPSHOT @@ -10,14 +37,14 @@ Kogito Example :: Serverless Workflow For Each :: Quarkus Kogito Serverless Workflow For Each Example - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 11 + 999-SNAPSHOT + 17 3.8.1 3.0.0-M7 @@ -42,8 +69,8 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus io.quarkus @@ -59,12 +86,8 @@ quarkus-resteasy-jackson - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files io.rest-assured diff --git a/serverless-workflow-examples/serverless-workflow-foreach-quarkus/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-foreach-quarkus/src/main/resources/application.properties index ddc28dd0f5..1e67c7e96d 100644 --- a/serverless-workflow-examples/serverless-workflow-foreach-quarkus/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-foreach-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. +# + # Packaging # quarkus.package.type=fast-jar quarkus.devservices.enabled=false @@ -7,7 +26,4 @@ quarkus.devservices.enabled=false %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-foreach-quarkus/src/main/resources/foreach.sw.json b/serverless-workflow-examples/serverless-workflow-foreach-quarkus/src/main/resources/foreach.sw.json index 5532eed27f..dbd6852ad6 100644 --- a/serverless-workflow-examples/serverless-workflow-foreach-quarkus/src/main/resources/foreach.sw.json +++ b/serverless-workflow-examples/serverless-workflow-foreach-quarkus/src/main/resources/foreach.sw.json @@ -6,9 +6,9 @@ "start": "start", "functions": [ { - "name": "printMessage", - "type": "custom", - "operation": "sysout" + "name": "double", + "type": "expression", + "operation": "$WORKFLOW.prevActionResult*2" }, { "name": "increase", @@ -30,18 +30,11 @@ "actions": [ { "name":"increase", - "functionRef": { - "refName": "increase" - } + "functionRef": "increase" }, { - "name": "printAction", - "functionRef": { - "refName": "printMessage", - "arguments": { - "message": ".item" - } - } + "name": "double", + "functionRef": "double" }], "end": true } diff --git a/serverless-workflow-examples/serverless-workflow-foreach-quarkus/src/test/java/org/kie/kogito/examples/ForEachRestIT.java b/serverless-workflow-examples/serverless-workflow-foreach-quarkus/src/test/java/org/kie/kogito/examples/ForEachRestIT.java index f2f91bbb69..8b8b06e115 100644 --- a/serverless-workflow-examples/serverless-workflow-foreach-quarkus/src/test/java/org/kie/kogito/examples/ForEachRestIT.java +++ b/serverless-workflow-examples/serverless-workflow-foreach-quarkus/src/test/java/org/kie/kogito/examples/ForEachRestIT.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.examples; @@ -38,7 +41,7 @@ void testForEachRest() { .post("/foreach") .then() .statusCode(201) - .body("workflowdata.output", is(Arrays.asList(2, 3, 4))) + .body("workflowdata.output", is(Arrays.asList(4, 6, 8))) .body("workflowdata.input", nullValue()); } } diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/README.md b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/README.md index 06876d9d63..e9b9645243 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/README.md +++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/README.md @@ -61,9 +61,9 @@ Also, there is the Swagger UI that can also be used to explore the APIs in this ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVm](https://www.graalvm.org/downloads/) 20.2.0+ installed diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/pom.xml index 9424dc1b5e..fcf5c21e6a 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/pom.xml @@ -1,8 +1,35 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-functions-events-quarkus 1.0-SNAPSHOT @@ -12,15 +39,15 @@ 8080 - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.8.1 - 11 + 17 3.0.0-M7 ${version.surefire.plugin} 2.33.2 @@ -46,16 +73,16 @@ - org.kie.kogito - kogito-quarkus-rules + org.drools + drools-quarkus-rules - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus - org.kie.kogito - kogito-addons-quarkus-knative-eventing + org.kie + kie-addons-quarkus-knative-eventing org.kie.kogito @@ -82,12 +109,8 @@ quarkus-smallrye-health - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/helpers/CalendarHelper.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/helpers/CalendarHelper.java index 2b778eb033..67d28857cc 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/helpers/CalendarHelper.java +++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/helpers/CalendarHelper.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.acme.sw.onboarding.helpers; diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/model/Appointment.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/model/Appointment.java index 42049ecb35..7dc96b31e3 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/model/Appointment.java +++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/model/Appointment.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.acme.sw.onboarding.model; diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/model/Assignment.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/model/Assignment.java index 8dcab10c8e..e154c025eb 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/model/Assignment.java +++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/model/Assignment.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.acme.sw.onboarding.model; diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/model/Doctor.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/model/Doctor.java index afa3777348..2f0b4a71fe 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/model/Doctor.java +++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/model/Doctor.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.acme.sw.onboarding.model; diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/model/Error.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/model/Error.java index f0970c0e46..934e68044c 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/model/Error.java +++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/model/Error.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.acme.sw.onboarding.model; diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/model/Patient.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/model/Patient.java index 605c0a9470..a844fc1e74 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/model/Patient.java +++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/model/Patient.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.acme.sw.onboarding.model; diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/model/SymptomSpecialty.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/model/SymptomSpecialty.java index 5b91d5be3f..2bdecf123e 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/model/SymptomSpecialty.java +++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/model/SymptomSpecialty.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.acme.sw.onboarding.model; diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/queries/AssignmentUnit.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/queries/AssignmentUnit.java index 3b1cca95b8..4491be6b25 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/queries/AssignmentUnit.java +++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/queries/AssignmentUnit.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.acme.sw.onboarding.queries; diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/resources/AppointmentResource.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/resources/AppointmentResource.java index b5584de030..b805fe09f3 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/resources/AppointmentResource.java +++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/resources/AppointmentResource.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.acme.sw.onboarding.resources; @@ -20,17 +23,17 @@ import java.util.List; import java.util.stream.Collectors; -import javax.inject.Inject; -import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.NotNull; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.inject.Inject; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.acme.sw.onboarding.model.Appointment; import org.acme.sw.onboarding.model.Error; diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/resources/PatientResource.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/resources/PatientResource.java index d7aab2dbc1..d29a5fb9f9 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/resources/PatientResource.java +++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/resources/PatientResource.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.acme.sw.onboarding.resources; @@ -20,16 +23,16 @@ import java.util.Optional; import java.util.UUID; -import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.NotNull; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.acme.sw.onboarding.model.Patient; import org.slf4j.Logger; diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/services/DoctorService.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/services/DoctorService.java index 7954fc9681..3fafaa6c22 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/services/DoctorService.java +++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/services/DoctorService.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.acme.sw.onboarding.services; diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/services/ScheduleService.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/services/ScheduleService.java index 52ac7f7bc1..25ebc48c8c 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/services/ScheduleService.java +++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/services/ScheduleService.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.acme.sw.onboarding.services; @@ -23,7 +26,7 @@ import java.util.Optional; import java.util.concurrent.ConcurrentHashMap; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.acme.sw.onboarding.model.Appointment; import org.acme.sw.onboarding.model.Patient; diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/services/SymptomSpecialtyService.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/services/SymptomSpecialtyService.java index 25a0805754..5a98db30f9 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/services/SymptomSpecialtyService.java +++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/java/org/acme/sw/onboarding/services/SymptomSpecialtyService.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.acme.sw.onboarding.services; diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/resources/META-INF/resources/index.html b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/resources/META-INF/resources/index.html index b95cf1ed9c..a1db6ed187 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/resources/META-INF/resources/index.html +++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/resources/META-INF/resources/index.html @@ -1,3 +1,23 @@ + diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/resources/application.properties index 647d76264d..3063f22f91 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-functions-events-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. +# + # Packaging # quarkus.package.type=fast-jar quarkus.http.test-port=0 @@ -31,6 +50,3 @@ org.kie.kogito.addons.knative.eventing.generate-kogito-source=true %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local %container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/resources/org/acme/sw/onboarding/queries/doctor_assignment.drl b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/resources/org/acme/sw/onboarding/queries/doctor_assignment.drl index c276e24468..c28cbd343a 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/resources/org/acme/sw/onboarding/queries/doctor_assignment.drl +++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/main/resources/org/acme/sw/onboarding/queries/doctor_assignment.drl @@ -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.acme.sw.onboarding.queries; unit AssignmentUnit; diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/queries/AssignmentUnitIT.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/queries/AssignmentUnitIT.java index bb006d1935..4ba44996ed 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/queries/AssignmentUnitIT.java +++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/queries/AssignmentUnitIT.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.acme.sw.onboarding.queries; diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/queries/AssignmentUnitPlainTest.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/queries/AssignmentUnitPlainTest.java index 925dbdb479..8d3016da5f 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/queries/AssignmentUnitPlainTest.java +++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/queries/AssignmentUnitPlainTest.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.acme.sw.onboarding.queries; diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/resources/AppointmentResourceIT.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/resources/AppointmentResourceIT.java index f6beebbbef..29f1d06d29 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/resources/AppointmentResourceIT.java +++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/resources/AppointmentResourceIT.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.acme.sw.onboarding.resources; @@ -20,7 +23,7 @@ import java.text.SimpleDateFormat; import java.util.Date; -import javax.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MediaType; import org.junit.jupiter.api.Test; diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/resources/OnboardingIT.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/resources/OnboardingIT.java index 41d8e03075..0f37350d07 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/resources/OnboardingIT.java +++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/resources/OnboardingIT.java @@ -1,24 +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.acme.sw.onboarding.resources; import java.time.Duration; import java.util.UUID; -import javax.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MediaType; import org.junit.jupiter.api.Test; @@ -42,7 +45,7 @@ void verifyOnboardingWorkflow() { .get("/onboarding/schedule/appointment") .then() .statusCode(200) - .extract().path("$.size()"); + .extract().path("size()"); given() .body("{ \"name\": \"Yoda\", \"dateOfBirth\": \"1963-08-15\", \"symptoms\":[\"seizures\"]}") diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/resources/PatientResourceIT.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/resources/PatientResourceIT.java index 1b26249b9d..d3f2205992 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/resources/PatientResourceIT.java +++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/resources/PatientResourceIT.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.acme.sw.onboarding.resources; diff --git a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/services/ScheduleServiceTest.java b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/services/ScheduleServiceTest.java index 8fc1044fe1..8e3bc68102 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/services/ScheduleServiceTest.java +++ b/serverless-workflow-examples/serverless-workflow-functions-events-quarkus/src/test/java/org/acme/sw/onboarding/services/ScheduleServiceTest.java @@ -1,24 +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.acme.sw.onboarding.services; import java.time.LocalDateTime; import java.util.List; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.acme.sw.onboarding.model.Appointment; import org.acme.sw.onboarding.model.Doctor; diff --git a/serverless-workflow-examples/serverless-workflow-functions-quarkus/README.md b/serverless-workflow-examples/serverless-workflow-functions-quarkus/README.md index aaac4d822c..e59d9bf7a6 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-quarkus/README.md +++ b/serverless-workflow-examples/serverless-workflow-functions-quarkus/README.md @@ -18,9 +18,9 @@ Finally, the resulting integer is printed using sysout script. ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVm](https://www.graalvm.org/downloads/) 20.2.0+ installed @@ -110,6 +110,3 @@ In Quarkus you should see the log message printed: ```text The sum is: 387 ``` -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/serverless-workflow-examples/serverless-workflow-functions-quarkus/operator/serverless-workflow-greeting-quarkus.yaml b/serverless-workflow-examples/serverless-workflow-functions-quarkus/operator/serverless-workflow-greeting-quarkus.yaml deleted file mode 100644 index c52d83b8bb..0000000000 --- a/serverless-workflow-examples/serverless-workflow-functions-quarkus/operator/serverless-workflow-greeting-quarkus.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: serverless-workflow-greeting-quarkus -spec: - type: RemoteSource - #envs: - # envs can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/serverless-workflow-greeting-quarkus - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: serverless-workflow-greeting-quarkus \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-functions-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-functions-quarkus/pom.xml index 35c91d68b2..a511e3fc1f 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-functions-quarkus/pom.xml @@ -1,8 +1,35 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-functions-quarkus 1.0-SNAPSHOT @@ -12,15 +39,15 @@ 8080 - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.8.1 - 11 + 17 3.0.0-M7 2.33.2 @@ -45,8 +72,8 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus io.quarkus @@ -69,12 +96,8 @@ quarkus-smallrye-health - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-functions-quarkus/src/main/java/org/acme/numbers/Numbers.java b/serverless-workflow-examples/serverless-workflow-functions-quarkus/src/main/java/org/acme/numbers/Numbers.java index d1e71383ff..08fdecb6d4 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-quarkus/src/main/java/org/acme/numbers/Numbers.java +++ b/serverless-workflow-examples/serverless-workflow-functions-quarkus/src/main/java/org/acme/numbers/Numbers.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.acme.numbers; diff --git a/serverless-workflow-examples/serverless-workflow-functions-quarkus/src/main/java/org/acme/numbers/NumbersResource.java b/serverless-workflow-examples/serverless-workflow-functions-quarkus/src/main/java/org/acme/numbers/NumbersResource.java index b9cbab2e87..94b4b4fbae 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-quarkus/src/main/java/org/acme/numbers/NumbersResource.java +++ b/serverless-workflow-examples/serverless-workflow-functions-quarkus/src/main/java/org/acme/numbers/NumbersResource.java @@ -1,34 +1,37 @@ /* - * 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.acme.numbers; +import jakarta.annotation.PostConstruct; import java.util.Random; import java.util.stream.Collectors; -import javax.annotation.PostConstruct; -import javax.enterprise.context.ApplicationScoped; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.ws.rs.DefaultValue; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/serverless-workflow-examples/serverless-workflow-functions-quarkus/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-functions-quarkus/src/main/resources/application.properties index a479f38024..fc862dced8 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-quarkus/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-functions-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. +# + # Packaging # quarkus.package.type=fast-jar quarkus.http.test-port=0 @@ -13,7 +32,4 @@ quarkus.swagger-ui.always-include=true %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-functions-quarkus/src/test/java/org/acme/numbers/serverless/workflow/functions/RestExampleIT.java b/serverless-workflow-examples/serverless-workflow-functions-quarkus/src/test/java/org/acme/numbers/serverless/workflow/functions/RestExampleIT.java index 7c023c3c15..8385cfd5cc 100644 --- a/serverless-workflow-examples/serverless-workflow-functions-quarkus/src/test/java/org/acme/numbers/serverless/workflow/functions/RestExampleIT.java +++ b/serverless-workflow-examples/serverless-workflow-functions-quarkus/src/test/java/org/acme/numbers/serverless/workflow/functions/RestExampleIT.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.acme.numbers.serverless.workflow.functions; diff --git a/serverless-workflow-examples/serverless-workflow-funqy/README.md b/serverless-workflow-examples/serverless-workflow-funqy/README.md index eb78c6fa04..1771f6dd14 100644 --- a/serverless-workflow-examples/serverless-workflow-funqy/README.md +++ b/serverless-workflow-examples/serverless-workflow-funqy/README.md @@ -17,9 +17,9 @@ orchestrate any services you want. ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVm](https://www.graalvm.org/downloads/) 19.3.1+ installed diff --git a/serverless-workflow-examples/serverless-workflow-funqy/pom.xml b/serverless-workflow-examples/serverless-workflow-funqy/pom.xml index 512772bece..0430ad3f57 100644 --- a/serverless-workflow-examples/serverless-workflow-funqy/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-funqy/pom.xml @@ -1,8 +1,35 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-funqy 1.0-SNAPSHOT diff --git a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/pom.xml b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/pom.xml index cda3b72964..70b862a1e0 100644 --- a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/pom.xml @@ -1,4 +1,24 @@ + 4.0.0 @@ -11,12 +31,12 @@ Kogito Example :: Serverless Workflow :: Funqy :: Services Kogito Serverless Workflow Funqy Services - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 3.8.1 - 11 + 17 3.0.0-M7 2.2 diff --git a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/functions/ClassificationFunction.java b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/functions/ClassificationFunction.java index 6f90bae6d1..231d817956 100644 --- a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/functions/ClassificationFunction.java +++ b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/functions/ClassificationFunction.java @@ -1,21 +1,24 @@ /* - * 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.kogito.serverless.examples.functions; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.kogito.serverless.examples.input.Country; import org.kogito.serverless.examples.services.ClassificationService; diff --git a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/functions/CountriesFunction.java b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/functions/CountriesFunction.java index 7508235461..7552fc92c4 100644 --- a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/functions/CountriesFunction.java +++ b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/functions/CountriesFunction.java @@ -1,21 +1,24 @@ /* - * 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.kogito.serverless.examples.functions; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.kogito.serverless.examples.input.Country; import org.kogito.serverless.examples.services.CountriesService; diff --git a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/functions/PopulationFunction.java b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/functions/PopulationFunction.java index 69066c4ec4..6040e4e9bf 100644 --- a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/functions/PopulationFunction.java +++ b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/functions/PopulationFunction.java @@ -1,21 +1,24 @@ /* - * 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.kogito.serverless.examples.functions; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.kogito.serverless.examples.input.Country; import org.kogito.serverless.examples.services.CountriesService; diff --git a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/input/Country.java b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/input/Country.java index 730c31d164..deaa0e78cf 100644 --- a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/input/Country.java +++ b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/input/Country.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.kogito.serverless.examples.input; diff --git a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/services/ClassificationService.java b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/services/ClassificationService.java index 3731e37073..a92fd12b35 100644 --- a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/services/ClassificationService.java +++ b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/services/ClassificationService.java @@ -1,24 +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.kogito.serverless.examples.services; import java.util.HashMap; import java.util.Map; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.kogito.serverless.examples.input.Country; diff --git a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/services/CountriesService.java b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/services/CountriesService.java index acce334962..bc569785a9 100644 --- a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/services/CountriesService.java +++ b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/services/CountriesService.java @@ -1,24 +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.kogito.serverless.examples.services; import java.util.ArrayList; import java.util.List; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.kogito.serverless.examples.input.Country; diff --git a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/services/PopulationService.java b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/services/PopulationService.java index 8aa404d54b..688851d860 100644 --- a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/services/PopulationService.java +++ b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/java/org/kogito/serverless/examples/services/PopulationService.java @@ -1,24 +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.kogito.serverless.examples.services; import java.util.HashMap; import java.util.Map; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.kogito.serverless.examples.input.Country; diff --git a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/resources/application.properties index 73daf8f567..22cef7da81 100644 --- a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/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.http.port=8082 quarkus.http.cors=true quarkus.http.cors.methods=POST @@ -8,7 +27,4 @@ quarkus.native.native-image-xmx=8g %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/test/java/org/kogito/serverless/examples/FunctionsIT.java b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/test/java/org/kogito/serverless/examples/FunctionsIT.java index ffc38888b1..9b2adf8776 100644 --- a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/test/java/org/kogito/serverless/examples/FunctionsIT.java +++ b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-services/src/test/java/org/kogito/serverless/examples/FunctionsIT.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.kogito.serverless.examples; diff --git a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/pom.xml b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/pom.xml index f651b169dc..fa9067d419 100644 --- a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/pom.xml @@ -1,4 +1,24 @@ + 4.0.0 @@ -11,15 +31,15 @@ Kogito Example :: Serverless Workflow :: Funqy :: Workflow Kogito Serverless Workflow Funqy Workflow - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.8.1 - 11 + 17 3.0.0-M7 2.33.2 @@ -44,8 +64,8 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/src/main/resources/META-INF/resources/index.html b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/src/main/resources/META-INF/resources/index.html index b273b0e220..338ccf97fe 100644 --- a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/src/main/resources/META-INF/resources/index.html +++ b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/src/main/resources/META-INF/resources/index.html @@ -1,3 +1,23 @@ + diff --git a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/src/main/resources/application.properties index 413e1ec918..617635fa97 100644 --- a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/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.http.port=8081 quarkus.http.cors=true quarkus.http.cors.methods=POST @@ -9,7 +28,4 @@ quarkus.devservices.enabled=false %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/src/test/java/org/kogito/serverless/examples/RestServiceMockServer.java b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/src/test/java/org/kogito/serverless/examples/RestServiceMockServer.java index e9d87f0fa2..a3d5916eae 100644 --- a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/src/test/java/org/kogito/serverless/examples/RestServiceMockServer.java +++ b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/src/test/java/org/kogito/serverless/examples/RestServiceMockServer.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.kogito.serverless.examples; diff --git a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/src/test/java/org/kogito/serverless/examples/WorkflowIT.java b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/src/test/java/org/kogito/serverless/examples/WorkflowIT.java index ca85dc7a55..0a9c485e3a 100644 --- a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/src/test/java/org/kogito/serverless/examples/WorkflowIT.java +++ b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/src/test/java/org/kogito/serverless/examples/WorkflowIT.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.kogito.serverless.examples; import org.junit.jupiter.api.Test; diff --git a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/src/test/resources/application.properties b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/src/test/resources/application.properties index 1ac3ed5008..03a4c749ee 100644 --- a/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/src/test/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-funqy/sw-funqy-workflow/src/test/resources/application.properties @@ -1 +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. +# + quarkus.http.test-port=8081 \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/README.md b/serverless-workflow-examples/serverless-workflow-github-showcase/README.md index db2a5c4904..177d40b34f 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/README.md +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/README.md @@ -43,13 +43,13 @@ You can follow the [Knative documentation](https://knative.dev/docs/install/serv 4. **Knative** Serving and Eventing components installed. We recommend [installing the Knative Operator](https://knative.dev/docs/install/knative-with-operators/) and install the rest of the components through it as described in their documentation. -5. **Kogito Operator** installed in the namespace `kogito-github`. [Download the latest release](https://github.com/kiegroup/kogito-operator/releases), and run: `NAMESPACE=kogito-github ./hack/install.sh`. +5. **Kogito Operator** installed in the namespace `kogito-github`. [Download the latest release](https://github.com/apache/incubator-kie-kogito-operator/releases), and run: `NAMESPACE=kogito-github ./hack/install.sh`. Alternatively, you can also install it via [OperatorHub](https://operatorhub.io/operator/kogito-operator). In your local machine you will need: -1. To clone this repository and go to `serverless-workflow-github-showcase` directory (`git clone https://github.com/kiegroup/kogito-examples.git && cd serverless-workflow-github-showcase`) -2. [Java 11 SDK](https://openjdk.java.net/install/) +1. To clone this repository and go to `serverless-workflow-github-showcase` directory (`git clone https://github.com/apache/incubator-kie-kogito-examples.git && cd serverless-workflow-github-showcase`) +2. [Java 17 SDK](https://openjdk.java.net/install/) 3. [Maven 3.8.1+](https://maven.apache.org/install.html) 4. [Podman](https://podman.io/getting-started/installation.html) or Docker to build the images 5. `kubectl` or `oc` client diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/README.md b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/README.md index d091f9d89b..6b0b880f3a 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/README.md +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/README.md @@ -123,11 +123,11 @@ You should see a similar output like this: STEP 1: FROM adoptopenjdk:11-jre-hotspot STEP 2: RUN mkdir -p /opt/app/lib --> Using cache 26183c5ad8a51a030030a250db0c99e649fdd9668ef4766d0b66782d0dad7573 -STEP 3: COPY target/github-service-2.0.0-SNAPSHOT-runner.jar /opt/app +STEP 3: COPY target/github-service-999-SNAPSHOT-runner.jar /opt/app --> 31bc2627d32 STEP 4: COPY target/lib/*.jar /opt/app/lib --> 62eae5cdde7 -STEP 5: CMD ["java", "-jar", "/opt/app/github-service-2.0.0-SNAPSHOT-runner.jar"] +STEP 5: CMD ["java", "-jar", "/opt/app/github-service-999-SNAPSHOT-runner.jar"] STEP 6: COMMIT quay.io/ricardozanini/github-service:latest --> 7c555a3060c 7c555a3060c666582824552d8824f2787b59b67b506fb933b171764bde894730 diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/configure.sh b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/configure.sh index 9ad2bcf03c..cc56960a8b 100755 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/configure.sh +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/configure.sh @@ -1,17 +1,22 @@ #!/bin/bash -# 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. QUAY_NAMESPACE=$1 APP_ID=$2 diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/deploy-kubernetes.sh b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/deploy-kubernetes.sh index 3687ff50a9..f1f9170ae8 100755 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/deploy-kubernetes.sh +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/deploy-kubernetes.sh @@ -1,17 +1,22 @@ #!/bin/bash -# 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. source ./configure.sh diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/expose-on-minikube.sh b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/expose-on-minikube.sh index 7029b6c874..a83f22f628 100755 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/expose-on-minikube.sh +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/expose-on-minikube.sh @@ -1,17 +1,22 @@ #!/bin/bash -# 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. CURR_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) # shellcheck source=../scripts/add-route-to-hosts.sh diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/kubernetes/00-deployment.yaml b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/kubernetes/00-deployment.yaml index 0a93e54ea6..024e999500 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/kubernetes/00-deployment.yaml +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/kubernetes/00-deployment.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. +# + apiVersion: serving.knative.dev/v1 # Current version of Knative (0.17.x) kind: Service metadata: diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/kubernetes/application.properties b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/kubernetes/application.properties index 8276e150f4..774b09b106 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/kubernetes/application.properties +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/kubernetes/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. +# + org.kogito.examples.sw.github.service.key=/opt/data/github-app-key.der org.kogito.examples.sw.github.service.installation_id=${INSTALLATION_ID} org.kogito.examples.sw.github.service.app_id=${APP_ID} \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/kubernetes/kustomization.yaml b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/kubernetes/kustomization.yaml index 0b2529c940..d805e98a60 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/kubernetes/kustomization.yaml +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/kubernetes/kustomization.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. +# + namespace: kogito-github resources: - 00-deployment.yaml diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/pom.xml b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/pom.xml index f7ba06c583..fa3f5adca9 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/pom.xml @@ -1,4 +1,24 @@ + 4.0.0 @@ -16,7 +36,7 @@ io.quarkus 2.13.1.Final 3.8.1 - 11 + 17 diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/main/java/org/kogito/examples/sw/github/service/GitHubResource.java b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/main/java/org/kogito/examples/sw/github/service/GitHubResource.java index f230ea5949..cfdec8f5fb 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/main/java/org/kogito/examples/sw/github/service/GitHubResource.java +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/main/java/org/kogito/examples/sw/github/service/GitHubResource.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.kogito.examples.sw.github.service; diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/main/java/org/kogito/examples/sw/github/service/GitHubWrapperService.java b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/main/java/org/kogito/examples/sw/github/service/GitHubWrapperService.java index 6a03215f7a..3f54d5bc21 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/main/java/org/kogito/examples/sw/github/service/GitHubWrapperService.java +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/main/java/org/kogito/examples/sw/github/service/GitHubWrapperService.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.kogito.examples.sw.github.service; diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/main/java/org/kogito/examples/sw/github/service/GitHubWrapperServiceImpl.java b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/main/java/org/kogito/examples/sw/github/service/GitHubWrapperServiceImpl.java index 31cfa2a505..a4cc3de7c4 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/main/java/org/kogito/examples/sw/github/service/GitHubWrapperServiceImpl.java +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/main/java/org/kogito/examples/sw/github/service/GitHubWrapperServiceImpl.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.kogito.examples.sw.github.service; diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/main/java/org/kogito/examples/sw/github/service/TokenProvider.java b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/main/java/org/kogito/examples/sw/github/service/TokenProvider.java index 70a4ca9ad3..663770bdf8 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/main/java/org/kogito/examples/sw/github/service/TokenProvider.java +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/main/java/org/kogito/examples/sw/github/service/TokenProvider.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.kogito.examples.sw.github.service; diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/main/resources/application.properties index 385adbe6b5..0abadfa507 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/github-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. +# + # Packaging # quarkus.package.type=fast-jar @@ -12,7 +31,4 @@ quarkus.native.enable-https-url-handler=true %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/test/java/org/kogito/examples/sw/github/service/GitHubResourceTest.java b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/test/java/org/kogito/examples/sw/github/service/GitHubResourceTest.java index a777768ce6..29aa76e014 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/test/java/org/kogito/examples/sw/github/service/GitHubResourceTest.java +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/test/java/org/kogito/examples/sw/github/service/GitHubResourceTest.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.kogito.examples.sw.github.service; diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/test/java/org/kogito/examples/sw/github/service/GitHubWrapperServiceIT.java b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/test/java/org/kogito/examples/sw/github/service/GitHubWrapperServiceIT.java index 533d6d1ca3..91dcfae71d 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/test/java/org/kogito/examples/sw/github/service/GitHubWrapperServiceIT.java +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/test/java/org/kogito/examples/sw/github/service/GitHubWrapperServiceIT.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.kogito.examples.sw.github.service; diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/test/java/org/kogito/examples/sw/github/service/MockedGitHubWrapperService.java b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/test/java/org/kogito/examples/sw/github/service/MockedGitHubWrapperService.java index 330bf1cb10..e92410095f 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/test/java/org/kogito/examples/sw/github/service/MockedGitHubWrapperService.java +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/test/java/org/kogito/examples/sw/github/service/MockedGitHubWrapperService.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.kogito.examples.sw.github.service; diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/test/resources/application.properties b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/test/resources/application.properties index 2c51352d9f..7f88e44ff5 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/src/test/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/github-service/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. +# + # see: https://github-api.kohsuke.org/githubappjwtauth.html # if you wish, replace with your own data and enable the GitHubWrapperServiceIT test to verify if everything is working as expected in your environment org.kogito.examples.sw.github.service.key=replace_with_your_key diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/README.md b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/README.md index abc92831e2..d9bed2ebf9 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/README.md +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/README.md @@ -86,11 +86,11 @@ You should see a similar output like this: STEP 1: FROM adoptopenjdk:11-jre-hotspot STEP 2: RUN mkdir -p /opt/app/lib --> Using cache 26183c5ad8a51a030030a250db0c99e649fdd9668ef4766d0b66782d0dad7573 -STEP 3: COPY target/notification-service-2.0.0-SNAPSHOT-runner.jar /opt/app +STEP 3: COPY target/notification-service-999-SNAPSHOT-runner.jar /opt/app --> 2a5b658411b STEP 4: COPY target/lib/*.jar /opt/app/lib --> 5fedac21977 -STEP 5: CMD ["java", "-jar", "/opt/app/notification-service-2.0.0-SNAPSHOT-runner.jar"] +STEP 5: CMD ["java", "-jar", "/opt/app/notification-service-999-SNAPSHOT-runner.jar"] STEP 6: COMMIT quay.io/your_namespace/notification-service:latest --> afe502d1940 afe502d1940d65f151c051008bb2057344607408c192787a726399d23d90c2d3 diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/configure.sh b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/configure.sh index 3625445487..e97ac0021a 100755 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/configure.sh +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/configure.sh @@ -1,17 +1,22 @@ #!/bin/bash -# 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. QUAY_NAMESPACE=$1 SLACK_WEBHOOK=$2 diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/deploy-kubernetes.sh b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/deploy-kubernetes.sh index b24a26a0f4..442075b3e0 100755 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/deploy-kubernetes.sh +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/deploy-kubernetes.sh @@ -1,17 +1,22 @@ #!/bin/bash -# 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. # imports.. diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/expose-on-minikube.sh b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/expose-on-minikube.sh index c081666847..01ffcaf9ee 100755 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/expose-on-minikube.sh +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/expose-on-minikube.sh @@ -1,17 +1,22 @@ #!/bin/bash -# 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. CURR_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) # shellcheck source=../scripts/add-route-to-hosts.sh diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/kubernetes/00-broker.yaml b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/kubernetes/00-broker.yaml index 3e3e089613..bf70b4d2f1 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/kubernetes/00-broker.yaml +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/kubernetes/00-broker.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. +# + # this is where all the messages coming to the cluster will pass # we can use triggers and sinkbinding to route/filter the messages as we pleased apiVersion: eventing.knative.dev/v1 diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/kubernetes/01-deployment.yaml b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/kubernetes/01-deployment.yaml index c7e9c1bdcf..2fd46a4b2e 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/kubernetes/01-deployment.yaml +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/kubernetes/01-deployment.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. +# + apiVersion: serving.knative.dev/v1 # Current version of Knative (0.17.x) kind: Service metadata: diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/kubernetes/02-trigger.yaml b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/kubernetes/02-trigger.yaml index ff18e244b3..fef444bdf3 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/kubernetes/02-trigger.yaml +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/kubernetes/02-trigger.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. +# + apiVersion: eventing.knative.dev/v1 kind: Trigger metadata: diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/kubernetes/application.properties b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/kubernetes/application.properties index 1f770525cf..9c461e32e2 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/kubernetes/application.properties +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/kubernetes/application.properties @@ -1 +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. +# + org.kogito.examples.sw.notification.slack.incoming=${SLACK_WEBHOOK} \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/kubernetes/kustomization.yaml b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/kubernetes/kustomization.yaml index c45706fb2d..8d72a3e150 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/kubernetes/kustomization.yaml +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/kubernetes/kustomization.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. +# + namespace: kogito-github resources: - 00-broker.yaml diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/pom.xml b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/pom.xml index db514c9073..47d49f7164 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/pom.xml @@ -1,4 +1,24 @@ + 4.0.0 @@ -17,7 +37,7 @@ 2.13.1.Final 2.3.0 3.8.1 - 11 + 17 diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/src/main/java/org/kogito/examples/sw/notification/service/NotificationResource.java b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/src/main/java/org/kogito/examples/sw/notification/service/NotificationResource.java index f4208fb976..9d825280d7 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/src/main/java/org/kogito/examples/sw/notification/service/NotificationResource.java +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/src/main/java/org/kogito/examples/sw/notification/service/NotificationResource.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.kogito.examples.sw.notification.service; diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/src/main/resources/application.properties index c3b1c6454b..80d5cb9819 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-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. +# + quarkus.swagger-ui.always-include=true org.kogito.examples.sw.notification.slack.channel=github-showcase @@ -10,6 +29,3 @@ quarkus.index-dependency.cloudevents.artifact-id=cloudevents-http-restful-ws %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local %container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/src/test/java/org/kogito/examples/sw/notification/service/NotificationResourceIT.java b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/src/test/java/org/kogito/examples/sw/notification/service/NotificationResourceIT.java index 5d02077539..dca26ad23c 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/src/test/java/org/kogito/examples/sw/notification/service/NotificationResourceIT.java +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/notification-service/src/test/java/org/kogito/examples/sw/notification/service/NotificationResourceIT.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.kogito.examples.sw.notification.service; diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/pom.xml b/serverless-workflow-examples/serverless-workflow-github-showcase/pom.xml index 9ecf1a0cf9..029e36a5d3 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/pom.xml @@ -1,8 +1,35 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-github-showcase 1.0-SNAPSHOT @@ -15,11 +42,11 @@ notification-service - 3.0.5 + 3.1.6 3.0.0-M7 0.11.2 1.116 - 2.13.0 + 3.9.0 2.33.2 diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/Dockerfile b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/Dockerfile index 59ed914cc4..7ab9a1990f 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/Dockerfile +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/Dockerfile @@ -1,6 +1,6 @@ -FROM quay.io/kiegroup/kogito-runtime-jvm:latest +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.20 ENV RUNTIME_TYPE quarkus COPY target/*-runner.jar $KOGITO_HOME/bin -COPY target/lib $KOGITO_HOME/bin/lib \ No newline at end of file +COPY target/lib $KOGITO_HOME/bin/lib diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/README.md b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/README.md index 0b2e3c2cff..afe6d4b680 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/README.md +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/README.md @@ -101,7 +101,7 @@ You should see a similar output like this:
Build logs ``` ---> Building and pushing image using tag quay.io/your_namespace/pr-checker-workflow:latest -STEP 1: FROM quay.io/kiegroup/kogito-runtime-jvm:latest +STEP 1: FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/openjdk-17:1.20 STEP 2: ENV RUNTIME_TYPE quarkus STEP 3: COPY target/*-runner.jar $KOGITO_HOME/bin --> 58760d128d8 @@ -177,4 +177,4 @@ Talk to the cluster administrator to understand how your cluster and Istio Ingre ### Cleaning up! -See the project root's [README](./README.md) documentation. \ No newline at end of file +See the project root's [README](./README.md) documentation. diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/configure.sh b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/configure.sh index f4661bdd52..fa69a529d6 100755 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/configure.sh +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/configure.sh @@ -1,17 +1,22 @@ #!/bin/bash -# 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. QUAY_NAMESPACE=$1 GITHUB_REPO=$2 diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/deploy-kubernetes.sh b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/deploy-kubernetes.sh index 1fa4eb7d73..ecad798bb2 100755 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/deploy-kubernetes.sh +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/deploy-kubernetes.sh @@ -1,17 +1,22 @@ #!/bin/bash -# 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. # imports.. diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/expose-on-minikube.sh b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/expose-on-minikube.sh index 199f20feeb..7c661d5209 100755 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/expose-on-minikube.sh +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/expose-on-minikube.sh @@ -1,17 +1,22 @@ #!/bin/bash -# 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. route=$(kubectl get routes -l receive-adapter=github -o jsonpath="{.items[*].metadata.name}" -n kogito-github) svc=$(kubectl get svc -l serving.knative.dev/service="${route}",networking.internal.knative.dev/serviceType=Public -o jsonpath="{.items[*].metadata.name}" -n kogito-github) diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/base/00-broker.yaml b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/base/00-broker.yaml index b22378c304..2e391d77ed 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/base/00-broker.yaml +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/base/00-broker.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. +# + apiVersion: eventing.knative.dev/v1 kind: Broker metadata: diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/base/01-github-source.yaml b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/base/01-github-source.yaml index 539132bba4..16483115be 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/base/01-github-source.yaml +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/base/01-github-source.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. +# + apiVersion: sources.knative.dev/v1alpha1 kind: GitHubSource metadata: diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/base/02-kogito-service.yaml b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/base/02-kogito-service.yaml index e8d52beb4b..6f961161ae 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/base/02-kogito-service.yaml +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/base/02-kogito-service.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. +# + apiVersion: app.kiegroup.org/v1beta1 kind: KogitoRuntime metadata: diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/base/03-pr-checker-trigger.yaml b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/base/03-pr-checker-trigger.yaml index 73eefa0cf1..0c5020a6fb 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/base/03-pr-checker-trigger.yaml +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/base/03-pr-checker-trigger.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. +# + apiVersion: eventing.knative.dev/v1 kind: Trigger metadata: diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/base/04-pr-checker-sinkbinding.yaml b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/base/04-pr-checker-sinkbinding.yaml index de5f393804..bcd6d103ed 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/base/04-pr-checker-sinkbinding.yaml +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/base/04-pr-checker-sinkbinding.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. +# + apiVersion: sources.knative.dev/v1alpha1 kind: SinkBinding metadata: diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/base/kustomization.yaml b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/base/kustomization.yaml index 392d4b60a6..c465bdcce3 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/base/kustomization.yaml +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/base/kustomization.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. +# + namespace: kogito-github resources: - 00-broker.yaml diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/local/00-github-smee-virtualservice.yaml b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/local/00-github-smee-virtualservice.yaml index f5f5ccb002..ec06daf606 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/local/00-github-smee-virtualservice.yaml +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/local/00-github-smee-virtualservice.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. +# + apiVersion: networking.istio.io/v1beta1 kind: VirtualService metadata: diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/local/01-kogito-service-ingress.yaml b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/local/01-kogito-service-ingress.yaml index 1a68668846..d0b241cab2 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/local/01-kogito-service-ingress.yaml +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/local/01-kogito-service-ingress.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. +# + # See: https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/ apiVersion: networking.k8s.io/v1beta1 # for versions before 1.14 use extensions/v1beta1 kind: Ingress diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/local/kustomization.yaml b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/local/kustomization.yaml index a63cba5f21..56de4a34a3 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/local/kustomization.yaml +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/kubernetes/local/kustomization.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. +# + bases: - ../base resources: diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/pom.xml b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/pom.xml index ad08b61a68..96d42cd698 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/pom.xml @@ -1,4 +1,24 @@ + 4.0.0 @@ -19,7 +39,7 @@ kogito-bom 1.29.0.Final 3.8.1 - 11 + 17 @@ -41,12 +61,12 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus - org.kie.kogito - kogito-addons-quarkus-knative-eventing + org.kie + kie-addons-quarkus-knative-eventing io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/main/java/org/kogito/examples/sw/github/workflow/GitHubClient.java b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/main/java/org/kogito/examples/sw/github/workflow/GitHubClient.java index 0f7adb3c3a..160445f471 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/main/java/org/kogito/examples/sw/github/workflow/GitHubClient.java +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/main/java/org/kogito/examples/sw/github/workflow/GitHubClient.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.kogito.examples.sw.github.workflow; diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/main/java/org/kogito/examples/sw/github/workflow/GitHubService.java b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/main/java/org/kogito/examples/sw/github/workflow/GitHubService.java index 8321b47090..99369f3b6f 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/main/java/org/kogito/examples/sw/github/workflow/GitHubService.java +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/main/java/org/kogito/examples/sw/github/workflow/GitHubService.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.kogito.examples.sw.github.workflow; diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/main/resources/application.properties index 0febd93dca..1e456969aa 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/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.level=INFO quarkus.swagger-ui.always-include=true @@ -22,7 +41,4 @@ mp.messaging.outgoing.checker_workflow_backend.url=${K_SINK} %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local %container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/test/java/org/kogito/examples/sw/github/workflow/GitHubServiceMockServer.java b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/test/java/org/kogito/examples/sw/github/workflow/GitHubServiceMockServer.java index d9aa9f4253..c00ca7790b 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/test/java/org/kogito/examples/sw/github/workflow/GitHubServiceMockServer.java +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/test/java/org/kogito/examples/sw/github/workflow/GitHubServiceMockServer.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.kogito.examples.sw.github.workflow; diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/test/java/org/kogito/examples/sw/github/workflow/GitHubServiceTest.java b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/test/java/org/kogito/examples/sw/github/workflow/GitHubServiceTest.java index be509edc6e..6cfae2d569 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/test/java/org/kogito/examples/sw/github/workflow/GitHubServiceTest.java +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/test/java/org/kogito/examples/sw/github/workflow/GitHubServiceTest.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.kogito.examples.sw.github.workflow; diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/test/java/org/kogito/examples/sw/github/workflow/MessageSinkServer.java b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/test/java/org/kogito/examples/sw/github/workflow/MessageSinkServer.java index 757a9b0f81..e17d643f7d 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/test/java/org/kogito/examples/sw/github/workflow/MessageSinkServer.java +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/test/java/org/kogito/examples/sw/github/workflow/MessageSinkServer.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.kogito.examples.sw.github.workflow; diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/test/java/org/kogito/examples/sw/github/workflow/PRCheckerWorkflowTest.java b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/test/java/org/kogito/examples/sw/github/workflow/PRCheckerWorkflowTest.java index f6e15d6b02..927a4bf655 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/test/java/org/kogito/examples/sw/github/workflow/PRCheckerWorkflowTest.java +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/test/java/org/kogito/examples/sw/github/workflow/PRCheckerWorkflowTest.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.kogito.examples.sw.github.workflow; diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/test/resources/application.properties b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/test/resources/application.properties index add3e03d94..e3b8b85d1c 100644 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/src/test/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/pr-checker-workflow/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.log.category."org.kogito".level=INFO quarkus.log.category."org.kie.kogito.app".level=INFO diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/scripts/add-route-to-hosts.sh b/serverless-workflow-examples/serverless-workflow-github-showcase/scripts/add-route-to-hosts.sh index cce8fc3fad..1ae6861d70 100755 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/scripts/add-route-to-hosts.sh +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/scripts/add-route-to-hosts.sh @@ -1,17 +1,22 @@ #!/bin/bash -# 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. # see: https://knative.dev/docs/serving/using-a-custom-domain/#local-dns-setup diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/scripts/cleanup-hosts-file.sh b/serverless-workflow-examples/serverless-workflow-github-showcase/scripts/cleanup-hosts-file.sh index 50127fdf2e..c30b70e4e0 100755 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/scripts/cleanup-hosts-file.sh +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/scripts/cleanup-hosts-file.sh @@ -1,17 +1,22 @@ #!/bin/bash -# 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. sudo sed -i '/pr-checker-workflow/d' /etc/hosts sudo sed -i '/github-event-listener/d' /etc/hosts diff --git a/serverless-workflow-examples/serverless-workflow-github-showcase/scripts/common.sh b/serverless-workflow-examples/serverless-workflow-github-showcase/scripts/common.sh index cf64493932..1a70747b13 100755 --- a/serverless-workflow-examples/serverless-workflow-github-showcase/scripts/common.sh +++ b/serverless-workflow-examples/serverless-workflow-github-showcase/scripts/common.sh @@ -1,17 +1,22 @@ #!/bin/bash -# 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. BUILDER=podman diff --git a/serverless-workflow-examples/serverless-workflow-greeting-quarkus/README.md b/serverless-workflow-examples/serverless-workflow-greeting-quarkus/README.md index 8f325790bd..a0f38d3892 100644 --- a/serverless-workflow-examples/serverless-workflow-greeting-quarkus/README.md +++ b/serverless-workflow-examples/serverless-workflow-greeting-quarkus/README.md @@ -24,9 +24,9 @@ The function then prints out the greeting to the console. ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVm](https://www.graalvm.org/downloads/) 19.3.1+ installed @@ -140,7 +140,3 @@ Hello from YAML Workflow, John ``` You can also change the language parameter value to "Spanish" to get the greeting in Spanish. - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/serverless-workflow-examples/serverless-workflow-greeting-quarkus/operator/serverless-workflow-greeting-quarkus.yaml b/serverless-workflow-examples/serverless-workflow-greeting-quarkus/operator/serverless-workflow-greeting-quarkus.yaml deleted file mode 100644 index 7cf8b44d46..0000000000 --- a/serverless-workflow-examples/serverless-workflow-greeting-quarkus/operator/serverless-workflow-greeting-quarkus.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: serverless-workflow-greeting-quarkus -spec: - type: RemoteSource - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/serverless-workflow-greeting-quarkus - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: serverless-workflow-greeting-quarkus \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-greeting-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-greeting-quarkus/pom.xml index 7ac2e39db5..2aac59327e 100644 --- a/serverless-workflow-examples/serverless-workflow-greeting-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-greeting-quarkus/pom.xml @@ -1,8 +1,35 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-greeting-quarkus 1.0-SNAPSHOT @@ -10,14 +37,14 @@ Kogito Example :: Serverless Workflow Greeting :: Quarkus Kogito Serverless Workflow Example - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 11 + 999-SNAPSHOT + 17 3.8.1 3.0.0-M7 @@ -42,8 +69,8 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus io.quarkus @@ -58,12 +85,8 @@ quarkus-jsonp - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-greeting-quarkus/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-greeting-quarkus/src/main/resources/application.properties index 5db9a0b5e1..835a80df6b 100644 --- a/serverless-workflow-examples/serverless-workflow-greeting-quarkus/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-greeting-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. +# + # Packaging # quarkus.package.type=fast-jar quarkus.native.native-image-xmx=8g @@ -7,7 +26,4 @@ quarkus.native.native-image-xmx=8g %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-greeting-quarkus/src/test/java/org/kie/kogito/examples/GreetRestIT.java b/serverless-workflow-examples/serverless-workflow-greeting-quarkus/src/test/java/org/kie/kogito/examples/GreetRestIT.java index c3c25d3575..8c1bd39191 100644 --- a/serverless-workflow-examples/serverless-workflow-greeting-quarkus/src/test/java/org/kie/kogito/examples/GreetRestIT.java +++ b/serverless-workflow-examples/serverless-workflow-greeting-quarkus/src/test/java/org/kie/kogito/examples/GreetRestIT.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/docker/docker-compose.yaml b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/docker/docker-compose.yaml index e95ad7a779..fa952b259c 100644 --- a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/docker/docker-compose.yaml +++ b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/docker/docker-compose.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. +# + version: '2' services: diff --git a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/pom.xml index 97c28bc222..96c8f514b6 100644 --- a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/pom.xml @@ -1,8 +1,35 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-greeting-rpc-quarkus 1.0-SNAPSHOT diff --git a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-client-rpc-quarkus/README.md b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-client-rpc-quarkus/README.md index 02547b78ff..4849929b87 100644 --- a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-client-rpc-quarkus/README.md +++ b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-client-rpc-quarkus/README.md @@ -25,9 +25,9 @@ The languages supported currently are English and Spanish. In case a supported l ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVm](https://www.graalvm.org/downloads/) 19.3.1+ installed diff --git a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-client-rpc-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-client-rpc-quarkus/pom.xml index 8c65633396..c738a79e9d 100644 --- a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-client-rpc-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-client-rpc-quarkus/pom.xml @@ -1,4 +1,24 @@ + 4.0.0 @@ -11,15 +31,15 @@ Kogito Example :: Serverless Workflow Greeting :: gRPC Client :: Quarkus Kogito Serverless Workflow Example that test a simple gRPC service - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.8.1 - 11 + 17 3.0.0-M7 @@ -42,8 +62,8 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus org.kie.kogito.examples @@ -74,12 +94,8 @@ quarkus-smallrye-health - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files @@ -167,4 +183,4 @@ - \ No newline at end of file + diff --git a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-client-rpc-quarkus/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-client-rpc-quarkus/src/main/resources/application.properties index 5cb2262631..357dbd5bd7 100644 --- a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-client-rpc-quarkus/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-client-rpc-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. +# + # Packaging # quarkus.package.type=fast-jar quarkus.native.native-image-xmx=8g @@ -15,6 +34,3 @@ quarkus.devservices.enabled=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local %container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin diff --git a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-client-rpc-quarkus/src/test/java/org/kie/kogito/examples/GreetRestIT.java b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-client-rpc-quarkus/src/test/java/org/kie/kogito/examples/GreetRestIT.java index 36b3595196..a9b58ce5fb 100644 --- a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-client-rpc-quarkus/src/test/java/org/kie/kogito/examples/GreetRestIT.java +++ b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-client-rpc-quarkus/src/test/java/org/kie/kogito/examples/GreetRestIT.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-server-rpc-quarkus/README.md b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-server-rpc-quarkus/README.md index 9fad0bb3c1..d75d0ab2d2 100644 --- a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-server-rpc-quarkus/README.md +++ b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-server-rpc-quarkus/README.md @@ -9,7 +9,7 @@ This module contains a simple greeting gRPC server definition and implementation ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - Maven 3.8.6+ installed diff --git a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-server-rpc-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-server-rpc-quarkus/pom.xml index c2ca6f9308..9e2f328822 100644 --- a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-server-rpc-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-server-rpc-quarkus/pom.xml @@ -1,4 +1,24 @@ + @@ -13,10 +33,10 @@ Kogito Serverless Workflow Example that defines a simple gRPC service - Quarkus 3.8.1 - 11 + 17 3.0.0-M7 3.22.0 - 1.51.1 + 1.56.0 1.6.0 0.6.1 3.3.0 @@ -49,7 +69,7 @@ org.junit.jupiter junit-jupiter - 5.8.1 + 5.9.3 diff --git a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-server-rpc-quarkus/src/main/java/org/kie/kogito/examples/sw/greeting/GreeterService.java b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-server-rpc-quarkus/src/main/java/org/kie/kogito/examples/sw/greeting/GreeterService.java index 8b708efc1c..be9d2613f4 100644 --- a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-server-rpc-quarkus/src/main/java/org/kie/kogito/examples/sw/greeting/GreeterService.java +++ b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-server-rpc-quarkus/src/main/java/org/kie/kogito/examples/sw/greeting/GreeterService.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.examples.sw.greeting; diff --git a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-server-rpc-quarkus/src/test/java/org/kie/kogito/examples/sw/greeting/GreeterClientTest.java b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-server-rpc-quarkus/src/test/java/org/kie/kogito/examples/sw/greeting/GreeterClientTest.java index 279d1eaa4d..f6ca922bb1 100644 --- a/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-server-rpc-quarkus/src/test/java/org/kie/kogito/examples/sw/greeting/GreeterClientTest.java +++ b/serverless-workflow-examples/serverless-workflow-greeting-rpc-quarkus/serverless-workflow-greeting-server-rpc-quarkus/src/test/java/org/kie/kogito/examples/sw/greeting/GreeterClientTest.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.examples.sw.greeting; import java.io.IOException; diff --git a/serverless-workflow-examples/serverless-workflow-hello-world/README.md b/serverless-workflow-examples/serverless-workflow-hello-world/README.md index 1a69ae6003..3c32aadce5 100644 --- a/serverless-workflow-examples/serverless-workflow-hello-world/README.md +++ b/serverless-workflow-examples/serverless-workflow-hello-world/README.md @@ -1 +1 @@ -Serverless Workflow guide: https://github.com/kiegroup/kogito-docs/blob/main/serverlessworkflow/modules/ROOT/pages/getting-started/create-your-first-workflow-service.adoc \ No newline at end of file +Serverless Workflow guide: https://github.com/apache/incubator-kie-kogito-docs/blob/main/serverlessworkflow/modules/ROOT/pages/getting-started/create-your-first-workflow-service.adoc \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-hello-world/pom.xml b/serverless-workflow-examples/serverless-workflow-hello-world/pom.xml index 12e44987a6..6c4605ffb7 100644 --- a/serverless-workflow-examples/serverless-workflow-hello-world/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-hello-world/pom.xml @@ -1,9 +1,36 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-hello-world 1.0-SNAPSHOT @@ -12,15 +39,15 @@ Kogito Serverless Workflow Example - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT - 11 + 999-SNAPSHOT + 999-SNAPSHOT + 17 3.8.1 3.0.0-M7 ${version.surefire.plugin} @@ -46,8 +73,8 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus io.quarkus @@ -62,12 +89,8 @@ quarkus-arc - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-hello-world/src/main/docker/Dockerfile.jvm b/serverless-workflow-examples/serverless-workflow-hello-world/src/main/docker/Dockerfile.jvm index b85ab2029c..c7f1b5276c 100644 --- a/serverless-workflow-examples/serverless-workflow-hello-world/src/main/docker/Dockerfile.jvm +++ b/serverless-workflow-examples/serverless-workflow-hello-world/src/main/docker/Dockerfile.jvm @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-hello-world/src/main/docker/Dockerfile.legacy-jar b/serverless-workflow-examples/serverless-workflow-hello-world/src/main/docker/Dockerfile.legacy-jar index 14a009717f..a34cf8fdbe 100644 --- a/serverless-workflow-examples/serverless-workflow-hello-world/src/main/docker/Dockerfile.legacy-jar +++ b/serverless-workflow-examples/serverless-workflow-hello-world/src/main/docker/Dockerfile.legacy-jar @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-hello-world/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-hello-world/src/main/resources/application.properties index 9033a327f8..eb1ab3c488 100644 --- a/serverless-workflow-examples/serverless-workflow-hello-world/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-hello-world/src/main/resources/application.properties @@ -1,9 +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. +# + # profile to pack this example into a container, to use it execute activate the maven container profile, -Dcontainer %container.quarkus.container-image.build=true %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local %container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin + diff --git a/serverless-workflow-examples/serverless-workflow-hello-world/src/test/java/org/kie/kogito/examples/HelloWorldTest.java b/serverless-workflow-examples/serverless-workflow-hello-world/src/test/java/org/kie/kogito/examples/HelloWorldTest.java index 4ec97375b0..29b63899ef 100644 --- a/serverless-workflow-examples/serverless-workflow-hello-world/src/test/java/org/kie/kogito/examples/HelloWorldTest.java +++ b/serverless-workflow-examples/serverless-workflow-hello-world/src/test/java/org/kie/kogito/examples/HelloWorldTest.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. + */ package org.kie.kogito.examples; import io.quarkus.test.junit.QuarkusTest; diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/README.md b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/README.md index 899c593e08..3418e2f7a4 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/README.md +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/README.md @@ -9,7 +9,7 @@ You can easily deploy this example on Minikube by using the provided `deploy.sh` 1. Installed Minikube 2. Installed [Knative Quickstart](https://knative.dev/docs/getting-started/quickstart-install/) on your Minikube installation. It adds a new `knative` profile to your cluster, so bear in mind that every command on Minikube must be followed by `-p knative`. -3. Installed JDK 11, Maven, NPM, and Docker in order to build all the parts of the example. +3. Installed JDK 17, Maven, NPM, and Docker in order to build all the parts of the example. Start the tunnel in a separate terminal: diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/pom.xml b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/pom.xml index 7e0c115aa5..f86634e06a 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/pom.xml @@ -1,4 +1,24 @@ + serverless-workflow-loanbroker-showcase @@ -36,7 +56,7 @@ io.cloudevents - cloudevents-http-restful-ws + cloudevents-http-restful-ws-jakarta ${version.io.cloudevents} diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/docker/Dockerfile.jvm b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/docker/Dockerfile.jvm index c32eda3b00..996836bb3d 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/docker/Dockerfile.jvm +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/docker/Dockerfile.jvm @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/docker/Dockerfile.legacy-jar b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/docker/Dockerfile.legacy-jar index bf40fa6a1d..20f4e5c6dd 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/docker/Dockerfile.legacy-jar +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/docker/Dockerfile.legacy-jar @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/CloudEventDataFormat.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/CloudEventDataFormat.java index 4a5671fe40..1d43db8cf3 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/CloudEventDataFormat.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/CloudEventDataFormat.java @@ -1,10 +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. + */ package org.acme.serverless.loanbroker.aggregator; import java.io.InputStream; import java.io.OutputStream; -import javax.inject.Inject; -import javax.inject.Singleton; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import org.apache.camel.Exchange; import org.apache.camel.spi.DataFormat; diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/CloudEventsConverter.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/CloudEventsConverter.java index 89031cba28..68345a8c94 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/CloudEventsConverter.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/CloudEventsConverter.java @@ -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. + */ package org.acme.serverless.loanbroker.aggregator; import java.net.URI; import java.util.UUID; -import javax.inject.Inject; -import javax.inject.Singleton; -import javax.ws.rs.core.MediaType; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; +import jakarta.ws.rs.core.MediaType; import org.apache.camel.Exchange; import org.apache.camel.TypeConversionException; diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/InMemoryQuotesRepositoryProcessor.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/InMemoryQuotesRepositoryProcessor.java index 83d5611b8d..7c9dcbec67 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/InMemoryQuotesRepositoryProcessor.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/InMemoryQuotesRepositoryProcessor.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. + */ package org.acme.serverless.loanbroker.aggregator; import java.util.Collections; @@ -5,7 +23,7 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.acme.serverless.loanbroker.aggregator.model.BankQuote; import org.apache.camel.Exchange; diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/IntegrationConstants.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/IntegrationConstants.java index fa4c0cce85..1afe0fad35 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/IntegrationConstants.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/IntegrationConstants.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. + */ package org.acme.serverless.loanbroker.aggregator; public final class IntegrationConstants { diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/QuotesAggregationStrategy.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/QuotesAggregationStrategy.java index 0a04a188b2..da03c9764f 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/QuotesAggregationStrategy.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/QuotesAggregationStrategy.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. + */ package org.acme.serverless.loanbroker.aggregator; import java.util.ArrayList; diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/QuotesAggregatorRoute.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/QuotesAggregatorRoute.java index 79c5fe0b27..14ca293698 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/QuotesAggregatorRoute.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/QuotesAggregatorRoute.java @@ -1,7 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.acme.serverless.loanbroker.aggregator; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; import org.acme.serverless.loanbroker.aggregator.model.AggregationResponse; import org.apache.camel.Exchange; @@ -36,7 +54,7 @@ public void configure() { .getTypeConverterRegistry() .addTypeConverter(CloudEvent.class, AggregationResponse.class, cloudEventsConverter); - + from("direct:aggregator") .routeId("quotes-aggregator") .aggregate(header(IntegrationConstants.KOGITO_FLOW_ID_HEADER), new QuotesAggregationStrategy()) diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/QuotesRepositoryProcessor.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/QuotesRepositoryProcessor.java index e9ce143351..e9993e3cc4 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/QuotesRepositoryProcessor.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/QuotesRepositoryProcessor.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. + */ package org.acme.serverless.loanbroker.aggregator; import java.util.List; diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/model/AggregationResponse.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/model/AggregationResponse.java index 633726c2ea..07a1440185 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/model/AggregationResponse.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/model/AggregationResponse.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. + */ package org.acme.serverless.loanbroker.aggregator.model; import java.io.Serializable; diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/model/BankQuote.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/model/BankQuote.java index c82e7fdadd..c89b4c460b 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/model/BankQuote.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/model/BankQuote.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. + */ package org.acme.serverless.loanbroker.aggregator.model; import java.io.Serializable; diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/QuotesCloudEventsResource.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/QuotesCloudEventsResource.java index f564b32c55..e92427e6a8 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/QuotesCloudEventsResource.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/QuotesCloudEventsResource.java @@ -1,12 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.acme.serverless.loanbroker.aggregator.resources; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.acme.serverless.loanbroker.aggregator.IntegrationConstants; import org.acme.serverless.loanbroker.aggregator.model.BankQuote; diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/QuotesExceptionMapper.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/QuotesExceptionMapper.java index fd6af3cfca..8d1f45ae68 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/QuotesExceptionMapper.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/QuotesExceptionMapper.java @@ -1,8 +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.acme.serverless.loanbroker.aggregator.resources; -import javax.ws.rs.core.Response; -import javax.ws.rs.ext.ExceptionMapper; -import javax.ws.rs.ext.Provider; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.ext.ExceptionMapper; +import jakarta.ws.rs.ext.Provider; @Provider public class QuotesExceptionMapper implements ExceptionMapper { diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/QuotesResource.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/QuotesResource.java index b31037174d..164f4aae4b 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/QuotesResource.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/QuotesResource.java @@ -1,15 +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. + */ package org.acme.serverless.loanbroker.aggregator.resources; import java.util.List; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.acme.serverless.loanbroker.aggregator.QuotesRepositoryProcessor; import org.acme.serverless.loanbroker.aggregator.model.BankQuote; diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/ResponseError.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/ResponseError.java index 5c514273dd..0501c2b833 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/ResponseError.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/java/org/acme/serverless/loanbroker/aggregator/resources/ResponseError.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. + */ package org.acme.serverless.loanbroker.aggregator.resources; import java.io.Serializable; diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/kubernetes/kubernetes.yml b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/kubernetes/kubernetes.yml index c8e6b6e31b..426d1b2cc7 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/kubernetes/kubernetes.yml +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/kubernetes/kubernetes.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. +# + # Sink for the Aggregator Service apiVersion: sources.knative.dev/v1 kind: SinkBinding diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/resources/application.properties index c7ef3c0ef2..4d4ac24d33 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/main/resources/application.properties @@ -1,13 +1,35 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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. +# + # where to send back the CloudEvent message once the application fineshed the aggregation # must start with http or https org.acme.serverless.loanbroker.aggregator.replyTo=${K_SINK:http://localhost:8080} quarkus.swagger-ui.always-include=true mp.openapi.extensions.smallrye.operationIdStrategy=METHOD +quarkus.kubernetes.name=loanbroker-aggregator +quarkus.kubernetes.deployment-target=kubernetes quarkus.kubernetes.deploy=false -quarkus.kubernetes.image-pull-policy=IfNotPresent +quarkus.kubernetes.image-pull-policy=if-not-present # profile to pack this example into a container, to use it execute activate the maven container profile, -Dcontainer -%container.quarkus.container-image.group=dev.local +%container.quarkus.container-image.registry=dev.local +%container.quarkus.container-image.group=${USER} %container.quarkus.container-image.name=loanbroker-aggregator %container.quarkus.container-image.build=true \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/test/java/org/acme/serverless/loanbroker/aggregator/InjectWithSinkMock.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/test/java/org/acme/serverless/loanbroker/aggregator/InjectWithSinkMock.java index f096d9d6b4..f3e7b29c0f 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/test/java/org/acme/serverless/loanbroker/aggregator/InjectWithSinkMock.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/test/java/org/acme/serverless/loanbroker/aggregator/InjectWithSinkMock.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. + */ package org.acme.serverless.loanbroker.aggregator; import java.lang.annotation.ElementType; diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/test/java/org/acme/serverless/loanbroker/aggregator/QuotesAggregatorRouteTest.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/test/java/org/acme/serverless/loanbroker/aggregator/QuotesAggregatorRouteTest.java index 696b43c7f5..f492f73019 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/test/java/org/acme/serverless/loanbroker/aggregator/QuotesAggregatorRouteTest.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/test/java/org/acme/serverless/loanbroker/aggregator/QuotesAggregatorRouteTest.java @@ -1,10 +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. + */ package org.acme.serverless.loanbroker.aggregator; import java.net.URI; import java.util.concurrent.TimeUnit; -import javax.inject.Inject; -import javax.ws.rs.core.MediaType; +import jakarta.inject.Inject; +import jakarta.ws.rs.core.MediaType; import org.acme.serverless.loanbroker.aggregator.model.BankQuote; import org.apache.camel.Exchange; diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/test/java/org/acme/serverless/loanbroker/aggregator/SinkMockTestResource.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/test/java/org/acme/serverless/loanbroker/aggregator/SinkMockTestResource.java index b58b675fae..26e205801c 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/test/java/org/acme/serverless/loanbroker/aggregator/SinkMockTestResource.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/test/java/org/acme/serverless/loanbroker/aggregator/SinkMockTestResource.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. + */ package org.acme.serverless.loanbroker.aggregator; import java.util.HashMap; diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/test/resources/application.properties b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/test/resources/application.properties index 74870ba986..a6f411ba5d 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/test/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/aggregator/src/test/resources/application.properties @@ -1 +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. +# + quarkus.http.test-port=0 diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/banks/func.yaml b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/banks/func.yaml index 0c83bed8cd..2d957a0e28 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/banks/func.yaml +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/banks/func.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. +# + specVersion: 0.35.0 name: loanbroker-bank1 runtime: node diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/credit-bureau/func.yaml b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/credit-bureau/func.yaml index dea41aa2f8..f07727e7f2 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/credit-bureau/func.yaml +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/credit-bureau/func.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. +# + specVersion: 0.35.0 name: credit-bureau runtime: node diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/deploy.sh b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/deploy.sh index db07879f52..876af41cab 100755 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/deploy.sh +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/deploy.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. +# + # Build every project using docker # configure the ports as: diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/kubernetes/jobs-service-postgresql.yml b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/kubernetes/jobs-service-postgresql.yml index 5e7ad38d0e..4e2a172afd 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/kubernetes/jobs-service-postgresql.yml +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/kubernetes/jobs-service-postgresql.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. +# + --- apiVersion: sources.knative.dev/v1 kind: SinkBinding @@ -16,14 +35,14 @@ spec: selector: matchLabels: app.kubernetes.io/name: jobs-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT --- apiVersion: v1 kind: Service metadata: labels: app.kubernetes.io/name: jobs-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT name: jobs-service-postgresql namespace: loanbroker-example spec: @@ -33,7 +52,7 @@ spec: targetPort: 8080 selector: app.kubernetes.io/name: jobs-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT type: ClusterIP --- apiVersion: apps/v1 @@ -41,7 +60,7 @@ kind: Deployment metadata: labels: app.kubernetes.io/name: jobs-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT name: jobs-service-postgresql namespace: loanbroker-example spec: @@ -49,12 +68,12 @@ spec: selector: matchLabels: app.kubernetes.io/name: jobs-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT template: metadata: labels: app.kubernetes.io/name: jobs-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT spec: containers: - name: jobs-service-postgresql diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/kubernetes/kubernetes.yml b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/kubernetes/kubernetes.yml index 59d4c72fe3..34fa981ec8 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/kubernetes/kubernetes.yml +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/kubernetes/kubernetes.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. +# + apiVersion: v1 kind: Namespace metadata: @@ -213,6 +232,12 @@ metadata: namespace: loanbroker-example spec: template: + metadata: + annotations: + autoscaling.knative.dev/minScale: "1" + autoscaling.knative.dev/maxScale: "1" + labels: + app.kubernetes.io/name: event-display spec: containers: - # This corresponds to diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/kubernetes/loanbroker-example-database.yml b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/kubernetes/loanbroker-example-database.yml index 281b682b14..93abcc5081 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/kubernetes/loanbroker-example-database.yml +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/kubernetes/loanbroker-example-database.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. +# + apiVersion: v1 kind: Namespace metadata: diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/pom.xml b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/pom.xml index 570e34034b..842644f709 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/pom.xml @@ -1,4 +1,24 @@ + serverless-workflow-loanbroker-showcase @@ -33,19 +53,19 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus - org.kie.kogito - kogito-addons-quarkus-knative-eventing + org.kie + kie-addons-quarkus-knative-eventing - org.kie.kogito - kogito-addons-quarkus-kubernetes + org.kie + kie-addons-quarkus-kubernetes - org.kie.kogito + org.kie kogito-addons-quarkus-fabric8-kubernetes-service-catalog @@ -174,8 +194,8 @@ - org.kie.kogito - kogito-addons-quarkus-persistence-jdbc + org.kie + kie-addons-quarkus-persistence-jdbc io.quarkus @@ -186,7 +206,7 @@ quarkus-agroal - org.kie.kogito + org.kie kogito-addons-quarkus-jobs-knative-eventing diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/docker/Dockerfile.jvm b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/docker/Dockerfile.jvm index e92d3fdf44..327d69d924 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/docker/Dockerfile.jvm +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/docker/Dockerfile.jvm @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/docker/Dockerfile.legacy-jar b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/docker/Dockerfile.legacy-jar index fd3bc8a552..68540059c8 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/docker/Dockerfile.legacy-jar +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/docker/Dockerfile.legacy-jar @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/kubernetes/knative.yml b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/kubernetes/knative.yml deleted file mode 100644 index eb699098c4..0000000000 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/kubernetes/knative.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -apiVersion: serving.knative.dev/v1 -kind: Service -metadata: - name: loanbroker-flow -spec: - template: - spec: - containers: - - name: loanbroker-flow - imagePullPolicy: IfNotPresent diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/resources/META-INF/resources/index.html b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/resources/META-INF/resources/index.html index 8b8d7cee8c..b515bcd9dd 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/resources/META-INF/resources/index.html +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/resources/META-INF/resources/index.html @@ -1,3 +1,23 @@ + diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/resources/application.properties index 1b6399022f..6f28b4ce8a 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/resources/application.properties @@ -1,32 +1,57 @@ -kogito.service.url=${KOGITO_SERVICE_CLUSTER_URL:http://localhost:8080} +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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=${knative:services.v1.serving.knative.dev/loanbroker-example/loanbroker-flow} +%dev.kogito.service.url=http://localhost:8080 kogito.messaging.as-cloudevents=true +kogito.addon.messaging.outgoing.cloudEventMode.kogito_outgoing_stream=structured -quarkus.http.cors.origins=* +quarkus.http.cors=true +quarkus.http.cors.origins=/.*/ quarkus.log.category."org.kie".level=DEBUG quarkus.log.category."org.kogito".level=DEBUG quarkus.log.category."org.acme".level=DEBUG quarkus.swagger-ui.always-include=true -quarkus.http.cors=true -quarkus.rest-client.credit_bureau_yaml.url=${CREDIT_BUREAU_URL:http://localhost:8181/} -quarkus.rest-client.aggregator_yaml.url=${AGGREGATOR_URL:http://localhost:8282/} + +# Use the Kogito service discovery mechanism to get the services url. +# For more information see: https://kiegroup.github.io/kogito-docs/serverlessworkflow/latest/cloud/kubernetes-service-discovery.html +quarkus.rest-client.credit_bureau_yaml.url=${knative:services.v1.serving.knative.dev/loanbroker-example/loanbroker-credit-bureau} +quarkus.rest-client.aggregator_yaml.url=${kubernetes:services.v1/loanbroker-example/loanbroker-aggregator} + +%dev.quarkus.rest-client.credit_bureau_yaml.url=http://localhost:8181 +%dev.quarkus.rest-client.aggregator_yaml.url=http://localhost:8282 mp.messaging.incoming.kogito_incoming_stream.path=/ mp.messaging.incoming.kogito_incoming_stream.connector=quarkus-http -quarkus.kubernetes.deploy=false quarkus.knative.name=loanbroker-flow quarkus.kubernetes.deployment-target=knative -quarkus.knative.image-pull-policy=IfNotPresent -# Use the Kogito service discovery mechanism to get the services url. -# For more information see: https://kiegroup.github.io/kogito-docs/serverlessworkflow/latest/cloud/kubernetes-service-discovery.html -quarkus.knative.env.vars.kogito_service_cluster_url=knative:services.v1.serving.knative.dev/loanbroker-example/loanbroker-flow -quarkus.knative.env.vars.credit_bureau_url=knative:services.v1.serving.knative.dev/loanbroker-example/loanbroker-credit-bureau -quarkus.knative.env.vars.aggregator_url=kubernetes:services.v1/loanbroker-example/loanbroker-aggregator +quarkus.knative.image-pull-policy=if-not-present + +quarkus.knative.min-scale=1 +quarkus.knative.max-scale=1 # Kogito persistence configurations for enabling the serverless workflow persistence -%persistence.quarkus.container-image.group=dev.local +%persistence.quarkus.container-image.registry=dev.local +%persistence.quarkus.container-image.group=${USER} %persistence.quarkus.container-image.name=loanbroker-flow %persistence.quarkus.container-image.build=true diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/resources/specs/aggregator.yaml b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/resources/specs/aggregator.yaml index 720a9072d0..11dab4ceb7 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/resources/specs/aggregator.yaml +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/resources/specs/aggregator.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. +# + --- openapi: 3.0.3 info: diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/resources/specs/credit-bureau.yaml b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/resources/specs/credit-bureau.yaml index 7043f5396f..f09fd3bdf9 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/resources/specs/credit-bureau.yaml +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/main/resources/specs/credit-bureau.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. +# + openapi: 3.0.1 info: title: Credit Bureau diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/CreditBureauMock.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/CreditBureauMock.java index cdc1aae345..43a6d1a8d3 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/CreditBureauMock.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/CreditBureauMock.java @@ -1,9 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.acme.serverless.loanbroker.flow; import java.util.Collections; import java.util.Map; -import javax.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MediaType; import com.github.tomakehurst.wiremock.WireMockServer; import com.github.tomakehurst.wiremock.core.WireMockConfiguration; @@ -25,7 +43,7 @@ public Map start() { wireMockServer.stubFor(get(urlPathMatching("/*")) .willReturn(aResponse() .withHeader("Content-Type", MediaType.APPLICATION_JSON) - .withBody("{ \"SSN\":\"123-45-6789\",\"score\":470,\"history\":4}}") + .withBody("{ \"SSN\":\"123-45-6789\",\"score\":470,\"history\":4 }") .withStatus(200))); // inject the endpoint to the generated RESTClient Stub diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/LoanBrokerFlowTest.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/LoanBrokerFlowTest.java index 1a11e28e4f..eb88db575f 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/LoanBrokerFlowTest.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/LoanBrokerFlowTest.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. + */ package org.acme.serverless.loanbroker.flow; import java.net.URI; @@ -6,7 +24,7 @@ import java.util.Objects; import java.util.UUID; -import javax.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MediaType; import org.junit.jupiter.api.Test; diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/QuotesAggregatorMock.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/QuotesAggregatorMock.java index 5b30c2aa1e..60da745410 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/QuotesAggregatorMock.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/QuotesAggregatorMock.java @@ -1,9 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.acme.serverless.loanbroker.flow; import java.util.Collections; import java.util.Map; -import javax.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MediaType; import com.github.tomakehurst.wiremock.WireMockServer; import com.github.tomakehurst.wiremock.core.WireMockConfiguration; diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/SinkMock.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/SinkMock.java index e6a5d69cda..95a8281b08 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/SinkMock.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/java/org/acme/serverless/loanbroker/flow/SinkMock.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. + */ package org.acme.serverless.loanbroker.flow; import java.util.Collections; diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/resources/application.properties b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/resources/application.properties index 74870ba986..e8953f6fe6 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-flow/src/test/resources/application.properties @@ -1 +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. +# + quarkus.http.test-port=0 + +# Act as a placeholder to avoid triggering Kubernetes Service Discovery during test runs +# The actual URLs are set by the Quarkus Test Runner +kogito.service.url=http://localhost:${quarkus.http.port} +quarkus.rest-client.credit_bureau_yaml.url=http://localhost:8181 +quarkus.rest-client.aggregator_yaml.url=http://localhost:8282 \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/pom.xml b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/pom.xml index aa01856bbe..896bbf7c14 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/pom.xml @@ -1,4 +1,24 @@ + 4.0.0 @@ -61,7 +81,7 @@ io.cloudevents - cloudevents-http-restful-ws + cloudevents-http-restful-ws-jakarta ${version.io.cloudevents} diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/docker/Dockerfile.jvm b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/docker/Dockerfile.jvm index 0a21739272..231bbb25f3 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/docker/Dockerfile.jvm +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/docker/Dockerfile.jvm @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/docker/Dockerfile.legacy-jar b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/docker/Dockerfile.legacy-jar index b85a4b4e95..9dd33ad4e1 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/docker/Dockerfile.legacy-jar +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/docker/Dockerfile.legacy-jar @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/AppResource.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/AppResource.java index 3b331ac396..248309bf4a 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/AppResource.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/AppResource.java @@ -1,15 +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. + */ package org.acme.loanbroker; import java.util.Map; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.acme.loanbroker.domain.QuotesResponse; import org.eclipse.microprofile.config.inject.ConfigProperty; diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/NewQuoteSocket.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/NewQuoteSocket.java index 93e67d86b0..e46a39a6c8 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/NewQuoteSocket.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/NewQuoteSocket.java @@ -1,13 +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. + */ package org.acme.loanbroker; import java.util.Queue; import java.util.concurrent.ConcurrentLinkedQueue; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.websocket.OnOpen; -import javax.websocket.Session; -import javax.websocket.server.ServerEndpoint; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.websocket.OnOpen; +import jakarta.websocket.Session; +import jakarta.websocket.server.ServerEndpoint; import org.acme.loanbroker.domain.QuotesResponse; import org.slf4j.Logger; diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/QuotesRepository.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/QuotesRepository.java index c36e3fdf33..350ec9d531 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/QuotesRepository.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/QuotesRepository.java @@ -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. + */ package org.acme.loanbroker; import java.util.Map; import java.util.Optional; import java.util.concurrent.ConcurrentHashMap; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; import org.acme.loanbroker.domain.QuotesResponse; diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/domain/Credit.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/domain/Credit.java index 4ec8174778..1d93685b11 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/domain/Credit.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/domain/Credit.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. + */ package org.acme.loanbroker.domain; import com.fasterxml.jackson.annotation.JsonGetter; diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/domain/Quote.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/domain/Quote.java index 20997dcd14..8d127a58c7 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/domain/Quote.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/domain/Quote.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. + */ package org.acme.loanbroker.domain; import java.util.Objects; diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/domain/QuotesResponse.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/domain/QuotesResponse.java index 12db737545..286d6f98cd 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/domain/QuotesResponse.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/java/org/acme/loanbroker/domain/QuotesResponse.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. + */ package org.acme.loanbroker.domain; import java.io.Serializable; diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/kubernetes/kubernetes.yml b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/kubernetes/kubernetes.yml index 6652df7c62..5c63a2b3fc 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/kubernetes/kubernetes.yml +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/kubernetes/kubernetes.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. +# + # Triggers for the UI, will receive the final response from the flow apiVersion: eventing.knative.dev/v1 kind: Trigger diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/resources/META-INF/resources/index.html b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/resources/META-INF/resources/index.html index cd755bec1e..2ca006ef36 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/resources/META-INF/resources/index.html +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/resources/META-INF/resources/index.html @@ -1,3 +1,23 @@ + diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/resources/application.properties index 2450108a08..98b287a932 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/main/resources/application.properties @@ -1,3 +1,25 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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.http.cors=true +quarkus.http.cors.origins=/.*/ + # on kubernetes, we can configure the workflow endpoint via an env var org.acme.loanbroker.ui.workflowURL=${WORKFLOW_URL:http://localhost:8080} quarkus.qute.content-types."js"=text/javascript @@ -8,11 +30,13 @@ quarkus.qute.suffixes=js,html %dev.quarkus.http.port=8383 # profile to pack this example into a container, to use it execute activate the maven container profile, -Dcontainer -%container.quarkus.container-image.group=dev.local +%container.quarkus.container-image.registry=dev.local +%container.quarkus.container-image.group=${USER} %container.quarkus.container-image.name=loanbroker-ui %container.quarkus.container-image.build=true +quarkus.kubernetes.name=loanbroker-ui quarkus.kubernetes.deploy=false quarkus.kubernetes.deployment-target=kubernetes -quarkus.kubernetes.image-pull-policy=IfNotPresent +quarkus.kubernetes.image-pull-policy=if-not-present quarkus.kubernetes.env.vars.workflow_url=http://loanbroker-flow.loanbroker-example.svc.cluster.local diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/test/java/org/acme/loanbroker/AppResourceTest.java b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/test/java/org/acme/loanbroker/AppResourceTest.java index 22075c1a9b..5148a78e27 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/test/java/org/acme/loanbroker/AppResourceTest.java +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/test/java/org/acme/loanbroker/AppResourceTest.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. + */ package org.acme.loanbroker; import java.io.IOException; @@ -7,13 +25,13 @@ import java.util.concurrent.LinkedBlockingDeque; import java.util.concurrent.TimeUnit; -import javax.inject.Inject; -import javax.websocket.ClientEndpoint; -import javax.websocket.ContainerProvider; -import javax.websocket.DeploymentException; -import javax.websocket.OnMessage; -import javax.websocket.Session; -import javax.ws.rs.core.MediaType; +import jakarta.inject.Inject; +import jakarta.websocket.ClientEndpoint; +import jakarta.websocket.ContainerProvider; +import jakarta.websocket.DeploymentException; +import jakarta.websocket.OnMessage; +import jakarta.websocket.Session; +import jakarta.ws.rs.core.MediaType; import org.acme.loanbroker.domain.Credit; import org.acme.loanbroker.domain.Quote; diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/test/resources/application.properties b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/test/resources/application.properties index 74870ba986..a6f411ba5d 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/test/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/loanbroker-ui/src/test/resources/application.properties @@ -1 +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. +# + quarkus.http.test-port=0 diff --git a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/pom.xml b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/pom.xml index efd654500d..f9724b06f8 100644 --- a/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-loanbroker-showcase/pom.xml @@ -1,10 +1,37 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples Kogito Example :: Serverless Workflow Loan Broker Showcase 1.0-SNAPSHOT @@ -12,27 +39,27 @@ serverless-workflow-loanbroker-showcase pom - 2.16.10.Final + 3.8.4 io.quarkus quarkus-bom - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT UTF-8 UTF-8 2.33.2 1.17.3 - 2.3.0 - + 2.5.0 + - 2.14.0 + 3.9.0 3.0.0-M7 3.8.1 - 11 + 17 ${version.surefire.plugin} diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/README.md b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/README.md index 1fc2525057..4156b87d1c 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/README.md +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/README.md @@ -22,12 +22,6 @@ This example demonstrates a few features powered by the Kogito implementation of In a Knative environment, the services involved in this use case can be scaled to zero and resume from the exact stage it was, saving cluster resources in the process. -## Using Quarkus Dev Services - -You can use the Workflow Instance management dev service when in Quarkus Dev Mode (`quarkus dev` from the [subscription-flow](subscription-flow) module root) to visualize the details of a given workflow instance: - -![Quarkus Dev UI](docs/dev-console.png) - ## The User Interface The [Newsletter Subscription Flow](subscription-flow) application has a user interface to interact with the workflow without having to rely on the command line to push events or making HTTP requests: diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/docs/dev-console.png b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/docs/dev-console.png deleted file mode 100644 index 53f288e7d4..0000000000 Binary files a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/docs/dev-console.png and /dev/null differ diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/kubernetes/data-index-services.yml b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/kubernetes/data-index-services.yml index 843a5a34f6..8f739b156b 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/kubernetes/data-index-services.yml +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/kubernetes/data-index-services.yml @@ -1,9 +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. +# + apiVersion: v1 kind: Service metadata: labels: app.kubernetes.io/name: data-index-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT name: data-index-service-postgresql spec: ports: @@ -12,7 +31,7 @@ spec: targetPort: 8080 selector: app.kubernetes.io/name: data-index-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT type: ClusterIP --- apiVersion: apps/v1 @@ -20,19 +39,19 @@ kind: Deployment metadata: labels: app.kubernetes.io/name: data-index-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT name: data-index-service-postgresql spec: replicas: 1 selector: matchLabels: app.kubernetes.io/name: data-index-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT template: metadata: labels: app.kubernetes.io/name: data-index-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT spec: containers: - name: data-index-service-postgresql @@ -69,16 +88,98 @@ spec: value: "http-events-support" - name: QUARKUS_HTTP_PORT value: "8080" + - name: KOGITO_SERVICE_URL + value: http://data-index-service-postgresql --- apiVersion: eventing.knative.dev/v1 kind: Trigger metadata: - name: data-index-service-postgresql-processes-trigger + name: data-index-service-postgresql-process-definition-trigger spec: broker: default filter: attributes: - type: ProcessInstanceEvent + type: ProcessDefinitionEvent + subscriber: + ref: + apiVersion: v1 + kind: Service + name: data-index-service-postgresql + uri: /definitions +--- +apiVersion: eventing.knative.dev/v1 +kind: Trigger +metadata: + name: data-index-service-postgresql-process-error-trigger +spec: + broker: default + filter: + attributes: + type: ProcessInstanceErrorDataEvent + subscriber: + ref: + apiVersion: v1 + kind: Service + name: data-index-service-postgresql + uri: /processes +--- +apiVersion: eventing.knative.dev/v1 +kind: Trigger +metadata: + name: data-index-service-postgresql-process-node-trigger +spec: + broker: default + filter: + attributes: + type: ProcessInstanceNodeDataEvent + subscriber: + ref: + apiVersion: v1 + kind: Service + name: data-index-service-postgresql + uri: /processes +--- +apiVersion: eventing.knative.dev/v1 +kind: Trigger +metadata: + name: data-index-service-postgresql-process-sla-trigger +spec: + broker: default + filter: + attributes: + type: ProcessInstanceSLADataEvent + subscriber: + ref: + apiVersion: v1 + kind: Service + name: data-index-service-postgresql + uri: /processes +--- +apiVersion: eventing.knative.dev/v1 +kind: Trigger +metadata: + name: data-index-service-postgresql-process-state-trigger +spec: + broker: default + filter: + attributes: + type: ProcessInstanceStateDataEvent + subscriber: + ref: + apiVersion: v1 + kind: Service + name: data-index-service-postgresql + uri: /processes +--- +apiVersion: eventing.knative.dev/v1 +kind: Trigger +metadata: + name: data-index-service-postgresql-process-variable-trigger +spec: + broker: default + filter: + attributes: + type: ProcessInstanceVariableDataEvent subscriber: ref: apiVersion: v1 diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/kubernetes/supporting-services.yml b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/kubernetes/supporting-services.yml index d5fe666189..c55cee2ad5 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/kubernetes/supporting-services.yml +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/kubernetes/supporting-services.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. +# + # default broker for the knative eventing communication between the services. apiVersion: eventing.knative.dev/v1 kind: Broker @@ -103,14 +122,14 @@ spec: selector: matchLabels: app.kubernetes.io/name: jobs-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT --- apiVersion: v1 kind: Service metadata: labels: app.kubernetes.io/name: jobs-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT name: jobs-service-postgresql spec: ports: @@ -119,7 +138,7 @@ spec: targetPort: 8080 selector: app.kubernetes.io/name: jobs-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT type: ClusterIP --- apiVersion: apps/v1 @@ -127,23 +146,23 @@ kind: Deployment metadata: labels: app.kubernetes.io/name: jobs-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT name: jobs-service-postgresql spec: replicas: 1 selector: matchLabels: app.kubernetes.io/name: jobs-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT template: metadata: labels: app.kubernetes.io/name: jobs-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT spec: containers: - name: jobs-service-postgresql - image: quay.io/kiegroup/kogito-jobs-service-allinone-nightly:latest + image: quay.io/kiegroup/kogito-jobs-service-postgresql-nightly:latest imagePullPolicy: Always ports: - containerPort: 8080 @@ -154,8 +173,8 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - - name: JOBS_SERVICE_PERSISTENCE - value: "postgresql" + - name: KOGITO_SERVICE_URL + value: http://jobs-service-postgresql - name: KOGITO_JOBS_SERVICE_HTTP_JOB_STATUS_CHANGE_EVENTS value: "true" - name: QUARKUS_DATASOURCE_USERNAME diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/pom.xml b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/pom.xml index 2e08e9a86b..7ccd6e65b3 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/pom.xml @@ -1,10 +1,37 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples Kogito Example :: Serverless Workflow Newsletter Subscription Showcase 1.0-SNAPSHOT @@ -12,18 +39,18 @@ serverless-workflow-newsletter-subscription pom - 2.16.10.Final + 3.8.4 io.quarkus quarkus-bom - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.0.0-M7 5.1.3 3.6.0 3.8.1 - 11 + 17 ${version.surefire.plugin} diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/pom.xml b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/pom.xml index 362fae8051..9fa02d38fb 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/pom.xml @@ -1,4 +1,24 @@ + @@ -52,48 +72,43 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus - org.kie.kogito - kogito-addons-quarkus-kubernetes + org.kie + kie-addons-quarkus-kubernetes - org.kie.kogito + org.kie kogito-addons-quarkus-fabric8-kubernetes-service-catalog - org.kie.kogito - kogito-addons-quarkus-messaging + org.kie + kie-addons-quarkus-messaging - org.kie.kogito - kogito-addons-quarkus-knative-eventing + org.kie + kie-addons-quarkus-knative-eventing - org.kie.kogito - kogito-addons-quarkus-events-process + org.kie + kie-addons-quarkus-events-process - - - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files - org.kie.kogito - kogito-addons-quarkus-process-management + org.kie + kie-addons-quarkus-process-management @@ -226,8 +241,8 @@ quarkus-container-image-jib - org.kie.kogito - kogito-addons-quarkus-persistence-jdbc + org.kie + kie-addons-quarkus-persistence-jdbc io.quarkus @@ -238,7 +253,7 @@ quarkus-agroal - org.kie.kogito + org.kie kogito-addons-quarkus-jobs-knative-eventing diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/main/java/org/kie/kogito/examples/VertxRouter.java b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/main/java/org/kie/kogito/examples/VertxRouter.java index 67fb2aa54c..d3cc018eeb 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/main/java/org/kie/kogito/examples/VertxRouter.java +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/main/java/org/kie/kogito/examples/VertxRouter.java @@ -1,23 +1,25 @@ /* - * 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.examples; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.event.Observes; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.event.Observes; import io.vertx.core.http.HttpMethod; import io.vertx.ext.web.Router; diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/main/resources/META-INF/resources/index.html b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/main/resources/META-INF/resources/index.html index 43f683c048..eb983ecdce 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/main/resources/META-INF/resources/index.html +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/main/resources/META-INF/resources/index.html @@ -1,19 +1,23 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this 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/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/main/resources/application-knative.properties b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/main/resources/application-knative.properties index db3cf3984b..8ce2a74312 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/main/resources/application-knative.properties +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/main/resources/application-knative.properties @@ -1,6 +1,25 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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. +# + # Use the Kogito service discovery mechanism to get the current service url. # For more information see: https://kiegroup.github.io/kogito-docs/serverlessworkflow/latest/cloud/kubernetes-service-discovery.html -kogito.service.url=knative:services.v1.serving.knative.dev/newsletter-showcase/subscription-flow +kogito.service.url=${knative:services.v1.serving.knative.dev/newsletter-showcase/subscription-flow} # When the application is generated with the knative profile, it'll require a PostgreSQL database. # Kogito persistence configurations for enabling the serverless workflow persistence @@ -18,33 +37,19 @@ quarkus.datasource.password=${POSTGRES_PASSWORD:pass} # Events produced by kogito-addons-quarkus-jobs-knative-eventing to program the timers on the jobs service. mp.messaging.outgoing.kogito-job-service-job-request-events.connector=quarkus-http -# The K_SINK variable is automatically injected by the Knative ecosystem. The default value http://localhost:8280 -# is used for local testing. mp.messaging.outgoing.kogito-job-service-job-request-events.url=${K_SINK:http://localhost:8280/v2/jobs/events} mp.messaging.outgoing.kogito-job-service-job-request-events.method=POST -# process, variables and user tasks events configuration. -mp.messaging.outgoing.kogito-processinstances-events.connector=quarkus-http -mp.messaging.outgoing.kogito-processinstances-events.url=${K_SINK:http://localhost:8180/processes} -mp.messaging.outgoing.kogito-processinstances-events.method=POST - kogito.events.usertasks.enabled=false -mp.messaging.outgoing.kogito-usertaskinstances-events.connector=quarkus-http -mp.messaging.outgoing.kogito-usertaskinstances-events.url=${K_SINK:http://localhost:8180/tasks} -mp.messaging.outgoing.kogito-usertaskinstances-events.method=POST - kogito.events.variables.enabled=false -mp.messaging.outgoing.kogito-variables-events.connector=quarkus-http -mp.messaging.outgoing.kogito-variables-events.url=${K_SINK:http://localhost:8180/variables} -mp.messaging.outgoing.kogito-variables-events.method=POST +kogito.addon.messaging.outgoing.cloudEventMode=structured ## Knative integration: -# Use the Kogito service discovery mechanism to get the subscription-service url and set an env var with name SUBSCRIPTION_SERVICE_URL +# Use the Kogito service discovery mechanism to get the subscription-service url # For more information see: # https://kiegroup.github.io/kogito-docs/serverlessworkflow/latest/cloud/kubernetes-service-discovery.html -# https://quarkus.io/guides/deploying-to-kubernetes#environment-variables-from-keyvalue-pairs -quarkus.knative.env.vars.subscription_service_url=knative:services.v1.serving.knative.dev/newsletter-showcase/subscription-service +quarkus.rest-client.subscription_service_yaml.url=${knative:services.v1.serving.knative.dev/newsletter-showcase/subscription-service} # Configure current deployment to set an env var with name POSTGRES_HOST # For more information see: https://quarkus.io/guides/deploying-to-kubernetes#environment-variables-from-keyvalue-pairs @@ -61,7 +66,9 @@ quarkus.knative.env.vars.postgres_host=newsletter-postgres # you can change this property with -Pknative -Dquarkus.container-image.group from the command line. quarkus.container-image.group=dev.local quarkus.kubernetes.deployment-target=knative +# The name of the application. This value will be used for naming Kubernetes resources like: Deployment, Service, etc. quarkus.knative.name=subscription-flow +quarkus.container-image.name=${quarkus.knative.name} quarkus.knative.image-pull-policy=IfNotPresent # Kogito Knative integration diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/main/resources/application.properties index 88b5245aae..86b736b0b6 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/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.native.native-image-xmx=8g quarkus.swagger-ui.always-include=true @@ -11,10 +30,11 @@ quarkus.log.category."org.kie.kogito.addon.quarkus.messaging".level=DEBUG # Internally, Kogito Serverless Workflow uses the Quarkus OpenAPI Generator extension. # The default value http://localhost:8282 is used for local testing. In kubernetes environments, the env var # SUBSCRIPTION_SERVICE_URL will be used instead. This env var is configured in the application-knative.properties file. -quarkus.rest-client.subscription_service_yaml.url=${SUBSCRIPTION_SERVICE_URL:http://localhost:8282} +quarkus.rest-client.subscription_service_yaml.url=http://localhost:8282 mp.messaging.incoming.kogito_incoming_stream.connector=quarkus-http mp.messaging.incoming.kogito_incoming_stream.path=/ +kogito.addon.messaging.outgoing.cloudEventMode=structured # The K_SINK variable is automatically injected by the Knative ecosystem. The default value http://localhost:8181 # is used for local testing, which correspond to the event-display local container. @@ -27,21 +47,7 @@ mp.messaging.outgoing.kogito_outgoing_stream.url=${K_SINK:http://localhost:8181} %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local %container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin - -# process, variables and user tasks events configuration. -mp.messaging.outgoing.kogito-processinstances-events.connector=quarkus-http -mp.messaging.outgoing.kogito-processinstances-events.url=http://localhost:8180/processes -mp.messaging.outgoing.kogito-processinstances-events.method=POST kogito.events.usertasks.enabled=false -mp.messaging.outgoing.kogito-usertaskinstances-events.connector=quarkus-http -mp.messaging.outgoing.kogito-usertaskinstances-events.url=http://localhost:8180/tasks -mp.messaging.outgoing.kogito-usertaskinstances-events.method=POST - kogito.events.variables.enabled=false -mp.messaging.outgoing.kogito-variables-events.connector=quarkus-http -mp.messaging.outgoing.kogito-variables-events.url=http://localhost:8180/variables -mp.messaging.outgoing.kogito-variables-events.method=POST \ No newline at end of file + diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/main/resources/specs/subscription-service.yaml b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/main/resources/specs/subscription-service.yaml index 83bb3d099b..02b3ccb932 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/main/resources/specs/subscription-service.yaml +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/main/resources/specs/subscription-service.yaml @@ -1,8 +1,27 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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. +# + --- openapi: 3.0.3 info: title: serverless-workflow-newsletter-subscription-service API - version: 2.0.0-SNAPSHOT + version: 999-SNAPSHOT paths: /subscription: get: diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/test/java/org/acme/newsletter/subscription/flow/SinkMock.java b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/test/java/org/acme/newsletter/subscription/flow/SinkMock.java index ac6184d376..cc41fef517 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/test/java/org/acme/newsletter/subscription/flow/SinkMock.java +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/test/java/org/acme/newsletter/subscription/flow/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.acme.newsletter.subscription.flow; import java.util.Collections; diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/test/java/org/acme/newsletter/subscription/flow/SubscriptionConstants.java b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/test/java/org/acme/newsletter/subscription/flow/SubscriptionConstants.java index 00fcad2537..adcbe78305 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/test/java/org/acme/newsletter/subscription/flow/SubscriptionConstants.java +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/test/java/org/acme/newsletter/subscription/flow/SubscriptionConstants.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.acme.newsletter.subscription.flow; import org.acme.newsletter.subscription.service.Subscription; diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/test/java/org/acme/newsletter/subscription/flow/SubscriptionFlowIT.java b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/test/java/org/acme/newsletter/subscription/flow/SubscriptionFlowIT.java index 3c07ebbdc5..0dd0b79406 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/test/java/org/acme/newsletter/subscription/flow/SubscriptionFlowIT.java +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/test/java/org/acme/newsletter/subscription/flow/SubscriptionFlowIT.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.acme.newsletter.subscription.flow; import java.net.URI; diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/test/java/org/acme/newsletter/subscription/flow/SubscriptionServiceMock.java b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/test/java/org/acme/newsletter/subscription/flow/SubscriptionServiceMock.java index c5352f815c..4eae27ce90 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/test/java/org/acme/newsletter/subscription/flow/SubscriptionServiceMock.java +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-flow/src/test/java/org/acme/newsletter/subscription/flow/SubscriptionServiceMock.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.acme.newsletter.subscription.flow; import java.util.Collections; @@ -35,8 +37,8 @@ import static com.github.tomakehurst.wiremock.client.WireMock.get; import static com.github.tomakehurst.wiremock.client.WireMock.post; import static com.github.tomakehurst.wiremock.client.WireMock.put; -import static javax.ws.rs.core.HttpHeaders.CONTENT_TYPE; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.HttpHeaders.CONTENT_TYPE; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; import static org.acme.newsletter.subscription.flow.SubscriptionConstants.EMAIL; import static org.acme.newsletter.subscription.flow.SubscriptionConstants.newSubscription; diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/pom.xml b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/pom.xml index 7f75088eb1..68f81b2712 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/pom.xml @@ -1,4 +1,24 @@ + diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/InMemorySubscriptionRepository.java b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/InMemorySubscriptionRepository.java index df97e0a3e2..c22cd7e765 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/InMemorySubscriptionRepository.java +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/InMemorySubscriptionRepository.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.acme.newsletter.subscription.service; import java.util.List; @@ -22,13 +24,13 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; -import javax.annotation.PostConstruct; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import io.quarkus.arc.DefaultBean; +import jakarta.annotation.PostConstruct; /** * This default implementation is used when the persistence is not enabled. diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/PostgreSqlSubscriptionRepository.java b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/PostgreSqlSubscriptionRepository.java index e299b1de95..06917d4dba 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/PostgreSqlSubscriptionRepository.java +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/PostgreSqlSubscriptionRepository.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.acme.newsletter.subscription.service; import java.util.Collections; @@ -22,9 +24,8 @@ import java.util.stream.Stream; import java.util.stream.StreamSupport; -import javax.annotation.PostConstruct; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -35,6 +36,7 @@ import io.vertx.mutiny.sqlclient.RowIterator; import io.vertx.mutiny.sqlclient.RowSet; import io.vertx.mutiny.sqlclient.Tuple; +import jakarta.annotation.PostConstruct; import static java.util.stream.Collectors.toList; diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/Subscription.java b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/Subscription.java index b328e77aab..9dd9932eda 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/Subscription.java +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/Subscription.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.acme.newsletter.subscription.service; import java.io.Serializable; diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionException.java b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionException.java index c5263ecb85..5c39eb5f9c 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionException.java +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionException.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.acme.newsletter.subscription.service; public class SubscriptionException extends RuntimeException { diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionRepository.java b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionRepository.java index 8c55645bbe..707466ad87 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionRepository.java +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionRepository.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.acme.newsletter.subscription.service; import java.util.List; diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionResource.java b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionResource.java index bd08a1df35..6a5fbb3a0d 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionResource.java +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionResource.java @@ -1,37 +1,39 @@ /* - * 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.acme.newsletter.subscription.service; import java.io.Serializable; import java.util.Optional; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.eclipse.microprofile.openapi.annotations.media.Content; import org.eclipse.microprofile.openapi.annotations.media.Schema; diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionService.java b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionService.java index 68620efee8..3fa5abba76 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionService.java +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionService.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.acme.newsletter.subscription.service; import java.util.List; diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionServiceImpl.java b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionServiceImpl.java index 3c64999b2e..7372b87d37 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionServiceImpl.java +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/java/org/acme/newsletter/subscription/service/SubscriptionServiceImpl.java @@ -1,25 +1,28 @@ /* - * 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.acme.newsletter.subscription.service; import java.util.List; import java.util.Optional; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; @ApplicationScoped public class SubscriptionServiceImpl implements SubscriptionService { diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/resources/META-INF/resources/index.html b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/resources/META-INF/resources/index.html index 357dd22e23..ed5b961ca8 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/resources/META-INF/resources/index.html +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/resources/META-INF/resources/index.html @@ -1,19 +1,23 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this 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/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/resources/application-knative.properties b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/resources/application-knative.properties index dd20270432..421aeb2bd4 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/resources/application-knative.properties +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/resources/application-knative.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. +# + # When the application is generated with the knative profile, it'll require a PostgreSQL database. # Enable the PostgreSqlSubscriptionRepository component. diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/resources/application.properties index d8561fb582..fdabd6120e 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-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. +# + quarkus.swagger-ui.always-include=true quarkus.smallrye-openapi.operation-id-strategy=method quarkus.native.native-image-xmx=8g @@ -8,6 +27,3 @@ quarkus.native.native-image-xmx=8g %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local %container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin diff --git a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/test/java/org/acme/newsletter/subscription/service/SubscriptionResourceIT.java b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/test/java/org/acme/newsletter/subscription/service/SubscriptionResourceIT.java index bf46c9d15a..2b13337d4b 100644 --- a/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/test/java/org/acme/newsletter/subscription/service/SubscriptionResourceIT.java +++ b/serverless-workflow-examples/serverless-workflow-newsletter-subscription/subscription-service/src/test/java/org/acme/newsletter/subscription/service/SubscriptionResourceIT.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.acme.newsletter.subscription.service; import java.util.UUID; diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/pom.xml b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/pom.xml index cdda9bb4f1..f44dcb86ee 100644 --- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/pom.xml @@ -1,4 +1,24 @@ + 4.0.0 @@ -10,15 +30,15 @@ acme-financial-service Kogito Example :: Serverless Workflow Oauth2 Orchestration Example :: ACME Financial Service - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.8.1 - 11 + 17 3.0.0-M7 3.22.0 diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/docker/Dockerfile.jvm b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/docker/Dockerfile.jvm index a5d1510824..66a75a263d 100644 --- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/docker/Dockerfile.jvm +++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/docker/Dockerfile.jvm @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/docker/Dockerfile.legacy-jar b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/docker/Dockerfile.legacy-jar index d90445070a..08c2ec28bd 100644 --- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/docker/Dockerfile.legacy-jar +++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/docker/Dockerfile.legacy-jar @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/AcmeFinancialApplication.java b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/AcmeFinancialApplication.java index af5d491986..70b3949b48 100644 --- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/AcmeFinancialApplication.java +++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/AcmeFinancialApplication.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.acme; import org.eclipse.microprofile.openapi.annotations.Components; @@ -42,6 +44,6 @@ tokenUrl = "http://localhost:8281/auth/realms/kogito/protocol/openid-connect/token", scopes = {}))) })) -public class AcmeFinancialApplication extends javax.ws.rs.core.Application { +public class AcmeFinancialApplication extends jakarta.ws.rs.core.Application { } diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/AcmeFinancialResource.java b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/AcmeFinancialResource.java index a791995076..9dee457775 100644 --- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/AcmeFinancialResource.java +++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/AcmeFinancialResource.java @@ -1,27 +1,29 @@ /* - * 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.acme; -import javax.inject.Inject; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.MediaType; +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.MediaType; import org.eclipse.microprofile.openapi.annotations.Operation; import org.eclipse.microprofile.openapi.annotations.security.SecurityRequirement; diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/ExchangeRateResult.java b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/ExchangeRateResult.java index da00ce4a61..03ba951797 100644 --- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/ExchangeRateResult.java +++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/ExchangeRateResult.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.acme; public class ExchangeRateResult { diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/ExchangeRatesDB.java b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/ExchangeRatesDB.java index 725d728dab..a54f583483 100644 --- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/ExchangeRatesDB.java +++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/java/org/acme/ExchangeRatesDB.java @@ -1,25 +1,29 @@ /* - * 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.acme; import java.util.HashMap; import java.util.Map; -import javax.annotation.PostConstruct; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; + +import jakarta.annotation.PostConstruct; /** * Emulates the Acme Financial Services database, implementation and maintenance of this DB diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/resources/META-INF/resources/index.html b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/resources/META-INF/resources/index.html index 396ae366c0..5b7a32f788 100644 --- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/resources/META-INF/resources/index.html +++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/resources/META-INF/resources/index.html @@ -1,3 +1,23 @@ + diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/resources/application.properties index 595f2d5961..b2e303fe3e 100644 --- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-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. +# + quarkus.http.port=8483 quarkus.native.native-image-xmx=8g @@ -21,7 +40,4 @@ quarkus.oidc.tenant-enabled=true %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/test/java/org/acme/AcmeExchangeResourceIT.java b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/test/java/org/acme/AcmeExchangeResourceIT.java index 0c93b8259b..80f396a421 100644 --- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/test/java/org/acme/AcmeExchangeResourceIT.java +++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/acme-financial-service/src/test/java/org/acme/AcmeExchangeResourceIT.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.acme; import java.util.stream.Stream; diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/README.md b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/README.md index c9b52c7ec6..f3ed523731 100644 --- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/README.md +++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/README.md @@ -40,9 +40,9 @@ You can navigate to this URL [Keycloak console](http://localhost:8281/auth) to c ### Prerequisites You will need: -- Java 11+ installed +- Java 17+ installed - Environment variable JAVA_HOME set accordingly -- Maven 3.8.6+ installed +- Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVm](https://www.graalvm.org/downloads/) 19.3.1+ installed diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/pom.xml b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/pom.xml index e0132a7d49..5ba5e9fd7b 100644 --- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/pom.xml @@ -1,4 +1,24 @@ + 4.0.0 @@ -12,15 +32,15 @@ Kogito Example :: Serverless Workflow Oauth2 Orchestration Example :: Currency Exchange - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.8.1 - 11 + 17 3.0.0-M7 @@ -63,16 +83,12 @@ quarkus-oidc-client-filter - org.kie.kogito - kogito-quarkus-serverless-workflow - - - org.kie.kogito - kogito-quarkus-serverless-workflow-devui + org.apache.kie.sonataflow + sonataflow-quarkus - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/docker/Dockerfile.jvm b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/docker/Dockerfile.jvm index 28f6495c83..234e2ff8fa 100644 --- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/docker/Dockerfile.jvm +++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/docker/Dockerfile.jvm @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/docker/Dockerfile.legacy-jar b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/docker/Dockerfile.legacy-jar index 77f6fdc177..ae4e430263 100644 --- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/docker/Dockerfile.legacy-jar +++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/docker/Dockerfile.legacy-jar @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/java/org/kie/kogito/examples/ExchangeWorkflowHelper.java b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/java/org/kie/kogito/examples/ExchangeWorkflowHelper.java index 335f6f86ab..0a46100bef 100644 --- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/java/org/kie/kogito/examples/ExchangeWorkflowHelper.java +++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/java/org/kie/kogito/examples/ExchangeWorkflowHelper.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.examples; import java.time.LocalDate; @@ -22,7 +24,7 @@ import java.util.LinkedHashSet; import java.util.Set; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/java/org/kie/kogito/examples/ValidationResult.java b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/java/org/kie/kogito/examples/ValidationResult.java index 353e47d727..98bcea4b5b 100644 --- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/java/org/kie/kogito/examples/ValidationResult.java +++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/java/org/kie/kogito/examples/ValidationResult.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.examples; /** diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/resources/application.properties index 8460c28559..acf5d3b30e 100644 --- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/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.examples".level=DEBUG quarkus.swagger-ui.always-include=true @@ -20,6 +39,3 @@ quarkus.oidc-client.acme_financial_oauth.credentials.client-secret.value=secret %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local %container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/resources/specs/acme-financial-service.yml b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/resources/specs/acme-financial-service.yml index 2fffc9b6ab..90c17e6dc7 100644 --- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/resources/specs/acme-financial-service.yml +++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/currency-exchange-workflow/src/main/resources/specs/acme-financial-service.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. +# + --- openapi: 3.0.3 info: diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/docker-compose/docker-compose.yml b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/docker-compose/docker-compose.yml index 5ff2b03d25..f42ccc9b0a 100755 --- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/docker-compose/docker-compose.yml +++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/docker-compose/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/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/pom.xml index 6efc6bb754..5d3bd2b7b7 100644 --- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/pom.xml @@ -1,8 +1,35 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-oauth2-orchestration-quarkus 1.0-SNAPSHOT diff --git a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/scripts/startKeycloak.sh b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/scripts/startKeycloak.sh index 6673e3b9e9..6756c66a1f 100755 --- a/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/scripts/startKeycloak.sh +++ b/serverless-workflow-examples/serverless-workflow-oauth2-orchestration-quarkus/scripts/startKeycloak.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. +# + export REALM_FILE_VOLUME=$PWD/../docker-compose/keycloak/kogito-realm.json:/tmp/kogito-realm.json diff --git a/serverless-workflow-examples/serverless-workflow-openvino-quarkus/README.md b/serverless-workflow-examples/serverless-workflow-openvino-quarkus/README.md index b2ab550f8c..b55278b4d5 100644 --- a/serverless-workflow-examples/serverless-workflow-openvino-quarkus/README.md +++ b/serverless-workflow-examples/serverless-workflow-openvino-quarkus/README.md @@ -11,9 +11,9 @@ The flow, given an image file name containing a dog image, returns that dog's ra ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed - Python 3+ installed. In Linux system is usually pre-installed. In case you have an older version or you are not using Linux, check [here](https://wiki.python.org/moin/BeginnersGuide/Download) - Pip installed. In case it not there, run `python -m ensurepip --upgrade` - Python required libraries, equivalent to run `pip install -r requirements.txt` and `pip install jep`, will be automatically installed when running Maven. diff --git a/serverless-workflow-examples/serverless-workflow-openvino-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-openvino-quarkus/pom.xml index f9f8962f07..0a2b539737 100644 --- a/serverless-workflow-examples/serverless-workflow-openvino-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-openvino-quarkus/pom.xml @@ -1,8 +1,35 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-openvino-quarkus 1.0-SNAPSHOT @@ -13,11 +40,11 @@ 2.16.10.Final quarkus-bom io.quarkus - 2.16.10.Final + 2.16.12.Final org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 11 + 999-SNAPSHOT + 17 1.6.0 3.8.1 3.0.0-M7 @@ -44,12 +71,12 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus - org.kie.kogito - kogito-addons-quarkus-serverless-workflow-python + org.apache.kie.sonataflow + sonataflow-addons-quarkus-python io.quarkus @@ -60,12 +87,8 @@ quarkus-resteasy-jackson - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files io.quarkus @@ -154,7 +177,7 @@ pip install - jep + jep==4.2.0 diff --git a/serverless-workflow-examples/serverless-workflow-openvino-quarkus/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-openvino-quarkus/src/main/resources/application.properties index 45dc3047af..c220b65aae 100644 --- a/serverless-workflow-examples/serverless-workflow-openvino-quarkus/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-openvino-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. +# + # Packaging # quarkus.package.type=fast-jar quarkus.native.native-image-xmx=8g @@ -9,7 +28,4 @@ quarkus.devservices.enabled=false %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-openvino-quarkus/src/test/java/org/kie/kogito/examples/OpenVinoRestIT.java b/serverless-workflow-examples/serverless-workflow-openvino-quarkus/src/test/java/org/kie/kogito/examples/OpenVinoRestIT.java index 6c61c6f60c..2fa3596e5b 100644 --- a/serverless-workflow-examples/serverless-workflow-openvino-quarkus/src/test/java/org/kie/kogito/examples/OpenVinoRestIT.java +++ b/serverless-workflow-examples/serverless-workflow-openvino-quarkus/src/test/java/org/kie/kogito/examples/OpenVinoRestIT.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-order-processing/README.md b/serverless-workflow-examples/serverless-workflow-order-processing/README.md index 3227a9bc61..24c913075d 100644 --- a/serverless-workflow-examples/serverless-workflow-order-processing/README.md +++ b/serverless-workflow-examples/serverless-workflow-order-processing/README.md @@ -39,9 +39,9 @@ receiving your events. ### Prerequisites You will need: -- Java 11+ installed +- Java 17+ installed - Environment variable JAVA_HOME set accordingly -- Maven 3.8.6+ installed +- Maven 3.9.6+ installed When using native image compilation, you will also need: - GraalVM 19.3+ installed @@ -135,7 +135,7 @@ __ ____ __ _____ ___ __ ____ ______ 2021-04-13 17:39:41,034 WARN [io.qua.arc.pro.BeanArchives] (build-45) Failed to index byte: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader 2021-04-13 17:39:41,754 INFO [org.kie.kog.ser.eve.imp.AbstractMessageConsumer] (Quarkus Main Thread) Consumer for class com.fasterxml.jackson.databind.JsonNode started. 2021-04-13 17:39:41,776 INFO [org.kie.kog.add.clo.qua.QuarkusKogitoExtensionInitializer] (Quarkus Main Thread) Registered Kogito CloudEvent extension -2021-04-13 17:39:41,827 INFO [io.quarkus] (Quarkus Main Thread) serverless-workflow-order-processing 2.0.0-SNAPSHOT on JVM (powered by Quarkus 1.11.5.Final) started in 2.815s. Listening on: http://localhost:8080 +2021-04-13 17:39:41,827 INFO [io.quarkus] (Quarkus Main Thread) serverless-workflow-order-processing 999-SNAPSHOT on JVM (powered by Quarkus 1.11.5.Final) started in 2.815s. Listening on: http://localhost:8080 2021-04-13 17:39:41,827 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated. 2021-04-13 17:39:41,827 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, mutiny, rest-client, rest-client-jackson, resteasy, resteasy-jackson, servlet, smallrye-context-propagation, smallrye-health, smallrye-openapi, smallrye-reactive-messaging, swagger-ui, vertx] ``` diff --git a/serverless-workflow-examples/serverless-workflow-order-processing/kubernetes/ingress.yaml b/serverless-workflow-examples/serverless-workflow-order-processing/kubernetes/ingress.yaml index babcb1d13c..44b54ea877 100644 --- a/serverless-workflow-examples/serverless-workflow-order-processing/kubernetes/ingress.yaml +++ b/serverless-workflow-examples/serverless-workflow-order-processing/kubernetes/ingress.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. +# + # OPTIONAL! You should have your own way to expose the service, this is just a suggestion # After deploying your service, use this file to expose it # Ref.: https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/#create-an-ingress-resource diff --git a/serverless-workflow-examples/serverless-workflow-order-processing/pom.xml b/serverless-workflow-examples/serverless-workflow-order-processing/pom.xml index 101b80b766..0930909dbc 100644 --- a/serverless-workflow-examples/serverless-workflow-order-processing/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-order-processing/pom.xml @@ -1,26 +1,53 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-order-processing 1.0-SNAPSHOT Kogito Example :: Serverless Workflow Order Processing - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.8.1 2.33.2 - 11 + 17 3.0.0-M7 @@ -44,12 +71,12 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus - org.kie.kogito - kogito-addons-quarkus-knative-eventing + org.kie + kie-addons-quarkus-knative-eventing io.quarkus @@ -64,12 +91,8 @@ quarkus-smallrye-health - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-order-processing/src/main/kubernetes/knative.yml b/serverless-workflow-examples/serverless-workflow-order-processing/src/main/kubernetes/knative.yml index 4ff89eb403..8250973f9e 100644 --- a/serverless-workflow-examples/serverless-workflow-order-processing/src/main/kubernetes/knative.yml +++ b/serverless-workflow-examples/serverless-workflow-order-processing/src/main/kubernetes/knative.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. +# + # simple knative application to display the routed messages apiVersion: serving.knative.dev/v1 kind: Service diff --git a/serverless-workflow-examples/serverless-workflow-order-processing/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-order-processing/src/main/resources/application.properties index 2733b386ba..a120da6e1f 100644 --- a/serverless-workflow-examples/serverless-workflow-order-processing/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-order-processing/src/main/resources/application.properties @@ -1,7 +1,27 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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.level=INFO # The K_SINK variable will be injected for us by the KogitoSource mp.messaging.outgoing.kogito_outgoing_stream.url=${K_SINK:http://localhost:8181} +kogito.addon.messaging.outgoing.cloudEventMode.kogito_outgoing_stream=structured mp.messaging.incoming.kogito_incoming_stream.connector=quarkus-http mp.messaging.incoming.kogito_incoming_stream.path=/ @@ -23,7 +43,4 @@ quarkus.swagger-ui.always-include=true %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local %container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin diff --git a/serverless-workflow-examples/serverless-workflow-order-processing/src/test/java/org/kie/kogito/examples/sw/orders/processing/Order.java b/serverless-workflow-examples/serverless-workflow-order-processing/src/test/java/org/kie/kogito/examples/sw/orders/processing/Order.java index 4ca2a33f05..2f69e27e9d 100644 --- a/serverless-workflow-examples/serverless-workflow-order-processing/src/test/java/org/kie/kogito/examples/sw/orders/processing/Order.java +++ b/serverless-workflow-examples/serverless-workflow-order-processing/src/test/java/org/kie/kogito/examples/sw/orders/processing/Order.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.examples.sw.orders.processing; diff --git a/serverless-workflow-examples/serverless-workflow-order-processing/src/test/java/org/kie/kogito/examples/sw/orders/processing/VerifyWorkflowExecutionIT.java b/serverless-workflow-examples/serverless-workflow-order-processing/src/test/java/org/kie/kogito/examples/sw/orders/processing/VerifyWorkflowExecutionIT.java index 5426850f65..85af1b21ed 100644 --- a/serverless-workflow-examples/serverless-workflow-order-processing/src/test/java/org/kie/kogito/examples/sw/orders/processing/VerifyWorkflowExecutionIT.java +++ b/serverless-workflow-examples/serverless-workflow-order-processing/src/test/java/org/kie/kogito/examples/sw/orders/processing/VerifyWorkflowExecutionIT.java @@ -1,23 +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.examples.sw.orders.processing; import java.util.UUID; -import javax.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MediaType; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; diff --git a/serverless-workflow-examples/serverless-workflow-order-processing/src/test/resources/application.properties b/serverless-workflow-examples/serverless-workflow-order-processing/src/test/resources/application.properties index d009f8fc76..5359088fd6 100644 --- a/serverless-workflow-examples/serverless-workflow-order-processing/src/test/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-order-processing/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.log.level=INFO mp.messaging.outgoing.kogito_outgoing_stream.url=http://0.0.0.0:8181 \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-parallel-execution/README.md b/serverless-workflow-examples/serverless-workflow-parallel-execution/README.md index cabec64eab..e0edd224ff 100644 --- a/serverless-workflow-examples/serverless-workflow-parallel-execution/README.md +++ b/serverless-workflow-examples/serverless-workflow-parallel-execution/README.md @@ -1,3 +1,3 @@ # serverless-workflow-parallel-execution -This project is the example application for the [https://github.com/kiegroup/kogito-docs/tree/main/serverlessworkflow/modules/ROOT/pages/core/working-with-parallelism.adoc](Working with parallelism) guide. \ No newline at end of file +This project is the example application for the [https://github.com/apache/incubator-kie-kogito-docs/tree/main/serverlessworkflow/modules/ROOT/pages/core/working-with-parallelism.adoc](Working with parallelism) guide. \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-parallel-execution/pom.xml b/serverless-workflow-examples/serverless-workflow-parallel-execution/pom.xml index f8d635e57d..02802b1f07 100644 --- a/serverless-workflow-examples/serverless-workflow-parallel-execution/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-parallel-execution/pom.xml @@ -1,9 +1,36 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-parallel-execution 1.0-SNAPSHOT @@ -12,15 +39,15 @@ Kogito Serverless Workflow Example - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 2.0.0-SNAPSHOT - 11 + 999-SNAPSHOT + 999-SNAPSHOT + 17 3.8.1 3.0.0-M7 ${version.surefire.plugin} @@ -46,8 +73,8 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-parallel-execution/src/main/resources/01-sonataflow_parallel.yaml b/serverless-workflow-examples/serverless-workflow-parallel-execution/src/main/resources/01-sonataflow_parallel.yaml index b5c5042c5e..0ba1d57fa8 100755 --- a/serverless-workflow-examples/serverless-workflow-parallel-execution/src/main/resources/01-sonataflow_parallel.yaml +++ b/serverless-workflow-examples/serverless-workflow-parallel-execution/src/main/resources/01-sonataflow_parallel.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. +# + apiVersion: sonataflow.org/v1alpha08 kind: SonataFlow metadata: diff --git a/serverless-workflow-examples/serverless-workflow-parallel-execution/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-parallel-execution/src/main/resources/application.properties index 4c6da73b47..e248eb1d7e 100644 --- a/serverless-workflow-examples/serverless-workflow-parallel-execution/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-parallel-execution/src/main/resources/application.properties @@ -1,9 +1,25 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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. +# + # profile to pack this example into a container, to use it execute activate the maven container profile, -Dcontainer %container.quarkus.container-image.build=true %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-parallel-execution/src/test/java/org/kie/kogito/examples/ParallelStateTest.java b/serverless-workflow-examples/serverless-workflow-parallel-execution/src/test/java/org/kie/kogito/examples/ParallelStateTest.java index 19fb55a4b5..bf64f05da5 100644 --- a/serverless-workflow-examples/serverless-workflow-parallel-execution/src/test/java/org/kie/kogito/examples/ParallelStateTest.java +++ b/serverless-workflow-examples/serverless-workflow-parallel-execution/src/test/java/org/kie/kogito/examples/ParallelStateTest.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-python-quarkus/README.md b/serverless-workflow-examples/serverless-workflow-python-quarkus/README.md index 21de2466b1..9721186d96 100644 --- a/serverless-workflow-examples/serverless-workflow-python-quarkus/README.md +++ b/serverless-workflow-examples/serverless-workflow-python-quarkus/README.md @@ -9,7 +9,7 @@ This example contains a simple workflow definition that executes numpy generator ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - Maven 3.8.6+ installed - Python3 installed diff --git a/serverless-workflow-examples/serverless-workflow-python-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-python-quarkus/pom.xml index 850e11d5b8..41b1342f0b 100644 --- a/serverless-workflow-examples/serverless-workflow-python-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-python-quarkus/pom.xml @@ -1,8 +1,35 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-python-quarkus 1.0-SNAPSHOT @@ -10,14 +37,14 @@ Kogito Example :: Serverless Workflow Python :: Quarkus Kogito Serverless Workflow Python Example - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 11 + 999-SNAPSHOT + 17 1.6.0 3.8.1 3.0.0-M7 @@ -44,12 +71,12 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus - org.kie.kogito - kogito-addons-quarkus-serverless-workflow-python + org.apache.kie.sonataflow + sonataflow-addons-quarkus-python io.quarkus @@ -60,12 +87,8 @@ quarkus-resteasy-jackson - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files io.quarkus @@ -154,7 +177,7 @@ pip install - jep + jep==4.2.0 diff --git a/serverless-workflow-examples/serverless-workflow-python-quarkus/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-python-quarkus/src/main/resources/application.properties index 3fd3d02ed9..afc1def064 100644 --- a/serverless-workflow-examples/serverless-workflow-python-quarkus/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-python-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. +# + # Packaging # quarkus.package.type=fast-jar quarkus.native.native-image-xmx=8g diff --git a/serverless-workflow-examples/serverless-workflow-python-quarkus/src/test/java/org/kie/kogito/examples/PythonRestIT.java b/serverless-workflow-examples/serverless-workflow-python-quarkus/src/test/java/org/kie/kogito/examples/PythonRestIT.java index 74897b88c8..7f428fe5b5 100644 --- a/serverless-workflow-examples/serverless-workflow-python-quarkus/src/test/java/org/kie/kogito/examples/PythonRestIT.java +++ b/serverless-workflow-examples/serverless-workflow-python-quarkus/src/test/java/org/kie/kogito/examples/PythonRestIT.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/docker-compose/kafka/docker-compose.yml b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/docker-compose/kafka/docker-compose.yml index 331d97819c..ee58bdd287 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/docker-compose/kafka/docker-compose.yml +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/docker-compose/kafka/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/serverless-workflow-examples/serverless-workflow-qas-service-showcase/docker-compose/knative/docker-compose.yml b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/docker-compose/knative/docker-compose.yml index 06ea7c36f3..0a17b05d0e 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/docker-compose/knative/docker-compose.yml +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/docker-compose/knative/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/serverless-workflow-examples/serverless-workflow-qas-service-showcase/pom.xml b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/pom.xml index 1849476fe9..fc5aa023a7 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/pom.xml @@ -1,8 +1,35 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-qas-service-showcase 1.0-SNAPSHOT @@ -20,7 +47,7 @@ 5.1.3 3.6.0 3.8.1 - 11 + 17 ${version.surefire.plugin} diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/README.md b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/README.md index a16984631f..4649f393b8 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/README.md +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/README.md @@ -50,9 +50,9 @@ In this way, a container for PostgreSQL will be started on port 5432. ### Prerequisites You will need: -- Java 11+ installed +- Java 17+ installed - Environment variable JAVA_HOME set accordingly -- Maven 3.8.6+ installed +- Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVm](https://www.graalvm.org/downloads/) 19.3.1+ installed diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/pom.xml b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/pom.xml index 1ec7e76292..8e7d174f89 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/pom.xml @@ -1,4 +1,24 @@ + 4.0.0 @@ -11,13 +31,13 @@ query-answer-service Kogito Example :: Serverless Workflow Query and Answer :: Workflow Service - 2.16.10.Final + 3.8.4 io.quarkus quarkus-bom - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 2.33.2 @@ -54,21 +74,17 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow - - - org.kie.kogito - kogito-quarkus-serverless-workflow-devui + org.apache.kie.sonataflow + sonataflow-quarkus - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files - org.kie.kogito - kogito-addons-quarkus-messaging + org.kie + kie-addons-quarkus-messaging @@ -179,8 +195,8 @@ - org.kie.kogito - kogito-addons-quarkus-persistence-jdbc + org.kie + kie-addons-quarkus-persistence-jdbc io.quarkus @@ -235,12 +251,12 @@ quarkus-container-image-jib - org.kie.kogito - kogito-addons-quarkus-persistence-postgresql + org.kie + kie-addons-quarkus-persistence-postgresql - org.kie.kogito - kogito-addons-quarkus-knative-eventing + org.kie + kie-addons-quarkus-knative-eventing diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/InMemoryQueryRecordRepository.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/InMemoryQueryRecordRepository.java index 004aa222cb..ed0cd4b7d2 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/InMemoryQueryRecordRepository.java +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/InMemoryQueryRecordRepository.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.acme; import java.util.ArrayList; @@ -21,9 +23,8 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.PostConstruct; -import javax.enterprise.context.ApplicationScoped; - +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.annotation.PostConstruct; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/PostgreSqlQueryRecordRepository.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/PostgreSqlQueryRecordRepository.java index a94484142a..d534e149c7 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/PostgreSqlQueryRecordRepository.java +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/PostgreSqlQueryRecordRepository.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.acme; import java.sql.Connection; @@ -26,11 +28,10 @@ import java.util.ArrayList; import java.util.List; -import javax.annotation.PostConstruct; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; import javax.sql.DataSource; - +import jakarta.annotation.PostConstruct; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryAnswerServiceException.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryAnswerServiceException.java index fa5ff1b784..a489494016 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryAnswerServiceException.java +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryAnswerServiceException.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.acme; public class QueryAnswerServiceException extends RuntimeException { diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryAnswerServiceHelper.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryAnswerServiceHelper.java index 054805d2a6..708164fe7c 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryAnswerServiceHelper.java +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryAnswerServiceHelper.java @@ -1,25 +1,27 @@ /* - * 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; import java.time.ZonedDateTime; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; import org.kie.kogito.internal.process.runtime.KogitoProcessContext; import org.slf4j.Logger; diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryAnswerServiceResource.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryAnswerServiceResource.java index 51c4ec7f6f..1d53d2fb5c 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryAnswerServiceResource.java +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryAnswerServiceResource.java @@ -1,27 +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.acme; import java.util.List; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.GET; -import javax.ws.rs.Path; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; @Path("/queries") @ApplicationScoped diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryRecord.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryRecord.java index fcd4e7216a..ff18ab7051 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryRecord.java +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryRecord.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.acme; import java.time.ZonedDateTime; diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryRecordRepository.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryRecordRepository.java index e36c37db78..d878a05f4d 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryRecordRepository.java +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/java/org/acme/QueryRecordRepository.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.acme; import java.util.List; diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/kubernetes/knative.yml b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/kubernetes/knative.yml index f7a9bf02ff..149849095b 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/kubernetes/knative.yml +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/kubernetes/knative.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. +# + # deployment for postgres database apiVersion: v1 data: diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/resources/META-INF/resources/index.html b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/resources/META-INF/resources/index.html index 0f25ae950c..d4825047c7 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/resources/META-INF/resources/index.html +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/resources/META-INF/resources/index.html @@ -1,19 +1,23 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this 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/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/resources/application-kafka.properties b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/resources/application-kafka.properties index 17b3f05bf6..a9e5e162a8 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/resources/application-kafka.properties +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/resources/application-kafka.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. +# + %prod.kafka.bootstrap.servers=localhost:9092 mp.messaging.incoming.query_response_events.connector=smallrye-kafka mp.messaging.incoming.query_response_events.topic=query_response_events diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/resources/application-knative.properties b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/resources/application-knative.properties index 9c95897790..8ffd4e9069 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/resources/application-knative.properties +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/resources/application-knative.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".level=DEBUG # Build the application with the persistence profile to use a PostgreSQL database. diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/resources/application-persistence.properties b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/resources/application-persistence.properties index 83b64e2225..54f49a9f6e 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/resources/application-persistence.properties +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/resources/application-persistence.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. +# + %prod.kafka.bootstrap.servers=localhost:9092 mp.messaging.incoming.query_response_events.connector=smallrye-kafka mp.messaging.incoming.query_response_events.topic=query_response_events diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/resources/application.properties index fce8ee32f0..e26b8d9519 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-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. +# + quarkus.log.category."org.acme".level=DEBUG # OpenApi client properties to access the query-service quarkus.rest-client.query_service_yaml.url=${QUERYSERVICE_URL:http://localhost:8283} @@ -12,6 +31,3 @@ quarkus.http.test-port=0 %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local %container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/resources/specs/query-service.yaml b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/resources/specs/query-service.yaml index 9b34211eaf..598adf8b10 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/resources/specs/query-service.yaml +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/main/resources/specs/query-service.yaml @@ -1,8 +1,27 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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. +# + --- openapi: 3.0.3 info: title: query-service API - version: 2.0.0-SNAPSHOT + version: 999-SNAPSHOT paths: /query-service/sendQuery: post: diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/test/java/org/acme/it/QueryAnswerServiceIT.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/test/java/org/acme/it/QueryAnswerServiceIT.java index 8a964727b7..91a9e978b0 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/test/java/org/acme/it/QueryAnswerServiceIT.java +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/test/java/org/acme/it/QueryAnswerServiceIT.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.acme.it; import java.net.URI; diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/test/java/org/acme/it/WireMockQueryServiceResource.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/test/java/org/acme/it/WireMockQueryServiceResource.java index 9de564150d..a6c80dce23 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/test/java/org/acme/it/WireMockQueryServiceResource.java +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-answer-service/src/test/java/org/acme/it/WireMockQueryServiceResource.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.acme.it; import java.util.HashMap; @@ -27,8 +29,8 @@ import static com.github.tomakehurst.wiremock.client.WireMock.configureFor; import static com.github.tomakehurst.wiremock.client.WireMock.post; import static com.github.tomakehurst.wiremock.client.WireMock.stubFor; -import static javax.ws.rs.core.HttpHeaders.CONTENT_TYPE; -import static javax.ws.rs.core.MediaType.APPLICATION_JSON; +import static jakarta.ws.rs.core.HttpHeaders.CONTENT_TYPE; +import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON; public class WireMockQueryServiceResource implements QuarkusTestResourceLifecycleManager { diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/pom.xml b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/pom.xml index 322691ea6c..3e74e0566d 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/pom.xml @@ -1,4 +1,24 @@ + 4.0.0 @@ -11,14 +31,14 @@ query-service Kogito Example :: Serverless Workflow Query and Answer :: Query Service - 2.16.10.Final + 3.8.4 io.quarkus quarkus-bom - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 1.0.1 + 999-SNAPSHOT + 2.0.2 2.3.0 diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/CloudEventsCustomizer.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/CloudEventsCustomizer.java index 84561dc71f..b161f0d909 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/CloudEventsCustomizer.java +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/CloudEventsCustomizer.java @@ -1,22 +1,24 @@ /* - * 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; -import javax.inject.Singleton; +import jakarta.inject.Singleton; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/InMemoryQueryRequestRepository.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/InMemoryQueryRequestRepository.java index c3c6e0708a..d8db70f3cc 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/InMemoryQueryRequestRepository.java +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/InMemoryQueryRequestRepository.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.acme; import java.util.ArrayList; @@ -21,9 +23,9 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import javax.annotation.PostConstruct; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.annotation.PostConstruct; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/PostgreSqlQueryRequestRepository.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/PostgreSqlQueryRequestRepository.java index 2614c44186..3e2541e968 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/PostgreSqlQueryRequestRepository.java +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/PostgreSqlQueryRequestRepository.java @@ -1,29 +1,30 @@ /* - * 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; import java.util.List; import java.util.stream.Stream; import java.util.stream.StreamSupport; -import javax.annotation.PostConstruct; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; - +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.annotation.PostConstruct; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/QueryRequest.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/QueryRequest.java index 8536a725c2..f0e8032379 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/QueryRequest.java +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/QueryRequest.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.acme; public class QueryRequest { diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/QueryRequestRepository.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/QueryRequestRepository.java index b925d18a93..2e8905a317 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/QueryRequestRepository.java +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/QueryRequestRepository.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.acme; import java.util.List; diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/QueryServiceException.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/QueryServiceException.java index 602e8f3ee9..fc73929fc2 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/QueryServiceException.java +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/QueryServiceException.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.acme; public class QueryServiceException extends RuntimeException { diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/QueryServiceResource.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/QueryServiceResource.java index b9cd6ca68f..9fa7a40567 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/QueryServiceResource.java +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/QueryServiceResource.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.acme; import java.net.URI; @@ -21,15 +23,15 @@ import java.util.List; import java.util.UUID; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.eclipse.microprofile.reactive.messaging.Channel; import org.eclipse.microprofile.reactive.messaging.Emitter; diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/ResolveRequest.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/ResolveRequest.java index 9f26196ad7..780c118ff2 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/ResolveRequest.java +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/java/org/acme/ResolveRequest.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.acme; public class ResolveRequest { diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/kubernetes/knative.yml b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/kubernetes/knative.yml index f4985fe42f..a2ed188f04 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/kubernetes/knative.yml +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/kubernetes/knative.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. +# + apiVersion: sources.knative.dev/v1 kind: SinkBinding metadata: diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/resources/META-INF/resources/index.html b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/resources/META-INF/resources/index.html index a1cc264027..5059ed8886 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/resources/META-INF/resources/index.html +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/resources/META-INF/resources/index.html @@ -1,19 +1,23 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this 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/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/resources/application-kafka.properties b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/resources/application-kafka.properties index 6eb955f0e4..70302a512b 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/resources/application-kafka.properties +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/resources/application-kafka.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 configuration for sending the events to the query-answer-service %prod.kafka.bootstrap.servers=localhost:9092 mp.messaging.outgoing.response_events.connector=smallrye-kafka diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/resources/application-knative.properties b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/resources/application-knative.properties index 8fd1394c77..169c62f855 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/resources/application-knative.properties +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/resources/application-knative.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. +# + # knative configuration for sending the events to the query-answer-service mp.messaging.outgoing.response_events.connector=quarkus-http mp.messaging.outgoing.response_events.url=${K_SINK:http://localhost:8181} diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/resources/application-persistence.properties b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/resources/application-persistence.properties index 2d9a981c85..8100e59e0e 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/resources/application-persistence.properties +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/resources/application-persistence.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 configuration for sending the events to the query-answer-service kafka.bootstrap.servers=localhost:9092 mp.messaging.outgoing.response_events.connector=smallrye-kafka diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/resources/application.properties index 2e6fc0f263..de02d67ac5 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-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. +# + quarkus.log.category."org.acme".level=DEBUG quarkus.http.port=8283 @@ -10,6 +29,3 @@ quarkus.swagger-ui.always-include=true %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local %container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin diff --git a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/test/java/org/acme/it/QueryServiceResourceIT.java b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/test/java/org/acme/it/QueryServiceResourceIT.java index 7710ab2b12..8590bf6785 100644 --- a/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/test/java/org/acme/it/QueryServiceResourceIT.java +++ b/serverless-workflow-examples/serverless-workflow-qas-service-showcase/query-service/src/test/java/org/acme/it/QueryServiceResourceIT.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.acme.it; import java.util.List; diff --git a/serverless-workflow-examples/serverless-workflow-saga-quarkus/README.md b/serverless-workflow-examples/serverless-workflow-saga-quarkus/README.md index 967b0415a9..404477ee45 100644 --- a/serverless-workflow-examples/serverless-workflow-saga-quarkus/README.md +++ b/serverless-workflow-examples/serverless-workflow-saga-quarkus/README.md @@ -32,9 +32,9 @@ This is the Serverless Workflow that represents the Order Saga. ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVM 21.3.0+](https://github.com/oracle/graal/releases/tag/vm-21.3.0) @@ -191,9 +191,3 @@ In the console executing the application, you can check the log with the execute 2021-12-21 09:20:45,968 INFO [org.kie.kog.exa.StockService] (executor-thread-0) Cancel Stock 8cc0144b-87e0-47ed-8d8f-eedbe4b69abe 2021-12-21 09:20:45,970 INFO [org.kie.kog.exa.OrderService] (executor-thread-0) Order Failed 03e6cf79-3301-434b-b5e1-d6899b5639aa ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). - -See also: [SAGA PATTERN WITH PROCESSES AND KOGITO – PART 1](https://blog.kie.org/2021/11/saga-pattern-with-processes-and-kogito-part-1.html) diff --git a/serverless-workflow-examples/serverless-workflow-saga-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-saga-quarkus/pom.xml index ddc08d91b4..4457c701c4 100644 --- a/serverless-workflow-examples/serverless-workflow-saga-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-saga-quarkus/pom.xml @@ -1,7 +1,34 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples 1.0-SNAPSHOT serverless-workflow-saga-quarkus @@ -10,15 +37,15 @@ How to implement Saga with a Serverless Workflow - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.8.1 - 11 + 17 3.22.0 3.0.0-M7 ${version.surefire.plugin} @@ -45,20 +72,16 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus io.quarkus quarkus-resteasy-jackson - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files diff --git a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/MockService.java b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/MockService.java index db3c576e3c..448ffd0175 100644 --- a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/MockService.java +++ b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/MockService.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.examples; @@ -19,7 +22,7 @@ import java.util.Optional; import java.util.UUID; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/OrderService.java b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/OrderService.java index 111555e29d..055c1d9c50 100644 --- a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/OrderService.java +++ b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/OrderService.java @@ -1,21 +1,24 @@ /* - * 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.examples; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/PaymentService.java b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/PaymentService.java index 350341fa01..478828eb42 100644 --- a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/PaymentService.java +++ b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/PaymentService.java @@ -1,22 +1,25 @@ /* - * 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.examples; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/Response.java b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/Response.java index 618d78e21b..bee6ff1493 100644 --- a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/Response.java +++ b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/Response.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/ServiceException.java b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/ServiceException.java index 908552aa21..e20f61055d 100644 --- a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/ServiceException.java +++ b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/ServiceException.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/ShippingService.java b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/ShippingService.java index d8c06baa84..599256315d 100644 --- a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/ShippingService.java +++ b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/ShippingService.java @@ -1,22 +1,25 @@ /* - * 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.examples; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/StockService.java b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/StockService.java index eb3f3d82c7..e798f64ff8 100644 --- a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/StockService.java +++ b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/java/org/kie/kogito/examples/StockService.java @@ -1,22 +1,25 @@ /* - * 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.examples; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/resources/application.properties index 4c6da73b47..e248eb1d7e 100644 --- a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/main/resources/application.properties @@ -1,9 +1,25 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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. +# + # profile to pack this example into a container, to use it execute activate the maven container profile, -Dcontainer %container.quarkus.container-image.build=true %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/test/java/org/kie/kogito/examples/OrderSagaWorkflowIT.java b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/test/java/org/kie/kogito/examples/OrderSagaWorkflowIT.java index 78ae825c93..2fe543d9a8 100644 --- a/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/test/java/org/kie/kogito/examples/OrderSagaWorkflowIT.java +++ b/serverless-workflow-examples/serverless-workflow-saga-quarkus/src/test/java/org/kie/kogito/examples/OrderSagaWorkflowIT.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/README.md b/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/README.md index f483420a97..474fafd955 100644 --- a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/README.md +++ b/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/README.md @@ -20,9 +20,9 @@ service to store the data before it finishes execution. ### Prerequisites You will need: - - Java 11+ installed + - Java 17+ installed - Environment variable JAVA_HOME set accordingly - - Maven 3.8.6+ installed + - Maven 3.9.6+ installed When using native image compilation, you will also need: - [GraalVm](https://www.graalvm.org/downloads/) 19.3.1+ installed diff --git a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/operator/serverless-workflow-service-calls-quarkus.yaml b/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/operator/serverless-workflow-service-calls-quarkus.yaml deleted file mode 100644 index ec8900ae59..0000000000 --- a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/operator/serverless-workflow-service-calls-quarkus.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoBuild -metadata: - name: serverless-workflow-service-calls-quarkus -spec: - type: RemoteSource - #env: - # env can be used to set variables during build - #- name: MY_CUSTOM_ENV - # value: "my value" - gitSource: - contextDir: kogito-quarkus-examples/serverless-workflow-service-calls-quarkus - uri: 'https://github.com/kiegroup/kogito-examples' - # set your maven nexus repository to speed up the build time - #mavenMirrorURL: ---- -apiVersion: app.kiegroup.org/v1beta1 -kind: KogitoRuntime -metadata: - name: serverless-workflow-service-calls-quarkus \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/pom.xml index d15fe8e640..da3836633a 100644 --- a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/pom.xml @@ -1,8 +1,35 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-service-calls-quarkus 1.0-SNAPSHOT @@ -10,15 +37,15 @@ Kogito Example :: Serverless Workflow Service Calls :: Quarkus Kogito Serverless Workflow Example - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.8.1 - 11 + 17 3.0.0-M7 2.33.2 @@ -43,8 +70,8 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus io.quarkus @@ -63,12 +90,8 @@ quarkus-smallrye-health - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/main/java/org/kogito/serverless/examples/CountriesClassifierResource.java b/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/main/java/org/kogito/serverless/examples/CountriesClassifierResource.java index 3917c23b4b..3c4b2766a0 100644 --- a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/main/java/org/kogito/serverless/examples/CountriesClassifierResource.java +++ b/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/main/java/org/kogito/serverless/examples/CountriesClassifierResource.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.kogito.serverless.examples; @@ -19,11 +22,11 @@ import java.util.LinkedHashMap; import java.util.Set; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import org.jboss.logging.Logger; diff --git a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/main/java/org/kogito/serverless/examples/Country.java b/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/main/java/org/kogito/serverless/examples/Country.java index 9266a5ffb6..a2ffe2cda0 100644 --- a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/main/java/org/kogito/serverless/examples/Country.java +++ b/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/main/java/org/kogito/serverless/examples/Country.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.kogito.serverless.examples; diff --git a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/main/resources/META-INF/resources/index.html b/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/main/resources/META-INF/resources/index.html index 578e27c420..331f1ce323 100644 --- a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/main/resources/META-INF/resources/index.html +++ b/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/main/resources/META-INF/resources/index.html @@ -1,3 +1,23 @@ + diff --git a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/main/resources/application.properties index 5db9a0b5e1..835a80df6b 100644 --- a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-service-calls-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. +# + # Packaging # quarkus.package.type=fast-jar quarkus.native.native-image-xmx=8g @@ -7,7 +26,4 @@ quarkus.native.native-image-xmx=8g %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/test/java/org/kogito/serverless/examples/CountryServiceWorkflowTest.java b/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/test/java/org/kogito/serverless/examples/CountryServiceWorkflowTest.java index f49df157ed..65bcaa562d 100644 --- a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/test/java/org/kogito/serverless/examples/CountryServiceWorkflowTest.java +++ b/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/test/java/org/kogito/serverless/examples/CountryServiceWorkflowTest.java @@ -1,25 +1,28 @@ /* - * 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.kogito.serverless.examples; import java.util.HashMap; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.inject.Inject; +import jakarta.inject.Named; import org.junit.jupiter.api.Test; import org.kie.kogito.Model; diff --git a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/test/java/org/kogito/serverless/examples/RestCountriesMockServer.java b/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/test/java/org/kogito/serverless/examples/RestCountriesMockServer.java index 49632b85f3..ec2c6f40b8 100644 --- a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/test/java/org/kogito/serverless/examples/RestCountriesMockServer.java +++ b/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/test/java/org/kogito/serverless/examples/RestCountriesMockServer.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.kogito.serverless.examples; diff --git a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/test/resources/application.properties b/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/test/resources/application.properties index 4308172a3d..0f6880fb66 100644 --- a/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/test/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-service-calls-quarkus/src/test/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. +# + # Quarkus quarkus.http.test-port=0 diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/README.md b/serverless-workflow-examples/serverless-workflow-stock-profit/README.md index 310c0e7356..3dcddc187b 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/README.md +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/README.md @@ -1 +1 @@ -Serverless Workflow guide: https://github.com/kiegroup/kogito-docs/blob/main/serverlessworkflow/modules/ROOT/pages/service-orchestration/configuring-openapi-services-endpoints.adoc \ No newline at end of file +Serverless Workflow guide: https://github.com/apache/incubator-kie-kogito-docs/blob/main/serverlessworkflow/modules/ROOT/pages/service-orchestration/configuring-openapi-services-endpoints.adoc \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/pom.xml b/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/pom.xml index 5db27a8abc..4d32cc7c1e 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/pom.xml @@ -1,4 +1,24 @@ + 4.0.0 diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/src/main/docker/Dockerfile.jvm b/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/src/main/docker/Dockerfile.jvm index 93dd02d618..cd45ab0d97 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/src/main/docker/Dockerfile.jvm +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/src/main/docker/Dockerfile.jvm @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/src/main/docker/Dockerfile.legacy-jar b/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/src/main/docker/Dockerfile.legacy-jar index 87393e85ab..41d1621f24 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/src/main/docker/Dockerfile.legacy-jar +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/src/main/docker/Dockerfile.legacy-jar @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/src/main/java/org/acme/FakeStockPriceResource.java b/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/src/main/java/org/acme/FakeStockPriceResource.java index 3364142723..7d04e7efd4 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/src/main/java/org/acme/FakeStockPriceResource.java +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/src/main/java/org/acme/FakeStockPriceResource.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.acme; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; import java.math.BigDecimal; import java.util.Map; diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/src/main/java/org/acme/Stock.java b/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/src/main/java/org/acme/Stock.java index bb1a9d8712..8ccb72f9c0 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/src/main/java/org/acme/Stock.java +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/src/main/java/org/acme/Stock.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.acme; diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/src/main/resources/application.properties index 218defab34..98dfa696af 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-service/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/fake-stock-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. +# + quarkus.http.port=8181 # profile to pack this example into a container, to use it execute activate the maven container profile, -Dcontainer @@ -5,7 +24,4 @@ quarkus.http.port=8181 %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/pom.xml b/serverless-workflow-examples/serverless-workflow-stock-profit/pom.xml index 730e56f86c..468809cb4d 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/pom.xml @@ -1,7 +1,35 @@ + 4.0.0 + + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-stock-profit 1.0-SNAPSHOT @@ -14,18 +42,18 @@ fake-stock-service - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.8.1 - 11 + 17 3.0.0-M7 ${version.surefire.plugin} - 2.33.2 + 3.0.0-beta-8 diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/pom.xml b/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/pom.xml index 506e535cb4..60456b8953 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/pom.xml @@ -1,4 +1,24 @@ + 4.0.0 diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/docker/Dockerfile.jvm b/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/docker/Dockerfile.jvm index 93dd02d618..cd45ab0d97 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/docker/Dockerfile.jvm +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/docker/Dockerfile.jvm @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/docker/Dockerfile.legacy-jar b/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/docker/Dockerfile.legacy-jar index 87393e85ab..41d1621f24 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/docker/Dockerfile.legacy-jar +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/docker/Dockerfile.legacy-jar @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/java/org/acme/RealStockPriceResource.java b/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/java/org/acme/RealStockPriceResource.java index 219f20cd6e..0b782a18cf 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/java/org/acme/RealStockPriceResource.java +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/java/org/acme/RealStockPriceResource.java @@ -1,25 +1,28 @@ /* - * 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.acme; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import java.math.BigDecimal; import java.math.RoundingMode; import java.security.SecureRandom; diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/java/org/acme/Stock.java b/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/java/org/acme/Stock.java index bb1a9d8712..8ccb72f9c0 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/java/org/acme/Stock.java +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/java/org/acme/Stock.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.acme; diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/resources/application.properties index 7d4fb10fa3..fc350f01e5 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-service/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/real-stock-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. +# + quarkus.http.port=8383 # profile to pack this example into a container, to use it execute activate the maven container profile, -Dcontainer @@ -5,7 +24,4 @@ quarkus.http.port=8383 %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/pom.xml b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/pom.xml index 035a4a3e82..7b378580f2 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/pom.xml @@ -1,4 +1,24 @@ + 4.0.0 diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/main/docker/Dockerfile.jvm b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/main/docker/Dockerfile.jvm index 93dd02d618..cd45ab0d97 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/main/docker/Dockerfile.jvm +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/main/docker/Dockerfile.jvm @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/main/docker/Dockerfile.legacy-jar b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/main/docker/Dockerfile.legacy-jar index 87393e85ab..41d1621f24 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/main/docker/Dockerfile.legacy-jar +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/main/docker/Dockerfile.legacy-jar @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/main/java/org/acme/ProfitResource.java b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/main/java/org/acme/ProfitResource.java index 28f7461ba4..c6ea2b292a 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/main/java/org/acme/ProfitResource.java +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/main/java/org/acme/ProfitResource.java @@ -1,24 +1,27 @@ /* - * 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.acme; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.QueryParam; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.QueryParam; import java.math.BigDecimal; import java.math.RoundingMode; import java.text.NumberFormat; diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/main/java/org/acme/StockProfit.java b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/main/java/org/acme/StockProfit.java index bbfd981839..3c7855e17c 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/main/java/org/acme/StockProfit.java +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/main/java/org/acme/StockProfit.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.acme; diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/main/resources/application.properties index eba1c257b5..2b3e37e96e 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-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. +# + quarkus.http.port=8282 # profile to pack this example into a container, to use it execute activate the maven container profile, -Dcontainer @@ -5,7 +24,4 @@ quarkus.http.port=8282 %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/test/java/org/acme/ProfitResourceTest.java b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/test/java/org/acme/ProfitResourceTest.java index 4c124781d3..b805e52496 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/test/java/org/acme/ProfitResourceTest.java +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-portfolio-service/src/test/java/org/acme/ProfitResourceTest.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.acme; diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/pom.xml b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/pom.xml index 809f6c6527..cc06b8d0ed 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/pom.xml @@ -1,4 +1,24 @@ + 4.0.0 @@ -11,8 +31,8 @@ Kogito Example :: Serverless Workflow Stock Profit :: Quarkus - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus io.quarkus @@ -42,7 +62,7 @@ com.github.tomakehurst - wiremock-jre8 + wiremock ${version.com.github.tomakehurst.wiremock} test diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/main/docker/Dockerfile.jvm b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/main/docker/Dockerfile.jvm index afc63a04c0..bf21486a69 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/main/docker/Dockerfile.jvm +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/main/docker/Dockerfile.jvm @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/main/docker/Dockerfile.legacy-jar b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/main/docker/Dockerfile.legacy-jar index 2b592069c0..b189bdf3f0 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/main/docker/Dockerfile.legacy-jar +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/main/docker/Dockerfile.legacy-jar @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/main/resources/application.properties index 9399347f69..b944624580 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/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.rest-client.stock_svc_yaml.url=http://localhost:8383/ %dev.quarkus.rest-client.stock_svc_yaml.url=http://localhost:8181/ @@ -8,7 +27,4 @@ quarkus.rest-client.stock_portfolio_svc_yaml.url=http://localhost:8282/ %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/main/resources/openapi/stock-portfolio-svc.yaml b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/main/resources/openapi/stock-portfolio-svc.yaml index 96b192077d..5b30bd037c 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/main/resources/openapi/stock-portfolio-svc.yaml +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/main/resources/openapi/stock-portfolio-svc.yaml @@ -1,8 +1,27 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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. +# + --- openapi: 3.0.3 info: title: stock-portfolio-service API - version: 2.0.0-SNAPSHOT + version: 999-SNAPSHOT paths: /profit/{symbol}: get: diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/main/resources/openapi/stock-svc.yaml b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/main/resources/openapi/stock-svc.yaml index 097d0ef71e..3a02ee053d 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/main/resources/openapi/stock-svc.yaml +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/main/resources/openapi/stock-svc.yaml @@ -1,8 +1,27 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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. +# + --- openapi: 3.0.3 info: title: stock-service API - version: 2.0.0-SNAPSHOT + version: 999-SNAPSHOT paths: /stock-price/{symbol}: get: diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/main/resources/stockprofit.sw.json b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/main/resources/stockprofit.sw.json index e686575402..380d0006e5 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/main/resources/stockprofit.sw.json +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/main/resources/stockprofit.sw.json @@ -1,7 +1,7 @@ { "id": "stockprofit", "specVersion": "0.8", - "version": "2.0.0-SNAPSHOT", + "version": "999-SNAPSHOT", "name": "Stock profit Workflow", "start": "GetStockPrice", "functions": [ diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/test/java/org/acme/MockServices.java b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/test/java/org/acme/MockServices.java index 6fed69ebe0..f89bb94fd3 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/test/java/org/acme/MockServices.java +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/test/java/org/acme/MockServices.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.acme; diff --git a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/test/java/org/acme/StockProfitIT.java b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/test/java/org/acme/StockProfitIT.java index d551eb455e..8cc76d9701 100644 --- a/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/test/java/org/acme/StockProfitIT.java +++ b/serverless-workflow-examples/serverless-workflow-stock-profit/stock-profit/src/test/java/org/acme/StockProfitIT.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.acme; diff --git a/serverless-workflow-examples/serverless-workflow-subflows-event/README.md b/serverless-workflow-examples/serverless-workflow-subflows-event/README.md new file mode 100644 index 0000000000..9737f73215 --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-subflows-event/README.md @@ -0,0 +1,86 @@ +# serverless-workflow-subflow-events + +This example illustrate how to trigger workflows manually with additional parameters calculated by an initial workflow. +The workflow responsible for setting up the parameters is executed as the start state. +Then, all possible workflows that might be instantiated with those parameters are registered using `event` state. `exclusive` property is set to false ensuring that the process instance remains active till all possible workflows has been executed. + +## Execution steps. + +Execute main workflow + +``` +curl --location 'http://localhost:8080/master' \ +--header 'Content-Type: application/json' \ +--data '{ +}' +``` + +This will return the id and the two properties that are configured by `setup` workflow + +``` +{ + "id": "ad7e1081-3f05-431e-b246-d9471643fec2", + "workflowdata": { + "param1": "This is param1", + "param2": "This is param2" + } +} +``` + +We need to write down the id returned by the previous steps and invoke `workflowA` through a cloud event containing that id as `kogitoprocrefid` attibute. + +``` +curl --location 'http://localhost:8080/executeA' \ +--header 'Content-Type: application/json' \ +--data '{ + "id" : "1", + "specversion" : "1.0", + "type" : "executeA", + "source" : "manual", + "data" : { + "param4" : "Additional parameter" + }, + "kogitoprocrefid" : "ad7e1081-3f05-431e-b246-d9471643fec2" +}' +``` + +The execution of `workflowA` is registered in the quarkus log. + +``` +2024-05-14 12:09:10,306 INFO [org.kie.kog.ser.wor.dev.DevModeServerlessWorkflowLogger] (kogito-event-executor-1) Triggered node 'Start' for process 'workflowA' (8321fbd0-64ee-4e95-91d6-957983a92325) +2024-05-14 12:09:10,306 INFO [org.kie.kog.ser.wor.dev.DevModeServerlessWorkflowLogger] (kogito-event-executor-1) Triggered node 'doIt' for process 'workflowA' (8321fbd0-64ee-4e95-91d6-957983a92325) +2024-05-14 12:09:10,307 INFO [org.kie.kog.ser.wor.dev.DevModeServerlessWorkflowLogger] (kogito-event-executor-1) Property 'workflowdata.param3' changed value from: 'null', to: '"This is workflow A"' +2024-05-14 12:09:10,307 INFO [org.kie.kog.ser.wor.dev.DevModeServerlessWorkflowLogger] (kogito-event-executor-1) Triggered node 'End' for process 'workflowA' (8321fbd0-64ee-4e95-91d6-957983a92325) +``` + +The main workflow is still active, waiting for execution of workflow B. Lets execute it sending another cloud event. + +``` +curl --location 'http://localhost:8080/executeB' \ +--header 'Content-Type: application/json' \ +--data '{ + "id": "1", + "specversion": "1.0", + "type": "executeB", + "source": "manual", + "data": { + "param4": "Additional parameter" + }, + "kogitoprocrefid": "ad7e1081-3f05-431e-b246-d9471643fec2" +}' +``` + +We see in quarkus logs that workflow B is executed and that master workflow is completed, since there are not more waiting events + +``` +2024-05-14 12:09:10,334 INFO [org.kie.kog.ser.wor.dev.DevModeServerlessWorkflowLogger] (kogito-event-executor-1) Triggered node 'Start' for process 'workflowB' (5a49f40d-2e54-46fb-8317-b0be12fd9f05) +2024-05-14 12:09:10,334 INFO [org.kie.kog.ser.wor.dev.DevModeServerlessWorkflowLogger] (kogito-event-executor-1) Triggered node 'doIt' for process 'workflowB' (5a49f40d-2e54-46fb-8317-b0be12fd9f05) +2024-05-14 12:09:10,335 INFO [org.kie.kog.ser.wor.dev.DevModeServerlessWorkflowLogger] (kogito-event-executor-1) Property 'workflowdata.param3' changed value from: 'null', to: '"This is workflow B"' +2024-05-14 12:09:10,335 INFO [org.kie.kog.ser.wor.dev.DevModeServerlessWorkflowLogger] (kogito-event-executor-1) Triggered node 'End' for process 'workflowB' (5a49f40d-2e54-46fb-8317-b0be12fd9f05) +2024-05-14 12:09:10,335 INFO [org.kie.kog.ser.wor.dev.DevModeServerlessWorkflowLogger] (kogito-event-executor-1) Workflow 'workflowB' (5a49f40d-2e54-46fb-8317-b0be12fd9f05) completed +2024-05-14 12:09:10,336 INFO [org.jbp.pro.cor.eve.EventTypeFilter] (kogito-event-executor-1) This event is subscribed to a message ref processInstanceCompleted:5a49f40d-2e54-46fb-8317-b0be12fd9f05 WorkflowProcessInstance [Id=5a49f40d-2e54-46fb-8317-b0be12fd9f05,processId=workflowB,state=2] +2024-05-14 12:09:10,336 INFO [org.jbp.pro.cor.eve.EventTypeFilter] (kogito-event-executor-1) This event is subscribed to a message ref processInstanceCompleted:5a49f40d-2e54-46fb-8317-b0be12fd9f05 WorkflowProcessInstance [Id=5a49f40d-2e54-46fb-8317-b0be12fd9f05,processId=workflowB,state=2] +2024-05-14 12:09:10,339 INFO [org.kie.kog.ser.wor.dev.DevModeServerlessWorkflowLogger] (kogito-event-executor-1) Triggered node 'waitForEventsJoin' for process 'master' (0ee42b37-7106-4157-9d75-00842f1fea45) +2024-05-14 12:09:10,339 INFO [org.kie.kog.ser.wor.dev.DevModeServerlessWorkflowLogger] (kogito-event-executor-1) Triggered node 'End' for process 'master' (0ee42b37-7106-4157-9d75-00842f1fea45) +2024-05-14 12:09:10,340 INFO [org.kie.kog.ser.wor.dev.DevModeServerlessWorkflowLogger] (kogito-event-executor-1) Triggered node 'End' for process 'master' (0ee42b37-7106-4157-9d75-00842f1fea45) +``` diff --git a/serverless-workflow-examples/serverless-workflow-subflows-event/pom.xml b/serverless-workflow-examples/serverless-workflow-subflows-event/pom.xml new file mode 100644 index 0000000000..a2a10a222c --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-subflows-event/pom.xml @@ -0,0 +1,192 @@ + + + + 4.0.0 + + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + + serverless-workflow-subflows-event + 1.0-SNAPSHOT + + Kogito Example :: Serverless Workflow Subflows Event :: Quarkus + Kogito Serverless Workflow Subflows Event - Quarkus + + + 3.8.4 + quarkus-bom + io.quarkus + 3.8.4 + org.kie.kogito + kogito-bom + 999-SNAPSHOT + 999-SNAPSHOT + 17 + 3.8.1 + 3.0.0-M7 + ${version.surefire.plugin} + + + + + + ${quarkus.platform.group-id} + ${quarkus.platform.artifact-id} + ${quarkus.platform.version} + pom + import + + + ${kogito.bom.group-id} + ${kogito.bom.artifact-id} + ${kogito.bom.version} + pom + import + + + + + + org.apache.kie.sonataflow + sonataflow-quarkus + + + io.quarkus + quarkus-resteasy-jackson + + + io.quarkus + quarkus-arc + + + io.quarkus + quarkus-resteasy + + + io.quarkus + quarkus-smallrye-openapi + + + io.quarkus + quarkus-junit5 + test + + + io.rest-assured + rest-assured + test + + + org.awaitility + awaitility + test + + + + ${project.artifactId} + + + maven-compiler-plugin + ${version.compiler.plugin} + + ${maven.compiler.release} + + + + ${quarkus.platform.group-id} + quarkus-maven-plugin + ${quarkus-plugin.version} + + + + build + + + + + + maven-surefire-plugin + ${version.surefire.plugin} + + + org.jboss.logmanager.LogManager + ${maven.home} + + + + + maven-failsafe-plugin + ${version.failsafe.plugin} + + + org.jboss.logmanager.LogManager + ${maven.home} + + + + + + integration-test + verify + + + + + + + + + container + + + container + + + + container + + + + io.quarkus + quarkus-container-image-jib + + + + + native + + + native + + + + native + + + + diff --git a/serverless-workflow-examples/serverless-workflow-subflows-event/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-subflows-event/src/main/resources/application.properties new file mode 100644 index 0000000000..cd71c3734d --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-subflows-event/src/main/resources/application.properties @@ -0,0 +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. + +mp.messaging.incoming.executeA.connector=quarkus-http +mp.messaging.incoming.executeA.path=/executeA + +mp.messaging.incoming.executeB.connector=quarkus-http +mp.messaging.incoming.executeB.path=/executeB + +# profile to pack this example into a container, to use it execute activate the maven container profile, -Dcontainer +%container.quarkus.container-image.build=true +%container.quarkus.container-image.push=false +%container.quarkus.container-image.group=${USER} +%container.quarkus.container-image.registry=dev.local +%container.quarkus.container-image.tag=1.0-SNAPSHOT + +quarkus.devservices.enabled=false diff --git a/serverless-workflow-examples/serverless-workflow-subflows-event/src/main/resources/master.sw.json b/serverless-workflow-examples/serverless-workflow-subflows-event/src/main/resources/master.sw.json new file mode 100644 index 0000000000..22a681ab5d --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-subflows-event/src/main/resources/master.sw.json @@ -0,0 +1,66 @@ +{ + "id": "master", + "version": "1.0", + "specVersion": "0.8", + "name": "master", + "start": "setup", + "events": [ + { + "name": "executeA", + "source": "", + "type": "executeA" + }, + { + "name": "executeB", + "source": "", + "type": "executeB" + } + ], + "states": [ + { + "name": "setup", + "type" : "operation", + "actions": [{ + "name": "setup", + "subFlowRef" : "setup" + }], + "transition": "waitForEvents" + }, + { + "name": "waitForEvents", + "type": "event", + "onEvents": [ + { + "eventRefs": [ + "executeA" + ], + "actions": [ + { + "name": "workflowA", + "subFlowRef": "workflowA", + "actionDataFilter" : { + "useResults": false + } + } + ] + }, + { + "eventRefs": [ + "executeB" + ], + "actions": [ + { + "name": "workflowB", + "subFlowRef": "workflowB", + "actionDataFilter" : { + "useResults": false + } + } + ] + } + ], + "exclusive": false, + "end" : true + } + ] +} \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-subflows-event/src/main/resources/setup.sw.json b/serverless-workflow-examples/serverless-workflow-subflows-event/src/main/resources/setup.sw.json new file mode 100644 index 0000000000..7659e1f1bd --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-subflows-event/src/main/resources/setup.sw.json @@ -0,0 +1,18 @@ +{ + "id": "setup", + "version": "1.0", + "specVersion": "0.8", + "name": "setup", + "start": "doIt", + "states": [ + { + "name": "doIt", + "type": "inject", + "data" : { + "param1": "This is param1", + "param2": "This is param2" + }, + "end": true + } + ] +} \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-subflows-event/src/main/resources/workflowA.sw.json b/serverless-workflow-examples/serverless-workflow-subflows-event/src/main/resources/workflowA.sw.json new file mode 100644 index 0000000000..4d626a9375 --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-subflows-event/src/main/resources/workflowA.sw.json @@ -0,0 +1,17 @@ +{ + "id": "workflowA", + "version": "1.0", + "specVersion": "0.8", + "name": "workflowB", + "start": "doIt", + "states": [ + { + "name": "doIt", + "type": "inject", + "data" : { + "param3": "This is workflow A" + }, + "end": true + } + ] +} \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-subflows-event/src/main/resources/workflowB.sw.json b/serverless-workflow-examples/serverless-workflow-subflows-event/src/main/resources/workflowB.sw.json new file mode 100644 index 0000000000..43f7c19df4 --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-subflows-event/src/main/resources/workflowB.sw.json @@ -0,0 +1,17 @@ +{ + "id": "workflowB", + "version": "1.0", + "specVersion": "0.8", + "name": "workflowB", + "start": "doIt", + "states": [ + { + "name": "doIt", + "type": "inject", + "data" : { + "param3": "This is workflow B" + }, + "end": true + } + ] +} \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-subflows-event/src/test/java/org/kie/kogito/examples/MasterWorkflowTest.java b/serverless-workflow-examples/serverless-workflow-subflows-event/src/test/java/org/kie/kogito/examples/MasterWorkflowTest.java new file mode 100644 index 0000000000..cdbd05335d --- /dev/null +++ b/serverless-workflow-examples/serverless-workflow-subflows-event/src/test/java/org/kie/kogito/examples/MasterWorkflowTest.java @@ -0,0 +1,99 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.examples; + +import static io.restassured.RestAssured.given; +import static java.util.concurrent.TimeUnit.SECONDS; +import static org.awaitility.Awaitility.await; + +import java.io.IOException; +import java.net.URI; +import java.time.Duration; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.Optional; +import java.util.UUID; + +import org.junit.jupiter.api.Test; +import org.kie.kogito.event.CloudEventMarshaller; +import org.kie.kogito.event.cloudevents.CloudEventExtensionConstants; +import org.kie.kogito.event.impl.StringCloudEventMarshaller; +import org.kie.kogito.jackson.utils.ObjectMapperFactory; + +import io.cloudevents.CloudEvent; +import io.cloudevents.core.builder.CloudEventBuilder; +import io.quarkus.test.junit.QuarkusTest; +import io.restassured.http.ContentType; + + +@QuarkusTest +class MasterWorkflowTest { + private static final CloudEventMarshaller marshaller = new StringCloudEventMarshaller(ObjectMapperFactory.get()); + + @Test + void testPartialParallelRest() throws IOException { + String id = given() + .contentType(ContentType.JSON) + .accept(ContentType.JSON) + .body("{}").when() + .post("/master") + .then() + .statusCode(201).extract().path("id"); + sendEvent (id, "executeA"); + sendEvent (id, "executeB"); + waitForFinish("master", id, Duration.ofSeconds(10)); + } + + static void waitForFinish(String flowName, String id, Duration duration) { + await("dead").atMost(duration) + .with().pollInterval(1, SECONDS) + .untilAsserted(() -> given() + .contentType(ContentType.JSON) + .accept(ContentType.JSON) + .get("/" + flowName + "/{id}", id) + .then() + .statusCode(404)); + } + + private void sendEvent(String id, String eventType) throws IOException { + given() + .contentType(ContentType.JSON) + .when() + .body(marshaller.marshall(buildCloudEvent(id, eventType, marshaller))) + .post("/" + eventType) + .then() + .statusCode(202); + } + + static CloudEvent buildCloudEvent(String id, Optional businessKey, String type, CloudEventMarshaller marshaller) { + io.cloudevents.core.v1.CloudEventBuilder builder = CloudEventBuilder.v1() + .withId(UUID.randomUUID().toString()) + .withSource(URI.create("")) + .withType(type) + .withTime(OffsetDateTime.now()) + .withData(marshaller.cloudEventDataFactory().apply(Collections.singletonMap("param4", "Additional argument"))); + businessKey.ifPresentOrElse(key -> builder.withExtension(CloudEventExtensionConstants.BUSINESS_KEY, key), () -> builder.withExtension(CloudEventExtensionConstants.PROCESS_REFERENCE_ID, id)); + return builder.build(); + } + + static CloudEvent buildCloudEvent(String id, String type, CloudEventMarshaller marshaller) { + return buildCloudEvent(id, Optional.empty(), type, marshaller); + } + +} diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/pom.xml b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/pom.xml index f3ee8d2f98..551384ab61 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/pom.xml @@ -1,4 +1,24 @@ + 4.0.0 @@ -10,15 +30,15 @@ conversion-workflow-full Kogito Example :: Serverless Workflow Temperature Conversion :: Conversion Full Service - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.8.1 - 11 + 17 3.0.0-M7 ${version.surefire.plugin} 2.33.2 @@ -43,8 +63,8 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus io.quarkus @@ -63,12 +83,8 @@ quarkus-smallrye-health - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/src/main/resources/application.properties index 4198cefe37..1ce4302a08 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/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. +# + # Packaging # quarkus.package.type=fast-jar quarkus.native.native-image-xmx=8g @@ -16,7 +35,4 @@ kogito.sw.operationIdStrategy=FULL_URI %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/src/main/resources/multiplication/spec.yaml b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/src/main/resources/multiplication/spec.yaml index 6c99fff287..f9f76d6145 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/src/main/resources/multiplication/spec.yaml +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/src/main/resources/multiplication/spec.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. +# + --- openapi: 3.0.3 info: diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/src/main/resources/subtraction/spec.yaml b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/src/main/resources/subtraction/spec.yaml index b5f7345b58..28930b1235 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/src/main/resources/subtraction/spec.yaml +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/src/main/resources/subtraction/spec.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. +# + --- openapi: 3.0.3 info: diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/src/test/java/org/kie/kogito/serverless/ConversationFlowIT.java b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/src/test/java/org/kie/kogito/serverless/ConversationFlowIT.java index f7c75cf67e..bd3bbe07b1 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/src/test/java/org/kie/kogito/serverless/ConversationFlowIT.java +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/src/test/java/org/kie/kogito/serverless/ConversationFlowIT.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.serverless; diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/src/test/java/org/kie/kogito/serverless/OperationsMockService.java b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/src/test/java/org/kie/kogito/serverless/OperationsMockService.java index 9a845abf90..f82871273c 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/src/test/java/org/kie/kogito/serverless/OperationsMockService.java +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-full/src/test/java/org/kie/kogito/serverless/OperationsMockService.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.serverless; diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/pom.xml b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/pom.xml index a0a03fe0bc..9c3c4550a3 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/pom.xml @@ -1,4 +1,24 @@ + 4.0.0 @@ -10,15 +30,15 @@ conversion-workflow-function Kogito Example :: Serverless Workflow Temperature Conversion :: Conversion Function Service - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.8.1 - 11 + 17 3.0.0-M7 ${version.surefire.plugin} 2.33.2 @@ -43,8 +63,8 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus io.quarkus @@ -63,12 +83,8 @@ quarkus-smallrye-health - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/src/main/resources/application.properties index 7391ec122c..1b3906418b 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/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. +# + # Packaging # quarkus.package.type=fast-jar quarkus.native.native-image-xmx=8g @@ -16,7 +35,4 @@ kogito.sw.operationIdStrategy=FUNCTION_NAME %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/src/main/resources/multiplication/spec.yaml b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/src/main/resources/multiplication/spec.yaml index 6c99fff287..f9f76d6145 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/src/main/resources/multiplication/spec.yaml +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/src/main/resources/multiplication/spec.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. +# + --- openapi: 3.0.3 info: diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/src/main/resources/subtraction/spec.yaml b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/src/main/resources/subtraction/spec.yaml index b5f7345b58..28930b1235 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/src/main/resources/subtraction/spec.yaml +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/src/main/resources/subtraction/spec.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. +# + --- openapi: 3.0.3 info: diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/src/test/java/org/kie/kogito/serverless/ConversationFlowIT.java b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/src/test/java/org/kie/kogito/serverless/ConversationFlowIT.java index f7c75cf67e..bd3bbe07b1 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/src/test/java/org/kie/kogito/serverless/ConversationFlowIT.java +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/src/test/java/org/kie/kogito/serverless/ConversationFlowIT.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.serverless; diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/src/test/java/org/kie/kogito/serverless/OperationsMockService.java b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/src/test/java/org/kie/kogito/serverless/OperationsMockService.java index 9a845abf90..f82871273c 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/src/test/java/org/kie/kogito/serverless/OperationsMockService.java +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-function/src/test/java/org/kie/kogito/serverless/OperationsMockService.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.serverless; diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/pom.xml b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/pom.xml index 8db50c2716..9ce59f0644 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/pom.xml @@ -1,4 +1,24 @@ + 4.0.0 @@ -10,15 +30,15 @@ conversion-workflow-spec Kogito Example :: Serverless Workflow Temperature Conversion :: Conversion Spec Service - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.8.1 - 11 + 17 3.0.0-M7 ${version.surefire.plugin} 2.33.2 @@ -43,8 +63,8 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus io.quarkus @@ -63,12 +83,8 @@ quarkus-smallrye-health - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/src/main/resources/application.properties index dc822973c5..e1dba8408f 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/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. +# + # Packaging # quarkus.package.type=fast-jar quarkus.native.native-image-xmx=8g @@ -16,7 +35,4 @@ kogito.sw.operationIdStrategy=SPEC_TITLE %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/src/main/resources/specs/multiplication.yaml b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/src/main/resources/specs/multiplication.yaml index d10fc84da6..baf5d66bad 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/src/main/resources/specs/multiplication.yaml +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/src/main/resources/specs/multiplication.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. +# + --- openapi: 3.0.3 info: diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/src/main/resources/specs/subtraction.yaml b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/src/main/resources/specs/subtraction.yaml index 80abd4fc7a..100113ef53 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/src/main/resources/specs/subtraction.yaml +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/src/main/resources/specs/subtraction.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. +# + --- openapi: 3.0.3 info: diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/src/test/java/org/kie/kogito/serverless/ConversationFlowIT.java b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/src/test/java/org/kie/kogito/serverless/ConversationFlowIT.java index f7c75cf67e..bd3bbe07b1 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/src/test/java/org/kie/kogito/serverless/ConversationFlowIT.java +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/src/test/java/org/kie/kogito/serverless/ConversationFlowIT.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.serverless; diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/src/test/java/org/kie/kogito/serverless/OperationsMockService.java b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/src/test/java/org/kie/kogito/serverless/OperationsMockService.java index 9a845abf90..f82871273c 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/src/test/java/org/kie/kogito/serverless/OperationsMockService.java +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow-spec/src/test/java/org/kie/kogito/serverless/OperationsMockService.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.serverless; diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/README.md b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/README.md index 679d40b57f..e0e39c4c98 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/README.md +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/README.md @@ -24,9 +24,9 @@ Finally, the result will be returned to the caller, the final product of the equ You will need: -- Java 11+ installed +- Java 17+ installed - Environment variable `JAVA_HOME` set accordingly -- Maven 3.8.6+ installed +- Maven 3.9.6+ installed When using native image compilation, you will also need: @@ -108,7 +108,3 @@ You should have a reply similar to this one: } } ``` - -## Deploying with Kogito Operator - -In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift). diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/pom.xml b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/pom.xml index 29686f3cac..5993949000 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/pom.xml @@ -1,4 +1,24 @@ + 4.0.0 @@ -10,15 +30,15 @@ conversion-workflow Kogito Example :: Serverless Workflow Temperature Conversion :: Conversion Service - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT + 999-SNAPSHOT 3.8.1 - 11 + 17 3.0.0-M7 ${version.surefire.plugin} 2.33.2 @@ -43,8 +63,8 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus io.quarkus @@ -59,12 +79,8 @@ quarkus-smallrye-health - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/src/main/resources/application.properties index ed8375b748..ab2c443a8e 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/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. +# + # Packaging # quarkus.package.type=fast-jar quarkus.native.native-image-xmx=8g @@ -14,7 +33,4 @@ quarkus.rest-client.multiplication_yaml.url=http://localhost:8282 %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/src/main/resources/specs/multiplication.yaml b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/src/main/resources/specs/multiplication.yaml index 6c99fff287..f9f76d6145 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/src/main/resources/specs/multiplication.yaml +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/src/main/resources/specs/multiplication.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. +# + --- openapi: 3.0.3 info: diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/src/main/resources/specs/subtraction.yaml b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/src/main/resources/specs/subtraction.yaml index b5f7345b58..28930b1235 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/src/main/resources/specs/subtraction.yaml +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/src/main/resources/specs/subtraction.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. +# + --- openapi: 3.0.3 info: diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/src/test/java/org/kie/kogito/serverless/ConversationFlowIT.java b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/src/test/java/org/kie/kogito/serverless/ConversationFlowIT.java index f7c75cf67e..bd3bbe07b1 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/src/test/java/org/kie/kogito/serverless/ConversationFlowIT.java +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/src/test/java/org/kie/kogito/serverless/ConversationFlowIT.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.serverless; diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/src/test/java/org/kie/kogito/serverless/OperationsMockService.java b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/src/test/java/org/kie/kogito/serverless/OperationsMockService.java index 9a845abf90..f82871273c 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/src/test/java/org/kie/kogito/serverless/OperationsMockService.java +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/conversion-workflow/src/test/java/org/kie/kogito/serverless/OperationsMockService.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.serverless; diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/kubernetes/knative-services.yaml b/serverless-workflow-examples/serverless-workflow-temperature-conversion/kubernetes/knative-services.yaml index 90e4175891..f3451ba56d 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/kubernetes/knative-services.yaml +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/kubernetes/knative-services.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. +# + # Our Subtraction and Multiplication services are Knative Services, meaning that they will scale to 0 when the workflow is not running # Requires OpenShift Serverless operator installed or Knative Service on Kubernetes environments --- diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/pom.xml b/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/pom.xml index 5d9b652aff..63bc712574 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/pom.xml @@ -1,4 +1,24 @@ + 4.0.0 @@ -10,12 +30,12 @@ multiplication-service Kogito Example :: Serverless Workflow Temperature Conversion :: Multiplication Service - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 3.8.1 - 11 + 17 3.0.0-M7 ${version.surefire.plugin} diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/src/main/java/org/kie/kogito/examples/sw/temp/multiplication/MultiplicationOperation.java b/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/src/main/java/org/kie/kogito/examples/sw/temp/multiplication/MultiplicationOperation.java index c89c7bd35a..422dd826c1 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/src/main/java/org/kie/kogito/examples/sw/temp/multiplication/MultiplicationOperation.java +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/src/main/java/org/kie/kogito/examples/sw/temp/multiplication/MultiplicationOperation.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.examples.sw.temp.multiplication; diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/src/main/java/org/kie/kogito/examples/sw/temp/multiplication/OperationResource.java b/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/src/main/java/org/kie/kogito/examples/sw/temp/multiplication/OperationResource.java index b889930829..376d5ed899 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/src/main/java/org/kie/kogito/examples/sw/temp/multiplication/OperationResource.java +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/src/main/java/org/kie/kogito/examples/sw/temp/multiplication/OperationResource.java @@ -1,27 +1,30 @@ /* - * 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.examples.sw.temp.multiplication; -import javax.validation.constraints.NotNull; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.validation.constraints.NotNull; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.eclipse.microprofile.openapi.annotations.responses.APIResponseSchema; diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/src/main/resources/META-INF/resources/index.html b/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/src/main/resources/META-INF/resources/index.html index dc68613314..2f522b0906 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/src/main/resources/META-INF/resources/index.html +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/src/main/resources/META-INF/resources/index.html @@ -1,3 +1,23 @@ + diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/src/main/resources/application.properties index d7fbda981d..26552ec40d 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-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. +# + # Packaging # quarkus.package.type=fast-jar quarkus.native.native-image-xmx=8g @@ -8,7 +27,4 @@ quarkus.swagger-ui.always-include=true %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/src/test/java/org/kie/kogito/examples/sw/temp/multiplication/OperationResourceIT.java b/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/src/test/java/org/kie/kogito/examples/sw/temp/multiplication/OperationResourceIT.java index d96b7c1bb1..b2066fa655 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/src/test/java/org/kie/kogito/examples/sw/temp/multiplication/OperationResourceIT.java +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/multiplication-service/src/test/java/org/kie/kogito/examples/sw/temp/multiplication/OperationResourceIT.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.examples.sw.temp.multiplication; diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/pom.xml b/serverless-workflow-examples/serverless-workflow-temperature-conversion/pom.xml index c8d8269374..c7b2406ac9 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/pom.xml @@ -1,8 +1,35 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-temperature-conversion 1.0-SNAPSHOT diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/pom.xml b/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/pom.xml index 50157e0d95..f0fb1b968a 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/pom.xml @@ -1,4 +1,24 @@ + 4.0.0 @@ -10,12 +30,12 @@ subtraction-service Kogito Example :: Serverless Workflow Temperature Conversion :: Subtraction Service - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 3.8.1 - 11 + 17 3.0.0-M7 ${version.surefire.plugin} diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/src/main/java/org/kie/kogito/examples/sw/temp/subtraction/OperationResource.java b/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/src/main/java/org/kie/kogito/examples/sw/temp/subtraction/OperationResource.java index fbddc22c5b..7648677f01 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/src/main/java/org/kie/kogito/examples/sw/temp/subtraction/OperationResource.java +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/src/main/java/org/kie/kogito/examples/sw/temp/subtraction/OperationResource.java @@ -1,27 +1,30 @@ /* - * 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.examples.sw.temp.subtraction; -import javax.validation.constraints.NotNull; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.validation.constraints.NotNull; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.eclipse.microprofile.openapi.annotations.responses.APIResponseSchema; diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/src/main/java/org/kie/kogito/examples/sw/temp/subtraction/SubtractionOperation.java b/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/src/main/java/org/kie/kogito/examples/sw/temp/subtraction/SubtractionOperation.java index 7bd7ab057d..710e67cc3d 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/src/main/java/org/kie/kogito/examples/sw/temp/subtraction/SubtractionOperation.java +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/src/main/java/org/kie/kogito/examples/sw/temp/subtraction/SubtractionOperation.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.examples.sw.temp.subtraction; diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/src/main/resources/META-INF/resources/index.html b/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/src/main/resources/META-INF/resources/index.html index dc68613314..2f522b0906 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/src/main/resources/META-INF/resources/index.html +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/src/main/resources/META-INF/resources/index.html @@ -1,3 +1,23 @@ + diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/src/main/resources/application.properties index d7fbda981d..26552ec40d 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-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. +# + # Packaging # quarkus.package.type=fast-jar quarkus.native.native-image-xmx=8g @@ -8,7 +27,4 @@ quarkus.swagger-ui.always-include=true %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/src/test/java/org/kie/kogito/examples/sw/temp/subtraction/OperationResourceIT.java b/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/src/test/java/org/kie/kogito/examples/sw/temp/subtraction/OperationResourceIT.java index b3bedd0b1e..9a06b6dc4d 100644 --- a/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/src/test/java/org/kie/kogito/examples/sw/temp/subtraction/OperationResourceIT.java +++ b/serverless-workflow-examples/serverless-workflow-temperature-conversion/subtraction-service/src/test/java/org/kie/kogito/examples/sw/temp/subtraction/OperationResourceIT.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.examples.sw.temp.subtraction; diff --git a/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/README.md b/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/README.md index 5ad353a55a..d7fd52df9c 100644 --- a/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/README.md +++ b/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/README.md @@ -1 +1 @@ -Serverless Workflow guide: https://github.com/kiegroup/kogito-docs/blob/main/serverlessworkflow/modules/ROOT/pages/testing-and-troubleshooting/basic-integration-tests-with-restassured.adoc \ No newline at end of file +Serverless Workflow guide: https://github.com/apache/incubator-kie-kogito-docs/blob/main/serverlessworkflow/modules/ROOT/pages/testing-and-troubleshooting/basic-integration-tests-with-restassured.adoc \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/pom.xml b/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/pom.xml index 29a3d7a38e..596197433f 100644 --- a/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/pom.xml @@ -1,9 +1,36 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-testing-with-rest-assured 1.0-SNAPSHOT @@ -11,14 +38,14 @@ Kogito Example :: Serverless Workflow Testing with REST Assured :: Quarkus Kogito Serverless Workflow Example - Quarkus - 2.16.10.Final + 3.8.4 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 11 + 999-SNAPSHOT + 17 3.8.1 3.0.0-M7 ${version.surefire.plugin} @@ -44,8 +71,8 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus io.quarkus @@ -60,12 +87,8 @@ quarkus-resteasy - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/src/main/docker/Dockerfile.jvm b/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/src/main/docker/Dockerfile.jvm index de3293361a..9ba0eaf662 100644 --- a/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/src/main/docker/Dockerfile.jvm +++ b/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/src/main/docker/Dockerfile.jvm @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/src/main/docker/Dockerfile.legacy-jar b/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/src/main/docker/Dockerfile.legacy-jar index 3b3db7d9c4..6420308f26 100644 --- a/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/src/main/docker/Dockerfile.legacy-jar +++ b/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/src/main/docker/Dockerfile.legacy-jar @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/src/main/resources/application.properties index 4c6da73b47..e248eb1d7e 100644 --- a/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/src/main/resources/application.properties @@ -1,9 +1,25 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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. +# + # profile to pack this example into a container, to use it execute activate the maven container profile, -Dcontainer %container.quarkus.container-image.build=true %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/src/test/java/org/kie/kogito/examples/HelloTest.java b/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/src/test/java/org/kie/kogito/examples/HelloTest.java index 81cb0dd2d8..15f1c6a1c8 100644 --- a/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/src/test/java/org/kie/kogito/examples/HelloTest.java +++ b/serverless-workflow-examples/serverless-workflow-testing-with-rest-assured/src/test/java/org/kie/kogito/examples/HelloTest.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/README.md b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/README.md index 588cf90386..d35f2e8260 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/README.md +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/README.md @@ -208,8 +208,3 @@ Additionally, the Quarkus Dev UI will be available at http://localhost:8080/q/de #### Dev UI Main View ![](docs/DevUIGeneral.png) - -#### Dev UI Serverless Workflow Tools View - -![](docs/DevUIWorkflows.png) - diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/docs/DevUIWorkflows.png b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/docs/DevUIWorkflows.png deleted file mode 100644 index 4cf5cdc3eb..0000000000 Binary files a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/docs/DevUIWorkflows.png and /dev/null differ diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/pom.xml b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/pom.xml index 9ecc52d5a1..ec5094b5ed 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/pom.xml @@ -1,8 +1,35 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-timeouts-showcase-embedded 1.0-SNAPSHOT @@ -13,18 +40,18 @@ UTF-8 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 11 + 999-SNAPSHOT + 17 3.8.1 3.0.0-M7 ${version.surefire.plugin} 5.1.3 3.6.0 - 0.0.9 + 0.2.2 @@ -73,16 +100,12 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow - - - org.kie.kogito - kogito-quarkus-serverless-workflow-devui + org.apache.kie.sonataflow + sonataflow-quarkus - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files @@ -99,19 +122,19 @@ quarkus-agroal - org.kie.kogito - kogito-addons-quarkus-persistence-jdbc + org.kie + kie-addons-quarkus-persistence-jdbc - org.kie.kogito + org.kie kogito-addons-quarkus-jobs-service-embedded - org.kie.kogito + org.kie kogito-addons-quarkus-data-index-inmemory @@ -226,11 +249,11 @@ quarkus-container-image-jib - org.kie.kogito - kogito-addons-quarkus-kubernetes + org.kie + kie-addons-quarkus-kubernetes - org.kie.kogito + org.kie kogito-addons-quarkus-fabric8-kubernetes-service-catalog diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/docker/Dockerfile.jvm b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/docker/Dockerfile.jvm index 6b93296be6..e680317f5a 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/docker/Dockerfile.jvm +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/docker/Dockerfile.jvm @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/docker/Dockerfile.legacy-jar b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/docker/Dockerfile.legacy-jar index a217de4a04..de6cfc6cd8 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/docker/Dockerfile.legacy-jar +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/docker/Dockerfile.legacy-jar @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/java/org/kie/kogito/examples/EventsProducerResource.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/java/org/kie/kogito/examples/EventsProducerResource.java index 85ecdad6e5..7611e766aa 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/java/org/kie/kogito/examples/EventsProducerResource.java +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/java/org/kie/kogito/examples/EventsProducerResource.java @@ -1,34 +1,36 @@ /* - * 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.examples; import java.net.URI; import java.time.OffsetDateTime; import java.util.UUID; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.eclipse.microprofile.reactive.messaging.Channel; import org.eclipse.microprofile.reactive.messaging.Emitter; diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/java/org/kie/kogito/examples/VertxRouter.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/java/org/kie/kogito/examples/VertxRouter.java index b1f5f10265..d3cc018eeb 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/java/org/kie/kogito/examples/VertxRouter.java +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/java/org/kie/kogito/examples/VertxRouter.java @@ -1,7 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.examples; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.event.Observes; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.event.Observes; import io.vertx.core.http.HttpMethod; import io.vertx.ext.web.Router; diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/resources/META-INF/resources/index.html b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/resources/META-INF/resources/index.html index 1e6f54d4d8..925abda0a3 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/resources/META-INF/resources/index.html +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/resources/META-INF/resources/index.html @@ -1,19 +1,23 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this 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/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/resources/application-knative.properties b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/resources/application-knative.properties index 09f04afbfb..e1d4ee9abe 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/resources/application-knative.properties +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/resources/application-knative.properties @@ -1,6 +1,25 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this 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. +# + # Use the Kogito service discovery mechanism to get the current service url. # For more information see: https://kiegroup.github.io/kogito-docs/serverlessworkflow/latest/cloud/kubernetes-service-discovery.html -kogito.service.url=knative:services.v1.serving.knative.dev/default/timeouts-showcase-embedded +kogito.service.url=${knative:services.v1.serving.knative.dev/default/timeouts-showcase-embedded} # This enables Knative to fetch the image information on Minikube. # You can change this property with -Pknative -Dquarkus.container-image.group from the command line. diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/resources/application.properties index 1218b4f358..370f3de745 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-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.http.port=8080 kogito.service.url=http://localhost:${quarkus.http.port} @@ -32,6 +51,3 @@ mp.messaging.outgoing.response_events.method=POST %container.quarkus.container-image.registry=dev.local %quarkus.container-image.name=timeouts-showcase-embedded %container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/test/java/org/kie/kogito/examples/TimeoutIT.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/test/java/org/kie/kogito/examples/TimeoutIT.java index 5ae15d321a..edaff888be 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/test/java/org/kie/kogito/examples/TimeoutIT.java +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-embedded/src/test/java/org/kie/kogito/examples/TimeoutIT.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/README.md b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/README.md index ae6f179fb3..35ed40b07d 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/README.md +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/README.md @@ -88,7 +88,7 @@ __ ____ __ _____ ___ __ ____ ______ 2022-08-18 10:34:48,678 jobs-service-postgresql-56d9668b4b-k4v87 INFO [org.flywaydb.core.internal.database.base.BaseDatabaseType:-1] (main) Database: jdbc:postgresql://timeouts-showcase-database:5432/postgres (PostgreSQL 13.4) 2022-08-18 10:34:48,727 jobs-service-postgresql-56d9668b4b-k4v87 INFO [org.flywaydb.core.internal.command.DbMigrate:-1] (main) Current version of schema "public": 2.0.1 2022-08-18 10:34:48,728 jobs-service-postgresql-56d9668b4b-k4v87 INFO [org.flywaydb.core.internal.command.DbMigrate:-1] (main) Schema "public" is up to date. No migration necessary. -2022-08-18 10:34:49,065 jobs-service-postgresql-56d9668b4b-k4v87 INFO [io.quarkus:-1] (main) jobs-service-postgresql 2.0.0-SNAPSHOT on JVM (powered by Quarkus 2.11.2.Final) started in 2.040s. Listening on: http://0.0.0.0:8080 +2022-08-18 10:34:49,065 jobs-service-postgresql-56d9668b4b-k4v87 INFO [io.quarkus:-1] (main) jobs-service-postgresql 999-SNAPSHOT on JVM (powered by Quarkus 2.11.2.Final) started in 2.040s. Listening on: http://0.0.0.0:8080 2022-08-18 10:34:49,065 jobs-service-postgresql-56d9668b4b-k4v87 INFO [io.quarkus:-1] (main) Profile prod activated. 2022-08-18 10:34:49,065 jobs-service-postgresql-56d9668b4b-k4v87 INFO [io.quarkus:-1] (main) Installed features: [agroal, cdi, flyway, jdbc-postgresql, kafka-client, narayana-jta, oidc, reactive-pg-client, reactive-routes, resteasy, resteasy-jackson, security, smallrye-context-propagation, smallrye-fault-tolerance, smallrye-health, smallrye-openapi, smallrye-reactive-messaging, smallrye-reactive-messaging-http, smallrye-reactive-messaging-kafka, swagger-ui, vertx] 2022-08-18 10:34:49,241 jobs-service-postgresql-56d9668b4b-k4v87 INFO [org.kie.kogito.jobs.service.scheduler.JobSchedulerManager:-1] (executor-thread-0) Loading scheduled jobs completed ! @@ -105,7 +105,12 @@ kubectl apply -f kubernetes/data-index-service-postgresql.yml -n timeouts-showca service/data-index-service-postgresql created deployment.apps/data-index-service-postgresql created -trigger.eventing.knative.dev/data-index-service-postgresql-processes-trigger created +trigger.eventing.knative.dev/data-index-service-postgresql-process-definition-trigger created +trigger.eventing.knative.dev/data-index-service-postgresql-process-error-trigger created +trigger.eventing.knative.dev/data-index-service-postgresql-process-node-trigger created +trigger.eventing.knative.dev/data-index-service-postgresql-process-sla-trigger created +trigger.eventing.knative.dev/data-index-service-postgresql-process-state-trigger created +trigger.eventing.knative.dev/data-index-service-postgresql-process-variable-trigger created trigger.eventing.knative.dev/data-index-service-postgresql-jobs-trigger created ``` diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/kubernetes/data-index-service-postgresql.yml b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/kubernetes/data-index-service-postgresql.yml index d0dc4c87f0..5318bf829b 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/kubernetes/data-index-service-postgresql.yml +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/kubernetes/data-index-service-postgresql.yml @@ -1,9 +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. +# + apiVersion: v1 kind: Service metadata: labels: app.kubernetes.io/name: data-index-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT name: data-index-service-postgresql spec: ports: @@ -12,7 +31,7 @@ spec: targetPort: 8080 selector: app.kubernetes.io/name: data-index-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT type: ClusterIP --- apiVersion: apps/v1 @@ -20,19 +39,19 @@ kind: Deployment metadata: labels: app.kubernetes.io/name: data-index-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT name: data-index-service-postgresql spec: replicas: 1 selector: matchLabels: app.kubernetes.io/name: data-index-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT template: metadata: labels: app.kubernetes.io/name: data-index-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT spec: containers: - name: data-index-service-postgresql @@ -43,6 +62,8 @@ spec: name: http protocol: TCP env: + - name: KOGITO_SERVICE_URL + value: http://data-index-service-postgresql - name: KUBERNETES_NAMESPACE valueFrom: fieldRef: @@ -57,7 +78,7 @@ spec: value: postgresql - name: QUARKUS_HIBERNATE_ORM_DATABASE_GENERATION value: update - - name: QUARKUS_KAFKA_HEALTH_ENABLE + - name: QUARKUS_SMALLRYE_HEALTH_CHECK__IO_QUARKUS_KAFKA_CLIENT_HEALTH_KAFKAHEALTHCHECK__ENABLED value: "false" - name: QUARKUS_HTTP_CORS value: "true" @@ -73,12 +94,92 @@ spec: apiVersion: eventing.knative.dev/v1 kind: Trigger metadata: - name: data-index-service-postgresql-processes-trigger + name: data-index-service-postgresql-process-definition-trigger spec: broker: default filter: attributes: - type: ProcessInstanceEvent + type: ProcessDefinitionEvent + subscriber: + ref: + apiVersion: v1 + kind: Service + name: data-index-service-postgresql + uri: /definitions +--- +apiVersion: eventing.knative.dev/v1 +kind: Trigger +metadata: + name: data-index-service-postgresql-process-error-trigger +spec: + broker: default + filter: + attributes: + type: ProcessInstanceErrorDataEvent + subscriber: + ref: + apiVersion: v1 + kind: Service + name: data-index-service-postgresql + uri: /processes +--- +apiVersion: eventing.knative.dev/v1 +kind: Trigger +metadata: + name: data-index-service-postgresql-process-node-trigger +spec: + broker: default + filter: + attributes: + type: ProcessInstanceNodeDataEvent + subscriber: + ref: + apiVersion: v1 + kind: Service + name: data-index-service-postgresql + uri: /processes +--- +apiVersion: eventing.knative.dev/v1 +kind: Trigger +metadata: + name: data-index-service-postgresql-process-sla-trigger +spec: + broker: default + filter: + attributes: + type: ProcessInstanceSLADataEvent + subscriber: + ref: + apiVersion: v1 + kind: Service + name: data-index-service-postgresql + uri: /processes +--- +apiVersion: eventing.knative.dev/v1 +kind: Trigger +metadata: + name: data-index-service-postgresql-process-state-trigger +spec: + broker: default + filter: + attributes: + type: ProcessInstanceStateDataEvent + subscriber: + ref: + apiVersion: v1 + kind: Service + name: data-index-service-postgresql + uri: /processes +--- +apiVersion: eventing.knative.dev/v1 +kind: Trigger +metadata: + name: data-index-service-postgresql-process-variable-trigger +spec: + broker: default + filter: + attributes: + type: ProcessInstanceVariableDataEvent subscriber: ref: apiVersion: v1 diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/kubernetes/jobs-service-postgresql.yml b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/kubernetes/jobs-service-postgresql.yml index 6f4d060e01..937c6d29e4 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/kubernetes/jobs-service-postgresql.yml +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/kubernetes/jobs-service-postgresql.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. +# + apiVersion: eventing.knative.dev/v1 kind: Broker metadata: @@ -19,14 +38,14 @@ spec: selector: matchLabels: app.kubernetes.io/name: jobs-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT --- apiVersion: v1 kind: Service metadata: labels: app.kubernetes.io/name: jobs-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT name: jobs-service-postgresql spec: ports: @@ -35,7 +54,7 @@ spec: targetPort: 8080 selector: app.kubernetes.io/name: jobs-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT type: ClusterIP --- apiVersion: apps/v1 @@ -43,7 +62,7 @@ kind: Deployment metadata: labels: app.kubernetes.io/name: jobs-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT name: jobs-service-postgresql spec: replicas: 1 @@ -53,16 +72,16 @@ spec: selector: matchLabels: app.kubernetes.io/name: jobs-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT template: metadata: labels: app.kubernetes.io/name: jobs-service-postgresql - app.kubernetes.io/version: 2.0.0-SNAPSHOT + app.kubernetes.io/version: 999-SNAPSHOT spec: containers: - name: jobs-service-postgresql - image: quay.io/kiegroup/kogito-jobs-service-allinone-nightly:latest + image: quay.io/kiegroup/kogito-jobs-service-postgresql-nightly:latest imagePullPolicy: Always ports: - containerPort: 8080 @@ -73,10 +92,10 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: KOGITO_SERVICE_URL + value: http://jobs-service-postgresql - name: KOGITO_JOBS_SERVICE_HTTP_JOB_STATUS_CHANGE_EVENTS value: "true" - - name: JOBS_SERVICE_PERSISTENCE - value: "postgresql" - name: QUARKUS_DATASOURCE_USERNAME value: postgres - name: QUARKUS_DATASOURCE_PASSWORD diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/kubernetes/timeouts-showcase-database.yml b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/kubernetes/timeouts-showcase-database.yml index bc2f5ab072..c3917811d0 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/kubernetes/timeouts-showcase-database.yml +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/kubernetes/timeouts-showcase-database.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. +# + # Deployment for the timeouts-showcase postgresql database apiVersion: v1 data: diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/pom.xml b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/pom.xml index 1d26d223ff..d0416236fe 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/pom.xml @@ -1,8 +1,35 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-timeouts-showcase-extended 1.0-SNAPSHOT @@ -13,11 +40,11 @@ UTF-8 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 11 + 999-SNAPSHOT + 17 3.8.1 3.0.0-M7 ${version.surefire.plugin} @@ -66,24 +93,20 @@ - org.kie.kogito - kogito-quarkus-serverless-workflow + org.apache.kie.sonataflow + sonataflow-quarkus - org.kie.kogito - kogito-addons-quarkus-kubernetes + org.kie + kie-addons-quarkus-kubernetes - org.kie.kogito + org.kie kogito-addons-quarkus-fabric8-kubernetes-service-catalog - org.kie.kogito - kogito-quarkus-serverless-workflow-devui - - - org.kie.kogito - kogito-addons-quarkus-source-files + org.kie + kie-addons-quarkus-source-files @@ -189,20 +212,20 @@ - org.kie.kogito - kogito-addons-quarkus-events-process + org.kie + kie-addons-quarkus-events-process - org.kie.kogito - kogito-addons-quarkus-knative-eventing + org.kie + kie-addons-quarkus-knative-eventing - org.kie.kogito + org.kie kogito-addons-quarkus-jobs-knative-eventing - org.kie.kogito - kogito-addons-quarkus-persistence-jdbc + org.kie + kie-addons-quarkus-persistence-jdbc io.quarkus diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/docker/Dockerfile.jvm b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/docker/Dockerfile.jvm index be6b251599..6bf18a89d6 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/docker/Dockerfile.jvm +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/docker/Dockerfile.jvm @@ -75,9 +75,9 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:1.20 -ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' +ENV LANGUAGE='en_US:en' # We make four distinct layers so if there are application changes the library layers can be re-used @@ -88,7 +88,8 @@ COPY --chown=185 target/quarkus-app/quarkus/ /deployments/quarkus/ EXPOSE 8080 USER 185 -ENV AB_JOLOKIA_OFF="" -ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" +ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV JAVA_APP_JAR="/deployments/quarkus-run.jar" +ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ] + diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/docker/Dockerfile.legacy-jar b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/docker/Dockerfile.legacy-jar index 9080823c51..96b4e6baca 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/docker/Dockerfile.legacy-jar +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/docker/Dockerfile.legacy-jar @@ -75,9 +75,9 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:1.20 -ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' +ENV LANGUAGE='en_US:en' COPY target/lib/* /deployments/lib/ @@ -85,6 +85,7 @@ COPY target/*-runner.jar /deployments/quarkus-run.jar EXPOSE 8080 USER 185 -ENV AB_JOLOKIA_OFF="" -ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" +ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV JAVA_APP_JAR="/deployments/quarkus-run.jar" + +ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ] diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/docker/Dockerfile.native b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/docker/Dockerfile.native index 6d2592fb63..883cf14ac7 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/docker/Dockerfile.native +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/docker/Dockerfile.native @@ -14,7 +14,7 @@ # docker run -i --rm -p 8080:8080 quarkus/serverless-workflow-timeouts-showcase-extended # ### -FROM registry.access.redhat.com/ubi8/ubi-minimal:8.5 +FROM registry.access.redhat.com/ubi8/ubi-minimal:8.9 WORKDIR /work/ RUN chown 1001 /work \ && chmod "g+rwX" /work \ @@ -24,4 +24,4 @@ COPY --chown=1001:root target/*-runner /work/application EXPOSE 8080 USER 1001 -CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] +ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0"] \ No newline at end of file diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/docker/Dockerfile.native-micro b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/docker/Dockerfile.native-micro index 0ecb8a18d8..69bd37e82e 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/docker/Dockerfile.native-micro +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/docker/Dockerfile.native-micro @@ -17,7 +17,7 @@ # docker run -i --rm -p 8080:8080 quarkus/serverless-workflow-timeouts-showcase-extended # ### -FROM quay.io/quarkus/quarkus-micro-image:1.0 +FROM quay.io/quarkus/quarkus-micro-image:2.0 WORKDIR /work/ RUN chown 1001 /work \ && chmod "g+rwX" /work \ @@ -27,4 +27,4 @@ COPY --chown=1001:root target/*-runner /work/application EXPOSE 8080 USER 1001 -CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] +ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0"] diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/java/org/kie/kogito/examples/EventsProducerResource.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/java/org/kie/kogito/examples/EventsProducerResource.java index 3be5d15111..ab6046e46e 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/java/org/kie/kogito/examples/EventsProducerResource.java +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/java/org/kie/kogito/examples/EventsProducerResource.java @@ -1,35 +1,37 @@ /* - * 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.examples; import java.net.URI; import java.time.OffsetDateTime; import java.util.UUID; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.event.Observes; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.event.Observes; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import io.vertx.core.http.HttpMethod; import io.vertx.ext.web.Router; diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/java/org/kie/kogito/examples/VertxRouter.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/java/org/kie/kogito/examples/VertxRouter.java index b1f5f10265..d3cc018eeb 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/java/org/kie/kogito/examples/VertxRouter.java +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/java/org/kie/kogito/examples/VertxRouter.java @@ -1,7 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.examples; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.event.Observes; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.event.Observes; import io.vertx.core.http.HttpMethod; import io.vertx.ext.web.Router; diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/resources/META-INF/resources/index.html b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/resources/META-INF/resources/index.html index 5aab9589f7..75380c58ef 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/resources/META-INF/resources/index.html +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/resources/META-INF/resources/index.html @@ -1,19 +1,23 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this 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/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/resources/application-knative.properties b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/resources/application-knative.properties index 20f28f97d3..72672f738c 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/resources/application-knative.properties +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/resources/application-knative.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 runtime persistence configurations kogito.persistence.type=jdbc kogito.persistence.proto.marshaller=false @@ -12,7 +31,7 @@ quarkus.datasource.password=pass # Use the Kogito service discovery mechanism to get the current service url. # For more information see: https://kiegroup.github.io/kogito-docs/serverlessworkflow/latest/cloud/kubernetes-service-discovery.html -kogito.service.url=knative:services.v1.serving.knative.dev/timeouts-showcase/timeouts-showcase-extended +kogito.service.url=${knative:services.v1.serving.knative.dev/timeouts-showcase/timeouts-showcase-extended} # Skip user tasks and variables events sending. kogito.events.usertasks.enabled=false @@ -23,12 +42,15 @@ mp.messaging.outgoing.kogito-job-service-job-request-events.connector=quarkus-ht mp.messaging.outgoing.kogito-job-service-job-request-events.url=${K_SINK:http://localhost:8280/v2/jobs/events} mp.messaging.outgoing.kogito-job-service-job-request-events.method=POST +# The name of the application. This value will be used for naming Kubernetes resources like: Deployment, Service, etc. +quarkus.knative.name=timeouts-showcase-extended + # This enables Knative to fetch the image information on Minikube. # You can change this property with -Pknative -Dquarkus.container-image.group from the command line. quarkus.container-image.build=true quarkus.container-image.registry=dev.local quarkus.container-image.group=${USER} -quarkus.container-image.name=timeouts-showcase-extended +quarkus.container-image.name=${quarkus.knative.name} quarkus.kubernetes.deployment-target=knative quarkus.knative.image-pull-policy=if-not-present quarkus.knative.env.vars.postgres_host=timeouts-showcase-database diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/resources/application.properties index a992929322..70b46247a4 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/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.http.port=8080 kogito.service.url=http://localhost:${quarkus.http.port} @@ -24,6 +43,3 @@ mp.messaging.outgoing.response_events.method=POST %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local %container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/test/java/org/kie/kogito/examples/TimeoutIT.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/test/java/org/kie/kogito/examples/TimeoutIT.java index 5ae15d321a..edaff888be 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/test/java/org/kie/kogito/examples/TimeoutIT.java +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-extended/src/test/java/org/kie/kogito/examples/TimeoutIT.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.examples; diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/README.md b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/README.md index adab503d19..7ff1f95e0d 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/README.md +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/README.md @@ -8,8 +8,8 @@ minikube start --cpus 4 --memory 10g --addons registry --addons metrics-server --insecure-registry "10.0.0.0/24" --insecure-registry "localhost:5000" ``` -> **NOTE:** If the number of allocated cpus and memory configurations don't feet well for your installation you can try to change this numbers. -> However lower configuration might lead your cluster to get out of memmory. Remember that every time you change this values, you will have to recreate your instance. +> **NOTE:** If the allocated cpus and memory configurations don't fit well for your installation, you can try adjusting these numbers. +> However, lower configurations might cause your cluster to run out of memory. Remember that every time you change these values, you will have to recreate your instance. 3. Be sure that the SonataFlow Operator is installed in your minikube. @@ -39,7 +39,7 @@ kubectl apply -f workflows/callback_state_timeouts_devprofile.yaml -n timeouts-s > **NOTE:** In local environments, we recommend that you deploy the workflows one by one at the same time you verify that > each deployment was successful. To do that, you can execute this command after each deployment, and you might have to -> execute command several times until you see that the deployed workflow pod is running successfully, since it might take +> execute command several times until you see that the deployed workflow pod is running successfully, as it might take > some time to download the images used by the operator. > > @@ -251,10 +251,6 @@ firefox $EVENT_STATE_TIMEOUTS_ROOT/q/dev ```shell firefox $WORKFLOW_TIMEOUTS_ROOT/q/dev ``` -#### Dev UI SonataFlow Tools View - -![](docs/DevUIWorkflows.png) - #### Dev UI SonataFlow Data Index View ![](docs/DevUIDataIndex.png) diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/pom.xml b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/pom.xml index d4cc05f687..6492b23e93 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/pom.xml @@ -1,8 +1,35 @@ + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples-parent + 999-SNAPSHOT + ../serverless-workflow-examples-parent/pom.xml + + org.kie.kogito.examples serverless-workflow-timeouts-showcase-operator-devprofile 1.0-SNAPSHOT @@ -13,11 +40,11 @@ UTF-8 quarkus-bom io.quarkus - 2.16.10.Final + 3.8.4 org.kie.kogito kogito-bom - 2.0.0-SNAPSHOT - 11 + 999-SNAPSHOT + 17 3.8.1 3.0.0-M7 ${version.surefire.plugin} diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/set-urls.sh b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/set-urls.sh index 75db2f48af..bf4b661f2b 100755 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/set-urls.sh +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/set-urls.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. +# + CALLBACK_STATE_TIMEOUTS_WF=callbackstatetimeouts EVENT_STATE_TIMEOUTS_WF=eventstatetimeouts diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/docker/Dockerfile.jvm b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/docker/Dockerfile.jvm index 11f0918ef3..3db101ec90 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/docker/Dockerfile.jvm +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/docker/Dockerfile.jvm @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/docker/Dockerfile.legacy-jar b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/docker/Dockerfile.legacy-jar index ca97968c69..0889a78b3a 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/docker/Dockerfile.legacy-jar +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/docker/Dockerfile.legacy-jar @@ -75,7 +75,7 @@ # accessed directly. (example: "foo.example.com,bar.example.com") # ### -FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 +FROM registry.access.redhat.com/ubi8/openjdk-17:latest ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/CallbackStateTimeoutsClient.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/CallbackStateTimeoutsClient.java index 9b5f2cf6f2..85b416b85b 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/CallbackStateTimeoutsClient.java +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/CallbackStateTimeoutsClient.java @@ -1,34 +1,36 @@ /* - * 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.examples; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; -import javax.ws.rs.Consumes; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.HttpHeaders; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DefaultValue; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import static org.kie.kogito.examples.CallbackStateTimeoutsClient.CONFIG_KEY; diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/CloudEventsCustomizer.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/CloudEventsCustomizer.java index a67f7efc06..5979828a07 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/CloudEventsCustomizer.java +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/CloudEventsCustomizer.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.examples; import com.fasterxml.jackson.databind.ObjectMapper; import io.cloudevents.jackson.JsonFormat; import io.quarkus.jackson.ObjectMapperCustomizer; -import javax.inject.Singleton; +import jakarta.inject.Singleton; /** * Ensure the registration of the CloudEvent jackson module according to the Quarkus suggested procedure. diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/EventStateTimeoutsClient.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/EventStateTimeoutsClient.java index 9e12d47b90..57614e9fb3 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/EventStateTimeoutsClient.java +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/EventStateTimeoutsClient.java @@ -1,34 +1,36 @@ /* - * 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.examples; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; -import javax.ws.rs.Consumes; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.HttpHeaders; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DefaultValue; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import static org.kie.kogito.examples.EventStateTimeoutsClient.CONFIG_KEY; diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/EventsProducerResource.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/EventsProducerResource.java index 01a195f51b..55d8412535 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/EventsProducerResource.java +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/EventsProducerResource.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.examples; import com.fasterxml.jackson.core.JsonProcessingException; @@ -22,15 +24,15 @@ import io.cloudevents.jackson.JsonCloudEventData; import org.eclipse.microprofile.rest.client.inject.RestClient; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import java.net.URI; import java.time.OffsetDateTime; import java.util.UUID; diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/SwitchStateTimeoutsClient.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/SwitchStateTimeoutsClient.java index 85a7e991ad..b02d854a83 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/SwitchStateTimeoutsClient.java +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/SwitchStateTimeoutsClient.java @@ -1,34 +1,36 @@ /* - * 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.examples; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; -import javax.ws.rs.Consumes; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.HttpHeaders; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DefaultValue; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import static org.kie.kogito.examples.SwitchStateTimeoutsClient.CONFIG_KEY; diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/VertxRouter.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/VertxRouter.java index 668f08bb78..d3cc018eeb 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/VertxRouter.java +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/VertxRouter.java @@ -1,23 +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.examples; -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.event.Observes; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.enterprise.event.Observes; import io.vertx.core.http.HttpMethod; import io.vertx.ext.web.Router; diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/WorkflowClient.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/WorkflowClient.java index 5f900abda3..d4c091ad6e 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/WorkflowClient.java +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/WorkflowClient.java @@ -1,29 +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.examples; import org.eclipse.microprofile.rest.client.annotation.ClientHeaderParam; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; public interface WorkflowClient { diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/WorkflowTimeoutsClient.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/WorkflowTimeoutsClient.java index 71bdf45d55..70fbcf6fa9 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/WorkflowTimeoutsClient.java +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/WorkflowTimeoutsClient.java @@ -1,34 +1,36 @@ /* - * 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.examples; import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; -import javax.ws.rs.Consumes; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.HttpHeaders; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DefaultValue; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import static org.kie.kogito.examples.WorkflowTimeoutsClient.CONFIG_KEY; diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/WorkflowsProxyResource.java b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/WorkflowsProxyResource.java index afee9f0622..9ef3481841 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/WorkflowsProxyResource.java +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/java/org/kie/kogito/examples/WorkflowsProxyResource.java @@ -1,36 +1,38 @@ /* - * 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.examples; import org.eclipse.microprofile.rest.client.inject.RestClient; -import javax.enterprise.context.ApplicationScoped; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.HttpHeaders; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DefaultValue; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; /** * The objective of this class is to provide a simple proxy for the invocations from the UI to the SWs, and avoid diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/resources/META-INF/resources/index.html b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/resources/META-INF/resources/index.html index a7e95b5772..175e9b2b2d 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/resources/META-INF/resources/index.html +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/resources/META-INF/resources/index.html @@ -1,19 +1,23 @@ + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this 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/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/resources/application-kubernetes.properties b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/resources/application-kubernetes.properties index 8d89ab040b..aea54f8809 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/resources/application-kubernetes.properties +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/resources/application-kubernetes.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. +# + # Local dns service names in the format ..svc.cluster.local are ok for this example UI, # since invocations to the SWs occurs within the cluster by design. quarkus.rest-client.callback_state_timeouts.url=http://callbackstatetimeouts.timeouts-showcase.svc.cluster.local diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/resources/application.properties index e3ae771abd..8e88a7a63c 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/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.http.port=8080 quarkus.http.cors=true @@ -18,6 +37,3 @@ quarkus.rest-client.workflow_timeouts.url=http://localhost:9090 %container.quarkus.container-image.registry=dev.local %container.quarkus.container-image.name=timeouts-showcase-operator-devprofile-ui %container.quarkus.container-image.tag=1.0-SNAPSHOT -%container.quarkus.jib.jvm-entrypoint=/home/kogito/kogito-app-launch.sh -%container.quarkus.jib.base-jvm-image=quay.io/kiegroup/kogito-runtime-jvm:latest -%container.quarkus.jib.working-directory=/home/kogito/bin diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/workflows/callback_state_timeouts_devprofile.yaml b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/workflows/callback_state_timeouts_devprofile.yaml index fc663b934c..6eb965a5de 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/workflows/callback_state_timeouts_devprofile.yaml +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/workflows/callback_state_timeouts_devprofile.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. +# + apiVersion: sonataflow.org/v1alpha08 kind: SonataFlow metadata: diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/workflows/event_state_timeouts_devprofile.yaml b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/workflows/event_state_timeouts_devprofile.yaml index 18f9c7791a..9a18415374 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/workflows/event_state_timeouts_devprofile.yaml +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/workflows/event_state_timeouts_devprofile.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. +# + apiVersion: sonataflow.org/v1alpha08 kind: SonataFlow metadata: diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/workflows/switch_state_timeouts_devprofile.yaml b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/workflows/switch_state_timeouts_devprofile.yaml index 80c8418a48..eaa4f78bb6 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/workflows/switch_state_timeouts_devprofile.yaml +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/workflows/switch_state_timeouts_devprofile.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. +# + apiVersion: sonataflow.org/v1alpha08 kind: SonataFlow metadata: diff --git a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/workflows/workflow_timeouts_devprofile.yaml b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/workflows/workflow_timeouts_devprofile.yaml index 1563da4db1..e2e55de331 100644 --- a/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/workflows/workflow_timeouts_devprofile.yaml +++ b/serverless-workflow-examples/serverless-workflow-timeouts-showcase-operator-devprofile/workflows/workflow_timeouts_devprofile.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. +# + apiVersion: sonataflow.org/v1alpha08 kind: SonataFlow metadata: diff --git a/serverless-workflow-examples/sonataflow-fluent/README.md b/serverless-workflow-examples/sonataflow-fluent/README.md new file mode 100644 index 0000000000..cdd38688dd --- /dev/null +++ b/serverless-workflow-examples/sonataflow-fluent/README.md @@ -0,0 +1,16 @@ +## Sonata Workflow Embedded examples + +Contains several examples of serverless workflow embedded execution, located at package `org.kie.kogito.serverless.workflow.examples`. + +Each example consist of a commented Java class that can be run using its main method. + +The recommend order of execution is + +* HelloWorld +* Concatenation +* JQInterpolation +* ForEachJava +* ParallelRest + +Read comments, run and enjoy! + \ No newline at end of file diff --git a/serverless-workflow-examples/sonataflow-fluent/pom.xml b/serverless-workflow-examples/sonataflow-fluent/pom.xml new file mode 100644 index 0000000000..c075143d37 --- /dev/null +++ b/serverless-workflow-examples/sonataflow-fluent/pom.xml @@ -0,0 +1,49 @@ + + 4.0.0 + + org.kie.kogito.examples + serverless-workflow-examples + 999-SNAPSHOT + + sonataflow-fluent + Kogito Example :: SonataFlow :: Java Embedded examples + + org.kie.kogito + kogito-bom + 999-SNAPSHOT + 17 + SonataFlowFluent + + + + + ${kogito.bom.group-id} + ${kogito.bom.artifact-id} + ${kogito.bom.version} + pom + import + + + + + + org.kie.kogito + kogito-serverless-workflow-executor + pom + + + org.slf4j + slf4j-simple + + + org.assertj + assertj-core + test + + + org.junit.jupiter + junit-jupiter-engine + test + + + diff --git a/serverless-workflow-examples/sonataflow-fluent/src/main/java/org/kie/kogito/serverless/workflow/examples/Concatenation.java b/serverless-workflow-examples/sonataflow-fluent/src/main/java/org/kie/kogito/serverless/workflow/examples/Concatenation.java new file mode 100644 index 0000000000..a10a515c23 --- /dev/null +++ b/serverless-workflow-examples/sonataflow-fluent/src/main/java/org/kie/kogito/serverless/workflow/examples/Concatenation.java @@ -0,0 +1,67 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.serverless.workflow.examples; + +import java.util.Map; + +import org.kie.kogito.process.Process; +import org.kie.kogito.serverless.workflow.actions.WorkflowLogLevel; +import org.kie.kogito.serverless.workflow.executor.StaticWorkflowApplication; +import org.kie.kogito.serverless.workflow.models.JsonNodeModel; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import io.serverlessworkflow.api.Workflow; + +import static org.kie.kogito.serverless.workflow.fluent.ActionBuilder.call; +import static org.kie.kogito.serverless.workflow.fluent.ActionBuilder.log; +import static org.kie.kogito.serverless.workflow.fluent.FunctionBuilder.expr; +import static org.kie.kogito.serverless.workflow.fluent.StateBuilder.operation; +import static org.kie.kogito.serverless.workflow.fluent.WorkflowBuilder.workflow; + +public class Concatenation { + + private static final Logger logger = LoggerFactory.getLogger(Concatenation.class); + + public static void main(String[] args) { + try (StaticWorkflowApplication application = StaticWorkflowApplication.create()) { + // This flow illustrate the usage of two consecutive function calls + // create a reusable process for several executions + Process process = application.process(getWorkflow()); + // execute it with one person name + logger.info(application.execute(process, Map.of("name", "Javier", "surname", "Tirado")).getWorkflowdata().toPrettyString()); + // execute it with other person name + logger.info(application.execute(process, Map.of("name", "Mark", "surname", "Proctor")).getWorkflowdata().toPrettyString()); + } + } + + static Workflow getWorkflow() { + return workflow("ExpressionExample") + // concatenate name + .start(operation() + .action(call(expr("name", "\"My name is \"+.name"))) + // you can add several sequential actions into an operation + .action(log(WorkflowLogLevel.DEBUG, "\"Response is\"+.response"))) + // concatenate surname + .next(operation() + .action(call(expr("surname", ".response+\" and my surname is \"+.surname"))) + .outputFilter(".response")) + .end().build(); + } +} diff --git a/serverless-workflow-examples/sonataflow-fluent/src/main/java/org/kie/kogito/serverless/workflow/examples/ForEachJava.java b/serverless-workflow-examples/sonataflow-fluent/src/main/java/org/kie/kogito/serverless/workflow/examples/ForEachJava.java new file mode 100644 index 0000000000..52c74e5cfc --- /dev/null +++ b/serverless-workflow-examples/sonataflow-fluent/src/main/java/org/kie/kogito/serverless/workflow/examples/ForEachJava.java @@ -0,0 +1,81 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.serverless.workflow.examples; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Arrays; +import java.util.Collections; +import java.util.Map; + +import org.kie.kogito.serverless.workflow.executor.StaticWorkflowApplication; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import io.serverlessworkflow.api.Workflow; + +import static org.kie.kogito.serverless.workflow.fluent.ActionBuilder.call; +import static org.kie.kogito.serverless.workflow.fluent.FunctionBuilder.expr; +import static org.kie.kogito.serverless.workflow.fluent.FunctionBuilder.java; +import static org.kie.kogito.serverless.workflow.fluent.StateBuilder.forEach; +import static org.kie.kogito.serverless.workflow.fluent.StateBuilder.operation; +import static org.kie.kogito.serverless.workflow.fluent.WorkflowBuilder.workflow; + +public class ForEachJava { + + private static final Logger logger = LoggerFactory.getLogger(ForEachJava.class); + + public static void main(String[] args) { + try (StaticWorkflowApplication application = StaticWorkflowApplication.create()) { + // execute the flow passing the list of names and the file name + logger.info(application.execute(getWorkflow(), Map.of("names", Arrays.asList("Javi", "Mark", "Kris", "Alessandro"), "fileName", "message.txt")).getWorkflowdata().toPrettyString()); + } + } + + static Workflow getWorkflow() { + // this flow illustrate the usage of foreach and how to use java to perform task that are not part of sw spec. + // The flow accepts a list of names and suffix them with a message read from a file + return workflow("ForEachExample") + // first load the message from the file and store it in message property + .start(operation().action(call(java("getMessage", ForEachJava::addAdvice), ".fileName"))) + // then for each element in input names concatenate it with that message + .next(forEach(".names").loopVar("name").outputCollection(".messages") + // jq expression that suffix each name with the message retrieved from the file + .action(call(expr("concat", ".name+.adviceMessage"))) + // only return messages list as result of the flow + .outputFilter("{messages}")) + .end().build(); + } + + // Java method invoked from workflow accepts one parameter, which might be a Map or a primitive/wrapper type, depending on the args provided in the flow + // In this case, we are passing the name of a file in the classpath, so the argument is a string + // Java method return type is always a Map (if not output,it should return an empty map). In this case, + // we are adding an advice message to the flow model read from the file. If the file cannot be read, we return empty map. + private static Map addAdvice(String fileName) { + try (InputStream is = ClassLoader.getSystemResourceAsStream(fileName)) { + if (is != null) { + return Collections.singletonMap("adviceMessage", new String(is.readAllBytes())); + } + } catch (IOException io) { + logger.warn("Error reading file " + fileName + " from classpath", io); + } + return Collections.emptyMap(); + } + +} diff --git a/serverless-workflow-examples/sonataflow-fluent/src/main/java/org/kie/kogito/serverless/workflow/examples/HelloWorld.java b/serverless-workflow-examples/sonataflow-fluent/src/main/java/org/kie/kogito/serverless/workflow/examples/HelloWorld.java new file mode 100644 index 0000000000..3d8648e93a --- /dev/null +++ b/serverless-workflow-examples/sonataflow-fluent/src/main/java/org/kie/kogito/serverless/workflow/examples/HelloWorld.java @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.serverless.workflow.examples; + +import java.util.Collections; + +import org.kie.kogito.serverless.workflow.executor.StaticWorkflowApplication; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import io.serverlessworkflow.api.Workflow; + +import static org.kie.kogito.serverless.workflow.fluent.StateBuilder.inject; +import static org.kie.kogito.serverless.workflow.fluent.WorkflowBuilder.jsonObject; +import static org.kie.kogito.serverless.workflow.fluent.WorkflowBuilder.workflow; + +public class HelloWorld { + + private static final Logger logger = LoggerFactory.getLogger(HelloWorld.class); + + public static void main(String[] args) { + try (StaticWorkflowApplication application = StaticWorkflowApplication.create()) { + logger.info("Workflow execution result is {}", application.execute(getWorkflow(), Collections.emptyMap()).getWorkflowdata()); + } + } + + static Workflow getWorkflow() { + return workflow("HelloWorld").start( + inject( + jsonObject().put("greeting", "Hello World").put("mantra", "Serverless Workflow is awesome!"))) + .end() + .build(); + } +} diff --git a/serverless-workflow-examples/sonataflow-fluent/src/main/java/org/kie/kogito/serverless/workflow/examples/JQInterpolation.java b/serverless-workflow-examples/sonataflow-fluent/src/main/java/org/kie/kogito/serverless/workflow/examples/JQInterpolation.java new file mode 100644 index 0000000000..b090d23d23 --- /dev/null +++ b/serverless-workflow-examples/sonataflow-fluent/src/main/java/org/kie/kogito/serverless/workflow/examples/JQInterpolation.java @@ -0,0 +1,51 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.serverless.workflow.examples; + +import java.io.IOException; + +import org.kie.kogito.jackson.utils.ObjectMapperFactory; +import org.kie.kogito.serverless.workflow.executor.StaticWorkflowApplication; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import io.serverlessworkflow.api.Workflow; + +import static org.kie.kogito.serverless.workflow.fluent.ActionBuilder.call; +import static org.kie.kogito.serverless.workflow.fluent.FunctionBuilder.expr; +import static org.kie.kogito.serverless.workflow.fluent.StateBuilder.operation; +import static org.kie.kogito.serverless.workflow.fluent.WorkflowBuilder.workflow; + +public class JQInterpolation { + + private static final Logger logger = LoggerFactory.getLogger(JQInterpolation.class); + + public static void main(String[] args) throws IOException { + try (StaticWorkflowApplication application = StaticWorkflowApplication.create()) { + logger.info(application.execute(getWorkflow(), ObjectMapperFactory.get().createObjectNode().put("name", "Javierito").put("language", "Spanish")).getWorkflowdata().toPrettyString()); + + } + } + + static Workflow getWorkflow() { + final String INTERPOLATION = "interpolation"; + return workflow("PlayingWithExpression").function(expr(INTERPOLATION, "{greeting: \"My name is \\(.name). My language is \\(.language)\"}")) + .start(operation().action(call(INTERPOLATION))).end().build(); + } +} diff --git a/serverless-workflow-examples/sonataflow-fluent/src/main/java/org/kie/kogito/serverless/workflow/examples/ParallelRest.java b/serverless-workflow-examples/sonataflow-fluent/src/main/java/org/kie/kogito/serverless/workflow/examples/ParallelRest.java new file mode 100644 index 0000000000..58a5d3871c --- /dev/null +++ b/serverless-workflow-examples/sonataflow-fluent/src/main/java/org/kie/kogito/serverless/workflow/examples/ParallelRest.java @@ -0,0 +1,102 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.serverless.workflow.examples; + +import java.util.Map; + +import org.kie.kogito.process.Process; +import org.kie.kogito.serverless.workflow.actions.WorkflowLogLevel; +import org.kie.kogito.serverless.workflow.executor.StaticWorkflowApplication; +import org.kie.kogito.serverless.workflow.fluent.FunctionBuilder.HttpMethod; +import org.kie.kogito.serverless.workflow.models.JsonNodeModel; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.fasterxml.jackson.databind.node.ObjectNode; + +import io.serverlessworkflow.api.Workflow; + +import static org.kie.kogito.serverless.workflow.fluent.ActionBuilder.call; +import static org.kie.kogito.serverless.workflow.fluent.ActionBuilder.log; +import static org.kie.kogito.serverless.workflow.fluent.ActionBuilder.subprocess; +import static org.kie.kogito.serverless.workflow.fluent.FunctionBuilder.rest; +import static org.kie.kogito.serverless.workflow.fluent.StateBuilder.operation; +import static org.kie.kogito.serverless.workflow.fluent.StateBuilder.parallel; +import static org.kie.kogito.serverless.workflow.fluent.WorkflowBuilder.jsonObject; +import static org.kie.kogito.serverless.workflow.fluent.WorkflowBuilder.workflow; + +public class ParallelRest { + + private static final Logger logger = LoggerFactory.getLogger(ParallelRest.class); + + public static void main(String[] args) { + try (StaticWorkflowApplication application = StaticWorkflowApplication.create()) { + // create a reusable process for several executions + Process process = application.process(getWorkflow(application)); + // execute it with one person name + logger.info(application.execute(process, Map.of("name", "Javier")).getWorkflowdata().toPrettyString()); + // execute it with another person name + logger.info(application.execute(process, Map.of("name", "Alba")).getWorkflowdata().toPrettyString()); + } + } + + static Workflow getWorkflow(StaticWorkflowApplication application) { + ObjectNode nameArgs = jsonObject().put("name", ".name"); + + // Define a subflow process that retrieve country information from the given name + Workflow subflow = workflow("GetCountry") + // subflow consist of just one state with two sequential actions + .start(operation() + // call rest function to retrieve country id + .action(call(rest("getCountryId", HttpMethod.get, "https://api.nationalize.io:/?name={name}"), nameArgs) + // extract relevant information from the response using JQ expression + .resultFilter(".country[0].country_id").outputFilter(".id")) + // call rest function to retrieve country information from country id + .action(call(rest("getCountryInfo", HttpMethod.get, "https://restcountries.com/v3.1/alpha/{id}"), jsonObject().put("id", ".id")) + // we are only interested in country name, longitude and latitude + .resultFilter("{country: {name:.[].name.common, latitude: .[].latlng[0], longitude: .[].latlng[1] }}")) + // return only country field to parent flow + .outputFilter("{country}")) + .end().build(); + + Process subprocess = application.process(subflow); + // This is the main flow, it invokes two services (one for retrieving the age and another to get the gender of the given name )and one subprocess (the country one defined above) in parallel + // Once the three of them has been executed, if age is greater than 50, it retrieve the weather information for the retrieved country, + // Else, it gets the list of universities for that country. + return workflow("FullExample") + // Api key to be used in getting weather call + .constant("apiKey", "2482c1d33308a7cffedff5764e9ef203") + // Starts performing retrieval of gender, country and age from the given name on parallel + .start(parallel() + .newBranch().action(call(rest("getAge", HttpMethod.get, "https://api.agify.io/?name={name}"), nameArgs).resultFilter("{age}")).endBranch() + .newBranch().action(subprocess(subprocess)).endBranch() + .newBranch().action(call(rest("getGender", HttpMethod.get, "https://api.genderize.io/?name={name}"), nameArgs).resultFilter("{gender}")).endBranch()) + // once done, logs the age (using Jq string interpolation) + .next(operation().action(log(WorkflowLogLevel.INFO, "\"Age is \\(.age)\""))) + // If age is less that fifty, retrieve the list of universities (the parameters object is built using jq expressions) + .when(".age<50").next(operation().action(call(rest("getUniversities", HttpMethod.get, "http://universities.hipolabs.com/search?country={country}"), + jsonObject().put("country", ".country.name")).resultFilter(".[].name").outputFilter(".universities"))) + // Else retrieve the weather for that country capital latitude and longitude (note how parameters are build from model info) + .end().or() + .next(operation().action(call(rest("getWeather", HttpMethod.get, "https://api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon}&appid={appid}"), + jsonObject().put("lat", ".country.latitude").put("lon", ".country.longitude").put("appid", "$CONST.apiKey")) + .resultFilter("{weather:.main}"))) + .end().build(); + } +} diff --git a/serverless-workflow-examples/sonataflow-fluent/src/main/resources/division.sw.json b/serverless-workflow-examples/sonataflow-fluent/src/main/resources/division.sw.json new file mode 100644 index 0000000000..73b9960357 --- /dev/null +++ b/serverless-workflow-examples/sonataflow-fluent/src/main/resources/division.sw.json @@ -0,0 +1,26 @@ +{ + "id": "division", + "version": "1.0", + "name": "division", + "start": "divide", + "functions": [ + { + "name": "divide", + "type": "expression", + "operation": ".numerator / .denominator" + } + ], + "states": [ + { + "name": "divide", + "type": "operation", + "actions": [ + { + "name": "divide", + "functionRef": "divide" + } + ], + "end": true + } + ] +} diff --git a/serverless-workflow-examples/sonataflow-fluent/src/main/resources/expression.sw.json b/serverless-workflow-examples/sonataflow-fluent/src/main/resources/expression.sw.json new file mode 100644 index 0000000000..dcf80ae8ce --- /dev/null +++ b/serverless-workflow-examples/sonataflow-fluent/src/main/resources/expression.sw.json @@ -0,0 +1,73 @@ +{ + "id": "expression", + "version": "1.0", + "name": "Workflow Expression example", + "constants" : { + "Dog" : { + "castellano" : "perro", + "leones": "perru", + "gallego" : "can", + "aragones" : "cocho", + "catalan" : "gos", + "vasco": "txakurra" + } + }, + "dataInputSchema" : "schema/expression.json", + "description": "An example of how to use a JQ expression assignment", + "start": "squareState", + "extensions" : [ { + "extensionid": "workflow-output-schema", + "outputSchema": "schema/result.json" + } + ], + "functions": [ + { + "name": "max", + "type": "expression", + "operation": "{max: .numbers | max_by(.x), min: .numbers | min_by(.y)}" + }, + { + "name": "printMessage", + "type": "custom", + "operation": "sysout" + } + ], + "states": [ + { + "name": "squareState", + "type": "operation", + "actions": [ + { + "name": "maxAction", + "functionRef": { + "refName": "max" + }, + "actionDataFilter": { + "results" : ".max.x", + "toStateData" : ".number" + } + } + ], + "transition": "finish" + }, + { + "name": "finish", + "type": "operation", + "stateDataFilter": { + "input": "{result: .number}" + }, + "actions": [ + { + "name": "printAction", + "functionRef": { + "refName": "printMessage", + "arguments": { + "message": ".result" + } + } + } + ], + "end": true + } + ] +} diff --git a/serverless-workflow-examples/sonataflow-fluent/src/main/resources/message.txt b/serverless-workflow-examples/sonataflow-fluent/src/main/resources/message.txt new file mode 100644 index 0000000000..01b797e5bc --- /dev/null +++ b/serverless-workflow-examples/sonataflow-fluent/src/main/resources/message.txt @@ -0,0 +1 @@ + , congratulations, you are a happy user of serverless workflow \ No newline at end of file diff --git a/serverless-workflow-examples/sonataflow-fluent/src/main/resources/schema/complex.json b/serverless-workflow-examples/sonataflow-fluent/src/main/resources/schema/complex.json new file mode 100644 index 0000000000..7a4e0728f6 --- /dev/null +++ b/serverless-workflow-examples/sonataflow-fluent/src/main/resources/schema/complex.json @@ -0,0 +1,12 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Complex", + "description": "Complex number", + "type": "object", + "properties": { + "x" : {"type":"number"}, + "y" : {"type":"number"} + + }, + "required": ["x","y"] +} \ No newline at end of file diff --git a/serverless-workflow-examples/sonataflow-fluent/src/main/resources/schema/expression.json b/serverless-workflow-examples/sonataflow-fluent/src/main/resources/schema/expression.json new file mode 100644 index 0000000000..3633e4e547 --- /dev/null +++ b/serverless-workflow-examples/sonataflow-fluent/src/main/resources/schema/expression.json @@ -0,0 +1,15 @@ +{ + "$id": "classpath:/schema/expression.json", + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Expression", + "description": "Schema for expression test", + "type": "object", + "properties": { + "numbers": { + "description": "The array of numbers to be operated with", + "type": "array", + "items": {"$ref" : "complex.json"} + } + }, + "required": ["numbers"] +} \ No newline at end of file diff --git a/serverless-workflow-examples/sonataflow-fluent/src/main/resources/schema/result.json b/serverless-workflow-examples/sonataflow-fluent/src/main/resources/schema/result.json new file mode 100644 index 0000000000..c5a55d1d5e --- /dev/null +++ b/serverless-workflow-examples/sonataflow-fluent/src/main/resources/schema/result.json @@ -0,0 +1,13 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Expression Output", + "description": "Output schema for expression example", + "type": "object", + "properties": { + "result": { + "type" : "number", + "description": "Maximum value on x" + } + }, + "required": ["result"] +} \ No newline at end of file diff --git a/serverless-workflow-examples/sonataflow-fluent/src/test/java/org/kie/kogito/serverless/workflow/examples/WorkflowFluentExamplesTest.java b/serverless-workflow-examples/sonataflow-fluent/src/test/java/org/kie/kogito/serverless/workflow/examples/WorkflowFluentExamplesTest.java new file mode 100644 index 0000000000..11fe8b4739 --- /dev/null +++ b/serverless-workflow-examples/sonataflow-fluent/src/test/java/org/kie/kogito/serverless/workflow/examples/WorkflowFluentExamplesTest.java @@ -0,0 +1,100 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this 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.serverless.workflow.examples; + +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.Reader; +import java.util.Arrays; +import java.util.Collections; +import java.util.Map; + +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.kie.kogito.serverless.workflow.executor.StaticWorkflowApplication; +import org.kie.kogito.serverless.workflow.utils.ServerlessWorkflowUtils; +import org.kie.kogito.serverless.workflow.utils.WorkflowFormat; + +import com.fasterxml.jackson.databind.node.IntNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import com.fasterxml.jackson.databind.node.TextNode; + +import io.serverlessworkflow.api.Workflow; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.kie.kogito.serverless.workflow.fluent.WorkflowBuilder.jsonObject; + +public class WorkflowFluentExamplesTest { + + private static StaticWorkflowApplication application; + + @BeforeAll + static void init() { + application = StaticWorkflowApplication.create(); + } + + @AfterAll + static void cleanUp() { + application.close(); + } + + @Test + void testHelloWorldDefinition() { + ObjectNode expected = jsonObject().put("greeting", "Hello World").put("mantra", "Serverless Workflow is awesome!"); + assertThat(application.execute(HelloWorld.getWorkflow(), Collections.emptyMap()).getWorkflowdata()).isEqualTo(expected); + } + + @Test + void testForEachJavaDefinition() { + assertThat(application.execute(ForEachJava.getWorkflow(), Map.of("names", Arrays.asList("Javi", "Mark"), "fileName", "message.txt")).getWorkflowdata().get("messages")) + .containsExactly(new TextNode("Javi , congratulations, you are a happy user of serverless workflow"), + new TextNode("Mark , congratulations, you are a happy user of serverless workflow")); + } + + @Test + void testJQInterpolation() { + assertThat(application.execute(JQInterpolation.getWorkflow(), Map.of("name", "Javierito", "language", "Spanish")).getWorkflowdata().get("greeting")) + .isEqualTo(new TextNode("My name is Javierito. My language is Spanish")); + } + + @Test + void testConcatenationDefinition() { + assertThat(application.execute(Concatenation.getWorkflow(), Map.of("name", "Javier", "surname", "Tirado")).getWorkflowdata()) + .isEqualTo(new TextNode("My name is Javier and my surname is Tirado")); + } + + @Test + void testDivisionDefinition() throws IOException { + assertThat(application.execute( + getWorkflow("division.sw.json"), Map.of("numerator", 4, "denominator", 2)).getWorkflowdata().get("response")).isEqualTo(new IntNode(2)); + } + + @Test + void testExpressionDefinition() throws IOException { + assertThat(application.execute( + getWorkflow("expression.sw.json"), Map.of("numbers", Arrays.asList(Map.of("x", 3, "y", 4), Map.of("x", 5, "y", 7)))).getWorkflowdata().get("result")).isEqualTo(new IntNode(5)); + } + + private Workflow getWorkflow(String filename) throws IOException { + try (Reader in = new InputStreamReader(ClassLoader.getSystemResourceAsStream(filename))) { + return ServerlessWorkflowUtils.getWorkflow(in, WorkflowFormat.JSON); + } + } +}