diff --git a/multi-ruleunit-quarkus-example/README.md b/multi-ruleunit-quarkus-example/README.md
new file mode 100644
index 0000000000..b3fac1c22c
--- /dev/null
+++ b/multi-ruleunit-quarkus-example/README.md
@@ -0,0 +1,135 @@
+# Multiple RuleUnit + Quarkus example
+
+## Description
+
+A complex rule service to validate `LoanApplication` fact.
+
+CustomQueryFindApprovedEndpoint is implemented to coordinate multiple RuleUnits. You can insert `LoanApplication` facts and query a result via the REST endpoints.
+
+## Installing and Running
+
+### Prerequisites
+
+You will need:
+ - Java 11+ installed
+ - Environment variable JAVA_HOME set accordingly
+ - Maven 3.6.2+ installed
+
+When using native image compilation, you will also need:
+ - [GraalVM 19.2.1](https://github.com/oracle/graal/releases/tag/vm-19.2.1) installed
+ - Environment variable GRAALVM_HOME set accordingly
+ - Note that GraalVM native image compilation typically requires other packages (glibc-devel, zlib-devel and gcc) to be installed too. You also need 'native-image' installed in GraalVM (using 'gu install native-image'). Please refer to [GraalVM installation documentation](https://www.graalvm.org/docs/reference-manual/aot-compilation/#prerequisites) for more details.
+
+### Compile and Run in Local Dev Mode
+
+```sh
+mvn clean compile quarkus:dev
+```
+
+### Package and Run in JVM mode
+
+```sh
+mvn clean package
+java -jar target/quarkus-app/quarkus-run.jar
+```
+
+or on windows
+
+```sh
+mvn clean package
+java -jar target\quarkus-app\quarkus-run.jar
+```
+
+### Package and Run using Local Native Image
+Note that this requires GRAALVM_HOME to point to a valid GraalVM installation
+
+```sh
+mvn clean package -Pnative
+```
+
+To run the generated native executable, generated in `target/`, execute
+
+```sh
+./target/ruleunit-quarkus-example-runner
+```
+
+Note: This does not yet work on Windows, GraalVM and Quarkus should be rolling out support for Windows soon.
+
+## OpenAPI (Swagger) documentation
+[Specification at swagger.io](https://swagger.io/docs/specification/about/)
+
+You can take a look at the [OpenAPI definition](http://localhost:8080/openapi?format=json) - automatically generated and included in this service - to determine all available operations exposed by this service. For easy readability you can visualize the OpenAPI definition file using a UI tool like for example available [Swagger UI](https://editor.swagger.io).
+
+In addition, various clients to interact with this service can be easily generated using this OpenAPI definition.
+
+When running in either Quarkus Development or Native mode, we also leverage the [Quarkus OpenAPI extension](https://quarkus.io/guides/openapi-swaggerui#use-swagger-ui-for-development) that exposes [Swagger UI](http://localhost:8080/swagger-ui/) that you can use to look at available REST endpoints and send test requests.
+
+## Example Usage
+
+Once the service is up and running, you can use the following examples to interact with the service. Note that rather than using the curl commands below, you can also use the [swagger UI](http://localhost:8080/swagger-ui/) to send requests.
+
+### POST /custom
+
+Returns approved loan applications from the given facts. Note that "DivisionA" is specified:
+
+```sh
+curl -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{"division":"DivisionA","loanApplications":[{"id":"ABC10001","amount":2000,"deposit":100,"applicant":{"age":45,"name":"John"}}, {"id":"ABC10002","amount":5000,"deposit":100,"applicant":{"age":25,"name":"Paul"}}, {"id":"ABC10015","amount":1000,"deposit":100,"applicant":{"age":12,"name":"George"}}]}' http://localhost:8080/custom
+```
+As response an array of loan applications is returned.
+
+Example response:
+
+```json
+[
+ {
+ "id":"ABC10001",
+ "applicant":{
+ "name":"John",
+ "age":45
+ },
+ "amount":2000,
+ "deposit":100,
+ "approved":true,
+ "completed":true
+ }
+]
+```
+
+If you send the loan applications to "DivisionB":
+
+```sh
+curl -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{"division":"DivisionB","loanApplications":[{"id":"ABC10001","amount":2000,"deposit":100,"applicant":{"age":45,"name":"John"}}, {"id":"ABC10002","amount":5000,"deposit":100,"applicant":{"age":25,"name":"Paul"}}, {"id":"ABC10015","amount":1000,"deposit":100,"applicant":{"age":12,"name":"George"}}]}' http://localhost:8080/custom
+```
+
+DivisionB rules are more tolerant so 2 applications are approved.
+
+```json
+[
+ {
+ "id":"ABC10001",
+ "applicant":{
+ "name":"John",
+ "age":45
+ },
+ "amount":2000,
+ "deposit":100,
+ "approved":true,
+ "completed":true
+ },
+ {
+ "id":"ABC10002",
+ "applicant":{
+ "name":"Paul",
+ "age":25
+ },
+ "amount":5000,
+ "deposit":100,
+ "approved":true,
+ "completed":true
+ }
+]
+```
+
+## Deploying with Kogito Operator
+
+In the [`operator`](operator) directory you'll find the custom resources needed to deploy this example on OpenShift with the [Kogito Operator](https://docs.jboss.org/kogito/release/latest/html_single/#chap_kogito-deploying-on-openshift).
diff --git a/multi-ruleunit-quarkus-example/operator/multi-ruleunit-quarkus-example.yaml b/multi-ruleunit-quarkus-example/operator/multi-ruleunit-quarkus-example.yaml
new file mode 100644
index 0000000000..d149fd66a7
--- /dev/null
+++ b/multi-ruleunit-quarkus-example/operator/multi-ruleunit-quarkus-example.yaml
@@ -0,0 +1,20 @@
+apiVersion: app.kiegroup.org/v1beta1
+kind: KogitoBuild
+metadata:
+ name: multi-ruleunit-quarkus-example
+spec:
+ type: RemoteSource
+ #env:
+ # env can be used to set variables during build
+ #- name: MY_CUSTOM_ENV
+ # value: "my value"
+ gitSource:
+ contextDir: multi-ruleunit-quarkus-example
+ uri: 'https://github.com/kiegroup/kogito-examples'
+ # set your maven nexus repository to speed up the build time
+ #mavenMirrorURL:
+---
+apiVersion: app.kiegroup.org/v1beta1
+kind: KogitoRuntime
+metadata:
+ name: multi-ruleunit-quarkus-example
\ No newline at end of file
diff --git a/multi-ruleunit-quarkus-example/pom.xml b/multi-ruleunit-quarkus-example/pom.xml
new file mode 100644
index 0000000000..891ce71d42
--- /dev/null
+++ b/multi-ruleunit-quarkus-example/pom.xml
@@ -0,0 +1,86 @@
+
+
+ 4.0.0
+
+ org.kie.kogito.examples
+ kogito-examples
+ 2.0.0-SNAPSHOT
+
+ multi-ruleunit-quarkus-example
+ Kogito Example :: Multiple RuleUnit - Quarkus
+
+ 2.3.0.Final
+ quarkus-bom
+ io.quarkus
+ 2.3.0.Final
+
+
+
+
+ ${quarkus.platform.group-id}
+ ${quarkus.platform.artifact-id}
+ ${quarkus.platform.version}
+ pom
+ import
+
+
+
+
+
+ org.kie.kogito
+ kogito-quarkus-rules
+
+
+ io.quarkus
+ quarkus-resteasy-jackson
+
+
+ io.quarkus
+ quarkus-resteasy
+
+
+ io.quarkus
+ quarkus-arc
+
+
+ io.quarkus
+ quarkus-smallrye-openapi
+
+
+ org.kie.kogito
+ kogito-drools
+
+
+ io.quarkus
+ quarkus-junit5
+ test
+
+
+ io.rest-assured
+ rest-assured
+ test
+
+
+ io.quarkus
+ quarkus-smallrye-health
+
+
+
+ ${project.artifactId}
+
+
+ io.quarkus
+ quarkus-maven-plugin
+ ${quarkus-plugin.version}
+
+
+
+ build
+
+
+
+
+
+
+
diff --git a/multi-ruleunit-quarkus-example/src/main/java/org/kie/kogito/examples/CustomQueryFindApprovedEndpoint.java b/multi-ruleunit-quarkus-example/src/main/java/org/kie/kogito/examples/CustomQueryFindApprovedEndpoint.java
new file mode 100644
index 0000000000..389961cc63
--- /dev/null
+++ b/multi-ruleunit-quarkus-example/src/main/java/org/kie/kogito/examples/CustomQueryFindApprovedEndpoint.java
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.kie.kogito.examples;
+
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.kie.kogito.examples.division.a.LoanDivisionAUnit;
+import org.kie.kogito.examples.division.b.LoanDivisionBUnit;
+import org.kie.kogito.examples.model.LoanApplication;
+import org.kie.kogito.rules.DataStore;
+import org.kie.kogito.rules.RuleUnit;
+import org.kie.kogito.rules.RuleUnitInstance;
+
+@Path("/custom")
+public class CustomQueryFindApprovedEndpoint {
+
+ @javax.inject.Inject
+ RuleUnit preprocessRuleUnit;
+
+ @javax.inject.Inject
+ RuleUnit divisionARuleUnit;
+
+ @javax.inject.Inject
+ RuleUnit divisionBRuleUnit;
+
+ @javax.inject.Inject
+ RuleUnit queryRuleUnit;
+
+ // @javax.inject.Inject
+ // Application application;
+
+ public CustomQueryFindApprovedEndpoint() {
+ }
+
+ public CustomQueryFindApprovedEndpoint(RuleUnit preprocessRuleUnit) {
+ this.preprocessRuleUnit = preprocessRuleUnit;
+ }
+
+ @POST()
+ @Produces(MediaType.APPLICATION_JSON)
+ @Consumes(MediaType.APPLICATION_JSON)
+ public List executeQuery(org.kie.kogito.examples.LoanPreprocessUnit unitDTO) {
+ // Loan preprocess
+ RuleUnitInstance preprocessInstance = preprocessRuleUnit.createInstance(unitDTO);
+ preprocessInstance.fire();
+ preprocessInstance.dispose();
+ DataStore loanApplications = unitDTO.getLoanApplications();
+
+ // custom logic to choose the next RuleUnit
+ String division = unitDTO.getDivision();
+ if (division.equals("DivisionA")) {
+ // get LoanDivisionAUnit instance
+ System.out.println("DivisionA");
+ LoanDivisionAUnit unitData = new LoanDivisionAUnit(loanApplications);
+ RuleUnitInstance divisionAInstance = divisionARuleUnit.createInstance(unitData);
+ divisionAInstance.fire();
+ divisionAInstance.dispose();
+ } else if (division.equals("DivisionB")) {
+ // get LoanDivisionBUnit instance
+ System.out.println("DivisionB");
+ LoanDivisionBUnit unitData = new LoanDivisionBUnit(loanApplications);
+ RuleUnitInstance divisionBInstance = divisionBRuleUnit.createInstance(unitData);
+ divisionBInstance.fire();
+ divisionBInstance.dispose();
+ }
+
+ // query finally
+ LoanQueryUnit unitData = new LoanQueryUnit(loanApplications);
+ RuleUnitInstance queryInstance = queryRuleUnit.createInstance(unitData);
+ List response = queryInstance.executeQuery("FindApproved").stream().map(this::toResult).collect(Collectors.toList());
+ queryInstance.dispose();
+
+ return response;
+ }
+
+ private org.kie.kogito.examples.model.LoanApplication toResult(Map tuple) {
+ return (org.kie.kogito.examples.model.LoanApplication) tuple.get("$l");
+ }
+}
diff --git a/multi-ruleunit-quarkus-example/src/main/java/org/kie/kogito/examples/LoanPreprocessUnit.java b/multi-ruleunit-quarkus-example/src/main/java/org/kie/kogito/examples/LoanPreprocessUnit.java
new file mode 100644
index 0000000000..f7cc3fa0e5
--- /dev/null
+++ b/multi-ruleunit-quarkus-example/src/main/java/org/kie/kogito/examples/LoanPreprocessUnit.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.kie.kogito.examples;
+
+import org.kie.kogito.examples.model.LoanApplication;
+import org.kie.kogito.rules.DataSource;
+import org.kie.kogito.rules.DataStore;
+import org.kie.kogito.rules.RuleUnitData;
+
+public class LoanPreprocessUnit implements RuleUnitData {
+
+ private String division;
+
+ private DataStore loanApplications;
+
+ public LoanPreprocessUnit() {
+ this(DataSource.createStore());
+ }
+
+ public LoanPreprocessUnit(DataStore loanApplications) {
+ this.loanApplications = loanApplications;
+ }
+
+ public DataStore getLoanApplications() {
+ return loanApplications;
+ }
+
+ public void setLoanApplications(DataStore loanApplications) {
+ this.loanApplications = loanApplications;
+ }
+
+ public String getDivision() {
+ return division;
+ }
+
+ public void setDivision(String division) {
+ this.division = division;
+ }
+
+}
diff --git a/multi-ruleunit-quarkus-example/src/main/java/org/kie/kogito/examples/LoanQueryUnit.java b/multi-ruleunit-quarkus-example/src/main/java/org/kie/kogito/examples/LoanQueryUnit.java
new file mode 100644
index 0000000000..c4b6bb51a3
--- /dev/null
+++ b/multi-ruleunit-quarkus-example/src/main/java/org/kie/kogito/examples/LoanQueryUnit.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.kie.kogito.examples;
+
+import org.kie.kogito.examples.model.LoanApplication;
+import org.kie.kogito.rules.DataSource;
+import org.kie.kogito.rules.DataStore;
+import org.kie.kogito.rules.RuleUnitData;
+
+public class LoanQueryUnit implements RuleUnitData {
+
+ private String division;
+
+ private DataStore loanApplications;
+
+ public LoanQueryUnit() {
+ this(DataSource.createStore());
+ }
+
+ public LoanQueryUnit(DataStore loanApplications) {
+ this.loanApplications = loanApplications;
+ }
+
+ public DataStore getLoanApplications() {
+ return loanApplications;
+ }
+
+ public void setLoanApplications(DataStore loanApplications) {
+ this.loanApplications = loanApplications;
+ }
+
+ public String getDivision() {
+ return division;
+ }
+
+ public void setDivision(String division) {
+ this.division = division;
+ }
+
+}
diff --git a/multi-ruleunit-quarkus-example/src/main/java/org/kie/kogito/examples/division/a/LoanDivisionAUnit.java b/multi-ruleunit-quarkus-example/src/main/java/org/kie/kogito/examples/division/a/LoanDivisionAUnit.java
new file mode 100644
index 0000000000..13f98e859c
--- /dev/null
+++ b/multi-ruleunit-quarkus-example/src/main/java/org/kie/kogito/examples/division/a/LoanDivisionAUnit.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.kie.kogito.examples.division.a;
+
+import org.kie.kogito.examples.model.LoanApplication;
+import org.kie.kogito.rules.DataSource;
+import org.kie.kogito.rules.DataStore;
+import org.kie.kogito.rules.RuleUnitData;
+
+public class LoanDivisionAUnit implements RuleUnitData {
+
+ private DataStore loanApplications;
+
+ public LoanDivisionAUnit() {
+ this(DataSource.createStore());
+ }
+
+ public LoanDivisionAUnit(DataStore loanApplications) {
+ this.loanApplications = loanApplications;
+ }
+
+ public DataStore getLoanApplications() {
+ return loanApplications;
+ }
+
+ public void setLoanApplications(DataStore loanApplications) {
+ this.loanApplications = loanApplications;
+ }
+
+}
diff --git a/multi-ruleunit-quarkus-example/src/main/java/org/kie/kogito/examples/division/b/LoanDivisionBUnit.java b/multi-ruleunit-quarkus-example/src/main/java/org/kie/kogito/examples/division/b/LoanDivisionBUnit.java
new file mode 100644
index 0000000000..ad15befa09
--- /dev/null
+++ b/multi-ruleunit-quarkus-example/src/main/java/org/kie/kogito/examples/division/b/LoanDivisionBUnit.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.kie.kogito.examples.division.b;
+
+import org.kie.kogito.examples.model.LoanApplication;
+import org.kie.kogito.rules.DataSource;
+import org.kie.kogito.rules.DataStore;
+import org.kie.kogito.rules.RuleUnitData;
+
+public class LoanDivisionBUnit implements RuleUnitData {
+
+ private DataStore loanApplications;
+
+ public LoanDivisionBUnit() {
+ this(DataSource.createStore());
+ }
+
+ public LoanDivisionBUnit(DataStore loanApplications) {
+ this.loanApplications = loanApplications;
+ }
+
+ public DataStore getLoanApplications() {
+ return loanApplications;
+ }
+
+ public void setLoanApplications(DataStore loanApplications) {
+ this.loanApplications = loanApplications;
+ }
+
+}
diff --git a/multi-ruleunit-quarkus-example/src/main/java/org/kie/kogito/examples/model/Applicant.java b/multi-ruleunit-quarkus-example/src/main/java/org/kie/kogito/examples/model/Applicant.java
new file mode 100644
index 0000000000..df71ce1e84
--- /dev/null
+++ b/multi-ruleunit-quarkus-example/src/main/java/org/kie/kogito/examples/model/Applicant.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.kie.kogito.examples.model;
+
+public class Applicant {
+
+ private String name;
+ private int age;
+
+ public Applicant() {
+ }
+
+ public Applicant(String name, int age) {
+ this.name = name;
+ this.age = age;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public int getAge() {
+ return age;
+ }
+
+ public void setAge(int age) {
+ this.age = age;
+ }
+}
diff --git a/multi-ruleunit-quarkus-example/src/main/java/org/kie/kogito/examples/model/LoanApplication.java b/multi-ruleunit-quarkus-example/src/main/java/org/kie/kogito/examples/model/LoanApplication.java
new file mode 100644
index 0000000000..29603143ff
--- /dev/null
+++ b/multi-ruleunit-quarkus-example/src/main/java/org/kie/kogito/examples/model/LoanApplication.java
@@ -0,0 +1,93 @@
+/*
+ * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.kie.kogito.examples.model;
+
+public class LoanApplication {
+
+ private String id;
+
+ private Applicant applicant;
+
+ private int amount;
+
+ private int deposit;
+
+ private boolean approved = false;
+
+ private boolean completed = false;
+
+ public LoanApplication() {
+ }
+
+ public LoanApplication(String id, Applicant applicant, int amount, int deposit, boolean approved, boolean completed) {
+ super();
+ this.id = id;
+ this.applicant = applicant;
+ this.amount = amount;
+ this.deposit = deposit;
+ this.approved = approved;
+ this.completed = completed;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public Applicant getApplicant() {
+ return applicant;
+ }
+
+ public void setApplicant(Applicant applicant) {
+ this.applicant = applicant;
+ }
+
+ public boolean isApproved() {
+ return approved;
+ }
+
+ public void setApproved(boolean approved) {
+ this.approved = approved;
+ }
+
+ public int getAmount() {
+ return amount;
+ }
+
+ public void setAmount(int amount) {
+ this.amount = amount;
+ }
+
+ public int getDeposit() {
+ return deposit;
+ }
+
+ public void setDeposit(int deposit) {
+ this.deposit = deposit;
+ }
+
+ public boolean isCompleted() {
+ return completed;
+ }
+
+ public void setCompleted(boolean completed) {
+ this.completed = completed;
+ }
+
+}
diff --git a/multi-ruleunit-quarkus-example/src/main/resources/application.properties b/multi-ruleunit-quarkus-example/src/main/resources/application.properties
new file mode 100644
index 0000000000..9557fd6d04
--- /dev/null
+++ b/multi-ruleunit-quarkus-example/src/main/resources/application.properties
@@ -0,0 +1,7 @@
+# Packaging
+# quarkus.package.type=fast-jar
+
+quarkus.swagger-ui.always-include=true
+
+# Maximum Java heap to be used during the native image generation
+quarkus.native.native-image-xmx=4g
diff --git a/multi-ruleunit-quarkus-example/src/main/resources/org/kie/kogito/examples/Preprocess.drl b/multi-ruleunit-quarkus-example/src/main/resources/org/kie/kogito/examples/Preprocess.drl
new file mode 100644
index 0000000000..379e8286a3
--- /dev/null
+++ b/multi-ruleunit-quarkus-example/src/main/resources/org/kie/kogito/examples/Preprocess.drl
@@ -0,0 +1,30 @@
+/**
+ * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.kie.kogito.examples;
+unit LoanPreprocessUnit;
+
+import org.kie.kogito.examples.model.LoanApplication;
+
+rule NotAdultApplication when
+ $l: /loanApplications[ applicant.age < 20 ]
+then
+ modify($l) { setApproved(false), setCompleted(true) };
+end
+
+// more preprocess checks...
+
+
+
diff --git a/multi-ruleunit-quarkus-example/src/main/resources/org/kie/kogito/examples/Query.drl b/multi-ruleunit-quarkus-example/src/main/resources/org/kie/kogito/examples/Query.drl
new file mode 100644
index 0000000000..838ac7a812
--- /dev/null
+++ b/multi-ruleunit-quarkus-example/src/main/resources/org/kie/kogito/examples/Query.drl
@@ -0,0 +1,24 @@
+/**
+ * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.kie.kogito.examples;
+unit LoanQueryUnit;
+
+import org.kie.kogito.examples.model.LoanApplication;
+
+query FindApproved
+ $l: /loanApplications[ approved, completed ]
+end
+
diff --git a/multi-ruleunit-quarkus-example/src/main/resources/org/kie/kogito/examples/division/a/DivisionA.drl b/multi-ruleunit-quarkus-example/src/main/resources/org/kie/kogito/examples/division/a/DivisionA.drl
new file mode 100644
index 0000000000..22f3cc3c01
--- /dev/null
+++ b/multi-ruleunit-quarkus-example/src/main/resources/org/kie/kogito/examples/division/a/DivisionA.drl
@@ -0,0 +1,46 @@
+/**
+ * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.kie.kogito.examples.division.a;
+unit LoanDivisionAUnit;
+
+import org.kie.kogito.examples.model.LoanApplication;
+
+rule SmallDepositApprove when
+ $l: /loanApplications[ applicant.age >= 20, deposit < 1000, amount <= 2000 ]
+then
+ modify($l) { setApproved(true), setCompleted(true) };
+end
+
+rule SmallDepositReject when
+ $l: /loanApplications[ applicant.age >= 20, deposit < 1000, amount > 2000 ]
+then
+ modify($l) { setApproved(false), setCompleted(true) };
+end
+
+rule LargeDepositApprove when
+ $l: /loanApplications[ applicant.age >= 20, deposit >= 1000, amount <= 5000 ]
+then
+ modify($l) { setApproved(true), setCompleted(true) };
+end
+
+rule LargeDepositReject when
+ $l: /loanApplications[ applicant.age >= 20, deposit >= 1000, amount > 5000 ]
+then
+ modify($l) { setApproved(false), setCompleted(true) };
+end
+
+// more rules...
+
diff --git a/multi-ruleunit-quarkus-example/src/main/resources/org/kie/kogito/examples/division/b/DivisionB.drl b/multi-ruleunit-quarkus-example/src/main/resources/org/kie/kogito/examples/division/b/DivisionB.drl
new file mode 100644
index 0000000000..9bb4099026
--- /dev/null
+++ b/multi-ruleunit-quarkus-example/src/main/resources/org/kie/kogito/examples/division/b/DivisionB.drl
@@ -0,0 +1,47 @@
+/**
+ * Copyright 2020 Red Hat, Inc. and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.kie.kogito.examples.division.b;
+unit LoanDivisionBUnit;
+
+import org.kie.kogito.examples.model.LoanApplication;
+
+rule SmallDepositApprove when
+ $l: /loanApplications[ applicant.age >= 20, deposit >= 100, amount <= 10000 ]
+then
+ modify($l) { setApproved(true), setCompleted(true) };
+end
+
+rule SmallDepositReject when
+ $l: /loanApplications[ applicant.age >= 20, deposit >= 100, amount > 10000 ]
+then
+ modify($l) { setApproved(false), setCompleted(true) };
+end
+
+rule LargeDepositApprove when
+ $l: /loanApplications[ applicant.age >= 20, deposit >= 100, amount <= 20000 ]
+then
+ modify($l) { setApproved(true), setCompleted(true) };
+end
+
+rule LargeDepositReject when
+ $l: /loanApplications[ applicant.age >= 20, deposit >= 100, amount > 20000 ]
+then
+ modify($l) { setApproved(false), setCompleted(true) };
+end
+
+// more rules...
+
+
diff --git a/multi-ruleunit-quarkus-example/src/test/java/org/kie/kogito/examples/RestQueryTest.java b/multi-ruleunit-quarkus-example/src/test/java/org/kie/kogito/examples/RestQueryTest.java
new file mode 100644
index 0000000000..c07c8550c3
--- /dev/null
+++ b/multi-ruleunit-quarkus-example/src/test/java/org/kie/kogito/examples/RestQueryTest.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2021 Red Hat, Inc. and/or its affiliates.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.kie.kogito.examples;
+
+import org.junit.jupiter.api.Test;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.http.ContentType;
+
+import static io.restassured.RestAssured.given;
+import static org.hamcrest.Matchers.hasItem;
+import static org.hamcrest.Matchers.hasItems;
+
+@QuarkusTest
+public class RestQueryTest {
+
+ private static final String JSON_PAYLOAD_MAIN =
+ " \"loanApplications\":[\n" +
+ " {\n" +
+ " \"id\":\"ABC10001\",\n" +
+ " \"amount\":2000,\n" +
+ " \"deposit\":100,\n" +
+ " \"applicant\":{\n" +
+ " \"age\":45,\n" +
+ " \"name\":\"John\"\n" +
+ " }\n" +
+ " },\n" +
+ " {\n" +
+ " \"id\":\"ABC10002\",\n" +
+ " \"amount\":5000,\n" +
+ " \"deposit\":100,\n" +
+ " \"applicant\":{\n" +
+ " \"age\":25,\n" +
+ " \"name\":\"Paul\"\n" +
+ " }\n" +
+ " },\n" +
+ " {\n" +
+ " \"id\":\"ABC10015\",\n" +
+ " \"amount\":1000,\n" +
+ " \"deposit\":100,\n" +
+ " \"applicant\":{\n" +
+ " \"age\":12,\n" +
+ " \"name\":\"George\"\n" +
+ " }\n" +
+ " }\n" +
+ " ]\n";
+
+ private static final String JSON_PAYLOAD_A =
+ "{\n" +
+ " \"division\":\"DivisionA\",\n" +
+ JSON_PAYLOAD_MAIN +
+ "}";
+
+ private static final String JSON_PAYLOAD_B =
+ "{\n" +
+ " \"division\":\"DivisionB\",\n" +
+ JSON_PAYLOAD_MAIN +
+ "}";
+
+ @Test
+ public void testApprovedDivisionA() {
+ given()
+ .body(JSON_PAYLOAD_A)
+ .contentType(ContentType.JSON)
+ .when()
+ .post("/custom")
+ .then()
+ .statusCode(200)
+ .body("id", hasItem("ABC10001"));
+ }
+
+ @Test
+ public void testApprovedDivisionB() {
+ given()
+ .body(JSON_PAYLOAD_B)
+ .contentType(ContentType.JSON)
+ .when()
+ .post("/custom")
+ .then()
+ .statusCode(200)
+ .body("id", hasItems("ABC10001", "ABC10002"));
+ }
+}
diff --git a/multi-ruleunit-quarkus-example/src/test/resources/application.properties b/multi-ruleunit-quarkus-example/src/test/resources/application.properties
new file mode 100644
index 0000000000..8c5dc5bd35
--- /dev/null
+++ b/multi-ruleunit-quarkus-example/src/test/resources/application.properties
@@ -0,0 +1,5 @@
+# Quarkus
+quarkus.http.test-port=0
+
+# Maximum Java heap to be used during the native image generation
+quarkus.native.native-image-xmx=4g