This is an automated email from the ASF dual-hosted git repository.
gitgabrio pushed a commit to branch main
in repository
https://gitbox.apache.org/repos/asf/incubator-kie-kogito-examples.git
The following commit(s) were added to refs/heads/main by this push:
new ca10e571b [incubator-kie-issues#2257] Implement GRADLE examples -
Quarkus (#2177)
ca10e571b is described below
commit ca10e571bb00079808625c2d313c9a8f62a2657c
Author: Gabriele Cardosi <[email protected]>
AuthorDate: Fri Feb 20 14:30:25 2026 +0100
[incubator-kie-issues#2257] Implement GRADLE examples - Quarkus (#2177)
* Removing unnecessary phases from model generation executions
* [incubator-kie-issues#1918] Working gradle-springboot-examples
* [incubator-kie-issues#1918] Working gradle-quarkus-examples
* [incubator-kie-issues#1918] Working gradle-quarkus-examples tests
* [incubator-kie-issues#1918] Fixing docs for springboot-gradle example
* [incubator-kie-issues#1918] Fixing docs; test/build for quarkus still not
working
* [incubator-kie-issues#1918] Fixed test/build for quarkus inside
drools/incubator-kie-issues#1918
* [incubator-kie-issues#1839] MInor fixes
* [incubator-kie-issues#1839] Introducing profiles
* [incubator-kie-issues#1839] Remove unused plugin resolution for quarkus
gradle project
* [incubator-kie-issues#1839] Include gradle examples in CI build
* [incubator-kie-issues#1839] Include snapshots repository.
Verified locally with twin PR on drools repository.
* [incubator-kie-issues#1839] Disable dev services from quarkus gradle
example
---------
Co-authored-by: Yeser Amer <[email protected]>
Co-authored-by: Gabriele-Cardosi <[email protected]>
---
gradle-examples/README.md | 2 +-
.../{ => kogito-quarkus-gradle-examples}/pom.xml | 12 +-
.../README.md | 343 +++++++++++++
.../build.gradle | 77 +++
.../gradle.properties | 10 +
.../process-decisions-rules-quarkus-gradle/pom.xml | 92 ++++
.../profile-dev.gradle | 22 +
.../profile-prod.gradle | 22 +
.../settings.gradle | 17 +
.../kie/kogito/traffic/NativeTrafficProcessIT.java | 25 +
.../java/org/kie/kogito/traffic/DriverService.java | 46 ++
.../src/main/java/org/kie/kogito/traffic/Fine.java | 46 ++
.../java/org/kie/kogito/traffic/Violation.java | 92 ++++
.../licensevalidated/LicenseValidatedService.java | 49 ++
.../kogito/traffic/licensevalidated/Validated.java | 55 +++
.../kogito/traffic/licensevalidation/Driver.java | 131 +++++
.../LicenseValidationService.java | 49 ++
.../src/main/resources/LicenseValidatedService.drl | 32 ++
.../main/resources/LicenseValidationService.drl | 39 ++
.../src/main/resources/TrafficViolation.dmn | 288 +++++++++++
.../src/main/resources/application.properties | 27 ++
.../src/main/resources/traffic-rules-dmn.bpmn | 534 +++++++++++++++++++++
.../org/kie/kogito/traffic/TrafficProcessTest.java | 72 +++
gradle-examples/pom.xml | 1 +
24 files changed, 2077 insertions(+), 6 deletions(-)
diff --git a/gradle-examples/README.md b/gradle-examples/README.md
index e4edfab9d..e0c8e9440 100644
--- a/gradle-examples/README.md
+++ b/gradle-examples/README.md
@@ -19,7 +19,7 @@
# Kogito Gradle Plugin Examples
-This modules contains springboot kogito examples built with gradle.
+This modules contains quarkus and springboot kogito examples built with gradle.
This module, and its children, also contains pom.xml files so that they can be
built and tested inside maven-based CI.
To avoid duplication of the same folder, all the concrete examples uses the
same gradle executables [gradlew](./gradlew) or [gradlew.bat](./gradlew.bat)
and relates to the same [gradle-wrapper](./gradle) directory.
diff --git a/gradle-examples/pom.xml
b/gradle-examples/kogito-quarkus-gradle-examples/pom.xml
similarity index 61%
copy from gradle-examples/pom.xml
copy to gradle-examples/kogito-quarkus-gradle-examples/pom.xml
index f0b020447..a5a0d29d7 100644
--- a/gradle-examples/pom.xml
+++ b/gradle-examples/kogito-quarkus-gradle-examples/pom.xml
@@ -5,16 +5,18 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.kie.kogito.examples</groupId>
- <artifactId>kogito-examples</artifactId>
+ <artifactId>gradle-examples</artifactId>
<version>999-SNAPSHOT</version>
</parent>
- <artifactId>gradle-examples</artifactId>
<packaging>pom</packaging>
- <name>Gradle Examples</name>
- <description>Kogito Examples built with Gradle</description>
+
+ <artifactId>kogito-quarkus-gradle-examples</artifactId>
+
+ <name>Quarkus Gradle Examples</name>
+ <description>Kogito Quarkus Examples built with Gradle</description>
<modules>
- <module>kogito-springboot-gradle-examples</module>
+ <module>process-decisions-rules-quarkus-gradle</module>
</modules>
</project>
\ No newline at end of file
diff --git
a/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/README.md
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/README.md
new file mode 100644
index 000000000..b41d4a666
--- /dev/null
+++
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/README.md
@@ -0,0 +1,343 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+# Process with Decisions Integration through Business Rule Task - Gradle build
+
+This module represent a kogito spring-boot application containing rules,
decisions, and processes models, managed by GRADLE.
+
+## Description
+
+This is an example project that shows the usage of decisions within processes.
Decisions can be expressed in different domains or assets, such as DMN and DRL.
+The focus here is to show how to integrate decisions in an embedded way using
Business Rule Task where they must be deployed together with the process, in
the same application. All assets(bpmn, dmn, drl) must be under the
[resources](src/main/resources/).
+
+This example covers the following items:
+
+* DMN to define a decision service
+* DRL to define rules decision service
+* How to integrate the process with decisions using Business Rule Task
+
+### The Traffic Process example:
+
+It is based on the traffic violation evaluation process, where it is required
to fetch Driver information, and based on this, it is first performed the
license validation to check if the driver has a valid license (using a RuleUnit
in a DRL) after the license validation it is then executed the violation
evaluation defined as a DMN decision and following, it is checked in the
process if the output contains information whether the driver was suspended or
not, completing the process.
+
+#### Process using Business Rule Task
+
+
+
+This is a declarative approach, it does not require to have any extra
implementation, the interaction with decisions is executed out-of-the-box by
the engine. The information needed to execute the decision evaluation should be
set in the Data Assignments in the Business Rule Task.
+
+The BPMN file where this process is declared is
[traffic-rules-dmn.bpmn](src/main/resources/traffic-rules-dmn.bpmn).
+
+---
+
+* #### Process Properties
+<img src="docs/images/process-properties-embedded.png" width=300/>
+
+These are the properties defined for the process, the most important one in
this section to pay attention is the ID because it is used in the REST endpoint
generation referring to the path to interact with this process.
+
+* #### Proces Variables
+
+The variables used in the process itself, but the focus in this example are
the classes that are used to define the POJOs to interact the process with
decisions, that are the
[Violation](src/main/java/org/kie/kogito/traffic/Violation.java),
[Driver](src/main/java/org/kie/kogito/traffic/Driver.java),
[Fine](src/main/java/org/kie/kogito/traffic/Fine.java).
+
+<img src="docs/images/process-variables-embedded.png" width=300/>
+
+**Mapping data from Process to/from DMN**
+
+It is important to mention DMN for instance can define the Data Type in its
structure, but we can align all attributes names in a Java class that is used
as process variables, in case the attribute names contain spaces or are not
following java conventions we can use
[Jackson](https://github.com/FasterXML/jackson) annotations to make the process
variable POJOs aligned with DMN data types, for instance in the
[Violation](src/main/java/org/kie/kogito/traffic/Violation.java) class, where
it [...]
+
+**Violation Data Type in DMN**
+
+<img src="docs/images/violation-dmn-data-types.png" width=600/>
+
+
+* #### Get Driver Task
+
+Fetch for driver information, in this implementation it is just mocking a
result, that simply fill with an expired license date in case the `driverId` is
an odd number and with a valid date in case of an even number. In a real use
case, it could be performing an external call to a service or a database to get
this information.
+
+The service task implementation is done in the
[DriverService](src/main/java/org/kie/kogito/traffic/DriverService.java) class.
+
+In the data assignment the input is the `driverId` and output is the `driver`
variable, filled with all driver information.
+
+* #### License Validation Task (DRL)
+
+Represents the task to do the call to the DRL service.
+
+<img src="docs/images/license-validation-drl-businessrule.png" width=150/>
+
+The properties to be set are mainly the `Rule Language`that should be set as
`DRL` and the `Rule Flow Group` with `unit:` + `[the FQCN of the Rule Unit Data
class]`, in this case
[org.kie.kogito.traffic.LicenseValidationService](src/main/java/org/kie/kogito/traffic/LicenseValidationService.java).
+
+<img src="docs/images/license-validation-dmn-businessrule-properties.png"
width=300/>
+
+The input and output mapping for this task is just the driver variable that is
filled with license validation information.
+
+
+
+
+* #### Traffic Violation Task (DMN)
+Similar to the License Validation Task, but it represents the task to do the
call to the DMN service.
+
+<img src="docs/images/traffic-violation-dmn-businessrule.png" width=150/>
+
+The properties to be set are mainly the `Rule Language`that should be set as
`DMN` and the `Namespace` and `DMN Model Name` must be set with the values
defined in in the DMN, in this case
[TrafficViolation.dmn](src/main/resources/TrafficViolation.dmn).
+
+<img src="docs/images/traffic-violation-dmn-businessrule-properties.png"
width=300/>
+
+The input for this task is the `Driver` and `Violation` variables, and the
outputs are the `Suspended` and `Fine`.
+
+
+
+
+* #### Suspended Task
+Just an example task where it could be performed any action based on the
condition in which the driver is suspended. In the current implementation, it
is just logging the information in the console.
+
+
+* #### Not Suspended Task
+Just an example task where it could be performed any action based on the
condition in which the driver is **not** suspended. In the current
implementation, it is just logging the information in the console.
+
+## Decisions
+
+### License Validation - Rule Unit
+
+This decision consistis in rules which are evaluated to check if a driver's
license is expired or not according to the expiration date and thus populating
the result in the information in the driver variable.
+
+The DRL file where this Rule Unit is declared is
[LicenseValidationService.drl](src/main/resources/LicenseValidationService.drl)
and the the Java class that contains the Rule Unit Data is
[LicenseValidationService](src/main/java/org/kie/kogito/traffic/LicenseValidationService.java).
+
+### Traffic Violation - DMN
+
+This decision consists in a DMN that basically checks if a driver is suspended
or not according to the violation and current driver points in its license.
+
+
+
+The DMN file where this decision is declared is
[TrafficViolation.dmn](src/main/resources/TrafficViolation.dmn)
+
+
+
+## Build and run
+
+### Prerequisites
+
+You will need:
+- Java 17+ installed
+- Environment variable JAVA_HOME set accordingly
+
+### Compile and Run in Local Dev Mode
+
+```sh
+../../../gradlew clean quarkusDev
+```
+
+or on windows
+
+```sh
+..\..\..\gradlew.bat clean quarkusDev
+```
+
+!!!! TO BE FIXED
+**_### Package and Run in JVM mode
+```sh
+../../../gradlew clean jar
+java -jar target/process-decisions-springboot.jar
+```
+
+or on windows
+
+```sh
+..\..\..\gradlew.bat clean jar
+java -jar target\process-decisions-springboot.jar
+```_**
+!!!! TO BE FIXED !!!!
+
+## 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/q/openapi) - 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 we can invoke the REST endpoints and
examine the logic.
+
+### Submit a request
+
+To make use of this application it is as simple as putting a sending request
to `http://localhost:8080/traffic` with appropriate contents. See the following
cases:
+
+You can play with different attributes.
+The `driver-id` format is `{days}-{points}`. Days value > 0 will originate a
`driver` with valid license. In this case, the evaluation will proceed taking
in account the given points.
+Days value = 0 will originate a `driver` with invalid license. In this case,
the evaluation will stop after first node and will return a `null` validation.
+
+
+#### Valid License and not suspended Driver
+
+Given data:
+
+```json
+{
+ "driverId": "12-345",
+ "violation":{
+ "Type":"speed",
+ "Speed Limit": 100,
+ "Actual Speed":140
+ }
+}
+```
+
+Submit the JSON object from above:
+
+```sh
+curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json'
-d '{"driverId": "12-345","violation":{"Type":"speed","Speed Limit":
100,"Actual Speed":140}}' http://localhost:8080/traffic
+```
+
+After the Curl command you should see a similar console log
+
+```json
+{
+ "id": "06ecbbb0-4972-431d-9b37-355d83bb1092",
+ "driverId": "12-345",
+ "driver": {
+ "licenseExpiration": "2021-08-13T17:59:08.589+00:00",
+ "validLicense": true,
+ "Name": "Arthur",
+ "State": "SP",
+ "City": "Campinas",
+ "Points": 13,
+ "Age": 30
+ },
+ "validated": {
+ "ValidLicense": true,
+ "Suspended": "no"
+ },
+ "fine": {
+ "Amount": 1000.0,
+ "Points": 7
+ },
+ "violation": {
+ "Code": null,
+ "Date": null,
+ "Type": "speed",
+ "Speed Limit": 100,
+ "Actual Speed": 140
+ }
+}
+```
+
+
+#### Valid License and suspended Driver
+
+Given data:
+
+```json
+{
+ "driverId": "12-15",
+ "violation":{
+ "Type":"speed",
+ "Speed Limit": 100,
+ "Actual Speed":110
+ }
+}
+```
+
+Submit the JSON object from above:
+
+```sh
+curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json'
-d '{"driverId": "12-15","violation":{"Type":"speed","Speed Limit": 100,"Actual
Speed":110}}' http://localhost:8080/traffic
+```
+
+
+After the Curl command, you should see a similar console log
+
+```json
+{
+ "id": "887d8f39-93ec-43cc-96e5-df8e9bb199f8",
+ "driverId": "12-15",
+ "driver": {
+ "licenseExpiration": "2021-08-12T17:59:37.703+00:00",
+ "validLicense": false,
+ "Name": "Arthur",
+ "State": "SP",
+ "City": "Campinas",
+ "Points": 13,
+ "Age": 30
+ },
+ "validated": {
+ "Suspended": "yes",
+ "ValidLicense": false
+ },
+ "fine": null,
+ "violation": {
+ "Code": null,
+ "Date": null,
+ "Type": "speed",
+ "Speed Limit": 100,
+ "Actual Speed": 110
+ }
+}
+```
+
+#### Expired Valid License
+
+Given data:
+
+```json
+{
+ "driverId": "0-150",
+ "violation":{
+ "Type":"speed",
+ "Speed Limit": 100,
+ "Actual Speed":110
+ }
+}
+```
+
+Submit the JSON object from above:
+
+```sh
+curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json'
-d '{"driverId": "0-150","violation":{"Type":"speed","Speed Limit": 100,"Actual
Speed":110}}' http://localhost:8080/traffic
+```
+
+
+After the Curl command, you should see a similar console log
+
+```json
+{
+ "id": "887d8f39-93ec-43cc-96e5-df8e9bb199f8",
+ "driverId": "0-150",
+ "driver": {
+ "licenseExpiration": "2021-08-12T17:59:37.703+00:00",
+ "validLicense": false,
+ "Name": "Arthur",
+ "State": "SP",
+ "City": "Campinas",
+ "Points": 13,
+ "Age": 30
+ },
+ "validated": null,
+ "fine": null,
+ "violation": {
+ "Code": null,
+ "Date": null,
+ "Type": "speed",
+ "Speed Limit": 100,
+ "Actual Speed": 110
+ }
+}
+```
+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`.
\ No newline at end of file
diff --git
a/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/build.gradle
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/build.gradle
new file mode 100644
index 000000000..c4792ce66
--- /dev/null
+++
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/build.gradle
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+plugins {
+ id 'java'
+ id 'io.quarkus'
+
+ // Inspection purpose
+ id "com.dorongold.task-tree" version "${taskTreeVersion}"
+}
+
+repositories {
+ mavenCentral()
+ mavenLocal()
+ maven {
+ url = uri("https://repo.maven.apache.org/maven2/")
+ }
+ maven {
+ url = uri("https://repository.apache.org/snapshots/")
+ }
+}
+
+group 'org.kie.kogito.examples'
+version '999-SNAPSHOT'
+
+dependencies {
+ implementation
enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")
+ implementation 'io.quarkus:quarkus-arc'
+ implementation 'io.quarkus:quarkus-resteasy'
+ implementation 'io.quarkus:quarkus-resteasy-jackson'
+ implementation 'io.quarkus:quarkus-smallrye-openapi'
+
+ implementation platform("org.kie.kogito:kogito-bom:${kogitoVersion}")
+
+ implementation 'org.jbpm:jbpm-with-drools-quarkus'
+ implementation 'org.kie.kogito:process-workitems'
+ implementation 'org.kie.kogito:jbpm-flow'
+ implementation 'org.kie.kogito:jbpm-bpmn2'
+ implementation 'org.drools:drools-quarkus-decisions'
+ testImplementation("org.junit.jupiter:junit-jupiter:${junitVersion}")
+ testImplementation 'io.quarkus:quarkus-junit5'
+ testImplementation("io.rest-assured:rest-assured")
+}
+
+if (!hasProperty('buildProfile')) ext.buildProfile = 'prod'
+
+apply from: "profile-${buildProfile}.gradle"
+
+test {
+ systemProperty "java.util.logging.manager", "org.jboss.logmanager.LogManager"
+}
+
+compileJava {
+ options.encoding = 'UTF-8'
+ options.compilerArgs << '-parameters'
+}
+
+compileTestJava {
+ options.encoding = 'UTF-8'
+}
\ No newline at end of file
diff --git
a/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/gradle.properties
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/gradle.properties
new file mode 100644
index 000000000..6a6666058
--- /dev/null
+++
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/gradle.properties
@@ -0,0 +1,10 @@
+#Gradle properties
+## 3.27.1 needed to support gradle 9.2
+quarkusPluginId=io.quarkus
+quarkusPluginVersion=3.27.1
+quarkusPlatformGroupId=io.quarkus.platform
+quarkusPlatformArtifactId=quarkus-bom
+quarkusPlatformVersion=3.27.1
+taskTreeVersion=4.0.1
+junitVersion=5.12.1
+kogitoVersion=999-SNAPSHOT
\ No newline at end of file
diff --git
a/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/pom.xml
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/pom.xml
new file mode 100644
index 000000000..3e4089e93
--- /dev/null
+++
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/pom.xml
@@ -0,0 +1,92 @@
+<?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-quarkus-gradle-examples</artifactId>
+ <version>999-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>process-decisions-rules-quarkus-gradle</artifactId>
+ <name>Kogito Example :: Process :: Decisions :: Rules :: Quarkus ::
Gradle</name>
+ <description>Process with DRL, DMN and DRL integration - Quarkus -
Gradle</description>
+
+ <properties>
+
<java.module.name>process.decisions.rules.quarkus.gradle</java.module.name>
+ <maven.compiler.release>17</maven.compiler.release>
+
<gradle.executable>${project.parent.parent.basedir}/gradlew</gradle.executable>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.kie.kogito</groupId>
+ <artifactId>kogito-gradle-plugin</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <!-- exclude maven compilation -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ <testExcludes>
+ <exclude>**/*.java</exclude>
+ </testExcludes>
+ </configuration>
+ </plugin>
+ <!-- execute Gradle command -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>gradle</id>
+ <phase>test</phase>
+ <configuration>
+ <executable>${gradle.executable}</executable>
+ <arguments>
+ <argument>clean</argument>
+ <argument>quarkusIntTest</argument>
+ </arguments>
+ </configuration>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-clean-plugin</artifactId>
+ <configuration>
+ <filesets>
+ <fileset>
+ <directory>${project.basedir}/build</directory>
+ </fileset>
+ </filesets>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>WINDOWS</id>
+ <activation>
+ <os>
+ <family>windows</family>
+ </os>
+ </activation>
+ <properties>
+
<gradle.executable>${project.parent.parent.basedir}/gradlew.bat</gradle.executable>
+ </properties>
+ </profile>
+ </profiles>
+</project>
\ No newline at end of file
diff --git
a/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/profile-dev.gradle
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/profile-dev.gradle
new file mode 100644
index 000000000..3e86895ef
--- /dev/null
+++
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/profile-dev.gradle
@@ -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.
+ *
+ */
+dependencies {
+ implementation 'io.quarkus:quarkus-jdbc-h2'
+}
\ No newline at end of file
diff --git
a/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/profile-prod.gradle
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/profile-prod.gradle
new file mode 100644
index 000000000..76e96d227
--- /dev/null
+++
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/profile-prod.gradle
@@ -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.
+ *
+ */
+dependencies {
+ implementation 'io.quarkus:quarkus-jdbc-postgresql'
+}
\ No newline at end of file
diff --git
a/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/settings.gradle
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/settings.gradle
new file mode 100644
index 000000000..f73c78f79
--- /dev/null
+++
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/settings.gradle
@@ -0,0 +1,17 @@
+pluginManagement {
+ repositories {
+ mavenLocal()
+ mavenCentral()
+ maven {
+ url = uri("target/dependencies")
+ }
+ maven {
+ url = uri("https://plugins.gradle.org/m2/")
+ }
+ }
+
+ plugins {
+ id "${quarkusPluginId}" version "${quarkusPluginVersion}"
+ }
+}
+rootProject.name = "process-decisions-rules-quarkus-gradle"
\ No newline at end of file
diff --git
a/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/integrationTest/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/integrationTest/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java
new file mode 100644
index 000000000..55fe9c00e
--- /dev/null
+++
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/integrationTest/java/org/kie/kogito/traffic/NativeTrafficProcessIT.java
@@ -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.
+ */
+package org.kie.kogito.traffic;
+
+import io.quarkus.test.junit.QuarkusIntegrationTest;
+
+@QuarkusIntegrationTest
+public class NativeTrafficProcessIT extends TrafficProcessTest {
+}
diff --git
a/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/java/org/kie/kogito/traffic/DriverService.java
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/java/org/kie/kogito/traffic/DriverService.java
new file mode 100644
index 000000000..78a9328f0
--- /dev/null
+++
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/java/org/kie/kogito/traffic/DriverService.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.traffic;
+
+import java.time.ZonedDateTime;
+import java.util.Date;
+
+import org.kie.kogito.traffic.licensevalidation.Driver;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import jakarta.enterprise.context.ApplicationScoped;
+
+@ApplicationScoped
+public class DriverService {
+
+ private static Logger LOGGER =
LoggerFactory.getLogger(DriverService.class);
+
+ public Driver getDriver(String driverId) {
+ LOGGER.info("Get Driver Information for id = {}", driverId);
+ //Could call an external service, database, etc.
+
+ //Mocking driver details
+ String[] parts = driverId.split("-");
+ long days = Long.parseLong(parts[0]);
+ int points = Integer.parseInt(parts[1]);
+ Date licenseExpiration = new
Date(ZonedDateTime.now().plusDays(days).toInstant().toEpochMilli());
+ return new Driver(driverId, "Arthur", "SP", "Campinas", points, 30,
licenseExpiration);
+ }
+}
diff --git
a/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/java/org/kie/kogito/traffic/Fine.java
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/java/org/kie/kogito/traffic/Fine.java
new file mode 100644
index 000000000..928562fb5
--- /dev/null
+++
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/java/org/kie/kogito/traffic/Fine.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.traffic;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class Fine {
+
+ @JsonProperty("Amount")
+ private Double amount;
+
+ @JsonProperty("Points")
+ private Integer points;
+
+ public Double getAmount() {
+ return amount;
+ }
+
+ public void setAmount(Double amount) {
+ this.amount = amount;
+ }
+
+ public Integer getPoints() {
+ return points;
+ }
+
+ public void setPoints(Integer points) {
+ this.points = points;
+ }
+}
diff --git
a/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/java/org/kie/kogito/traffic/Violation.java
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/java/org/kie/kogito/traffic/Violation.java
new file mode 100644
index 000000000..170dd2dda
--- /dev/null
+++
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/java/org/kie/kogito/traffic/Violation.java
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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;
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+public class Violation {
+
+ @JsonProperty("Code")
+ private String code;
+
+ @JsonProperty("Date")
+ private Date date;
+
+ @JsonProperty("Type")
+ private String type;
+
+ @JsonProperty("Speed Limit")
+ private BigDecimal speedLimit;
+
+ @JsonProperty("Actual Speed")
+ private BigDecimal actualSpeed;
+
+ public Violation() {
+ }
+
+ public Violation(String type, BigDecimal speedLimit, BigDecimal
actualSpeed) {
+ this.type = type;
+ this.speedLimit = speedLimit;
+ this.actualSpeed = actualSpeed;
+ this.date = new Date();
+ }
+
+ public String getCode() {
+ return code;
+ }
+
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ public Date getDate() {
+ return date;
+ }
+
+ public void setDate(Date date) {
+ this.date = date;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public BigDecimal getSpeedLimit() {
+ return speedLimit;
+ }
+
+ public void setSpeedLimit(BigDecimal speedLimit) {
+ this.speedLimit = speedLimit;
+ }
+
+ public BigDecimal getActualSpeed() {
+ return actualSpeed;
+ }
+
+ public void setActualSpeed(BigDecimal actualSpeed) {
+ this.actualSpeed = actualSpeed;
+ }
+}
diff --git
a/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/java/org/kie/kogito/traffic/licensevalidated/LicenseValidatedService.java
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/java/org/kie/kogito/traffic/licensevalidated/LicenseValidatedService.java
new file mode 100644
index 000000000..374e5efa2
--- /dev/null
+++
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/java/org/kie/kogito/traffic/licensevalidated/LicenseValidatedService.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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 java.util.Date;
+
+import org.drools.ruleunits.api.DataSource;
+import org.drools.ruleunits.api.RuleUnitData;
+import org.drools.ruleunits.api.SingletonStore;
+
+public class LicenseValidatedService implements RuleUnitData {
+ private SingletonStore<Validated> validated;
+
+ public LicenseValidatedService() {
+ this(DataSource.createSingleton());
+ }
+
+ public LicenseValidatedService(SingletonStore<Validated> validated) {
+ this.validated = validated;
+ }
+
+ public void setValidated(SingletonStore<Validated> validated) {
+ this.validated = validated;
+ }
+
+ public SingletonStore<Validated> getValidated() {
+ return validated;
+ }
+
+ public Date getCurrentTime() {
+ return new Date();
+ }
+}
diff --git
a/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/java/org/kie/kogito/traffic/licensevalidated/Validated.java
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/java/org/kie/kogito/traffic/licensevalidated/Validated.java
new file mode 100644
index 000000000..a24f9189e
--- /dev/null
+++
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/java/org/kie/kogito/traffic/licensevalidated/Validated.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.traffic.licensevalidated;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Validated {
+
+ @JsonProperty("Suspended")
+ private String suspended;
+
+ @JsonProperty("ValidLicense")
+ private Boolean validLicense = Boolean.FALSE;
+
+ public Validated() {
+ }
+
+ public Validated(String suspended) {
+ this.suspended = suspended;
+ }
+
+ public String getSuspended() {
+ return suspended;
+ }
+
+ public Boolean isValidLicense() {
+ return validLicense;
+ }
+
+ public Boolean getValidLicense() {
+ return validLicense;
+ }
+
+ public void setValidLicense(Boolean validLicense) {
+ this.validLicense = validLicense;
+ }
+}
diff --git
a/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/java/org/kie/kogito/traffic/licensevalidation/Driver.java
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/java/org/kie/kogito/traffic/licensevalidation/Driver.java
new file mode 100644
index 000000000..cfe7d0793
--- /dev/null
+++
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/java/org/kie/kogito/traffic/licensevalidation/Driver.java
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Driver {
+
+ private String id;
+
+ @JsonProperty("Name")
+ private String name;
+
+ @JsonProperty("State")
+ private String state;
+
+ @JsonProperty("City")
+ private String city;
+
+ @JsonProperty("Points")
+ private Integer points;
+
+ @JsonProperty("Age")
+ private Integer age;
+
+ private Date licenseExpiration;
+
+ @JsonProperty("ValidLicense")
+ private Boolean validLicense = Boolean.FALSE;
+
+ public Driver() {
+ }
+
+ public Driver(String id, String name, String state, String city, Integer
points, Integer age, Date licenseExpiration) {
+ this.id = id;
+ this.name = name;
+ this.state = state;
+ this.city = city;
+ this.points = points;
+ this.age = age;
+ this.licenseExpiration = licenseExpiration;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ public String getCity() {
+ return city;
+ }
+
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+ public Integer getPoints() {
+ return points;
+ }
+
+ public void setPoints(Integer points) {
+ this.points = points;
+ }
+
+ public Integer getAge() {
+ return age;
+ }
+
+ public void setAge(Integer age) {
+ this.age = age;
+ }
+
+ public Date getLicenseExpiration() {
+ return licenseExpiration;
+ }
+
+ public void setLicenseExpiration(Date licenseExpiration) {
+ this.licenseExpiration = licenseExpiration;
+ }
+
+ public Boolean isValidLicense() {
+ return validLicense;
+ }
+
+ public Boolean getValidLicense() {
+ return validLicense;
+ }
+
+ public void setValidLicense(Boolean validLicense) {
+ this.validLicense = validLicense;
+ }
+}
diff --git
a/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/java/org/kie/kogito/traffic/licensevalidation/LicenseValidationService.java
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/java/org/kie/kogito/traffic/licensevalidation/LicenseValidationService.java
new file mode 100644
index 000000000..278b5fb47
--- /dev/null
+++
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/java/org/kie/kogito/traffic/licensevalidation/LicenseValidationService.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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;
+
+import org.drools.ruleunits.api.DataSource;
+import org.drools.ruleunits.api.RuleUnitData;
+import org.drools.ruleunits.api.SingletonStore;
+
+public class LicenseValidationService implements RuleUnitData {
+ private SingletonStore<Driver> driver;
+
+ public LicenseValidationService() {
+ this(DataSource.createSingleton());
+ }
+
+ public LicenseValidationService(SingletonStore<Driver> driver) {
+ this.driver = driver;
+ }
+
+ public void setDriver(SingletonStore<Driver> driver) {
+ this.driver = driver;
+ }
+
+ public SingletonStore<Driver> getDriver() {
+ return driver;
+ }
+
+ public Date getCurrentTime() {
+ return new Date();
+ }
+}
diff --git
a/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/resources/LicenseValidatedService.drl
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/resources/LicenseValidatedService.drl
new file mode 100644
index 000000000..3130e7305
--- /dev/null
+++
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/resources/LicenseValidatedService.drl
@@ -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.
+ */
+package org.kie.kogito.traffic.licensevalidated
+
+unit LicenseValidatedService
+
+rule "Is validated license validated"
+when
+ $validated: /validated[suspended.equalsIgnoreCase("no")]
+then
+ $validated.setValidLicense(true);
+end
+
+query "validated"
+ $validated : /validated
+end
\ No newline at end of file
diff --git
a/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/resources/LicenseValidationService.drl
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/resources/LicenseValidationService.drl
new file mode 100644
index 000000000..da7439087
--- /dev/null
+++
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/resources/LicenseValidationService.drl
@@ -0,0 +1,39 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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
+
+unit LicenseValidationService
+
+rule "Is driver license valid"
+when
+ $driver: /driver[licenseExpiration.after(currentTime)]
+then
+ $driver.setValidLicense(true);
+end
+
+rule "Is driver license expired"
+when
+ $driver: /driver[licenseExpiration.before(currentTime)]
+then
+ $driver.setValidLicense(false);
+end
+
+query "validation"
+ $driver : /driver
+end
\ No newline at end of file
diff --git
a/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/resources/TrafficViolation.dmn
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/resources/TrafficViolation.dmn
new file mode 100644
index 000000000..daac1062a
--- /dev/null
+++
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/resources/TrafficViolation.dmn
@@ -0,0 +1,288 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/"
xmlns="https://github.com/kiegroup/drools/kie-dmn/_A4BCA8B8-CF08-433F-93B2-A2598F19ECFF"
xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/"
xmlns:kie="http://www.drools.org/kie/dmn/1.2"
xmlns:feel="http://www.omg.org/spec/DMN/20180521/FEEL/"
xmlns:dmndi="http://www.omg.org/spec/DMN/20180521/DMNDI/"
xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/"
id="_1C792953-80DB-4B32-99EB-25FBE32BAF9E" name="Traffic Violation [...]
+ <dmn:extensionElements/>
+ <dmn:itemDefinition id="_63824D3F-9173-446D-A940-6A7F0FA056BB"
name="tDriver" isCollection="false">
+ <dmn:itemComponent id="_9DAB5DAA-3B44-4F6D-87F2-95125FB2FEE4" name="Name"
isCollection="false">
+ <dmn:typeRef>string</dmn:typeRef>
+ </dmn:itemComponent>
+ <dmn:itemComponent id="_856BA8FA-EF7B-4DF9-A1EE-E28263CE9955" name="Age"
isCollection="false">
+ <dmn:typeRef>number</dmn:typeRef>
+ </dmn:itemComponent>
+ <dmn:itemComponent id="_FDC2CE03-D465-47C2-A311-98944E8CC23F" name="State"
isCollection="false">
+ <dmn:typeRef>string</dmn:typeRef>
+ </dmn:itemComponent>
+ <dmn:itemComponent id="_D6FD34C4-00DC-4C79-B1BF-BBCF6FC9B6D7" name="City"
isCollection="false">
+ <dmn:typeRef>string</dmn:typeRef>
+ </dmn:itemComponent>
+ <dmn:itemComponent id="_7110FE7E-1A38-4C39-B0EB-AEEF06BA37F4"
name="Points" isCollection="false">
+ <dmn:typeRef>number</dmn:typeRef>
+ </dmn:itemComponent>
+ </dmn:itemDefinition>
+ <dmn:itemDefinition id="_40731093-0642-4588-9183-1660FC55053B"
name="tViolation" isCollection="false">
+ <dmn:itemComponent id="_39E88D9F-AE53-47AD-B3DE-8AB38D4F50B3" name="Code"
isCollection="false">
+ <dmn:typeRef>string</dmn:typeRef>
+ </dmn:itemComponent>
+ <dmn:itemComponent id="_1648EA0A-2463-4B54-A12A-D743A3E3EE7B" name="Date"
isCollection="false">
+ <dmn:typeRef>date</dmn:typeRef>
+ </dmn:itemComponent>
+ <dmn:itemComponent id="_9F129EAA-4E71-4D99-B6D0-84EEC3AC43CC" name="Type"
isCollection="false">
+ <dmn:typeRef>string</dmn:typeRef>
+ <dmn:allowedValues kie:constraintType="enumeration"
id="_626A8F9C-9DD1-44E0-9568-0F6F8F8BA228">
+ <dmn:text>"speed", "parking", "driving under the influence"</dmn:text>
+ </dmn:allowedValues>
+ </dmn:itemComponent>
+ <dmn:itemComponent id="_DDD10D6E-BD38-4C79-9E2F-8155E3A4B438" name="Speed
Limit" isCollection="false">
+ <dmn:typeRef>number</dmn:typeRef>
+ </dmn:itemComponent>
+ <dmn:itemComponent id="_229F80E4-2892-494C-B70D-683ABF2345F6" name="Actual
Speed" isCollection="false">
+ <dmn:typeRef>number</dmn:typeRef>
+ </dmn:itemComponent>
+ </dmn:itemDefinition>
+ <dmn:itemDefinition id="_2D4F30EE-21A6-4A78-A524-A5C238D433AE" name="tFine"
isCollection="false">
+ <dmn:itemComponent id="_B9F70BC7-1995-4F51-B949-1AB65538B405"
name="Amount" isCollection="false">
+ <dmn:typeRef>number</dmn:typeRef>
+ </dmn:itemComponent>
+ <dmn:itemComponent id="_F49085D6-8F08-4463-9A1A-EF6B57635DBD"
name="Points" isCollection="false">
+ <dmn:typeRef>number</dmn:typeRef>
+ </dmn:itemComponent>
+ </dmn:itemDefinition>
+ <dmn:itemDefinition id="_E08BBD2C-2308-4E20-9C47-58B092771753"
name="tValidated" isCollection="false">
+ <dmn:itemComponent id="_C7B66E05-6586-4C08-8D85-8EB61C929361"
name="Suspended" isCollection="false">
+ <dmn:typeRef>string</dmn:typeRef>
+ </dmn:itemComponent>
+ <dmn:itemComponent id="_AFEA2C02-9260-45AB-BEB9-FB9F5A6D85B4"
name="ValidLicense" isCollection="false">
+ <dmn:typeRef>boolean</dmn:typeRef>
+ </dmn:itemComponent>
+ </dmn:itemDefinition>
+ <dmn:inputData id="_1929CBD5-40E0-442D-B909-49CEDE0101DC" name="Violation">
+ <dmn:extensionElements/>
+ <dmn:variable id="_C16CF9B1-5FAB-48A0-95E0-5FCD661E0406" name="Violation"
typeRef="tViolation"/>
+ </dmn:inputData>
+ <dmn:decision id="_4055D956-1C47-479C-B3F4-BAEB61F1C929" name="Fine">
+ <dmn:extensionElements/>
+ <dmn:variable id="_8C1EAC83-F251-4D94-8A9E-B03ACF6849CD" name="Fine"
typeRef="tFine"/>
+ <dmn:informationRequirement id="_800A3BBB-90A3-4D9D-BA5E-A311DED0134F">
+ <dmn:requiredInput href="#_1929CBD5-40E0-442D-B909-49CEDE0101DC"/>
+ </dmn:informationRequirement>
+ <dmn:decisionTable id="_C8F7F579-E06C-4A2F-8485-65FAFAC3FE6A"
hitPolicy="UNIQUE" preferredOrientation="Rule-as-Row">
+ <dmn:input id="_B53A6F0D-F72C-41EF-96B3-F31269AC0FED">
+ <dmn:inputExpression id="_974C8D01-728F-4CE5-8C69-BE884125B859"
typeRef="string">
+ <dmn:text>Violation.Type</dmn:text>
+ </dmn:inputExpression>
+ </dmn:input>
+ <dmn:input id="_D5319F80-1C59-4736-AF2D-D29DE6B7E76D">
+ <dmn:inputExpression id="_3FEB4DE3-90C6-438E-99BF-9BB1BF5B078A"
typeRef="number">
+ <dmn:text>Violation.Actual Speed - Violation.Speed Limit</dmn:text>
+ </dmn:inputExpression>
+ </dmn:input>
+ <dmn:output id="_9012031F-9C01-44E5-8CD2-E6704D594504" name="Amount"
typeRef="number"/>
+ <dmn:output id="_7CAC8240-E1A5-4FEB-A0D4-B8613F0DE54B" name="Points"
typeRef="number"/>
+ <dmn:annotation name=""/>
+ <dmn:rule id="_424A80AE-916F-4451-9B6B-71557F7EC65A">
+ <dmn:inputEntry id="_EDA4F336-AA28-4F5F-ADFC-401E6DCC8D35">
+ <dmn:text>"speed"</dmn:text>
+ </dmn:inputEntry>
+ <dmn:inputEntry id="_246AAB08-A945-4599-9220-7C24B6716FDD">
+ <dmn:text>[10..30)</dmn:text>
+ </dmn:inputEntry>
+ <dmn:outputEntry id="_E49345EE-51D3-47C7-B658-3607E723FF37">
+ <dmn:text>500</dmn:text>
+ </dmn:outputEntry>
+ <dmn:outputEntry id="_1D56F3CB-6BAE-4415-940F-00F37121813D">
+ <dmn:text>3</dmn:text>
+ </dmn:outputEntry>
+ <dmn:annotationEntry>
+ <dmn:text/>
+ </dmn:annotationEntry>
+ </dmn:rule>
+ <dmn:rule id="_B1ECE6A9-6B82-4A85-A7CA-5F96CDB0DCB6">
+ <dmn:inputEntry id="_2390F686-65CF-40FF-BF9A-72DFBAEBACAC">
+ <dmn:text>"speed"</dmn:text>
+ </dmn:inputEntry>
+ <dmn:inputEntry id="_8CEBE4D5-DBEF-46EF-BD95-7B96148B6D8A">
+ <dmn:text>>= 30</dmn:text>
+ </dmn:inputEntry>
+ <dmn:outputEntry id="_5FCC56B7-6BAA-4B09-AC61-7EB9D4CD58C3">
+ <dmn:text>1000</dmn:text>
+ </dmn:outputEntry>
+ <dmn:outputEntry id="_79FF8FDD-3299-4DFD-AA14-D2022504BDAD">
+ <dmn:text>7</dmn:text>
+ </dmn:outputEntry>
+ <dmn:annotationEntry>
+ <dmn:text/>
+ </dmn:annotationEntry>
+ </dmn:rule>
+ <dmn:rule id="_8FC7068C-A3FD-44D9-AC2B-69C160A12E5D">
+ <dmn:inputEntry id="_02EEE8A9-1AD7-4708-8EC8-9B4177B05167">
+ <dmn:text>"parking"</dmn:text>
+ </dmn:inputEntry>
+ <dmn:inputEntry id="_A5141FF4-8D63-49DB-8979-3B64A3BD9A82">
+ <dmn:text>-</dmn:text>
+ </dmn:inputEntry>
+ <dmn:outputEntry id="_EFDA632D-113D-46C9-94B8-78E9F9770CA4">
+ <dmn:text>100</dmn:text>
+ </dmn:outputEntry>
+ <dmn:outputEntry id="_05F86973-52CE-4C9D-B785-47B6340D10FD">
+ <dmn:text>1</dmn:text>
+ </dmn:outputEntry>
+ <dmn:annotationEntry>
+ <dmn:text/>
+ </dmn:annotationEntry>
+ </dmn:rule>
+ <dmn:rule id="_A742DF2B-DC91-4166-9773-6EF86A45A625">
+ <dmn:inputEntry id="_F5B5AE87-D9E6-4142-B01D-D79D4BA49EEE">
+ <dmn:text>"driving under the influence"</dmn:text>
+ </dmn:inputEntry>
+ <dmn:inputEntry id="_BD2A43F5-46D8-436A-B8A1-D98747C836B1">
+ <dmn:text>-</dmn:text>
+ </dmn:inputEntry>
+ <dmn:outputEntry id="_ECAF3378-46B6-4F40-B95A-E90DB700BF7D">
+ <dmn:text>1000</dmn:text>
+ </dmn:outputEntry>
+ <dmn:outputEntry id="_F0016A9C-D1D0-472A-9FB3-ABE77AD15F7D">
+ <dmn:text>5</dmn:text>
+ </dmn:outputEntry>
+ <dmn:annotationEntry>
+ <dmn:text/>
+ </dmn:annotationEntry>
+ </dmn:rule>
+ </dmn:decisionTable>
+ </dmn:decision>
+ <dmn:inputData id="_1F9350D7-146D-46F1-85D8-15B5B68AF22A" name="Driver">
+ <dmn:extensionElements/>
+ <dmn:variable id="_A80F16DF-0DB4-43A2-B041-32900B1A3F3D" name="Driver"
typeRef="tDriver"/>
+ </dmn:inputData>
+ <dmn:decision id="_4780A053-F62F-4245-9297-31A788132083" name="Validated">
+ <dmn:extensionElements/>
+ <dmn:variable id="_5269D123-38DF-47C2-9F9A-334192A0EC48" name="Validated"
typeRef="tValidated"/>
+ <dmn:informationRequirement id="_982211B1-5246-49CD-BE85-3211F71253CF">
+ <dmn:requiredInput href="#_1F9350D7-146D-46F1-85D8-15B5B68AF22A"/>
+ </dmn:informationRequirement>
+ <dmn:informationRequirement id="_AEC4AA5F-50C3-4FED-A0C2-261F90290731">
+ <dmn:requiredDecision href="#_4055D956-1C47-479C-B3F4-BAEB61F1C929"/>
+ </dmn:informationRequirement>
+ <dmn:decisionTable id="_DADF0E8B-DD97-4B1A-BECC-B767E54AC382"
hitPolicy="UNIQUE" preferredOrientation="Rule-as-Row">
+ <dmn:input id="_D09ABFAD-70D9-4DA9-AD41-428D79F6743B">
+ <dmn:inputExpression id="_61619DF0-0F95-405E-B478-5D98B8F7F7B8"
typeRef="number">
+ <dmn:text>Driver.Points</dmn:text>
+ </dmn:inputExpression>
+ </dmn:input>
+ <dmn:output id="_EC5E832D-6BDB-4688-8ADA-C53E29855BBD" name="Suspended"
typeRef="string"/>
+ <dmn:output id="_5FCF6CCE-D2FB-48AB-A3CA-460A32E1F53F"
name="ValidLicense" typeRef="boolean"/>
+ <dmn:annotation name=""/>
+ <dmn:rule id="_ED7227BE-9943-4EE5-B8E1-50291952F6A4">
+ <dmn:inputEntry id="_328516FE-62FA-4774-8546-68ED4D7B3730">
+ <dmn:text>< 20</dmn:text>
+ </dmn:inputEntry>
+ <dmn:outputEntry id="_6CA9E17C-D596-4A4F-99DF-2C6410B47431">
+ <dmn:text>"yes"</dmn:text>
+ </dmn:outputEntry>
+ <dmn:outputEntry id="_3A293217-F17E-43B1-89DF-B9CCD64C43B5">
+ <dmn:text>false</dmn:text>
+ </dmn:outputEntry>
+ <dmn:annotationEntry>
+ <dmn:text/>
+ </dmn:annotationEntry>
+ </dmn:rule>
+ <dmn:rule id="_B5424E50-62D3-4535-A55E-B55D7C41235F">
+ <dmn:inputEntry id="_CF5CDBFC-A15B-41F6-B96D-DC9CE7BCAC26">
+ <dmn:text>= 20</dmn:text>
+ </dmn:inputEntry>
+ <dmn:outputEntry id="_2A45948F-008C-4C24-9BDD-C3020CA2D0F1">
+ <dmn:text>"no"</dmn:text>
+ </dmn:outputEntry>
+ <dmn:outputEntry id="_886E5F7E-913C-4F57-B1EA-3595C8060EE0">
+ <dmn:text>true</dmn:text>
+ </dmn:outputEntry>
+ <dmn:annotationEntry>
+ <dmn:text/>
+ </dmn:annotationEntry>
+ </dmn:rule>
+ <dmn:rule id="_1A61415B-FB65-4423-BCEC-365609D4567D">
+ <dmn:inputEntry id="_A075DB28-4E22-4681-814A-62EF273095FA">
+ <dmn:text>> 20</dmn:text>
+ </dmn:inputEntry>
+ <dmn:outputEntry id="_70D6A183-AB5B-4FBD-8FE5-9E05491F9FEB">
+ <dmn:text>"no"</dmn:text>
+ </dmn:outputEntry>
+ <dmn:outputEntry id="_B5DC1F55-0F53-4B85-9A18-BB21B8C9C1DB">
+ <dmn:text>true</dmn:text>
+ </dmn:outputEntry>
+ <dmn:annotationEntry>
+ <dmn:text/>
+ </dmn:annotationEntry>
+ </dmn:rule>
+ </dmn:decisionTable>
+ </dmn:decision>
+ <dmndi:DMNDI>
+ <dmndi:DMNDiagram id="_3FEB9053-0E6B-4880-A6AE-85FAB5072161" name="DRG">
+ <di:extension>
+ <kie:ComponentsWidthsExtension>
+ <kie:ComponentWidths
dmnElementRef="_C8F7F579-E06C-4A2F-8485-65FAFAC3FE6A">
+ <kie:width>50</kie:width>
+ <kie:width>254</kie:width>
+ <kie:width>329</kie:width>
+ <kie:width>119</kie:width>
+ <kie:width>100</kie:width>
+ <kie:width>186</kie:width>
+ </kie:ComponentWidths>
+ <kie:ComponentWidths
dmnElementRef="_DADF0E8B-DD97-4B1A-BECC-B767E54AC382">
+ <kie:width>50</kie:width>
+ <kie:width>329</kie:width>
+ <kie:width>100</kie:width>
+ <kie:width>119</kie:width>
+ <kie:width>186</kie:width>
+ </kie:ComponentWidths>
+ </kie:ComponentsWidthsExtension>
+ </di:extension>
+ <dmndi:DMNShape id="dmnshape-drg-_1929CBD5-40E0-442D-B909-49CEDE0101DC"
dmnElementRef="_1929CBD5-40E0-442D-B909-49CEDE0101DC" isCollapsed="false">
+ <dmndi:DMNStyle>
+ <dmndi:FillColor red="255" green="255" blue="255"/>
+ <dmndi:StrokeColor red="0" green="0" blue="0"/>
+ <dmndi:FontColor red="0" green="0" blue="0"/>
+ </dmndi:DMNStyle>
+ <dc:Bounds x="708" y="350" width="100" height="50"/>
+ <dmndi:DMNLabel/>
+ </dmndi:DMNShape>
+ <dmndi:DMNShape id="dmnshape-drg-_4055D956-1C47-479C-B3F4-BAEB61F1C929"
dmnElementRef="_4055D956-1C47-479C-B3F4-BAEB61F1C929" isCollapsed="false">
+ <dmndi:DMNStyle>
+ <dmndi:FillColor red="255" green="255" blue="255"/>
+ <dmndi:StrokeColor red="0" green="0" blue="0"/>
+ <dmndi:FontColor red="0" green="0" blue="0"/>
+ </dmndi:DMNStyle>
+ <dc:Bounds x="709" y="210" width="100" height="50"/>
+ <dmndi:DMNLabel/>
+ </dmndi:DMNShape>
+ <dmndi:DMNShape id="dmnshape-drg-_1F9350D7-146D-46F1-85D8-15B5B68AF22A"
dmnElementRef="_1F9350D7-146D-46F1-85D8-15B5B68AF22A" isCollapsed="false">
+ <dmndi:DMNStyle>
+ <dmndi:FillColor red="255" green="255" blue="255"/>
+ <dmndi:StrokeColor red="0" green="0" blue="0"/>
+ <dmndi:FontColor red="0" green="0" blue="0"/>
+ </dmndi:DMNStyle>
+ <dc:Bounds x="369" y="344" width="100" height="50"/>
+ <dmndi:DMNLabel/>
+ </dmndi:DMNShape>
+ <dmndi:DMNShape id="dmnshape-drg-_4780A053-F62F-4245-9297-31A788132083"
dmnElementRef="_4780A053-F62F-4245-9297-31A788132083" isCollapsed="false">
+ <dmndi:DMNStyle>
+ <dmndi:FillColor red="255" green="255" blue="255"/>
+ <dmndi:StrokeColor red="0" green="0" blue="0"/>
+ <dmndi:FontColor red="0" green="0" blue="0"/>
+ </dmndi:DMNStyle>
+ <dc:Bounds x="540" y="76" width="100" height="50"/>
+ <dmndi:DMNLabel/>
+ </dmndi:DMNShape>
+ <dmndi:DMNEdge id="dmnedge-drg-_800A3BBB-90A3-4D9D-BA5E-A311DED0134F"
dmnElementRef="_800A3BBB-90A3-4D9D-BA5E-A311DED0134F">
+ <di:waypoint x="758" y="375"/>
+ <di:waypoint x="759" y="235"/>
+ </dmndi:DMNEdge>
+ <dmndi:DMNEdge
id="dmnedge-drg-_982211B1-5246-49CD-BE85-3211F71253CF-AUTO-TARGET"
dmnElementRef="_982211B1-5246-49CD-BE85-3211F71253CF">
+ <di:waypoint x="419" y="369"/>
+ <di:waypoint x="590" y="126"/>
+ </dmndi:DMNEdge>
+ <dmndi:DMNEdge id="dmnedge-drg-_AEC4AA5F-50C3-4FED-A0C2-261F90290731"
dmnElementRef="_AEC4AA5F-50C3-4FED-A0C2-261F90290731">
+ <di:waypoint x="759" y="235"/>
+ <di:waypoint x="590" y="126"/>
+ </dmndi:DMNEdge>
+ </dmndi:DMNDiagram>
+ </dmndi:DMNDI>
+</dmn:definitions>
\ No newline at end of file
diff --git
a/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/resources/application.properties
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/resources/application.properties
new file mode 100644
index 000000000..4953f9096
--- /dev/null
+++
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/resources/application.properties
@@ -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.
+#
+
+# Packaging
+# quarkus.package.jar.type=fast-jar
+
+quarkus.swagger-ui.always-include=true
+
+kogito.generate.rest.decisions=true
+kogito.generate.rest.processes=true
+quarkus.devservices.enabled=false
\ No newline at end of file
diff --git
a/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/resources/traffic-rules-dmn.bpmn
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/resources/traffic-rules-dmn.bpmn
new file mode 100644
index 000000000..1ddb14979
--- /dev/null
+++
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/main/resources/traffic-rules-dmn.bpmn
@@ -0,0 +1,534 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:bpsim="http://www.bpsim.org/schemas/1.0"
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
xmlns:drools="http://www.jboss.org/drools" id="_FcMNgJTYEDuJVMby5BR7SQ"
xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd
http://www. [...]
+ <bpmn2:itemDefinition id="_driverIdItem" structureRef="String"/>
+ <bpmn2:itemDefinition id="_violationItem"
structureRef="org.kie.kogito.traffic.Violation"/>
+ <bpmn2:itemDefinition id="_driverItem"
structureRef="org.kie.kogito.traffic.licensevalidation.Driver"/>
+ <bpmn2:itemDefinition id="_fineItem"
structureRef="org.kie.kogito.traffic.Fine"/>
+ <bpmn2:itemDefinition id="_validatedItem"
structureRef="org.kie.kogito.traffic.licensevalidated.Validated"/>
+ <bpmn2:itemDefinition
id="__B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_namespaceInputXItem"
structureRef="java.lang.String"/>
+ <bpmn2:itemDefinition
id="__B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_modelInputXItem"
structureRef="java.lang.String"/>
+ <bpmn2:itemDefinition
id="__B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_ViolationInputXItem"
structureRef="org.kie.kogito.traffic.Violation"/>
+ <bpmn2:itemDefinition
id="__B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_DriverInputXItem"
structureRef="org.kie.kogito.traffic.licensevalidation.Driver"/>
+ <bpmn2:itemDefinition
id="__B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_ValidatedOutputXItem"
structureRef="org.kie.kogito.traffic.licensevalidated.Validated"/>
+ <bpmn2:itemDefinition
id="__B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_FineOutputXItem"
structureRef="org.kie.kogito.traffic.Fine"/>
+ <bpmn2:itemDefinition
id="__93FFD317-476E-4624-84EF-994617572560_driverIdInputXItem"
structureRef="String"/>
+ <bpmn2:itemDefinition
id="__93FFD317-476E-4624-84EF-994617572560_responseOutputXItem"
structureRef="org.kie.kogito.traffic.licensevalidation.Driver"/>
+ <bpmn2:itemDefinition
id="__95EFED1F-73F8-47E7-9604-A81EFE5DE8F5_namespaceInputXItem"
structureRef="java.lang.String"/>
+ <bpmn2:itemDefinition
id="__95EFED1F-73F8-47E7-9604-A81EFE5DE8F5_modelInputXItem"
structureRef="java.lang.String"/>
+ <bpmn2:itemDefinition
id="__95EFED1F-73F8-47E7-9604-A81EFE5DE8F5_driverInputXItem"
structureRef="org.kie.kogito.traffic.licensevalidation.Driver"/>
+ <bpmn2:itemDefinition
id="__95EFED1F-73F8-47E7-9604-A81EFE5DE8F5_driverOutputXItem"
structureRef="org.kie.kogito.traffic.licensevalidation.Driver"/>
+ <bpmn2:itemDefinition
id="__3F719C8E-DA3F-46F8-B8F2-5F04DB132E9C_namespaceInputXItem"
structureRef="java.lang.String"/>
+ <bpmn2:itemDefinition
id="__3F719C8E-DA3F-46F8-B8F2-5F04DB132E9C_modelInputXItem"
structureRef="java.lang.String"/>
+ <bpmn2:itemDefinition
id="__3F719C8E-DA3F-46F8-B8F2-5F04DB132E9C_validatedInputXItem"
structureRef="org.kie.kogito.traffic.licensevalidated.Validated"/>
+ <bpmn2:itemDefinition
id="__3F719C8E-DA3F-46F8-B8F2-5F04DB132E9C_validatedOutputXItem"
structureRef="org.kie.kogito.traffic.licensevalidated.Validated"/>
+ <bpmn2:interface id="_93FFD317-476E-4624-84EF-994617572560_ServiceInterface"
name="org.kie.kogito.traffic.DriverService"
implementationRef="org.kie.kogito.traffic.DriverService">
+ <bpmn2:operation
id="_93FFD317-476E-4624-84EF-994617572560_ServiceOperation" name="getDriver"
implementationRef="getDriver"/>
+ </bpmn2:interface>
+ <bpmn2:collaboration id="_835BF56B-F802-4ABD-8F1A-F6110E669D6C"
name="Default Collaboration">
+ <bpmn2:participant id="_12DAED3F-4A2C-40B1-9716-A16BA1A05F2D" name="Pool
Participant" processRef="traffic"/>
+ </bpmn2:collaboration>
+ <bpmn2:process id="traffic" drools:packageName="com.example"
drools:version="1.0" drools:adHoc="false" name="traffic" isExecutable="true"
processType="Public">
+ <bpmn2:property id="driverId" itemSubjectRef="_driverIdItem"
name="driverId"/>
+ <bpmn2:property id="violation" itemSubjectRef="_violationItem"
name="violation"/>
+ <bpmn2:property id="driver" itemSubjectRef="_driverItem" name="driver"/>
+ <bpmn2:property id="fine" itemSubjectRef="_fineItem" name="fine"/>
+ <bpmn2:property id="validated" itemSubjectRef="_validatedItem"
name="validated"/>
+ <bpmn2:sequenceFlow id="_044AA388-325A-45DE-B783-4F48421B788B"
name="license is expired" sourceRef="_7229480F-BC4D-4406-B27C-8FF46C5C9042"
targetRef="_E2A8304B-68A0-4CCC-8D47-1FA9352D4853">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[license is expired]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"
language="http://www.java.com/java"><![CDATA[return
!driver.isValidLicense();]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="_D3E2F4B7-7739-452F-8D55-0C4F169D4A44"
sourceRef="_95EFED1F-73F8-47E7-9604-A81EFE5DE8F5"
targetRef="_7229480F-BC4D-4406-B27C-8FF46C5C9042">
+ <bpmn2:extensionElements>
+ <drools:metaData name="isAutoConnection.target">
+ <drools:metaValue><![CDATA[true]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="_A19108FE-08A2-4E80-B7A8-0254C49209A6"
sourceRef="_93FFD317-476E-4624-84EF-994617572560"
targetRef="_95EFED1F-73F8-47E7-9604-A81EFE5DE8F5"/>
+ <bpmn2:sequenceFlow id="_1287C97D-3568-458A-A907-0123A64A93BE"
sourceRef="_298312AB-7A3D-478B-BD9B-B260CE847645"
targetRef="_67972C63-8A06-42C5-A3FF-A843EFB4D07B">
+ <bpmn2:extensionElements>
+ <drools:metaData name="isAutoConnection.source">
+ <drools:metaValue><![CDATA[true]]></drools:metaValue>
+ </drools:metaData>
+ <drools:metaData name="isAutoConnection.target">
+ <drools:metaValue><![CDATA[true]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="_249EB7E9-5847-47C9-8B4D-8BEFED257600" name="yes"
sourceRef="_8A66FABC-E538-4F50-9DAC-BC9069D19942"
targetRef="_298312AB-7A3D-478B-BD9B-B260CE847645">
+ <bpmn2:extensionElements>
+ <drools:metaData name="isAutoConnection.target">
+ <drools:metaValue><![CDATA[true]]></drools:metaValue>
+ </drools:metaData>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[yes]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"
language="http://www.java.com/java"><![CDATA[return
validated.isValidLicense();]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="_E7EF578E-3735-42D9-BF0C-8CCBF398D41C"
sourceRef="_3F719C8E-DA3F-46F8-B8F2-5F04DB132E9C"
targetRef="_8A66FABC-E538-4F50-9DAC-BC9069D19942">
+ <bpmn2:extensionElements>
+ <drools:metaData name="isAutoConnection.target">
+ <drools:metaValue><![CDATA[true]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="_521A00FC-6A79-44ED-8485-45DB97A621F2"
sourceRef="_DDD02AFB-D927-47BC-9C0C-523B602B5CD2"
targetRef="_418CD980-670D-4FC5-B492-A271A61B1477">
+ <bpmn2:extensionElements>
+ <drools:metaData name="isAutoConnection.source">
+ <drools:metaValue><![CDATA[true]]></drools:metaValue>
+ </drools:metaData>
+ <drools:metaData name="isAutoConnection.target">
+ <drools:metaValue><![CDATA[true]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="_19CC68B6-D2DC-4E39-99E5-CE5B30C5FEE6" name="no"
sourceRef="_8A66FABC-E538-4F50-9DAC-BC9069D19942"
targetRef="_DDD02AFB-D927-47BC-9C0C-523B602B5CD2">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[no]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"
language="http://www.java.com/java"><![CDATA[return
!validated.isValidLicense();]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="_BB963FF4-CF17-4CA0-A727-9AFC2BE17C29"
sourceRef="_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941"
targetRef="_3F719C8E-DA3F-46F8-B8F2-5F04DB132E9C"/>
+ <bpmn2:sequenceFlow id="_D2252EFF-5EC4-4D61-B797-653F71652627"
sourceRef="_7229480F-BC4D-4406-B27C-8FF46C5C9042"
targetRef="_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941">
+ <bpmn2:extensionElements>
+ <drools:metaData name="isAutoConnection.target">
+ <drools:metaValue><![CDATA[true]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"
language="http://www.java.com/java"><![CDATA[return
driver.isValidLicense();]]></bpmn2:conditionExpression>
+ </bpmn2:sequenceFlow>
+ <bpmn2:sequenceFlow id="_2C2FFD79-4241-4F9E-A486-2482F817595E"
sourceRef="_905F0834-19CC-423B-B90E-B38C6D80329F"
targetRef="_93FFD317-476E-4624-84EF-994617572560">
+ <bpmn2:extensionElements>
+ <drools:metaData name="isAutoConnection.target">
+ <drools:metaValue><![CDATA[true]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ </bpmn2:sequenceFlow>
+ <bpmn2:businessRuleTask id="_3F719C8E-DA3F-46F8-B8F2-5F04DB132E9C"
drools:ruleFlowGroup="unit:org.kie.kogito.traffic.licensevalidated.LicenseValidatedService"
name="LicenseValidated DRL"
implementation="http://www.jboss.org/drools/rule">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[LicenseValidated
+DRL]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_BB963FF4-CF17-4CA0-A727-9AFC2BE17C29</bpmn2:incoming>
+ <bpmn2:outgoing>_E7EF578E-3735-42D9-BF0C-8CCBF398D41C</bpmn2:outgoing>
+ <bpmn2:ioSpecification>
+ <bpmn2:dataInput
id="_3F719C8E-DA3F-46F8-B8F2-5F04DB132E9C_validatedInputX"
drools:dtype="org.kie.kogito.traffic.licensevalidated.Validated"
itemSubjectRef="__3F719C8E-DA3F-46F8-B8F2-5F04DB132E9C_validatedInputXItem"
name="validated"/>
+ <bpmn2:dataOutput
id="_3F719C8E-DA3F-46F8-B8F2-5F04DB132E9C_validatedOutputX"
drools:dtype="org.kie.kogito.traffic.licensevalidated.Validated"
itemSubjectRef="__3F719C8E-DA3F-46F8-B8F2-5F04DB132E9C_validatedOutputXItem"
name="validated"/>
+ <bpmn2:inputSet>
+
<bpmn2:dataInputRefs>_3F719C8E-DA3F-46F8-B8F2-5F04DB132E9C_validatedInputX</bpmn2:dataInputRefs>
+ </bpmn2:inputSet>
+ <bpmn2:outputSet>
+
<bpmn2:dataOutputRefs>_3F719C8E-DA3F-46F8-B8F2-5F04DB132E9C_validatedOutputX</bpmn2:dataOutputRefs>
+ </bpmn2:outputSet>
+ </bpmn2:ioSpecification>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:sourceRef>validated</bpmn2:sourceRef>
+
<bpmn2:targetRef>_3F719C8E-DA3F-46F8-B8F2-5F04DB132E9C_validatedInputX</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataOutputAssociation>
+
<bpmn2:sourceRef>_3F719C8E-DA3F-46F8-B8F2-5F04DB132E9C_validatedOutputX</bpmn2:sourceRef>
+ <bpmn2:targetRef>validated</bpmn2:targetRef>
+ </bpmn2:dataOutputAssociation>
+ </bpmn2:businessRuleTask>
+ <bpmn2:endEvent id="_E2A8304B-68A0-4CCC-8D47-1FA9352D4853">
+ <bpmn2:incoming>_044AA388-325A-45DE-B783-4F48421B788B</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:exclusiveGateway id="_7229480F-BC4D-4406-B27C-8FF46C5C9042"
name="Exclusive Gateway 1" gatewayDirection="Diverging">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Exclusive Gateway 1]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_D3E2F4B7-7739-452F-8D55-0C4F169D4A44</bpmn2:incoming>
+ <bpmn2:outgoing>_D2252EFF-5EC4-4D61-B797-653F71652627</bpmn2:outgoing>
+ <bpmn2:outgoing>_044AA388-325A-45DE-B783-4F48421B788B</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:businessRuleTask id="_95EFED1F-73F8-47E7-9604-A81EFE5DE8F5"
drools:ruleFlowGroup="unit:org.kie.kogito.traffic.licensevalidation.LicenseValidationService"
name="LicenseValidation DRL"
implementation="http://www.jboss.org/drools/rule">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[LicenseValidation
+DRL]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_A19108FE-08A2-4E80-B7A8-0254C49209A6</bpmn2:incoming>
+ <bpmn2:outgoing>_D3E2F4B7-7739-452F-8D55-0C4F169D4A44</bpmn2:outgoing>
+ <bpmn2:ioSpecification>
+ <bpmn2:dataInput
id="_95EFED1F-73F8-47E7-9604-A81EFE5DE8F5_driverInputX"
drools:dtype="org.kie.kogito.traffic.licensevalidation.Driver"
itemSubjectRef="__95EFED1F-73F8-47E7-9604-A81EFE5DE8F5_driverInputXItem"
name="driver"/>
+ <bpmn2:dataOutput
id="_95EFED1F-73F8-47E7-9604-A81EFE5DE8F5_driverOutputX"
drools:dtype="org.kie.kogito.traffic.licensevalidation.Driver"
itemSubjectRef="__95EFED1F-73F8-47E7-9604-A81EFE5DE8F5_driverOutputXItem"
name="driver"/>
+ <bpmn2:inputSet>
+
<bpmn2:dataInputRefs>_95EFED1F-73F8-47E7-9604-A81EFE5DE8F5_driverInputX</bpmn2:dataInputRefs>
+ </bpmn2:inputSet>
+ <bpmn2:outputSet>
+
<bpmn2:dataOutputRefs>_95EFED1F-73F8-47E7-9604-A81EFE5DE8F5_driverOutputX</bpmn2:dataOutputRefs>
+ </bpmn2:outputSet>
+ </bpmn2:ioSpecification>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:sourceRef>driver</bpmn2:sourceRef>
+
<bpmn2:targetRef>_95EFED1F-73F8-47E7-9604-A81EFE5DE8F5_driverInputX</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataOutputAssociation>
+
<bpmn2:sourceRef>_95EFED1F-73F8-47E7-9604-A81EFE5DE8F5_driverOutputX</bpmn2:sourceRef>
+ <bpmn2:targetRef>driver</bpmn2:targetRef>
+ </bpmn2:dataOutputAssociation>
+ </bpmn2:businessRuleTask>
+ <bpmn2:serviceTask id="_93FFD317-476E-4624-84EF-994617572560"
drools:serviceimplementation="Java"
drools:serviceinterface="org.kie.kogito.traffic.DriverService"
drools:serviceoperation="getDriver" name="Get Driver Details"
implementation="Java"
operationRef="_93FFD317-476E-4624-84EF-994617572560_ServiceOperation">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Get Driver Details]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_2C2FFD79-4241-4F9E-A486-2482F817595E</bpmn2:incoming>
+ <bpmn2:outgoing>_A19108FE-08A2-4E80-B7A8-0254C49209A6</bpmn2:outgoing>
+ <bpmn2:ioSpecification>
+ <bpmn2:dataInput
id="_93FFD317-476E-4624-84EF-994617572560_driverIdInputX" drools:dtype="String"
itemSubjectRef="__93FFD317-476E-4624-84EF-994617572560_driverIdInputXItem"
name="driverId"/>
+ <bpmn2:dataOutput
id="_93FFD317-476E-4624-84EF-994617572560_responseOutputX"
drools:dtype="org.kie.kogito.traffic.licensevalidation.Driver"
itemSubjectRef="__93FFD317-476E-4624-84EF-994617572560_responseOutputXItem"
name="response"/>
+ <bpmn2:inputSet>
+
<bpmn2:dataInputRefs>_93FFD317-476E-4624-84EF-994617572560_driverIdInputX</bpmn2:dataInputRefs>
+ </bpmn2:inputSet>
+ <bpmn2:outputSet>
+
<bpmn2:dataOutputRefs>_93FFD317-476E-4624-84EF-994617572560_responseOutputX</bpmn2:dataOutputRefs>
+ </bpmn2:outputSet>
+ </bpmn2:ioSpecification>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:sourceRef>driverId</bpmn2:sourceRef>
+
<bpmn2:targetRef>_93FFD317-476E-4624-84EF-994617572560_driverIdInputX</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataOutputAssociation>
+
<bpmn2:sourceRef>_93FFD317-476E-4624-84EF-994617572560_responseOutputX</bpmn2:sourceRef>
+ <bpmn2:targetRef>driver</bpmn2:targetRef>
+ </bpmn2:dataOutputAssociation>
+ </bpmn2:serviceTask>
+ <bpmn2:endEvent id="_67972C63-8A06-42C5-A3FF-A843EFB4D07B">
+ <bpmn2:incoming>_1287C97D-3568-458A-A907-0123A64A93BE</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="_298312AB-7A3D-478B-BD9B-B260CE847645"
name="Suspended Task" scriptFormat="http://www.java.com/java">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Suspended
+Task]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_249EB7E9-5847-47C9-8B4D-8BEFED257600</bpmn2:incoming>
+ <bpmn2:outgoing>_1287C97D-3568-458A-A907-0123A64A93BE</bpmn2:outgoing>
+ <bpmn2:script>System.out.println("Driver is suspended!");</bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:exclusiveGateway id="_8A66FABC-E538-4F50-9DAC-BC9069D19942"
name="Exclusive Gateway 2" gatewayDirection="Diverging">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Exclusive Gateway 2]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_E7EF578E-3735-42D9-BF0C-8CCBF398D41C</bpmn2:incoming>
+ <bpmn2:outgoing>_19CC68B6-D2DC-4E39-99E5-CE5B30C5FEE6</bpmn2:outgoing>
+ <bpmn2:outgoing>_249EB7E9-5847-47C9-8B4D-8BEFED257600</bpmn2:outgoing>
+ </bpmn2:exclusiveGateway>
+ <bpmn2:endEvent id="_418CD980-670D-4FC5-B492-A271A61B1477">
+ <bpmn2:incoming>_521A00FC-6A79-44ED-8485-45DB97A621F2</bpmn2:incoming>
+ </bpmn2:endEvent>
+ <bpmn2:scriptTask id="_DDD02AFB-D927-47BC-9C0C-523B602B5CD2" name="Not
Suspended Task" scriptFormat="http://www.java.com/java">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[Not Suspended
+ Task]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_19CC68B6-D2DC-4E39-99E5-CE5B30C5FEE6</bpmn2:incoming>
+ <bpmn2:outgoing>_521A00FC-6A79-44ED-8485-45DB97A621F2</bpmn2:outgoing>
+ <bpmn2:script>System.out.println("Driver is NOT
suspended!");</bpmn2:script>
+ </bpmn2:scriptTask>
+ <bpmn2:businessRuleTask id="_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941"
name="TrafficViolation DMN"
implementation="http://www.jboss.org/drools/dmn">
+ <bpmn2:extensionElements>
+ <drools:metaData name="elementname">
+ <drools:metaValue><![CDATA[TrafficViolation
+DMN]]></drools:metaValue>
+ </drools:metaData>
+ </bpmn2:extensionElements>
+ <bpmn2:incoming>_D2252EFF-5EC4-4D61-B797-653F71652627</bpmn2:incoming>
+ <bpmn2:outgoing>_BB963FF4-CF17-4CA0-A727-9AFC2BE17C29</bpmn2:outgoing>
+ <bpmn2:ioSpecification>
+ <bpmn2:dataInput
id="_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_namespaceInputX"
drools:dtype="java.lang.String"
itemSubjectRef="__B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_namespaceInputXItem"
name="namespace"/>
+ <bpmn2:dataInput
id="_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_modelInputX"
drools:dtype="java.lang.String"
itemSubjectRef="__B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_modelInputXItem"
name="model"/>
+ <bpmn2:dataInput
id="_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_ViolationInputX"
drools:dtype="org.kie.kogito.traffic.Violation"
itemSubjectRef="__B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_ViolationInputXItem"
name="Violation"/>
+ <bpmn2:dataInput
id="_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_DriverInputX"
drools:dtype="org.kie.kogito.traffic.licensevalidation.Driver"
itemSubjectRef="__B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_DriverInputXItem"
name="Driver"/>
+ <bpmn2:dataOutput
id="_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_ValidatedOutputX"
drools:dtype="org.kie.kogito.traffic.licensevalidated.Validated"
itemSubjectRef="__B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_ValidatedOutputXItem"
name="Validated"/>
+ <bpmn2:dataOutput
id="_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_FineOutputX"
drools:dtype="org.kie.kogito.traffic.Fine"
itemSubjectRef="__B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_FineOutputXItem"
name="Fine"/>
+ <bpmn2:inputSet>
+
<bpmn2:dataInputRefs>_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_namespaceInputX</bpmn2:dataInputRefs>
+
<bpmn2:dataInputRefs>_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_modelInputX</bpmn2:dataInputRefs>
+
<bpmn2:dataInputRefs>_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_ViolationInputX</bpmn2:dataInputRefs>
+
<bpmn2:dataInputRefs>_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_DriverInputX</bpmn2:dataInputRefs>
+ </bpmn2:inputSet>
+ <bpmn2:outputSet>
+
<bpmn2:dataOutputRefs>_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_ValidatedOutputX</bpmn2:dataOutputRefs>
+
<bpmn2:dataOutputRefs>_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_FineOutputX</bpmn2:dataOutputRefs>
+ </bpmn2:outputSet>
+ </bpmn2:ioSpecification>
+ <bpmn2:dataInputAssociation>
+
<bpmn2:targetRef>_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_namespaceInputX</bpmn2:targetRef>
+ <bpmn2:assignment>
+ <bpmn2:from
xsi:type="bpmn2:tFormalExpression"><![CDATA[https://github.com/kiegroup/drools/kie-dmn/_A4BCA8B8-CF08-433F-93B2-A2598F19ECFF]]></bpmn2:from>
+ <bpmn2:to
xsi:type="bpmn2:tFormalExpression"><![CDATA[_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_namespaceInputX]]></bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation>
+
<bpmn2:targetRef>_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_modelInputX</bpmn2:targetRef>
+ <bpmn2:assignment>
+ <bpmn2:from xsi:type="bpmn2:tFormalExpression"><![CDATA[Traffic
Violation]]></bpmn2:from>
+ <bpmn2:to
xsi:type="bpmn2:tFormalExpression"><![CDATA[_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_modelInputX]]></bpmn2:to>
+ </bpmn2:assignment>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:sourceRef>violation</bpmn2:sourceRef>
+
<bpmn2:targetRef>_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_ViolationInputX</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataInputAssociation>
+ <bpmn2:sourceRef>driver</bpmn2:sourceRef>
+
<bpmn2:targetRef>_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_DriverInputX</bpmn2:targetRef>
+ </bpmn2:dataInputAssociation>
+ <bpmn2:dataOutputAssociation>
+
<bpmn2:sourceRef>_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_ValidatedOutputX</bpmn2:sourceRef>
+ <bpmn2:targetRef>validated</bpmn2:targetRef>
+ </bpmn2:dataOutputAssociation>
+ <bpmn2:dataOutputAssociation>
+
<bpmn2:sourceRef>_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_FineOutputX</bpmn2:sourceRef>
+ <bpmn2:targetRef>fine</bpmn2:targetRef>
+ </bpmn2:dataOutputAssociation>
+ </bpmn2:businessRuleTask>
+ <bpmn2:startEvent id="_905F0834-19CC-423B-B90E-B38C6D80329F">
+ <bpmn2:outgoing>_2C2FFD79-4241-4F9E-A486-2482F817595E</bpmn2:outgoing>
+ </bpmn2:startEvent>
+ </bpmn2:process>
+ <bpmndi:BPMNDiagram>
+ <bpmndi:BPMNPlane bpmnElement="traffic">
+ <bpmndi:BPMNShape id="shape__905F0834-19CC-423B-B90E-B38C6D80329F"
bpmnElement="_905F0834-19CC-423B-B90E-B38C6D80329F">
+ <dc:Bounds height="56" width="56" x="79" y="227"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__B076DF7E-91A5-47C7-B3FC-2C2EC06E5941"
bpmnElement="_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941">
+ <dc:Bounds height="98" width="216" x="782" y="205"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__DDD02AFB-D927-47BC-9C0C-523B602B5CD2"
bpmnElement="_DDD02AFB-D927-47BC-9C0C-523B602B5CD2">
+ <dc:Bounds height="100" width="181" x="1429.5" y="354"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__418CD980-670D-4FC5-B492-A271A61B1477"
bpmnElement="_418CD980-670D-4FC5-B492-A271A61B1477">
+ <dc:Bounds height="56" width="56" x="1719" y="377"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__8A66FABC-E538-4F50-9DAC-BC9069D19942"
bpmnElement="_8A66FABC-E538-4F50-9DAC-BC9069D19942">
+ <dc:Bounds height="56" width="56" x="1351" y="228"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__298312AB-7A3D-478B-BD9B-B260CE847645"
bpmnElement="_298312AB-7A3D-478B-BD9B-B260CE847645">
+ <dc:Bounds height="102" width="178" x="1445" y="77"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__67972C63-8A06-42C5-A3FF-A843EFB4D07B"
bpmnElement="_67972C63-8A06-42C5-A3FF-A843EFB4D07B">
+ <dc:Bounds height="56" width="56" x="1719" y="100"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__93FFD317-476E-4624-84EF-994617572560"
bpmnElement="_93FFD317-476E-4624-84EF-994617572560">
+ <dc:Bounds height="102" width="154" x="195" y="205"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__95EFED1F-73F8-47E7-9604-A81EFE5DE8F5"
bpmnElement="_95EFED1F-73F8-47E7-9604-A81EFE5DE8F5">
+ <dc:Bounds height="101.09090909090912" width="177.63636363636363"
x="409" y="205.45454545454544"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__7229480F-BC4D-4406-B27C-8FF46C5C9042"
bpmnElement="_7229480F-BC4D-4406-B27C-8FF46C5C9042">
+ <dc:Bounds height="56" width="56" x="637" y="227"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__E2A8304B-68A0-4CCC-8D47-1FA9352D4853"
bpmnElement="_E2A8304B-68A0-4CCC-8D47-1FA9352D4853">
+ <dc:Bounds height="56" width="56" x="637" y="416"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="shape__3F719C8E-DA3F-46F8-B8F2-5F04DB132E9C"
bpmnElement="_3F719C8E-DA3F-46F8-B8F2-5F04DB132E9C">
+ <dc:Bounds height="103" width="227" x="1032" y="204.11691542288554"/>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge
id="edge_shape__905F0834-19CC-423B-B90E-B38C6D80329F_to_shape__93FFD317-476E-4624-84EF-994617572560"
bpmnElement="_2C2FFD79-4241-4F9E-A486-2482F817595E">
+ <di:waypoint x="107" y="255"/>
+ <di:waypoint x="272" y="205"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__7229480F-BC4D-4406-B27C-8FF46C5C9042_to_shape__B076DF7E-91A5-47C7-B3FC-2C2EC06E5941"
bpmnElement="_D2252EFF-5EC4-4D61-B797-653F71652627">
+ <di:waypoint x="665" y="255"/>
+ <di:waypoint x="782" y="254"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__B076DF7E-91A5-47C7-B3FC-2C2EC06E5941_to_shape__3F719C8E-DA3F-46F8-B8F2-5F04DB132E9C"
bpmnElement="_BB963FF4-CF17-4CA0-A727-9AFC2BE17C29">
+ <di:waypoint x="890" y="254"/>
+ <di:waypoint x="1032" y="255.61691542288554"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__8A66FABC-E538-4F50-9DAC-BC9069D19942_to_shape__DDD02AFB-D927-47BC-9C0C-523B602B5CD2"
bpmnElement="_19CC68B6-D2DC-4E39-99E5-CE5B30C5FEE6">
+ <di:waypoint x="1379" y="256"/>
+ <di:waypoint x="1378.951928980325" y="406.2250892494252"/>
+ <di:waypoint x="1520" y="404"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__DDD02AFB-D927-47BC-9C0C-523B602B5CD2_to_shape__418CD980-670D-4FC5-B492-A271A61B1477"
bpmnElement="_521A00FC-6A79-44ED-8485-45DB97A621F2">
+ <di:waypoint x="1520" y="354"/>
+ <di:waypoint x="1747" y="433"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__3F719C8E-DA3F-46F8-B8F2-5F04DB132E9C_to_shape__8A66FABC-E538-4F50-9DAC-BC9069D19942"
bpmnElement="_E7EF578E-3735-42D9-BF0C-8CCBF398D41C">
+ <di:waypoint x="1259" y="255.61691542288554"/>
+ <di:waypoint x="1351" y="256"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__8A66FABC-E538-4F50-9DAC-BC9069D19942_to_shape__298312AB-7A3D-478B-BD9B-B260CE847645"
bpmnElement="_249EB7E9-5847-47C9-8B4D-8BEFED257600">
+ <di:waypoint x="1379" y="256"/>
+ <di:waypoint x="1378.9581298828125" y="128"/>
+ <di:waypoint x="1534" y="179"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__298312AB-7A3D-478B-BD9B-B260CE847645_to_shape__67972C63-8A06-42C5-A3FF-A843EFB4D07B"
bpmnElement="_1287C97D-3568-458A-A907-0123A64A93BE">
+ <di:waypoint x="1623" y="128"/>
+ <di:waypoint x="1719" y="128"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__93FFD317-476E-4624-84EF-994617572560_to_shape__95EFED1F-73F8-47E7-9604-A81EFE5DE8F5"
bpmnElement="_A19108FE-08A2-4E80-B7A8-0254C49209A6">
+ <di:waypoint x="272" y="256"/>
+ <di:waypoint x="409" y="256"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__95EFED1F-73F8-47E7-9604-A81EFE5DE8F5_to_shape__7229480F-BC4D-4406-B27C-8FF46C5C9042"
bpmnElement="_D3E2F4B7-7739-452F-8D55-0C4F169D4A44">
+ <di:waypoint x="497.8181818181818" y="256"/>
+ <di:waypoint x="637" y="255"/>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge
id="edge_shape__7229480F-BC4D-4406-B27C-8FF46C5C9042_to_shape__E2A8304B-68A0-4CCC-8D47-1FA9352D4853"
bpmnElement="_044AA388-325A-45DE-B783-4F48421B788B">
+ <di:waypoint x="665" y="255"/>
+ <di:waypoint x="665" y="444"/>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ </bpmndi:BPMNDiagram>
+ <bpmn2:relationship type="BPSimData">
+ <bpmn2:extensionElements>
+ <bpsim:BPSimData>
+ <bpsim:Scenario id="default" name="Simulationscenario">
+ <bpsim:ScenarioParameters/>
+ <bpsim:ElementParameters
elementRef="_905F0834-19CC-423B-B90E-B38C6D80329F">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ </bpsim:ElementParameters>
+ <bpsim:ElementParameters
elementRef="_B076DF7E-91A5-47C7-B3FC-2C2EC06E5941">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ <bpsim:ResourceParameters>
+ <bpsim:Availability>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Availability>
+ <bpsim:Quantity>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Quantity>
+ </bpsim:ResourceParameters>
+ <bpsim:CostParameters>
+ <bpsim:UnitCost>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:UnitCost>
+ </bpsim:CostParameters>
+ </bpsim:ElementParameters>
+ <bpsim:ElementParameters
elementRef="_DDD02AFB-D927-47BC-9C0C-523B602B5CD2">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ <bpsim:ResourceParameters>
+ <bpsim:Availability>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Availability>
+ <bpsim:Quantity>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Quantity>
+ </bpsim:ResourceParameters>
+ <bpsim:CostParameters>
+ <bpsim:UnitCost>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:UnitCost>
+ </bpsim:CostParameters>
+ </bpsim:ElementParameters>
+ <bpsim:ElementParameters
elementRef="_298312AB-7A3D-478B-BD9B-B260CE847645">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ <bpsim:ResourceParameters>
+ <bpsim:Availability>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Availability>
+ <bpsim:Quantity>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Quantity>
+ </bpsim:ResourceParameters>
+ <bpsim:CostParameters>
+ <bpsim:UnitCost>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:UnitCost>
+ </bpsim:CostParameters>
+ </bpsim:ElementParameters>
+ <bpsim:ElementParameters
elementRef="_93FFD317-476E-4624-84EF-994617572560">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ <bpsim:ResourceParameters>
+ <bpsim:Availability>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Availability>
+ <bpsim:Quantity>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Quantity>
+ </bpsim:ResourceParameters>
+ <bpsim:CostParameters>
+ <bpsim:UnitCost>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:UnitCost>
+ </bpsim:CostParameters>
+ </bpsim:ElementParameters>
+ <bpsim:ElementParameters
elementRef="_95EFED1F-73F8-47E7-9604-A81EFE5DE8F5">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ <bpsim:ResourceParameters>
+ <bpsim:Availability>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Availability>
+ <bpsim:Quantity>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Quantity>
+ </bpsim:ResourceParameters>
+ <bpsim:CostParameters>
+ <bpsim:UnitCost>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:UnitCost>
+ </bpsim:CostParameters>
+ </bpsim:ElementParameters>
+ <bpsim:ElementParameters
elementRef="_3F719C8E-DA3F-46F8-B8F2-5F04DB132E9C">
+ <bpsim:TimeParameters>
+ <bpsim:ProcessingTime>
+ <bpsim:NormalDistribution mean="0" standardDeviation="0"/>
+ </bpsim:ProcessingTime>
+ </bpsim:TimeParameters>
+ <bpsim:ResourceParameters>
+ <bpsim:Availability>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Availability>
+ <bpsim:Quantity>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:Quantity>
+ </bpsim:ResourceParameters>
+ <bpsim:CostParameters>
+ <bpsim:UnitCost>
+ <bpsim:FloatingParameter value="0"/>
+ </bpsim:UnitCost>
+ </bpsim:CostParameters>
+ </bpsim:ElementParameters>
+ </bpsim:Scenario>
+ </bpsim:BPSimData>
+ </bpmn2:extensionElements>
+ <bpmn2:source>_FcMNgJTYEDuJVMby5BR7SQ</bpmn2:source>
+ <bpmn2:target>_FcMNgJTYEDuJVMby5BR7SQ</bpmn2:target>
+ </bpmn2:relationship>
+</bpmn2:definitions>
\ No newline at end of file
diff --git
a/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/test/java/org/kie/kogito/traffic/TrafficProcessTest.java
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/test/java/org/kie/kogito/traffic/TrafficProcessTest.java
new file mode 100644
index 000000000..a5eeb330a
--- /dev/null
+++
b/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/src/test/java/org/kie/kogito/traffic/TrafficProcessTest.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 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;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.junit.jupiter.api.Test;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.http.ContentType;
+import io.restassured.response.ValidatableResponse;
+
+import static io.restassured.RestAssured.given;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.nullValue;
+
+@QuarkusTest
+public class TrafficProcessTest {
+
+ public static final BigDecimal SPEED_LIMIT = new BigDecimal(100);
+
+ @Test
+ public void getOpenAPI() {
+ ValidatableResponse body =
given().when().get("/q/openapi").then().statusCode(200);
+ System.out.println(body.extract().asString());
+ }
+
+ @Test
+ public void testTrafficViolationEmbeddedDecisionOnQuarkus() {
+ testTrafficProcess("traffic", "12-345", 120d, "no", true, true);
+ testTrafficProcess("traffic", "12-15", 140d, "yes", true, false);
+ testTrafficProcess("traffic", "0-150", 140d, null, false, false);
+ }
+
+ private void testTrafficProcess(String processId, String driverId, Double
speed, String suspended, boolean validLicense, boolean validatedLicense) {
+ Map<String, Object> request = new HashMap<>();
+ request.put("driverId", driverId);
+ request.put("violation", new Violation("speed", SPEED_LIMIT, new
BigDecimal(speed)));
+ ValidatableResponse body = given()
+ .body(request)
+ .contentType(ContentType.JSON)
+ .when()
+ .post("/" + processId)
+ .then()
+ .statusCode(201)
+ .body("driver.ValidLicense", is(validLicense));
+ if (suspended != null) {
+ body.body("validated.ValidLicense", is(validatedLicense))
+ .body("validated.Suspended", is(suspended));
+ } else {
+ body.body("validated", nullValue());
+ }
+ }
+}
diff --git a/gradle-examples/pom.xml b/gradle-examples/pom.xml
index f0b020447..eeae23404 100644
--- a/gradle-examples/pom.xml
+++ b/gradle-examples/pom.xml
@@ -15,6 +15,7 @@
<description>Kogito Examples built with Gradle</description>
<modules>
<module>kogito-springboot-gradle-examples</module>
+ <module>kogito-quarkus-gradle-examples</module>
</modules>
</project>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]