Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into incubator-kie-issues#…
Browse files Browse the repository at this point in the history
…1460
  • Loading branch information
Gabriele-Cardosi committed Nov 8, 2024
2 parents 0695603 + d644c19 commit 21fc832
Show file tree
Hide file tree
Showing 26 changed files with 55 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .ci/jenkins/Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ pipeline {
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")
.withOptions("-pl .,kogito-java-examples,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")
Expand Down
9 changes: 9 additions & 0 deletions .ci/jenkins/dsl/jobs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ Map getMultijobPRConfig(JenkinsFolder jobFolder) {
parallel: true,
buildchain: true,
jobs : [
[
id: 'kogito-java-examples',
primary: true,
env : [
// Sonarcloud analysis is disabled for examples
KOGITO_EXAMPLES_SUBFOLDER_POM: 'kogito-java-examples/',
BUILD_MVN_OPTS_CURRENT: "${defaultBuildMvnOptsCurrent} ${getExamplesBuildMvnOptions(jobFolder).join(' ')}",
]
],
[
id: 'kogito-quarkus-examples',
primary: true,
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/pr-kogito-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ jobs:
timeout-minutes: 180
strategy:
matrix:
job_name: [ kogito-quarkus-examples, kogito-springboot-examples, serverless-workflow-examples ]
job_name: [ kogito-java-examples, kogito-quarkus-examples, kogito-springboot-examples, serverless-workflow-examples ]
os: [ubuntu-latest]
java-version: [17]
maven-version: ['3.9.6']
include:
- job_name: kogito-java-examples
repository: incubator-kie-kogito-examples
env_KOGITO_EXAMPLES_SUBFOLDER_POM: kogito-java-examples/
- job_name: kogito-quarkus-examples
repository: incubator-kie-kogito-examples
env_KOGITO_EXAMPLES_SUBFOLDER_POM: kogito-quarkus-examples/
Expand Down
6 changes: 6 additions & 0 deletions kogito-java-examples/dmn-embedded-mode-example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# decisions-embedded-mode-example

Is an example of running DMN decisions using plain java. This is an example decision for approving and declining the loan application. Please notice, the decision is only example that do not cover all cases from the banking domain.

## Execute
Simply run the main class `org.kie.kogito.decisions.embedded.DecisionsEmbeddedModeExample` either from the IDE or your command line.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.kie.kogito.decisions.embedded</groupId>
<artifactId>decisions-embedded-mode-example</artifactId>
<name>Kogito Example :: Decision Embedded Mode</name>
<artifactId>dmn-embedded-mode-example</artifactId>
<name>Kogito Example :: DMN Embedded Mode</name>
<version>999-SNAPSHOT</version>
<packaging>kjar</packaging>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>17</maven.compiler.source>
Expand All @@ -38,19 +39,11 @@
<version.kogito.bom>999-SNAPSHOT</version.kogito.bom>
<version.org.kie>999-SNAPSHOT</version.org.kie>

<version.quarkus.platform>3.8.6</version.quarkus.platform>
<version.org.slf4j>2.0.13</version.org.slf4j>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-bom</artifactId>
<version>${version.quarkus.platform}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-bom</artifactId>
Expand Down
29 changes: 29 additions & 0 deletions kogito-java-examples/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.kie.kogito.examples</groupId>
<artifactId>kogito-examples</artifactId>
<version>999-SNAPSHOT</version>
</parent>

<artifactId>kogito-java-examples</artifactId>
<packaging>pom</packaging>
<name>Kogito Example :: Java</name>

<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>dmn-embedded-mode-example</module>
<module>rules-embedded-mode-example</module>
</modules>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,11 @@
<version.kogito.bom>999-SNAPSHOT</version.kogito.bom>
<version.org.kie>999-SNAPSHOT</version.org.kie>

<version.quarkus.platform>3.8.6</version.quarkus.platform>
<version.org.slf4j>2.0.13</version.org.slf4j>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-bom</artifactId>
<version>${version.quarkus.platform}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-bom</artifactId>
Expand Down

This file was deleted.

4 changes: 2 additions & 2 deletions kogito-quarkus-examples/dmn-drools-quarkus-metrics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The use case is summarized in the following schema:

![RuntimeMetrics](https://user-images.githubusercontent.com/18282531/76740726-a0cbdd80-676e-11ea-8cc3-63ed5cbb3ac8.png)

To summarize, the kogito app will expose by default an endpoint `/metrics` with the prometheus variables, and a prometheus instance will simply fetch the data from there.
To summarize, the kogito app will expose by default an endpoint `/q/metrics` with the prometheus variables, and a prometheus instance will simply fetch the data from there.

### Dashboards

Expand Down Expand Up @@ -81,7 +81,7 @@ Post "hello":
curl -H "Content-Type: application/json" -X POST -d '{"strings":["world"]}' http://localhost:8080/hello
```

the service will return `["hello", "world"]`
the service will return `["world"]`

### POST /LoanEligibility

Expand Down
2 changes: 0 additions & 2 deletions kogito-quarkus-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
</activation>
<modules>
<module>decisiontable-quarkus-example</module>
<module>decisions-embedded-mode-example</module>
<module>dmn-15-quarkus-example</module>
<module>dmn-drools-quarkus-metrics</module>
<module>dmn-event-driven-quarkus</module>
Expand Down Expand Up @@ -100,7 +99,6 @@
<module>process-usertasks-timer-quarkus-with-console</module>
<module>process-usertasks-with-security-oidc-quarkus</module>
<module>process-usertasks-with-security-quarkus</module>
<module>rules-embedded-mode-example</module>
<module>rules-incubation-api-quarkus</module>
<module>rules-legacy-quarkus-example</module>
<module>rules-legacy-scesim-quarkus-example</module>
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>kogito-java-examples</module>
<module>kogito-quarkus-examples</module>
<module>kogito-springboot-examples</module>
<module>serverless-workflow-examples</module>
Expand Down

0 comments on commit 21fc832

Please sign in to comment.